Coming back to this issue. It’s still a problem. The AudioPluginHost throws away any sample offsets from outgoing MIDI data.
This is with JUCE 5.4.7.
My previous message was wrong. It DOES INDEED FIX IT to simply change sendBlockOfMessagesNow() to sendBlockOfMessages().
juce_AudioProcessorPlayer.cpp
AudioBuffer<float> buffer (channels, totalNumChans, numSamples);
{
const ScopedLock sl (lock);
if (processor != nullptr)
{
const ScopedLock sl2 (processor->getCallbackLock());
if (! processor->isSuspended())
{
if (processor->isUsingDoublePrecision())
{
conversionBuffer.makeCopyOf (buffer, true);
processor->processBlock (conversionBuffer, incomingMidi);
buffer.makeCopyOf (conversionBuffer, true);
}
else
{
processor->processBlock (buffer, incomingMidi);
}
if (midiOutput != nullptr)
//midiOutput->sendBlockOfMessagesNow (incomingMidi); change to:
midiOutput->sendBlockOfMessages(incomingMidi,
Time::getMillisecondCounterHiRes(),
getCurrentProcessor()->getSampleRate());
return;
}
}
}
I can see no reason why this was not done in the first place!
Here you can see the results of the same experiment at the top, with this one-line fix. The CC messages come out of the AudioPluginHost with 1 ms between each of them - the offsets are working.
Can the JUCE Team please fix this for JUCE 6 at least?

