Cubase: VST3: processBlock: stops getting called after 12s of silence


#1

Hi,

I have an effect plugin and a tester of mine has reported an issue with VST3 whose tail gets cut off after about 12s of no actual signal passing through.

I am setting the tail to max:

double PluginProcessor::getTailLengthSeconds() const
{
	return std::numeric_limits<double>::max ();
}

The VST2 version of this same plugin doesn’t cut off like that.

The issue is reproducible in any version of Cubase 9.5.

How do you deal with this?


#2

I see that FabFilter have fixed precisely this issue in the past

Pro-R: Fixed a bug in the VST3 plug-in that caused long reverb tails to be cut off after 10 seconds after the input became silent.

Anyone from FabFilter in da house?


#3

Is this right?

Doesn’t this result in Vst::kNoTail pretty much… all the time?

I debugged it with Cubase 9.5 and it always returns kNoTail, beacuse there always is sampleRate > 0.0.

@jules Shouldn’t this be like that?

Steinberg::uint32 PLUGIN_API getTailSamples() override
 {
    auto tailLengthSeconds = getPluginInstance().getTailLengthSeconds();

    if (tailLengthSeconds <= 0.0 || processSetup.sampleRate <= 0.0)
        return Vst::kNoTail;

    return (Steinberg::uint32) roundToIntAccurate (tailLengthSeconds * processSetup.sampleRate);
}

Update:
I missed to report that changing the condition didn’t make a difference in Cubase specifically, but I am not sure how other hosts would react. Very weird that no one has hit this for 4 years…


Bug in getTailSamples
Bug in getTailSamples
#4

BTW, in Cubase this can be disabled: Preferences/VST/Plug-Ins and uncheck “Suspend VST3 plug-in processing when no audio signal are received”. But if the implementation for tail is incorrect and the host doesn’t allow it, there is still an issue.


#5

There seems to be an alternative to setting the tail - adding kFxGenerator as another subcategory.

How do I add 2 categories within JucePlugin_Vst3Category?

The VST3 docs says:

can be more than one, logically added by the OR operator


Bug in getTailSamples
#6
#define JucePlugin_Vst3Category "Fx|Analyzer|Delay|Distortion|Dynamics|Generator"

Keep the leading “Fx” and add categories like this.


#7

Mind you - this isn’t foolproof. Cubase will only list your plug-in in the first category you supply. Other hosts, such as REAPER, will list your plug-in in multiple places.