processBlock not being called for generative plugin

We have an instrument plugin that generates audio at random intervals. However ableton takes the executive decision to turn off processBlock calls sometimes. Presumably to save CPU …

Are there any flags we can set that ensure this doesn’t happen and we always get our processBlock call called?

silenceInProducesSilenceOut / getTailLength? Beyond these, I don’t think there’s much you can do beyond always outputting something…

Keep in mind it’s an important optimization from the host side. All hosts I know do this to some degree; Logic may be the most fierce.

Totally understand why the hosts do it … silenceInProducesSilenceOut has been depreciated from JUCE, I’m not sure what it used to do under the hood or why it’s been removed tho.

https://sdk.steinberg.net/viewtopic.php?f=4&t=79

If your plugin always generate sound without needing any input audio, you can add the category "Generator" as subCategories (for example use kFxGenerator) or you can return kInfiniteTail in the function IAudioProcessor::getTailSamples

@fabian
I think this flag should be reintroduced, and should choose the “correct” method for any wrapper/format to show the host that its processBlock should be called always.

For example for VST the flag should be automatically return kInfiniteTail in function IAudioProcessor::getTailSamples if its false, or does somebody has a better idea?

1 Like

Yes I think you are right. I’ve re-added experimental silenceInProducesSilenceOut support on my private repo. Didn’t have much time to test it though so it would be good if you could give the different plug-in formats a proper spin.

Fabian - we’ve had some detailed support on this issue from the ableton sound team, so I think we have some custom ableton implementation for silenceInProducesSilenceOut support. Do you want to integrate this into your implementation? I’ll get it over to you in an e-mail.

For cubase the advice above is correct re: generator or tail length to infinite.

We are working through the other DAWs …

1 Like

OK thanks. Please send your ableton code to me!

Hi guys - run into this problem in Ableton myself today - what is the current status with fixes/workarounds?

We’ve pushed a workaround for this to develop a few weeks ago. Please test!

No difference for me. Anything to do other than overriding silenceInProducesSilenceOut() ??

1 Like

Tested and working btw.

You need to return std::numeric_limits::max() from getTailLength().

thx - that looks to have done it in test device - will build into real device…

yup - all good now, thanks!

1 Like

@jimc just found this thread after a user reporting a problem that sounds remarkably similar. Just to confirm: some DAWs stop calling processBlock() for “instrument” plugins when they are silent for a given period and returning std::numeric_limits<double>::max() from getTailLength() is the way to prevent this?

Yes - but only works on Ableton with the develop branch at the moment. We’ve had success with other DAWs I think - but haven’t tested all of them thoroughly.

Ah, what about Logic and FinalCutProX? I have an old proof of concept that I rescheduled because of this problem, and I want to get back to it now… Did that anybody check already?

I think I’d have been told if Logic X was a problem - and we must have tested it. Final Cut definitely untested.

ok, thanks. I have to send it for logic to a colleague, that’s why I didn’t check yet.
Hope to get my FinalCut license soon, then I will report back…

Interesting. My user-reported issue is in Logic, but only one user so far. Symptoms are “playback not working after leaving and coming back”! My own log suggests this is because processBlock() stops getting called.

Is there any way to conclusively prove “stops getting called” without setting and testing a flag from the message thread?