Closed csteinmetz1 closed 7 months ago
Hey Christian! Great question - I have a feeling this might be related to https://github.com/spotify/pedalboard/issues/268, which I haven't had time to dig into yet. VSTs certainly support pumping the audio callback from multiple threads (as that's what DAWs do) but we might not be properly handling a lock somewhere. I'll do a bit of digging.
Hey @csteinmetz1 - after a hectic couple months away, I've just merged a fix that should allow you to run VST3Plugin
instances in background threads. Note that this is fairly experimental and may break for some plugins; the VST3 spec doesn't allow us to call some methods (like prepareToPlay
) from threads other than the main thread, but Pedalboard does anyways. It's worked for every VST3 I've tried, but there will definitely be exceptions.
This change is part of v0.8.8, which has just entered CI and should be live on PyPI within a couple of hours.
I followed the example in #212 to use
ThreadPoolExecutor
but I find that this does not work for me when using VST3 plugin objects. It does work using the internal Pedalboard effects such asReverb()
in your example. When I call the below example it will hang indefinitely. Is there a limitation with usingVST3Plugin
instances here? I couldn't find a mention in the docs.Here is a minimal example: