simple-carla 2.3.3__tar.gz → 2.5.0__tar.gz
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-2.3.3 → simple_carla-2.5.0}/PKG-INFO +1 -2
- {simple_carla-2.3.3 → simple_carla-2.5.0}/pyproject.toml +3 -2
- {simple_carla-2.3.3 → simple_carla-2.5.0}/simple_carla/__init__.py +2 -2
- {simple_carla-2.3.3 → simple_carla-2.5.0}/simple_carla/qt.py +0 -1
- simple_carla-2.5.0/simple_carla/scripts/sc_plugin_info.py +122 -0
- {simple_carla-2.3.3 → simple_carla-2.5.0}/tests/carla.py +2 -3
- {simple_carla-2.3.3 → simple_carla-2.5.0}/.gitignore +0 -0
- {simple_carla-2.3.3 → simple_carla-2.5.0}/LICENSE +0 -0
- {simple_carla-2.3.3 → simple_carla-2.5.0}/README.md +0 -0
- {simple_carla-2.3.3 → simple_carla-2.5.0}/simple_carla/plugin_dialog.py +0 -0
- {simple_carla-2.3.3 → simple_carla-2.5.0}/simple_carla/scripts/__init__.py +0 -0
- {simple_carla-2.3.3 → simple_carla-2.5.0}/simple_carla/scripts/sc_plugin_def.py +0 -0
- {simple_carla-2.3.3 → simple_carla-2.5.0}/tests/qt_carla.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: simple_carla
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.5.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
|
@@ -8,7 +8,6 @@ Classifier: License :: OSI Approved :: GNU General Public License v3 or later (G
|
|
8
8
|
Requires-Dist: numpy
|
9
9
|
Requires-Dist: log_soso
|
10
10
|
Requires-Dist: PyQt5
|
11
|
-
Requires-Dist: soso_qt_extras >= 1.2.0
|
12
11
|
Project-URL: Home, https://github.com/Zen-Master-SoSo/simple_carla
|
13
12
|
|
14
13
|
# simple_carla
|
@@ -5,7 +5,7 @@ readme = "README.md"
|
|
5
5
|
license = {file = "LICENSE"}
|
6
6
|
classifiers = ["License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)"]
|
7
7
|
dynamic = ["version", "description"]
|
8
|
-
dependencies = ["numpy", "log_soso", "PyQt5"
|
8
|
+
dependencies = ["numpy", "log_soso", "PyQt5"]
|
9
9
|
|
10
10
|
[project.urls]
|
11
11
|
Home = "https://github.com/Zen-Master-SoSo/simple_carla"
|
@@ -16,9 +16,10 @@ build-backend = "flit_core.buildapi"
|
|
16
16
|
|
17
17
|
[project.scripts]
|
18
18
|
sc-plugin-def = "simple_carla.scripts.sc_plugin_def:main"
|
19
|
+
sc-plugin-info = "simple_carla.scripts.sc_plugin_info:main"
|
19
20
|
|
20
21
|
[bumpver]
|
21
|
-
current_version = "2.
|
22
|
+
current_version = "2.5.0"
|
22
23
|
version_pattern = "MAJOR.MINOR.PATCH"
|
23
24
|
commit_message = "Bump version {old_version} -> {new_version}"
|
24
25
|
commit = true
|
@@ -240,7 +240,7 @@ from carla_backend import (
|
|
240
240
|
)
|
241
241
|
|
242
242
|
|
243
|
-
__version__ = "2.
|
243
|
+
__version__ = "2.5.0"
|
244
244
|
|
245
245
|
|
246
246
|
# -------------------------------------------------------------------
|
@@ -2712,7 +2712,7 @@ class Plugin(PatchbayClient):
|
|
2712
2712
|
_cb_ready = None
|
2713
2713
|
_cb_removed = None
|
2714
2714
|
|
2715
|
-
_save_state_keys = [ '
|
2715
|
+
_save_state_keys = [ 'moniker',
|
2716
2716
|
'active', 'volume', 'dry_wet', 'panning', 'balance_left', 'balance_right',
|
2717
2717
|
'prefer_generic_dialog', 'send_all_sound_off', 'send_channel_pressure', 'send_control_changes',
|
2718
2718
|
'send_note_aftertouch', 'send_pitchbend', 'send_program_changes', 'skip_sending_notes', 'force_stereo' ]
|
@@ -21,7 +21,6 @@
|
|
21
21
|
Qt -enabled classes which utilize signals rather than callbacks.
|
22
22
|
"""
|
23
23
|
import logging, traceback, os, sys
|
24
|
-
import qt_extras.autofit
|
25
24
|
from PyQt5.QtCore import QObject, pyqtSignal
|
26
25
|
from simple_carla import _SimpleCarla, Plugin, Parameter, \
|
27
26
|
PatchbayClient, PatchbayPort, PatchbayConnection
|
@@ -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
|
@@ -4,7 +4,6 @@
|
|
4
4
|
#
|
5
5
|
import logging
|
6
6
|
from time import sleep
|
7
|
-
from PyQt5.QtCore import QCoreApplication
|
8
7
|
from simple_carla import Carla, Plugin
|
9
8
|
|
10
9
|
APPLICATION_NAME = 'simple_carla'
|
@@ -21,9 +20,9 @@ class TestApp:
|
|
21
20
|
if not carla.engine_init():
|
22
21
|
audio_error = carla.get_last_error()
|
23
22
|
if audio_error:
|
24
|
-
raise
|
23
|
+
raise RuntimeError("Could not start carla; possible reasons:\n%s" % audio_error)
|
25
24
|
else:
|
26
|
-
raise
|
25
|
+
raise RuntimeError('Could not start carla')
|
27
26
|
|
28
27
|
def carla_started(self, *_):
|
29
28
|
logging.debug('======= Engine started ======== ')
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|