Closes #345tags/1.9.7
@@ -1498,7 +1498,6 @@ public: | |||
value = ctrlEvent.value; | |||
setDryWet(value, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_DRYWET, 0, value); | |||
break; | |||
} | |||
if (MIDI_IS_CONTROL_CHANNEL_VOLUME(ctrlEvent.param) && (pData->hints & PLUGIN_CAN_VOLUME) != 0) | |||
@@ -1506,7 +1505,6 @@ public: | |||
value = ctrlEvent.value*127.0f/100.0f; | |||
setVolume(value, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_VOLUME, 0, value); | |||
break; | |||
} | |||
if (MIDI_IS_CONTROL_BALANCE(ctrlEvent.param) && (pData->hints & PLUGIN_CAN_BALANCE) != 0) | |||
@@ -1534,7 +1532,6 @@ public: | |||
setBalanceRight(right, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right); | |||
break; | |||
} | |||
} | |||
#endif | |||
@@ -1475,7 +1475,6 @@ public: | |||
value = ctrlEvent.value; | |||
setDryWet(value, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_DRYWET, 0, value); | |||
break; | |||
} | |||
if (MIDI_IS_CONTROL_CHANNEL_VOLUME(ctrlEvent.param) && (pData->hints & PLUGIN_CAN_VOLUME) != 0) | |||
@@ -1483,7 +1482,6 @@ public: | |||
value = ctrlEvent.value*127.0f/100.0f; | |||
setVolume(value, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_VOLUME, 0, value); | |||
break; | |||
} | |||
if (MIDI_IS_CONTROL_BALANCE(ctrlEvent.param) && (pData->hints & PLUGIN_CAN_BALANCE) != 0) | |||
@@ -1511,7 +1509,6 @@ public: | |||
setBalanceRight(right, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right); | |||
break; | |||
} | |||
} | |||
#endif | |||
@@ -1544,13 +1541,8 @@ public: | |||
setParameterValue(k, value, false, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, static_cast<int32_t>(k), 0, value); | |||
break; | |||
} | |||
// check if event is already handled | |||
if (k != pData->param.count) | |||
break; | |||
if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_CONTROL) | |||
{ | |||
if (midiEventCount >= kPluginMaxMidiEvents) | |||
@@ -1565,6 +1557,7 @@ public: | |||
seqEvent.data.control.param = ctrlEvent.param; | |||
seqEvent.data.control.value = int8_t(ctrlEvent.value*127.0f); | |||
} | |||
break; | |||
} // case kEngineControlEventTypeParameter | |||
@@ -766,7 +766,6 @@ public: | |||
value = ctrlEvent.value; | |||
setDryWet(value, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_DRYWET, 0, value); | |||
break; | |||
} | |||
if (MIDI_IS_CONTROL_CHANNEL_VOLUME(ctrlEvent.param) && (pData->hints & PLUGIN_CAN_VOLUME) != 0) | |||
@@ -774,7 +773,6 @@ public: | |||
value = ctrlEvent.value*127.0f/100.0f; | |||
setVolume(value, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_VOLUME, 0, value); | |||
break; | |||
} | |||
if (MIDI_IS_CONTROL_BALANCE(ctrlEvent.param) && (pData->hints & PLUGIN_CAN_BALANCE) != 0) | |||
@@ -802,7 +800,6 @@ public: | |||
setBalanceRight(right, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right); | |||
break; | |||
} | |||
} | |||
#endif | |||
@@ -835,13 +832,8 @@ public: | |||
setParameterValue(k, value, false, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, static_cast<int32_t>(k), 0, value); | |||
break; | |||
} | |||
// check if event is already handled | |||
if (k != pData->param.count) | |||
break; | |||
if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_CONTROL) | |||
{ | |||
uint8_t midiData[3]; | |||
@@ -851,6 +843,7 @@ public: | |||
fMidiBuffer.addEvent(midiData, 3, static_cast<int>(event.time)); | |||
} | |||
break; | |||
} // case kEngineControlEventTypeParameter | |||
@@ -969,7 +969,6 @@ public: | |||
value = ctrlEvent.value; | |||
setDryWet(value, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_DRYWET, 0, value); | |||
break; | |||
} | |||
if (MIDI_IS_CONTROL_CHANNEL_VOLUME(ctrlEvent.param) && (pData->hints & PLUGIN_CAN_VOLUME) != 0) | |||
@@ -977,7 +976,6 @@ public: | |||
value = ctrlEvent.value*127.0f/100.0f; | |||
setVolume(value, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_VOLUME, 0, value); | |||
break; | |||
} | |||
if (MIDI_IS_CONTROL_BALANCE(ctrlEvent.param) && (pData->hints & PLUGIN_CAN_BALANCE) != 0) | |||
@@ -1005,7 +1003,6 @@ public: | |||
setBalanceRight(right, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right); | |||
break; | |||
} | |||
} | |||
#endif | |||
@@ -1037,8 +1034,8 @@ public: | |||
setParameterValue(k, value, false, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, static_cast<int32_t>(k), 0, value); | |||
break; | |||
} | |||
break; | |||
} // case kEngineControlEventTypeParameter | |||
@@ -3092,7 +3092,6 @@ public: | |||
value = ctrlEvent.value; | |||
setDryWet(value, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_DRYWET, 0, value); | |||
break; | |||
} | |||
if (MIDI_IS_CONTROL_CHANNEL_VOLUME(ctrlEvent.param) && (pData->hints & PLUGIN_CAN_VOLUME) != 0) | |||
@@ -3100,7 +3099,6 @@ public: | |||
value = ctrlEvent.value*127.0f/100.0f; | |||
setVolume(value, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_VOLUME, 0, value); | |||
break; | |||
} | |||
if (MIDI_IS_CONTROL_BALANCE(ctrlEvent.param) && (pData->hints & PLUGIN_CAN_BALANCE) != 0) | |||
@@ -3128,7 +3126,6 @@ public: | |||
setBalanceRight(right, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right); | |||
break; | |||
} | |||
} | |||
#endif | |||
@@ -3161,13 +3158,8 @@ public: | |||
setParameterValue(k, value, false, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, static_cast<int32_t>(k), 0, value); | |||
break; | |||
} | |||
// check if event is already handled | |||
if (k != pData->param.count) | |||
break; | |||
if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_CONTROL) | |||
{ | |||
uint8_t midiData[3]; | |||
@@ -3186,6 +3178,7 @@ public: | |||
else if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_MIDI_LL) | |||
lv2midi_put_event(&evInMidiStates[fEventsIn.ctrlIndex], mtime, 3, midiData); | |||
} | |||
break; | |||
} // case kEngineControlEventTypeParameter | |||
@@ -1584,8 +1584,9 @@ public: | |||
nativeEvent.data[2] = uint8_t(ctrlEvent.value*127.0f); | |||
nativeEvent.size = 3; | |||
} | |||
break; | |||
} | |||
} // case kEngineControlEventTypeParameter | |||
case kEngineControlEventTypeMidiBank: | |||
if (pData->options & PLUGIN_OPTION_MAP_PROGRAM_CHANGES) | |||
@@ -1221,7 +1221,6 @@ public: | |||
value = ctrlEvent.value; | |||
setDryWet(value, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_DRYWET, 0, value); | |||
break; | |||
} | |||
if (MIDI_IS_CONTROL_CHANNEL_VOLUME(ctrlEvent.param) && (pData->hints & PLUGIN_CAN_VOLUME) != 0) | |||
@@ -1229,7 +1228,6 @@ public: | |||
value = ctrlEvent.value*127.0f/100.0f; | |||
setVolume(value, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_VOLUME, 0, value); | |||
break; | |||
} | |||
if (MIDI_IS_CONTROL_BALANCE(ctrlEvent.param) && (pData->hints & PLUGIN_CAN_BALANCE) != 0) | |||
@@ -1257,7 +1255,6 @@ public: | |||
setBalanceRight(right, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right); | |||
break; | |||
} | |||
} | |||
#endif | |||
@@ -1290,13 +1287,8 @@ public: | |||
setParameterValue(k, value, false, false, false); | |||
pData->postponeRtEvent(kPluginPostRtEventParameterChange, static_cast<int32_t>(k), 0, value); | |||
break; | |||
} | |||
// check if event is already handled | |||
if (k != pData->param.count) | |||
break; | |||
if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_CONTROL) | |||
{ | |||
if (fMidiEventCount >= kPluginMaxMidiEvents*2) | |||