|
@@ -2782,6 +2782,23 @@ public: |
|
|
postponeRtEvent(kPluginPostRtEventParameterChange, static_cast<int32_t>(k), 0, value); |
|
|
postponeRtEvent(kPluginPostRtEventParameterChange, static_cast<int32_t>(k), 0, value); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ((fOptions & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param <= 0x5F) |
|
|
|
|
|
{ |
|
|
|
|
|
uint8_t midiData[3]; |
|
|
|
|
|
midiData[0] = MIDI_STATUS_CONTROL_CHANGE + i; |
|
|
|
|
|
midiData[1] = ctrlEvent.param; |
|
|
|
|
|
midiData[2] = ctrlEvent.value*127.0f; |
|
|
|
|
|
|
|
|
|
|
|
if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_ATOM) |
|
|
|
|
|
lv2_atom_buffer_write(&evInAtomIters[fEventsIn.ctrlIndex], 0, 0, CARLA_URI_MAP_ID_MIDI_EVENT, 3, midiData); |
|
|
|
|
|
|
|
|
|
|
|
else if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_EVENT) |
|
|
|
|
|
lv2_event_write(&evInEventIters[fEventsIn.ctrlIndex], 0, 0, CARLA_URI_MAP_ID_MIDI_EVENT, 3, midiData); |
|
|
|
|
|
|
|
|
|
|
|
else if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_MIDI_LL) |
|
|
|
|
|
lv2midi_put_event(&evInMidiStates[fEventsIn.ctrlIndex], 0, 3, midiData); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -2810,19 +2827,21 @@ public: |
|
|
case kEngineControlEventTypeAllSoundOff: |
|
|
case kEngineControlEventTypeAllSoundOff: |
|
|
if (fOptions & PLUGIN_OPTION_SEND_ALL_SOUND_OFF) |
|
|
if (fOptions & PLUGIN_OPTION_SEND_ALL_SOUND_OFF) |
|
|
{ |
|
|
{ |
|
|
|
|
|
const uint32_t mtime(sampleAccurate ? startTime : time); |
|
|
|
|
|
|
|
|
uint8_t midiData[3]; |
|
|
uint8_t midiData[3]; |
|
|
midiData[0] = MIDI_STATUS_CONTROL_CHANGE + i; |
|
|
midiData[0] = MIDI_STATUS_CONTROL_CHANGE + i; |
|
|
midiData[1] = MIDI_CONTROL_ALL_SOUND_OFF; |
|
|
midiData[1] = MIDI_CONTROL_ALL_SOUND_OFF; |
|
|
midiData[2] = 0; |
|
|
midiData[2] = 0; |
|
|
|
|
|
|
|
|
if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_ATOM) |
|
|
if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_ATOM) |
|
|
lv2_atom_buffer_write(&evInAtomIters[fEventsIn.ctrlIndex], 0, 0, CARLA_URI_MAP_ID_MIDI_EVENT, 3, midiData); |
|
|
|
|
|
|
|
|
lv2_atom_buffer_write(&evInAtomIters[fEventsIn.ctrlIndex], mtime, 0, CARLA_URI_MAP_ID_MIDI_EVENT, 3, midiData); |
|
|
|
|
|
|
|
|
else if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_EVENT) |
|
|
else if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_EVENT) |
|
|
lv2_event_write(&evInEventIters[fEventsIn.ctrlIndex], 0, 0, CARLA_URI_MAP_ID_MIDI_EVENT, 3, midiData); |
|
|
|
|
|
|
|
|
lv2_event_write(&evInEventIters[fEventsIn.ctrlIndex], mtime, 0, CARLA_URI_MAP_ID_MIDI_EVENT, 3, midiData); |
|
|
|
|
|
|
|
|
else if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_MIDI_LL) |
|
|
else if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_MIDI_LL) |
|
|
lv2midi_put_event(&evInMidiStates[fEventsIn.ctrlIndex], 0, 3, midiData); |
|
|
|
|
|
|
|
|
lv2midi_put_event(&evInMidiStates[fEventsIn.ctrlIndex], mtime, 3, midiData); |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
@@ -2835,19 +2854,21 @@ public: |
|
|
sendMidiAllNotesOffToCallback(); |
|
|
sendMidiAllNotesOffToCallback(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const uint32_t mtime(sampleAccurate ? startTime : time); |
|
|
|
|
|
|
|
|
uint8_t midiData[3]; |
|
|
uint8_t midiData[3]; |
|
|
midiData[0] = MIDI_STATUS_CONTROL_CHANGE + i; |
|
|
midiData[0] = MIDI_STATUS_CONTROL_CHANGE + i; |
|
|
midiData[1] = MIDI_CONTROL_ALL_NOTES_OFF; |
|
|
midiData[1] = MIDI_CONTROL_ALL_NOTES_OFF; |
|
|
midiData[2] = 0; |
|
|
midiData[2] = 0; |
|
|
|
|
|
|
|
|
if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_ATOM) |
|
|
if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_ATOM) |
|
|
lv2_atom_buffer_write(&evInAtomIters[fEventsIn.ctrlIndex], 0, 0, CARLA_URI_MAP_ID_MIDI_EVENT, 3, midiData); |
|
|
|
|
|
|
|
|
lv2_atom_buffer_write(&evInAtomIters[fEventsIn.ctrlIndex], mtime, 0, CARLA_URI_MAP_ID_MIDI_EVENT, 3, midiData); |
|
|
|
|
|
|
|
|
else if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_EVENT) |
|
|
else if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_EVENT) |
|
|
lv2_event_write(&evInEventIters[fEventsIn.ctrlIndex], 0, 0, CARLA_URI_MAP_ID_MIDI_EVENT, 3, midiData); |
|
|
|
|
|
|
|
|
lv2_event_write(&evInEventIters[fEventsIn.ctrlIndex], mtime, 0, CARLA_URI_MAP_ID_MIDI_EVENT, 3, midiData); |
|
|
|
|
|
|
|
|
else if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_MIDI_LL) |
|
|
else if (fEventsIn.ctrl->type & CARLA_EVENT_DATA_MIDI_LL) |
|
|
lv2midi_put_event(&evInMidiStates[fEventsIn.ctrlIndex], 0, 3, midiData); |
|
|
|
|
|
|
|
|
lv2midi_put_event(&evInMidiStates[fEventsIn.ctrlIndex], mtime, 3, midiData); |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|