| 268 | |
| 269 | |
| 270 | void 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 | |
| 296 | void CtrlrModulatorProcessor::setParameterNotifyingHost() |
| 297 | { |
no test coverage detected