simple-carla 2.3.2__py2.py3-none-any.whl → 2.4.0__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- simple_carla/__init__.py +2 -2
- simple_carla/plugin_dialog.py +2 -2
- simple_carla/qt.py +1 -1
- simple_carla/scripts/sc_plugin_info.py +122 -0
- {simple_carla-2.3.2.dist-info → simple_carla-2.4.0.dist-info}/METADATA +2 -3
- simple_carla-2.4.0.dist-info/RECORD +11 -0
- {simple_carla-2.3.2.dist-info → simple_carla-2.4.0.dist-info}/WHEEL +1 -1
- {simple_carla-2.3.2.dist-info → simple_carla-2.4.0.dist-info}/entry_points.txt +1 -0
- simple_carla-2.3.2.dist-info/RECORD +0 -10
- {simple_carla-2.3.2.dist-info/licenses → simple_carla-2.4.0.dist-info}/LICENSE +0 -0
simple_carla/__init__.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# simple_carla/__init__.py
|
2
2
|
#
|
3
|
-
# Copyright 2024
|
3
|
+
# Copyright 2024 Leon Dionne <ldionne@dridesign.sh.cn>
|
4
4
|
#
|
5
5
|
# This program is free software; you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU General Public License as published by
|
@@ -240,7 +240,7 @@ from carla_backend import (
|
|
240
240
|
)
|
241
241
|
|
242
242
|
|
243
|
-
__version__ = "2.
|
243
|
+
__version__ = "2.4.0"
|
244
244
|
|
245
245
|
|
246
246
|
# -------------------------------------------------------------------
|
simple_carla/plugin_dialog.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# simple_carla/plugin_dialog.py
|
2
2
|
#
|
3
|
-
# Copyright 2024
|
3
|
+
# Copyright 2024 Leon Dionne <ldionne@dridesign.sh.cn>
|
4
4
|
#
|
5
5
|
"""
|
6
6
|
Provides a means to use Carla's plugin dialog to compile a plugin's
|
@@ -18,7 +18,7 @@ class CarlaPluginDialog():
|
|
18
18
|
"""
|
19
19
|
Wrapper for Carla's native plugin selection dialog.
|
20
20
|
This is a singleton class. You may call the constructor repatedly, and it will
|
21
|
-
|
21
|
+
use the same instance for the life of the program.
|
22
22
|
"""
|
23
23
|
_instance = None
|
24
24
|
_carla_felib = None
|
simple_carla/qt.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# simple_carla/qt.py
|
2
2
|
#
|
3
|
-
# Copyright 2024
|
3
|
+
# Copyright 2024 Leon Dionne <ldionne@dridesign.sh.cn>
|
4
4
|
#
|
5
5
|
# This program is free software; you can redistribute it and/or modify
|
6
6
|
# it under the terms of the GNU General Public License as published by
|
@@ -0,0 +1,122 @@
|
|
1
|
+
# simple_carla/scripts/sc_plugin_info.py
|
2
|
+
#
|
3
|
+
# Copyright 2025 Leon Dionne <ldionne@dridesign.sh.cn>
|
4
|
+
#
|
5
|
+
# This program is free software; you can redistribute it and/or modify
|
6
|
+
# it under the terms of the GNU General Public License as published by
|
7
|
+
# the Free Software Foundation; either version 2 of the License, or
|
8
|
+
# (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
# GNU General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU General Public License
|
16
|
+
# along with this program; if not, write to the Free Software
|
17
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
18
|
+
# MA 02110-1301, USA.
|
19
|
+
#
|
20
|
+
"""
|
21
|
+
Allows the user to select a plugin using Carla's plugin dialog and display a
|
22
|
+
bunch of info about the plugin in a human -readable format.
|
23
|
+
"""
|
24
|
+
import argparse, logging
|
25
|
+
from threading import Event
|
26
|
+
from PyQt5.QtWidgets import QApplication, QMainWindow
|
27
|
+
from PyQt5.QtCore import Qt, pyqtSlot
|
28
|
+
from simple_carla.qt import CarlaQt, QtPlugin, Plugin
|
29
|
+
from simple_carla.plugin_dialog import CarlaPluginDialog
|
30
|
+
|
31
|
+
|
32
|
+
class MainWindow(QMainWindow):
|
33
|
+
|
34
|
+
def __init__(self):
|
35
|
+
super().__init__()
|
36
|
+
self.ready_event = Event()
|
37
|
+
self.carla = CarlaQt('carla')
|
38
|
+
self.carla.sig_engine_started.connect(self.slot_engine_started)
|
39
|
+
if not self.carla.engine_init():
|
40
|
+
audio_error = self.carla.get_last_error()
|
41
|
+
if audio_error:
|
42
|
+
raise RuntimeError(f'Could not start carla; possible reasons:\n{audio_error}')
|
43
|
+
raise RuntimeError('Could not start carla')
|
44
|
+
|
45
|
+
@pyqtSlot(int, int, int, int, float, str)
|
46
|
+
def slot_engine_started(self, *_):
|
47
|
+
logging.debug('======= Engine started ======== ')
|
48
|
+
self.ready_event.set()
|
49
|
+
|
50
|
+
def show_dialog(self):
|
51
|
+
self.ready_event.wait()
|
52
|
+
plugin_def = CarlaPluginDialog(self).exec_dialog()
|
53
|
+
if plugin_def is None:
|
54
|
+
self.close()
|
55
|
+
else:
|
56
|
+
plugin = QtPlugin(plugin_def)
|
57
|
+
plugin.sig_ready.connect(self.plugin_ready, type = Qt.QueuedConnection)
|
58
|
+
plugin.add_to_carla()
|
59
|
+
|
60
|
+
@pyqtSlot(Plugin)
|
61
|
+
def plugin_ready(self, plugin):
|
62
|
+
logging.debug('Received sig_ready from %s', plugin)
|
63
|
+
print(f"""
|
64
|
+
Plugin Name: {plugin.original_plugin_name}
|
65
|
+
Audio Inputs: {plugin.audio_in_count}
|
66
|
+
Audio Outputs: {plugin.audio_out_count}
|
67
|
+
MIDI Inputs: {plugin.midi_in_count}
|
68
|
+
MIDI Outputs: {plugin.midi_out_count}
|
69
|
+
Input Parameters: {plugin.input_parameter_count}
|
70
|
+
Output Parameters: {plugin.output_parameter_count}
|
71
|
+
Maker: {plugin.maker}
|
72
|
+
Category: {plugin.category}
|
73
|
+
Label: {plugin.label}
|
74
|
+
Filename: {plugin.filename}""")
|
75
|
+
for param in plugin.parameters.values():
|
76
|
+
type_name = 'Boolean' if param.is_boolean \
|
77
|
+
else 'Integer' if param.is_integer \
|
78
|
+
else 'Float'
|
79
|
+
|
80
|
+
print(f"""
|
81
|
+
Parameter: {param.name}
|
82
|
+
Symbol: {param.symbol}
|
83
|
+
Comment: {param.comment}
|
84
|
+
Group Name: {param.groupName}
|
85
|
+
Unit: {param.unit}
|
86
|
+
Enabled: {param.is_enabled}
|
87
|
+
Type: {type_name}
|
88
|
+
Min: {param.min}
|
89
|
+
Max: {param.max}
|
90
|
+
Step: {param.step}
|
91
|
+
Automatable: {param.is_automatable}
|
92
|
+
Read only: {param.is_read_only}
|
93
|
+
Uses samplerate: {param.uses_samplerate}
|
94
|
+
Uses scalepoints: {param.uses_scalepoints}
|
95
|
+
Scale point count: {param.scalePointCount}
|
96
|
+
Uses custom text: {param.uses_custom_text}
|
97
|
+
Can be CV controlled: {param.can_be_cv_controlled}""")
|
98
|
+
self.carla.delete()
|
99
|
+
QApplication.instance().quit()
|
100
|
+
|
101
|
+
|
102
|
+
def main():
|
103
|
+
p = argparse.ArgumentParser()
|
104
|
+
p.epilog = __doc__
|
105
|
+
p.add_argument("--verbose", "-v", action="store_true",
|
106
|
+
help="Show detailed debug information")
|
107
|
+
options = p.parse_args()
|
108
|
+
logging.basicConfig(
|
109
|
+
level = logging.DEBUG if options.verbose else logging.ERROR,
|
110
|
+
format = "[%(filename)24s:%(lineno)-4d] %(levelname)-8s %(message)s"
|
111
|
+
)
|
112
|
+
app = QApplication([])
|
113
|
+
window = MainWindow()
|
114
|
+
window.show_dialog()
|
115
|
+
app.exec()
|
116
|
+
|
117
|
+
|
118
|
+
if __name__ == "__main__":
|
119
|
+
main()
|
120
|
+
|
121
|
+
|
122
|
+
# end simple_carla/scripts/sc_plugin_info.py
|
@@ -1,11 +1,10 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.1
|
2
2
|
Name: simple_carla
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.4.0
|
4
4
|
Summary: An easy-to-use, object-oriented interface to the carla plugin host.
|
5
5
|
Author-email: Leon Dionne <ldionne@dridesign.sh.cn>
|
6
6
|
Description-Content-Type: text/markdown
|
7
7
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
8
|
-
License-File: LICENSE
|
9
8
|
Requires-Dist: numpy
|
10
9
|
Requires-Dist: log_soso
|
11
10
|
Requires-Dist: PyQt5
|
@@ -0,0 +1,11 @@
|
|
1
|
+
simple_carla/__init__.py,sha256=-TtDda_WOh5ffsq8EpjqSMnZ3L8F82xtqHfNUfFj5gI,111188
|
2
|
+
simple_carla/plugin_dialog.py,sha256=XPlskS2SWyTqiuW4po6QsMyk3Z-XpVvJAfN27ZpkqtI,1512
|
3
|
+
simple_carla/qt.py,sha256=kFM4GPMWOWb6d2-zjPLLF_IrLEgyCbedmuvXjK6Fqho,15649
|
4
|
+
simple_carla/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
|
+
simple_carla/scripts/sc_plugin_def.py,sha256=CVseichHuDCmGeD8v7CfHweeyHHXI60-RcvzU8OILqo,2214
|
6
|
+
simple_carla/scripts/sc_plugin_info.py,sha256=94VQTTgxiXfCIoK_LQhpgyZL1iQxAsoKEdTj9H8Ktq0,4144
|
7
|
+
simple_carla-2.4.0.dist-info/entry_points.txt,sha256=nBXzsLu8yX5vIBkcY4JbVN4XsJOh3DF4v1WxP9Wrb8Y,129
|
8
|
+
simple_carla-2.4.0.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
|
9
|
+
simple_carla-2.4.0.dist-info/WHEEL,sha256=j3d_2VkBU36k09xOc4O9RZyJJ8uFqn4BR2AtKD7MOp8,99
|
10
|
+
simple_carla-2.4.0.dist-info/METADATA,sha256=rg7XaU8XK5fF-7l8I9nMAcUnUNSaKxnRG--qdA2UITY,1717
|
11
|
+
simple_carla-2.4.0.dist-info/RECORD,,
|
@@ -1,10 +0,0 @@
|
|
1
|
-
simple_carla/__init__.py,sha256=vnaDXh1Rsfb0QCWbImKtXyB9UgHjT8n25UdWdZP6Big,111175
|
2
|
-
simple_carla/plugin_dialog.py,sha256=uof7YSqVEjgUrWqF-bo76hegsecIOtu6aZr03kdNrKQ,1498
|
3
|
-
simple_carla/qt.py,sha256=8J56Zagbh9ip_HGkhqcNQR36JC8YrUsR4H0QIlhPWIA,15636
|
4
|
-
simple_carla/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
|
-
simple_carla/scripts/sc_plugin_def.py,sha256=CVseichHuDCmGeD8v7CfHweeyHHXI60-RcvzU8OILqo,2214
|
6
|
-
simple_carla-2.3.2.dist-info/entry_points.txt,sha256=oqJRVQXTCIUOmspGNnqDWq9mhz397uoRMQQOhBFbIcs,73
|
7
|
-
simple_carla-2.3.2.dist-info/licenses/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
|
8
|
-
simple_carla-2.3.2.dist-info/WHEEL,sha256=Dyt6SBfaasWElUrURkknVFAZDHSTwxg3PaTza7RSbkY,100
|
9
|
-
simple_carla-2.3.2.dist-info/METADATA,sha256=TmpI6h38JlwUxsuifu9GrNbuBO5z7iXfp6ZGB9UnuMU,1739
|
10
|
-
simple_carla-2.3.2.dist-info/RECORD,,
|
File without changes
|