Hi, I’ve noticed a couple of bugs in Juce when creating midi plugins.
First when creating a midi effect plugin the producer doesn’t correctly override AudioProcessor::isMidiEffect in the code it auto generates so this needs to be done manually.
Secondly and more importantly there appears to be a timing error in the way Juce processes the midi buffer passed to AudioProcessor::processBlock. It’s easy to recreate by creating a new midi effect plugin project using the producer and leave the code untouched (except for overriding the isMidiEffect function as described above) so that the midi buffer is simply passed through without being touched. Build the dll and load it into your DAW. Create two tracks with a sampler in each playing a short sample such as a hi-hat every 16th note and on one of the tracks insert the midi effect plugin you just built. If you play this a listen carefully you’ll hear that the timing of the track with the midi effect shifts around compared to the other. The shift isn’t constant but appears to increase for a duration then resets periodically. You can see this more clearly if you render out the audio from each track and compare them.
The following screen grab shows the issue. The top waveform is the track without the midi effect, and the bottom is the track with the midi effect. Observe how the bottom one drifts around compared to the top one:
Does anyone know of a way to fix this?