processBlock not being called for generative plugin


#1

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?


#2

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.


#3

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.


#4

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


#5

@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?


#6

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.


processBlock no longer called after closing editor
#7

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 …


#8

OK thanks. Please send your ableton code to me!


#9

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


#10

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


#11

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


#12

Tested and working btw.

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


#13

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


Ableton VST MIDI out silencing
#14

yup - all good now, thanks!


#15

@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?


#16

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.


#17

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?


#18

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


#19

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…


#20

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?