simple-carla 2.3.3__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 CHANGED
@@ -240,7 +240,7 @@ from carla_backend import (
240
240
  )
241
241
 
242
242
 
243
- __version__ = "2.3.3"
243
+ __version__ = "2.4.0"
244
244
 
245
245
 
246
246
  # -------------------------------------------------------------------
@@ -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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: simple_carla
3
- Version: 2.3.3
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
@@ -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,3 +1,4 @@
1
1
  [console_scripts]
2
2
  sc-plugin-def=simple_carla.scripts.sc_plugin_def:main
3
+ sc-plugin-info=simple_carla.scripts.sc_plugin_info:main
3
4
 
@@ -1,10 +0,0 @@
1
- simple_carla/__init__.py,sha256=sN0PZ45zL3Z6er6P5SFlqeFeqdNdPrG9Z-lGmbDGB54,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-2.3.3.dist-info/entry_points.txt,sha256=oqJRVQXTCIUOmspGNnqDWq9mhz397uoRMQQOhBFbIcs,73
7
- simple_carla-2.3.3.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
8
- simple_carla-2.3.3.dist-info/WHEEL,sha256=j3d_2VkBU36k09xOc4O9RZyJJ8uFqn4BR2AtKD7MOp8,99
9
- simple_carla-2.3.3.dist-info/METADATA,sha256=15c1DnL67V96NLF_9WrhysyTu7omFnTRigGZoOppgFE,1717
10
- simple_carla-2.3.3.dist-info/RECORD,,