Skip to content

Commit

Permalink
Merge branch 'master' of github.com:RitaAndAurora/ddrm-jfsebastian
Browse files Browse the repository at this point in the history
  • Loading branch information
ffont committed Feb 18, 2022
2 parents 1267732 + 3a50ae0 commit fd51dbb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion 3rdParty/JUCE
Submodule JUCE updated 1939 files
13 changes: 9 additions & 4 deletions Source/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1027,10 +1027,15 @@ void DdrmtimbreSpaceAudioProcessor::handleIncomingMidiMessage(MidiInput* source,
// Set parameter value from MIDI message
const ScopedValueSetter<bool> scopedInputFlag (isReceivingFromMidiInput, true);
float newValue = (float)ccValue/127.0;
const String parameterID = ddrmInterface->getParameterIDFromCCNumber(ccNumber);
parameters.getParameter(parameterID)->beginChangeGesture();
parameters.getParameter(parameterID)->setValueNotifyingHost(newValue); // setValueNotifyingHost takes norm values from [0.0..1.0]
parameters.getParameter(parameterID)->endChangeGesture();
try {
const String parameterID = ddrmInterface->getParameterIDFromCCNumber(ccNumber);
parameters.getParameter(parameterID)->beginChangeGesture();
parameters.getParameter(parameterID)->setValueNotifyingHost(newValue); // setValueNotifyingHost takes norm values from [0.0..1.0]
parameters.getParameter(parameterID)->endChangeGesture();
} catch (...) {
// The above will raise if the ccNumber does not correpsond to any DDRM number.
// We should no nothing in this case. This try/catch will avoid app crashing.
}
}
}
}
Expand Down

0 comments on commit fd51dbb

Please sign in to comment.