Ableton Live has a setting when bouncing a project to use a different sample rate to the one specified for the normal project playback.
We’ve noticed that our VST3 plugins no longer render correctly when this is used, with strange dropouts all over the place.
I tracked the problem up the stack into JUCE until I reached juce_audio_plugin_client_VST3.cpp
. I inserted some logs into a file at various points there that show that, indeed, many processBlock()
calls seem to simply “not happen” under these settings.
I’m logging whenever the MIDI buffer contains events (logging each event in the buffer), but I’m also logging the number of blocks with empty MIDI buffers that occurred between those too (to keep the logs shorter).
Here are some examples. First, an example where we bounce at the project’s native 44.1kHz (this project contains only 4 MIDI notes heading into our VST3 instrument):
prepareToPlay (44100, 128)
All notes off Channel 1
... (All notes off for each channel)
[35 blocks processed] 4480 samples total
Note on C#2 Velocity 100 Channel 1
[344 blocks processed] 44032 samples total
Note off C#2 Velocity 64 Channel 1
Note on F#2 Velocity 100 Channel 1
[345 blocks processed] 44160 samples total
Note off F#2 Velocity 64 Channel 1
Note on G#1 Velocity 100 Channel 1
[344 blocks processed] 44032 samples total
Note off G#1 Velocity 64 Channel 1
Note on D#2 Velocity 100 Channel 1
[345 blocks processed] 44160 samples total
Note off D#2 Velocity 64 Channel 1
[1563 blocks processed] 200064 samples total
prepareToPlay (44100, 128)
Then here is an example where we render the same project at 48kHz, without changing the sample rate of the audio device:
prepareToPlay (44100, 128)
prepareToPlay (48000, 128)
prepareToPlay (48000, 128)
[0 blocks processed] 0 samples total
All notes off Channel 1
... (All notes off for all MIDI channels)
[38 blocks processed] 4864 samples total
Note on C#2 Velocity 100 Channel 1
[375 blocks processed] 48000 samples total
Note off C#2 Velocity 64 Channel 1
Note on F#2 Velocity 100 Channel 1
[103 blocks processed] 13184 samples total
prepareToPlay (48000, 128)
prepareToPlay (44100, 128)
prepareToPlay (44100, 128)
prepareToPlay (44100, 128)
So it looks like a bunch of audio and MIDI blocks are being dropped.