simple-carla 2.5.0__tar.gz → 2.5.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: simple_carla
3
- Version: 2.5.0
3
+ Version: 2.5.2
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
@@ -19,7 +19,7 @@ sc-plugin-def = "simple_carla.scripts.sc_plugin_def:main"
19
19
  sc-plugin-info = "simple_carla.scripts.sc_plugin_info:main"
20
20
 
21
21
  [bumpver]
22
- current_version = "2.5.0"
22
+ current_version = "2.5.2"
23
23
  version_pattern = "MAJOR.MINOR.PATCH"
24
24
  commit_message = "Bump version {old_version} -> {new_version}"
25
25
  commit = true
@@ -240,7 +240,7 @@ from carla_backend import (
240
240
  )
241
241
 
242
242
 
243
- __version__ = "2.5.0"
243
+ __version__ = "2.5.2"
244
244
 
245
245
 
246
246
  # -------------------------------------------------------------------
@@ -2714,8 +2714,9 @@ class Plugin(PatchbayClient):
2714
2714
 
2715
2715
  _save_state_keys = [ 'moniker',
2716
2716
  'active', 'volume', 'dry_wet', 'panning', 'balance_left', 'balance_right',
2717
- 'prefer_generic_dialog', 'send_all_sound_off', 'send_channel_pressure', 'send_control_changes',
2718
- 'send_note_aftertouch', 'send_pitchbend', 'send_program_changes', 'skip_sending_notes', 'force_stereo' ]
2717
+ 'prefer_generic_dialog', 'send_all_sound_off', 'send_channel_pressure',
2718
+ 'send_control_changes', 'send_note_aftertouch', 'send_pitchbend',
2719
+ 'send_program_changes', 'skip_sending_notes', 'force_stereo' ]
2719
2720
 
2720
2721
  def on_ready(self, callback):
2721
2722
  self._cb_ready = callback
@@ -2931,7 +2932,8 @@ class Plugin(PatchbayClient):
2931
2932
  This function is called from "check_ports_ready" before calling Plugin.ready()
2932
2933
  """
2933
2934
  for key, value in self.saved_state["vars"].items():
2934
- setattr(self, key, value)
2935
+ if not value is None:
2936
+ setattr(self, key, value)
2935
2937
  for key, value in self.saved_state["parameters"].items():
2936
2938
  if not value is None and int(key) in self.parameters:
2937
2939
  self.parameters[int(key)].value = value
@@ -3247,11 +3249,10 @@ class Plugin(PatchbayClient):
3247
3249
  self.set_dry_wet(value)
3248
3250
 
3249
3251
  def set_dry_wet(self, value):
3250
- if isinstance(value, float):
3251
- if value < 0.0 or value > 1.0:
3252
- raise ValueError()
3253
- self._dry_wet = value
3254
- Carla.instance.set_drywet(self.plugin_id, value)
3252
+ if not isinstance(value, float) or value < 0.0 or value > 1.0:
3253
+ raise ValueError()
3254
+ self._dry_wet = value
3255
+ Carla.instance.set_drywet(self.plugin_id, value)
3255
3256
 
3256
3257
  @property
3257
3258
  def volume(self):
@@ -3270,11 +3271,10 @@ class Plugin(PatchbayClient):
3270
3271
  self.set_volume(value)
3271
3272
 
3272
3273
  def set_volume(self, value):
3273
- if isinstance(value, float):
3274
- if value < 0.0 or value > 1.0:
3275
- raise ValueError()
3276
- self._volume = value
3277
- Carla.instance.set_volume(self.plugin_id, value)
3274
+ if not isinstance(value, float) or value < 0.0 or value > 1.0:
3275
+ raise ValueError()
3276
+ self._volume = value
3277
+ Carla.instance.set_volume(self.plugin_id, value)
3278
3278
 
3279
3279
  @property
3280
3280
  def balance_left(self):
@@ -3293,11 +3293,10 @@ class Plugin(PatchbayClient):
3293
3293
  self.set_balance_left(value)
3294
3294
 
3295
3295
  def set_balance_left(self, value):
3296
- if isinstance(value, float):
3297
- if value < -1.0 or value > 1.0:
3298
- raise ValueError()
3299
- self._balance_left = value
3300
- Carla.instance.set_balance_left(self.plugin_id, value)
3296
+ if not isinstance(value, float) or value < -1.0 or value > 1.0:
3297
+ raise ValueError()
3298
+ self._balance_left = value
3299
+ Carla.instance.set_balance_left(self.plugin_id, value)
3301
3300
 
3302
3301
  @property
3303
3302
  def balance_right(self):
@@ -3316,11 +3315,10 @@ class Plugin(PatchbayClient):
3316
3315
  self.set_balance_right(value)
3317
3316
 
3318
3317
  def set_balance_right(self, value):
3319
- if isinstance(value, float):
3320
- if value < -1.0 or value > 1.0:
3321
- raise ValueError()
3322
- self._balance_right = value
3323
- Carla.instance.set_balance_right(self.plugin_id, value)
3318
+ if not isinstance(value, float) or value < -1.0 or value > 1.0:
3319
+ raise ValueError()
3320
+ self._balance_right = value
3321
+ Carla.instance.set_balance_right(self.plugin_id, value)
3324
3322
 
3325
3323
  @property
3326
3324
  def balance_center(self):
@@ -3349,11 +3347,10 @@ class Plugin(PatchbayClient):
3349
3347
  self.set_panning(value)
3350
3348
 
3351
3349
  def set_panning(self, value):
3352
- if isinstance(value, float):
3353
- if value < -1.0 or value > 1.0:
3354
- raise ValueError()
3355
- self._panning = value
3356
- Carla.instance.set_panning(self.plugin_id, value)
3350
+ if not isinstance(value, float) or value < -1.0 or value > 1.0:
3351
+ raise ValueError()
3352
+ self._panning = value
3353
+ Carla.instance.set_panning(self.plugin_id, value)
3357
3354
 
3358
3355
  @property
3359
3356
  def ctrl_channel(self):
@@ -71,30 +71,35 @@ Output Parameters: {plugin.output_parameter_count}
71
71
  Maker: {plugin.maker}
72
72
  Category: {plugin.category}
73
73
  Label: {plugin.label}
74
- Filename: {plugin.filename}""")
74
+ Filename: {plugin.filename}
75
+ """)
75
76
  for param in plugin.parameters.values():
76
- type_name = 'Boolean' if param.is_boolean \
77
+ param.type_name = 'Boolean' if param.is_boolean \
77
78
  else 'Integer' if param.is_integer \
78
79
  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}""")
80
+ for label, att in [
81
+ ('Parameter: ', 'name'),
82
+ ('Symbol: ', 'symbol'),
83
+ ('Comment: ', 'comment'),
84
+ ('Group Name: ', 'groupName'),
85
+ ('Unit: ', 'unit'),
86
+ ('Enabled: ', 'is_enabled'),
87
+ ('Type: ', 'type_name'),
88
+ ('Min: ', 'min'),
89
+ ('Max: ', 'max'),
90
+ ('Step: ', 'step'),
91
+ ('Automatable: ', 'is_automatable'),
92
+ ('Read only: ', 'is_read_only'),
93
+ ('Uses samplerate: ', 'uses_samplerate'),
94
+ ('Uses scalepoints: ', 'uses_scalepoints'),
95
+ ('Scale point count: ', 'scalePointCount'),
96
+ ('Uses custom text: ', 'uses_custom_text'),
97
+ ('Can be CV controlled:', 'can_be_cv_controlled')
98
+ ]:
99
+ try:
100
+ print(label, getattr(param, att));
101
+ except AttributeError:
102
+ pass
98
103
  self.carla.delete()
99
104
  QApplication.instance().quit()
100
105
 
File without changes
File without changes
File without changes