processBlock not being called for generative plugin

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?

I can’t seem to find the forum post anymore (the post had an odd title), but the conclusion is that Logic will stop calling processBlock after a while. This is just a limitation of Logic that you will have to live with.

I’ve now reproduced the problem. At first I thought it was related to the laptop going into Sleep mode, but I can’t reliably reproduce this and I’ve also had it stop after seemingly random intervals as @fabian suggests.

I can confirm that processBlock() definitely stopped getting called because I had Logic running under the debugger. So the conclusion is: Logic stops calling processBlock() after an arbitrary period of inactivity. Hitting play in Logic starts it back up again.

This is really bad, because from a user perspective it just appears that the plugin isn’t working. If there’s no way for a plugin to notify the host that it needs to be “active”, it feels like a bug in Logic. Has anyone raised the issue via Apple Feedback…?

I know this is bad, but you cannot change this behaviour. You will find no other plug-in (other than maybe Apple’s own plug-ins) which works around this limitation of Logic (and isn’t an AU generator). This is not a JUCE issue.

I think we are using an AU generator…

I’ve just done a test, and setting the plugin AU type to kAudioUnitType_Generator does seem to work around the issue.

Unfortunately it does not for Final Cut X 10.3.2.

  • I set kAudioUnitType_Generator
  • I return from getTailLengthSeconds() std::numeric_limits::max();

Anything else worth testing?

I’d try and find a final cut developer to talk to :slight_smile:

1 Like

I am hitting this with an effect plugin. Setting the tail length to max doesn’t work and after about 12sec of no input, processBlock stops getting called and that cuts off the tail of the plugin (which in some cases is still sounding off).

I am observing this in Cubase with VST3. VST2 works fine. Haven’t tested this specific issue with AU, but I don’t think I have a problem in Live.

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

I am already setting another category and this isn’t it. How do I add it as a subcategory? Or maybe there is a way to set kInfiniteTail to be returned from that method in the VST3 API?

Bringing this back up because this is a huge issue for me, has there been any new developments on this? Specifically my plugin is an effect and it must always have the processBlock() called or it doesn’t really work.

Any advice appreciated!