I did more tests.
The current version of my VST3 plugin (done with JUICE) receives Midi Data and dose nothing interesting with same (pushes them to a FiFo for later use) and clears the Midi message buffer before pushing its output message(s) on same (if any).
On user request it can (e.g.) send a single Midi message.
In the project, "MidiCCLFOgenerator" sends a stream of Midi messages to the plugin.
Result:
- Without user interaction, no Midi messages are detected downstream of my plugin.
- Each time I have the plugin send a Midi message, "something" additionally repeats downstream the last Midi Message it had received.
Hence if I deactivate MidiCCLFOgenerator, the last message same sent is repeated towards ReaContrlMidi which sits after my plugin over and over again, with each message my plugin sends. It sits sometimes before and sometimes after the message my plugin sends.
See the post referenced in the first message in this thread to see why suppose this might be a bug of Reaper's.
You can get a current version of the plugin here: ->
http://www.bschnell.de/VST3_Test_mschnell.zip
This is the code in the Audio block callback I did for sending Midi:
Code:
midiMessages.clear();
const int CCmsg = 0xB0 + midiChannel; // + 1;
int size;
MidiValue mv;
while ((size = midiOutFiFo.readFromFifo(&mv, 1))>0) { // the values for the midi messages the plugin wants to send.
juce::MidiMessage msg{CCmsg, controllertype, mv.val};
midiMessages.addEvent(msg, 0);
}
Devs please help, as this is not usable for the purpose I have in mind.
-Michael