So… I can use the MidiMessage class to add Note Events to a MidiBuffer but when I try to add a Controller Event, the host (Reaper in my test case) does not receive any Controller events. I can’t see that I’m doing anything wrong. Can anyone confirm this works for them or tell me what I’m doing wrong?
void MidiFxTestAudioProcessor::processBlock(AudioBuffer<float>& buffer, MidiBuffer& midiMessages)
// this works
auto msg = MidiMessage::noteOn(1, 60, uint8(100));
// this does not work
auto msg = MidiMessage::controllerEvent(1, 1, 100);
Note that this version of JUCE didn’t include support for outgoing CC events in the VST3 format. You’ll need at least JUCE 6, but I’d recommend updating to the latest version of JUCE. Even then, not all host programs support CC events in VST3 format - I think REAPER does, but I wouldn’t expect this to work in all hosts.
@reuk: Ah, that is helpful information! I realized that merely setting the config is enough to kill the live input of MIDI controllers so that they never reach the host, regardless of whether I try to add to the buffer or transform the incoming CCs.
Unfortunately, despite upgrading to JUCE v7 and recompiling everything, I still have the exact same problem. As soon as I insert any JUCE plugin configured for MIDI I/O onto the “Input FX” bus in Reaper, all MIDI controller data incoming from my MIDI keyboard is filtered out. As before, I can add Note Events to the midiMessages object that show up in the host, but any Controller events added do not show up.
Since these are actually two separate problems, I am going to create another post specific to the I/O problem.