simple-carla 1.5.0__py2.py3-none-any.whl → 2.0.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 +121 -73
- simple_carla/qt.py +54 -11
- {simple_carla-1.5.0.dist-info → simple_carla-2.0.0.dist-info}/METADATA +1 -1
- simple_carla-2.0.0.dist-info/RECORD +10 -0
- simple_carla-1.5.0.dist-info/RECORD +0 -10
- {simple_carla-1.5.0.dist-info → simple_carla-2.0.0.dist-info}/LICENSE +0 -0
- {simple_carla-1.5.0.dist-info → simple_carla-2.0.0.dist-info}/WHEEL +0 -0
- {simple_carla-1.5.0.dist-info → simple_carla-2.0.0.dist-info}/entry_points.txt +0 -0
simple_carla/__init__.py
CHANGED
@@ -22,7 +22,7 @@ An easy-to-use, object-oriented interface to the carla plugin host.
|
|
22
22
|
"""
|
23
23
|
import os, sys, threading, time, logging, traceback
|
24
24
|
from ctypes import byref, cast, c_char_p, c_void_p, POINTER
|
25
|
-
from functools import wraps
|
25
|
+
from functools import wraps, cached_property
|
26
26
|
from struct import pack
|
27
27
|
from numpy import zeros as np_zeros
|
28
28
|
from log_soso import StreamToLogger
|
@@ -234,7 +234,7 @@ from carla_backend import (
|
|
234
234
|
)
|
235
235
|
|
236
236
|
|
237
|
-
__version__ = "
|
237
|
+
__version__ = "2.0.0"
|
238
238
|
|
239
239
|
|
240
240
|
# -------------------------------------------------------------------
|
@@ -1280,14 +1280,15 @@ class _SimpleCarla(CarlaHostDLL):
|
|
1280
1280
|
the "_plugins" dict.
|
1281
1281
|
"""
|
1282
1282
|
if plugin_id in self._plugins:
|
1283
|
-
logging.
|
1284
|
-
logging.
|
1283
|
+
logging.error('cb_plugin_added: Cannot add plugin %s', plugin_id)
|
1284
|
+
logging.error('"%s" - plugin %s already in _plugins"', carla_plugin_name, self._plugins[plugin_id])
|
1285
1285
|
return
|
1286
1286
|
if carla_plugin_name in self._plugin_by_uuid:
|
1287
1287
|
self._plugins[plugin_id] = self._plugin_by_uuid[carla_plugin_name]
|
1288
1288
|
self._plugins[plugin_id].post_embed_init(plugin_id) # Set up parameters, etc.
|
1289
1289
|
else:
|
1290
|
-
logging.
|
1290
|
+
logging.error('cb_plugin_added: Plugin "%s" not found in _plugin_by_uuid when added',
|
1291
|
+
carla_plugin_name)
|
1291
1292
|
|
1292
1293
|
def cb_plugin_removed(self, plugin_id):
|
1293
1294
|
if plugin_id in self._plugins:
|
@@ -1295,7 +1296,8 @@ class _SimpleCarla(CarlaHostDLL):
|
|
1295
1296
|
if plugin.uuid in self._plugin_by_uuid:
|
1296
1297
|
del self._plugin_by_uuid[plugin.uuid]
|
1297
1298
|
else:
|
1298
|
-
logging.
|
1299
|
+
logging.error('cb_plugin_removed: "%s" uuid %s not in self._plugin_by_uuid',
|
1300
|
+
plugin, plugin.uuid)
|
1299
1301
|
self._alert_plugin_removed(plugin)
|
1300
1302
|
# Renumber plugins per Carla plugin_id conventions:
|
1301
1303
|
for i in range(plugin_id, len(self._plugins) - 1):
|
@@ -1306,7 +1308,7 @@ class _SimpleCarla(CarlaHostDLL):
|
|
1306
1308
|
if self.is_clear():
|
1307
1309
|
self._alert_last_plugin_removed()
|
1308
1310
|
else:
|
1309
|
-
logging.
|
1311
|
+
logging.error('cb_plugin_removed: Plugin removed (%d) not in _plugins', plugin_id)
|
1310
1312
|
|
1311
1313
|
def cb_plugin_renamed(self, plugin_id, new_name):
|
1312
1314
|
self._plugins[plugin_id].plugin_renamed(new_name)
|
@@ -1316,34 +1318,10 @@ class _SimpleCarla(CarlaHostDLL):
|
|
1316
1318
|
|
1317
1319
|
def cb_parameter_value_changed(self, plugin_id, index, value):
|
1318
1320
|
if plugin_id in self._plugins:
|
1319
|
-
|
1320
|
-
if index == PARAMETER_NULL:
|
1321
|
-
return
|
1322
|
-
elif index == PARAMETER_ACTIVE:
|
1323
|
-
plugin.active = value != 0
|
1324
|
-
elif index == PARAMETER_DRYWET:
|
1325
|
-
plugin.dry_wet = value
|
1326
|
-
elif index == PARAMETER_VOLUME:
|
1327
|
-
plugin.volume = value
|
1328
|
-
elif index == PARAMETER_BALANCE_LEFT:
|
1329
|
-
plugin.balance_left = value
|
1330
|
-
elif index == PARAMETER_BALANCE_RIGHT:
|
1331
|
-
plugin.balance_right = value
|
1332
|
-
elif index == PARAMETER_PANNING:
|
1333
|
-
plugin.panning = value
|
1334
|
-
elif index == PARAMETER_CTRL_CHANNEL:
|
1335
|
-
plugin.ctrl_channel = value
|
1336
|
-
elif index == PARAMETER_MAX:
|
1337
|
-
return
|
1338
|
-
else:
|
1339
|
-
if index in plugin.parameters:
|
1340
|
-
parameter = plugin.parameters[index]
|
1341
|
-
parameter.internal_value_changed(value)
|
1342
|
-
plugin.parameter_internal_value_changed(parameter, value)
|
1343
|
-
else:
|
1344
|
-
logging.error('Parameter index not in plugin.parameters')
|
1321
|
+
self._plugins[plugin_id].internal_value_changed(index, value)
|
1345
1322
|
else:
|
1346
|
-
logging.
|
1323
|
+
logging.error('cb_parameter_value_changed: plugin_id %s not in self._plugins',
|
1324
|
+
plugin_id)
|
1347
1325
|
|
1348
1326
|
def cb_parameter_default_changed(self, plugin_id, index, value):
|
1349
1327
|
self._plugins[plugin_id].parameter_default_changed(index, value)
|
@@ -1412,7 +1390,7 @@ class _SimpleCarla(CarlaHostDLL):
|
|
1412
1390
|
use "on_client_added".
|
1413
1391
|
"""
|
1414
1392
|
if client_id in self._clients:
|
1415
|
-
return logging.
|
1393
|
+
return logging.error('cb_patchbay_client_added: "%s" already in _clients as "%s"',
|
1416
1394
|
self._clients[client_id], client_name)
|
1417
1395
|
plugin_uuid = client_name.rsplit("/")[-1]
|
1418
1396
|
if plugin_uuid in self._plugin_by_uuid:
|
@@ -1443,7 +1421,8 @@ class _SimpleCarla(CarlaHostDLL):
|
|
1443
1421
|
del self._sys_clients[client.client_name]
|
1444
1422
|
del self._clients[client_id]
|
1445
1423
|
else:
|
1446
|
-
logging.
|
1424
|
+
logging.error('cb_patchbay_client_removed: Client removed (%s) not in _clients',
|
1425
|
+
client_id)
|
1447
1426
|
|
1448
1427
|
def cb_patchbay_client_renamed(self, client_id, new_client_name):
|
1449
1428
|
logging.debug('cb_patchbay_client_renamed: "%s" new name: "%s"',
|
@@ -1465,14 +1444,14 @@ class _SimpleCarla(CarlaHostDLL):
|
|
1465
1444
|
self._clients[client_id].port_added(port_id, port_flags, group_id, port_name)
|
1466
1445
|
self._alert_port_added(self._clients[client_id].ports[port_id])
|
1467
1446
|
else:
|
1468
|
-
logging.
|
1447
|
+
logging.error('cb_patchbay_port_added: client %s not in _clients', client_id)
|
1469
1448
|
|
1470
1449
|
def cb_patchbay_port_removed(self, client_id, port_id):
|
1471
1450
|
if client_id in self._clients:
|
1472
1451
|
self._alert_port_removed(self._clients[client_id].ports[port_id])
|
1473
1452
|
self._clients[client_id].port_removed(port_id)
|
1474
1453
|
else:
|
1475
|
-
logging.
|
1454
|
+
logging.error('cb_patchbay_port_removed: client %s not in _clients', client_id)
|
1476
1455
|
|
1477
1456
|
def cb_patchbay_port_changed(self, client_id, port_id, port_flags, group_id, new_port_name):
|
1478
1457
|
logging.debug('cb_patchbay_port_changed: client_id %s port_id %s group_id %s new_port_name %s',
|
@@ -1519,7 +1498,7 @@ class _SimpleCarla(CarlaHostDLL):
|
|
1519
1498
|
self._alert_connection_removed(connection)
|
1520
1499
|
del self._connections[connection_id]
|
1521
1500
|
else:
|
1522
|
-
logging.
|
1501
|
+
logging.error('cb_patchbay_connection_removed: Connection %s not in ._connections',
|
1523
1502
|
connection_id)
|
1524
1503
|
|
1525
1504
|
# ================================================================================
|
@@ -2562,26 +2541,25 @@ class PatchbayPort:
|
|
2562
2541
|
for conn in self._connections.values():
|
2563
2542
|
conn.disconnect()
|
2564
2543
|
|
2544
|
+
@cached_property
|
2565
2545
|
def client(self):
|
2566
2546
|
"""
|
2567
2547
|
Returns PatchbayClient.
|
2568
2548
|
(May return class extending PatchbayClient, i.e. SystemPatchbayClient / Plugin)
|
2569
2549
|
"""
|
2570
|
-
# TODO: Make this a cached property
|
2571
2550
|
return Carla.instance.client(self.client_id)
|
2572
2551
|
|
2573
2552
|
def client_name(self):
|
2574
2553
|
"""
|
2575
2554
|
Returns (str) the JACK client name of the PatchbayClient which "owns" this PatchbayPort.
|
2576
2555
|
"""
|
2577
|
-
|
2578
|
-
return self.client().client_name
|
2556
|
+
return self.client.client_name
|
2579
2557
|
|
2580
2558
|
def jack_name(self):
|
2581
2559
|
"""
|
2582
2560
|
Returns (str) fully qualified name in the format that JACK uses.
|
2583
2561
|
"""
|
2584
|
-
return "{0}:{1}".format(self.client
|
2562
|
+
return "{0}:{1}".format(self.client.client_name, self.port_name)
|
2585
2563
|
|
2586
2564
|
def connections(self):
|
2587
2565
|
"""
|
@@ -2627,25 +2605,13 @@ class PatchbayPort:
|
|
2627
2605
|
Returns list of PatchbayClient
|
2628
2606
|
(May return class extending PatchbayClient, i.e. SystemPatchbayClient / Plugin)
|
2629
2607
|
"""
|
2630
|
-
return [ port.client
|
2631
|
-
|
2632
|
-
def encode_saved_state(self):
|
2633
|
-
"""
|
2634
|
-
Returns a dict which is encoded to JSON when saving a project.
|
2635
|
-
"""
|
2636
|
-
client = self.client()
|
2637
|
-
return {
|
2638
|
-
"system" : isinstance(client, SystemPatchbayClient),
|
2639
|
-
"moniker" : f"{client.moniker}:{self.port_name}",
|
2640
|
-
"client" : client.client_name if isinstance(client, SystemPatchbayClient) else client.uuid,
|
2641
|
-
"port" : self.port_name
|
2642
|
-
}
|
2608
|
+
return [ port.client for port in self.connected_ports() ]
|
2643
2609
|
|
2644
2610
|
def __str__(self):
|
2645
2611
|
return '<{0} {1} "{2}:{3}">'.format(
|
2646
2612
|
("Audio" if self.is_audio else "MIDI" if self.is_midi else "CV"),
|
2647
2613
|
("input" if self.is_input else "output"),
|
2648
|
-
self.client
|
2614
|
+
self.client.moniker, self.port_name
|
2649
2615
|
)
|
2650
2616
|
|
2651
2617
|
|
@@ -2681,11 +2647,9 @@ class PatchbayConnection:
|
|
2681
2647
|
return f'<PatchbayConnection {self.connection_id} {self.out_port} to {self.in_port}>'
|
2682
2648
|
|
2683
2649
|
|
2684
|
-
|
2685
2650
|
# -------------------------------------------------------------------
|
2686
2651
|
# Plugins:
|
2687
2652
|
|
2688
|
-
|
2689
2653
|
class Plugin(PatchbayClient):
|
2690
2654
|
"""
|
2691
2655
|
An abstraction of a carla plugin.
|
@@ -2724,6 +2688,8 @@ class Plugin(PatchbayClient):
|
|
2724
2688
|
super().__init__()
|
2725
2689
|
self.saved_state = saved_state
|
2726
2690
|
self.original_plugin_name = self.plugin_def['name']
|
2691
|
+
self.client_id = None # Assigned by carla
|
2692
|
+
self.client_name = None # Assigned by carla
|
2727
2693
|
self.plugin_id = None
|
2728
2694
|
self.moniker = None
|
2729
2695
|
self.ports_ready = False
|
@@ -2880,7 +2846,6 @@ class Plugin(PatchbayClient):
|
|
2880
2846
|
Called after post_embed_init() and all ports ready.
|
2881
2847
|
You can check the state of this plugin using the "Plugin.is_ready" property.
|
2882
2848
|
"""
|
2883
|
-
logging.debug('%s ready', self)
|
2884
2849
|
if self._cb_ready is not None:
|
2885
2850
|
self._cb_ready()
|
2886
2851
|
|
@@ -2972,6 +2937,27 @@ class Plugin(PatchbayClient):
|
|
2972
2937
|
"""
|
2973
2938
|
return len(self.output_parameters())
|
2974
2939
|
|
2940
|
+
@property
|
2941
|
+
def peak_mono(self):
|
2942
|
+
"""
|
2943
|
+
Returns (float) an estimated volume peak for mono plugins
|
2944
|
+
"""
|
2945
|
+
return Carla.instance.get_input_peak_value(self.plugin_id, True)
|
2946
|
+
|
2947
|
+
@property
|
2948
|
+
def peak_left(self):
|
2949
|
+
"""
|
2950
|
+
Returns (float) an estimated volume peak for the left channel
|
2951
|
+
"""
|
2952
|
+
return Carla.instance.get_input_peak_value(self.plugin_id, True)
|
2953
|
+
|
2954
|
+
@property
|
2955
|
+
def peak_right(self):
|
2956
|
+
"""
|
2957
|
+
Returns (float) an estimated volume peak for the left channel
|
2958
|
+
"""
|
2959
|
+
return Carla.instance.get_input_peak_value(self.plugin_id, False)
|
2960
|
+
|
2975
2961
|
def input_parameters(self):
|
2976
2962
|
"""
|
2977
2963
|
Returns a list of Parameter objects.
|
@@ -2988,16 +2974,6 @@ class Plugin(PatchbayClient):
|
|
2988
2974
|
return '<{0} "{1}" (uuid {2}, client_id {3})>'.format(
|
2989
2975
|
type(self).__name__, self.moniker, self.uuid, self.client_id)
|
2990
2976
|
|
2991
|
-
def idle_fast(self):
|
2992
|
-
"""
|
2993
|
-
Function which is called at a regular interval by client applications
|
2994
|
-
Although this function is not used anywhere in this package, it is included for
|
2995
|
-
your convenience.
|
2996
|
-
Use it like so:
|
2997
|
-
for plugin in Carla.instance.plugins():
|
2998
|
-
plugin.idle_fast()
|
2999
|
-
"""
|
3000
|
-
|
3001
2977
|
# -------------------------------------------------------------------
|
3002
2978
|
# Functions called from Carla engine callbacks:
|
3003
2979
|
|
@@ -3030,6 +3006,34 @@ class Plugin(PatchbayClient):
|
|
3030
3006
|
if self._cb_removed is not None:
|
3031
3007
|
self._cb_removed()
|
3032
3008
|
|
3009
|
+
def internal_value_changed(self, index, value):
|
3010
|
+
if index == PARAMETER_NULL:
|
3011
|
+
return
|
3012
|
+
elif index == PARAMETER_ACTIVE:
|
3013
|
+
self.active_changed(bool(value))
|
3014
|
+
elif index == PARAMETER_DRYWET:
|
3015
|
+
self.dry_wet_changed(value)
|
3016
|
+
elif index == PARAMETER_VOLUME:
|
3017
|
+
self.volume_changed(value)
|
3018
|
+
elif index == PARAMETER_BALANCE_LEFT:
|
3019
|
+
self.balance_left_changed(value)
|
3020
|
+
elif index == PARAMETER_BALANCE_RIGHT:
|
3021
|
+
self.balance_right_changed(value)
|
3022
|
+
elif index == PARAMETER_PANNING:
|
3023
|
+
self.panning_changed(value)
|
3024
|
+
elif index == PARAMETER_CTRL_CHANNEL:
|
3025
|
+
self.ctrl_channel_changed(value)
|
3026
|
+
elif index == PARAMETER_MAX:
|
3027
|
+
return
|
3028
|
+
else:
|
3029
|
+
if index in self.parameters:
|
3030
|
+
parameter = self.parameters[index]
|
3031
|
+
parameter.internal_value_changed(value)
|
3032
|
+
self.parameter_internal_value_changed(parameter, value)
|
3033
|
+
else:
|
3034
|
+
logging.error('Parameter "%d" not in "%s" parameters',
|
3035
|
+
index, self)
|
3036
|
+
|
3033
3037
|
def parameter_internal_value_changed(self, parameter, value):
|
3034
3038
|
"""
|
3035
3039
|
Called by the Carla host engine when the internal value of a parameter has changed.
|
@@ -3118,8 +3122,31 @@ class Plugin(PatchbayClient):
|
|
3118
3122
|
pass
|
3119
3123
|
|
3120
3124
|
# -------------------------------------------------------------------
|
3121
|
-
#
|
3122
|
-
|
3125
|
+
# Property changes triggered by internal value changes from carla
|
3126
|
+
|
3127
|
+
def active_changed(self, value):
|
3128
|
+
self._active = value
|
3129
|
+
|
3130
|
+
def dry_wet_changed(self, value):
|
3131
|
+
self._dry_wet = value
|
3132
|
+
|
3133
|
+
def volume_changed(self, value):
|
3134
|
+
self._volume = value
|
3135
|
+
|
3136
|
+
def balance_left_changed(self, value):
|
3137
|
+
self._balance_left = value
|
3138
|
+
|
3139
|
+
def balance_right_changed(self, value):
|
3140
|
+
self._balance_right = value
|
3141
|
+
|
3142
|
+
def panning_changed(self, value):
|
3143
|
+
self._panning = value
|
3144
|
+
|
3145
|
+
def ctrl_channel_changed(self, value):
|
3146
|
+
self._ctrl_channel = value
|
3147
|
+
|
3148
|
+
# -------------------------------------------------------------------
|
3149
|
+
# Properties accessed only from outside, not by carla
|
3123
3150
|
|
3124
3151
|
@property
|
3125
3152
|
def active(self):
|
@@ -3133,6 +3160,9 @@ class Plugin(PatchbayClient):
|
|
3133
3160
|
"""
|
3134
3161
|
Set the "active" state of this Plugin.
|
3135
3162
|
"""
|
3163
|
+
self.set_active(value)
|
3164
|
+
|
3165
|
+
def set_active(self, value):
|
3136
3166
|
if self.is_ready:
|
3137
3167
|
self._active = value
|
3138
3168
|
Carla.instance.set_active(self.plugin_id, bool(value))
|
@@ -3151,6 +3181,9 @@ class Plugin(PatchbayClient):
|
|
3151
3181
|
Sets the dry/wet mix.
|
3152
3182
|
"value" must be a float value in the range 0.0 to 1.0.
|
3153
3183
|
"""
|
3184
|
+
self.set_dry_wet(value)
|
3185
|
+
|
3186
|
+
def set_dry_wet(self, value):
|
3154
3187
|
if isinstance(value, float):
|
3155
3188
|
if value < 0.0 or value > 1.0:
|
3156
3189
|
raise ValueError()
|
@@ -3171,6 +3204,9 @@ class Plugin(PatchbayClient):
|
|
3171
3204
|
Sets the volume.
|
3172
3205
|
"value" must be a float value in the range 0.0 to 1.0.
|
3173
3206
|
"""
|
3207
|
+
self.set_volume(value)
|
3208
|
+
|
3209
|
+
def set_volume(self, value):
|
3174
3210
|
if isinstance(value, float):
|
3175
3211
|
if value < 0.0 or value > 1.0:
|
3176
3212
|
raise ValueError()
|
@@ -3191,6 +3227,9 @@ class Plugin(PatchbayClient):
|
|
3191
3227
|
Sets the balance of the left channel (if applicable).
|
3192
3228
|
"value" must be a float value in the range 0.0 to 1.0.
|
3193
3229
|
"""
|
3230
|
+
self.set_balance_left(value)
|
3231
|
+
|
3232
|
+
def set_balance_left(self, value):
|
3194
3233
|
if isinstance(value, float):
|
3195
3234
|
if value < -1.0 or value > 1.0:
|
3196
3235
|
raise ValueError()
|
@@ -3211,6 +3250,9 @@ class Plugin(PatchbayClient):
|
|
3211
3250
|
Sets the balance of the right channel (if applicable).
|
3212
3251
|
"value" must be a float value in the range 0.0 to 1.0.
|
3213
3252
|
"""
|
3253
|
+
self.set_balance_right(value)
|
3254
|
+
|
3255
|
+
def set_balance_right(self, value):
|
3214
3256
|
if isinstance(value, float):
|
3215
3257
|
if value < -1.0 or value > 1.0:
|
3216
3258
|
raise ValueError()
|
@@ -3241,6 +3283,9 @@ class Plugin(PatchbayClient):
|
|
3241
3283
|
Sets the pan value (if applicable).
|
3242
3284
|
"value" must be a float value in the range 0.0 to 1.0.
|
3243
3285
|
"""
|
3286
|
+
self.set_panning(value)
|
3287
|
+
|
3288
|
+
def set_panning(self, value):
|
3244
3289
|
if isinstance(value, float):
|
3245
3290
|
if value < -1.0 or value > 1.0:
|
3246
3291
|
raise ValueError()
|
@@ -3259,7 +3304,9 @@ class Plugin(PatchbayClient):
|
|
3259
3304
|
"""
|
3260
3305
|
Not sure what this does.
|
3261
3306
|
"""
|
3262
|
-
|
3307
|
+
self.set_ctrl_channel(value)
|
3308
|
+
|
3309
|
+
def set_ctrl_channel(self, value):
|
3263
3310
|
Carla.instance.set_ctrl_channel(self.plugin_id, value)
|
3264
3311
|
self._ctrl_channel = value
|
3265
3312
|
|
@@ -3384,6 +3431,7 @@ class Parameter:
|
|
3384
3431
|
self.__value = Carla.instance.get_current_parameter_value(self.plugin_id, self.parameter_id)
|
3385
3432
|
return self.__value
|
3386
3433
|
|
3434
|
+
@cached_property
|
3387
3435
|
def plugin(self):
|
3388
3436
|
"""
|
3389
3437
|
Returns the Plugin which "owns" this Parameter.
|
simple_carla/qt.py
CHANGED
@@ -314,7 +314,6 @@ class CarlaQt(_SimpleCarla, QObject):
|
|
314
314
|
self.sig_last_plugin_removed.emit()
|
315
315
|
|
316
316
|
|
317
|
-
|
318
317
|
class AbstractQtPlugin(Plugin):
|
319
318
|
"""
|
320
319
|
This is an abstract class for use by classes which you wish to inherit from a
|
@@ -329,10 +328,17 @@ class AbstractQtPlugin(Plugin):
|
|
329
328
|
class MyVisualPlugin(QFrame, AbstractQtPlugin):
|
330
329
|
|
331
330
|
# You must define these signals!
|
332
|
-
sig_ready
|
333
|
-
sig_removed
|
334
|
-
sig_connection_change
|
335
|
-
sig_parameter_changed
|
331
|
+
sig_ready = pyqtSignal(Plugin)
|
332
|
+
sig_removed = pyqtSignal(Plugin)
|
333
|
+
sig_connection_change = pyqtSignal(PatchbayPort, PatchbayPort, bool)
|
334
|
+
sig_parameter_changed = pyqtSignal(Plugin, Parameter, float)
|
335
|
+
sig_active_changed = pyqtSignal(Plugin, bool)
|
336
|
+
sig_dry_wet_changed = pyqtSignal(Plugin, float)
|
337
|
+
sig_volume_changed = pyqtSignal(Plugin, float)
|
338
|
+
sig_balance_left_changed = pyqtSignal(Plugin, float)
|
339
|
+
sig_balance_right_changed = pyqtSignal(Plugin, float)
|
340
|
+
sig_panning_changed = pyqtSignal(Plugin, float)
|
341
|
+
sig_ctrl_channel_changed = pyqtSignal(Plugin, float)
|
336
342
|
|
337
343
|
plugin_def = {...}
|
338
344
|
|
@@ -364,6 +370,37 @@ class AbstractQtPlugin(Plugin):
|
|
364
370
|
if not self.removing_from_carla:
|
365
371
|
self.sig_connection_change.emit(connection.out_port, connection.in_port, state)
|
366
372
|
|
373
|
+
# -------------------------------------------------------------------
|
374
|
+
# Property changes triggered by internal value changes from carla
|
375
|
+
|
376
|
+
def active_changed(self, value):
|
377
|
+
self._active = value
|
378
|
+
self.sig_active_changed.emit(self, value)
|
379
|
+
|
380
|
+
def dry_wet_changed(self, value):
|
381
|
+
self._dry_wet = value
|
382
|
+
self.sig_dry_wet_changed.emit(self, value)
|
383
|
+
|
384
|
+
def volume_changed(self, value):
|
385
|
+
self._volume = value
|
386
|
+
self.sig_volume_changed.emit(self, value)
|
387
|
+
|
388
|
+
def balance_left_changed(self, value):
|
389
|
+
self._balance_left = value
|
390
|
+
self.sig_balance_left_changed.emit(self, value)
|
391
|
+
|
392
|
+
def balance_right_changed(self, value):
|
393
|
+
self._balance_right = value
|
394
|
+
self.sig_balance_right_changed.emit(self, value)
|
395
|
+
|
396
|
+
def panning_changed(self, value):
|
397
|
+
self._panning = value
|
398
|
+
self.sig_panning_changed.emit(self, value)
|
399
|
+
|
400
|
+
def ctrl_channel_changed(self, value):
|
401
|
+
self._ctrl_channel = value
|
402
|
+
self.sig_ctrl_channel_changed.emit(self, value)
|
403
|
+
|
367
404
|
def parameter_internal_value_changed(self, parameter, value):
|
368
405
|
"""
|
369
406
|
Called by the Carla host engine when the internal value of a parameter has changed.
|
@@ -375,7 +412,6 @@ class AbstractQtPlugin(Plugin):
|
|
375
412
|
self.sig_parameter_changed.emit(self, parameter, value)
|
376
413
|
|
377
414
|
|
378
|
-
|
379
415
|
class QtPlugin(AbstractQtPlugin, QObject):
|
380
416
|
"""
|
381
417
|
A class which inherits from both Plugin and QObject. It can be used by plugins
|
@@ -389,15 +425,22 @@ class QtPlugin(AbstractQtPlugin, QObject):
|
|
389
425
|
|
390
426
|
"""
|
391
427
|
|
392
|
-
sig_ready
|
393
|
-
sig_removed
|
394
|
-
sig_connection_change
|
395
|
-
sig_parameter_changed
|
428
|
+
sig_ready = pyqtSignal(Plugin)
|
429
|
+
sig_removed = pyqtSignal(Plugin)
|
430
|
+
sig_connection_change = pyqtSignal(PatchbayPort, PatchbayPort, bool)
|
431
|
+
sig_parameter_changed = pyqtSignal(Plugin, Parameter, float)
|
432
|
+
sig_active_changed = pyqtSignal(Plugin, bool)
|
433
|
+
sig_dry_wet_changed = pyqtSignal(Plugin, float)
|
434
|
+
sig_volume_changed = pyqtSignal(Plugin, float)
|
435
|
+
sig_balance_left_changed = pyqtSignal(Plugin, float)
|
436
|
+
sig_balance_right_changed = pyqtSignal(Plugin, float)
|
437
|
+
sig_panning_changed = pyqtSignal(Plugin, float)
|
438
|
+
sig_ctrl_channel_changed = pyqtSignal(Plugin, float)
|
439
|
+
|
396
440
|
|
397
441
|
def __init__(self, plugin_def=None, saved_state=None):
|
398
442
|
QObject.__init__(self)
|
399
443
|
Plugin.__init__(self, plugin_def, saved_state)
|
400
444
|
|
401
445
|
|
402
|
-
|
403
446
|
# end simple_carla/qt.py
|
@@ -0,0 +1,10 @@
|
|
1
|
+
simple_carla/__init__.py,sha256=d0coorjkbBI2rUidAfWvFtpz8-29N13jxKUnBZxfvkc,109341
|
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.0.0.dist-info/entry_points.txt,sha256=oqJRVQXTCIUOmspGNnqDWq9mhz397uoRMQQOhBFbIcs,73
|
7
|
+
simple_carla-2.0.0.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
|
8
|
+
simple_carla-2.0.0.dist-info/WHEEL,sha256=j3d_2VkBU36k09xOc4O9RZyJJ8uFqn4BR2AtKD7MOp8,99
|
9
|
+
simple_carla-2.0.0.dist-info/METADATA,sha256=NzokJ7bUAv8bPRKMG2da6hFMrCXkI-radjyUa9yQmgw,1717
|
10
|
+
simple_carla-2.0.0.dist-info/RECORD,,
|
@@ -1,10 +0,0 @@
|
|
1
|
-
simple_carla/__init__.py,sha256=r6NMfF2BzCKUzI900DJUjfzt9khbvsiq09vJDv92ruM,108435
|
2
|
-
simple_carla/plugin_dialog.py,sha256=uof7YSqVEjgUrWqF-bo76hegsecIOtu6aZr03kdNrKQ,1498
|
3
|
-
simple_carla/qt.py,sha256=ufN7PHHjFB_IXyoJnuG_JcY2p-5CyuOcEDFYG4BHF-g,13957
|
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-1.5.0.dist-info/entry_points.txt,sha256=oqJRVQXTCIUOmspGNnqDWq9mhz397uoRMQQOhBFbIcs,73
|
7
|
-
simple_carla-1.5.0.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
|
8
|
-
simple_carla-1.5.0.dist-info/WHEEL,sha256=j3d_2VkBU36k09xOc4O9RZyJJ8uFqn4BR2AtKD7MOp8,99
|
9
|
-
simple_carla-1.5.0.dist-info/METADATA,sha256=CjmnVnsvEJfe492I1KMD0xTe1VeRApEDveDdHpSzEsQ,1717
|
10
|
-
simple_carla-1.5.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|