Browse Source

Fix offset to cv controlled parameters; Dont show range if unmapped

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.1-rc1
falkTX 4 years ago
parent
commit
b99fc3c418
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 8 additions and 6 deletions
  1. +1
    -1
      source/backend/engine/CarlaEngineJack.cpp
  2. +1
    -1
      source/backend/engine/CarlaEnginePorts.cpp
  3. +6
    -4
      source/frontend/carla_widgets.py

+ 1
- 1
source/backend/engine/CarlaEngineJack.cpp View File

@@ -628,7 +628,7 @@ public:
event.channel = kEngineEventNonMidiChannel; event.channel = kEngineEventNonMidiChannel;


event.ctrl.type = kEngineControlEventTypeParameter; event.ctrl.type = kEngineControlEventTypeParameter;
event.ctrl.param = static_cast<uint16_t>(i);
event.ctrl.param = static_cast<uint16_t>(ecv.indexOffset);
event.ctrl.value = carla_fixedValue(0.0f, 1.0f, (v - min) / (max - min)); event.ctrl.value = carla_fixedValue(0.0f, 1.0f, (v - min) / (max - min));
} }




+ 1
- 1
source/backend/engine/CarlaEnginePorts.cpp View File

@@ -469,7 +469,7 @@ void CarlaEngineCVSourcePorts::initPortBuffers(const float* const* const buffers
event.channel = kEngineEventNonMidiChannel; event.channel = kEngineEventNonMidiChannel;


event.ctrl.type = kEngineControlEventTypeParameter; event.ctrl.type = kEngineControlEventTypeParameter;
event.ctrl.param = static_cast<uint16_t>(i);
event.ctrl.param = static_cast<uint16_t>(ecv.indexOffset);
event.ctrl.value = carla_fixedValue(0.0f, 1.0f, (v - min) / (max - min)); event.ctrl.value = carla_fixedValue(0.0f, 1.0f, (v - min) / (max - min));
} }




+ 6
- 4
source/frontend/carla_widgets.py View File

@@ -426,10 +426,12 @@ class PluginParameter(QWidget):
action.setCheckable(True) action.setCheckable(True)
action.setChecked(True) action.setChecked(True)


menu.addSection("Range")

actRangeMinimum = menu.addAction(self.tr("Set minimum... (%g)" % self.fMappedMinimum))
actRangeMaximum = menu.addAction(self.tr("Set maximum... (%g)" % self.fMappedMaximum))
if self.fMappedCtrl != CONTROL_VALUE_NONE:
menu.addSection("Range")
actRangeMinimum = menu.addAction(self.tr("Set minimum... (%g)" % self.fMappedMinimum))
actRangeMaximum = menu.addAction(self.tr("Set maximum... (%g)" % self.fMappedMaximum))
else:
actRangeMinimum = actRangeMaximum = None


actSel = menu.exec_(QCursor.pos()) actSel = menu.exec_(QCursor.pos())




Loading…
Cancel
Save