MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / setValueFromMIDI

Method setValueFromMIDI

Source/Core/CtrlrModulator/CtrlrModulatorProcessor.cpp:270–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268
269
270void CtrlrModulatorProcessor::setValueFromMIDI(CtrlrMidiMessage &m, const CtrlrMIDIDeviceType source)
271{
272 /* called from the Panel's MIDI thread */
273 {
274 const ScopedWriteLock sl (processorLock);
275
276 /* merge the icomming midi data with our message */
277 mergeMidiData (m, getMidiMessage(source));
278
279 /* fetch the value from the midi message and pass it to the host */
280 const int possibleValue = getValueFromMidiMessage(source);
281
282 if (currentValue.value != possibleValue)
283 {
284 if (isInValidMappedRange (possibleValue))
285 {
286 currentValue.value = possibleValue;
287 currentValue.lastChangeSource = CtrlrModulatorValue::changedByMidiIn;
288
289 /* notify the pluginHost about the change */
290 setParameterNotifyingHost();
291 }
292 }
293 }
294}
295
296void CtrlrModulatorProcessor::setParameterNotifyingHost()
297{

Callers 6

matchMethod · 0.80
matchSysExMethod · 0.80
cacheMatchMethod · 0.80
cacheMatchSysExMethod · 0.80
matchMethod · 0.80
cacheMatchMethod · 0.80

Calls 1

mergeMidiDataFunction · 0.85

Tested by

no test coverage detected