Bug in getTailSamples

hello,

i found an issue in getTailSamples() in the VST3 wrapper. it always returns Vst::kNoTail:
if (tailLengthSeconds <= 0.0 || processSetup.sampleRate > 0.0)
return Vst::kNoTail;

imo the || should be replaced with &&

have a nice day.

Was reported here a few hours ago:

1 Like

yep, the result is Vst::kNoTail pretty much all the time since sample rate is usually > 0.0

my plugin freezes sound over time and i need about 24 hours of trail length. i fixed it locally but i thought the issue might me worth sharing.

Shouldn’t it be this:

if (tailLengthSeconds <= 0.0 || processSetup.sampleRate <= 0.0)

yo, this would also work.

this bug doesn’t deserve that much discussion :smiley:

Well, I did write that bit!

IDK… does this solve it for you? I tested Cubase and it didn’t make any difference at my end.

this solves the issue:

1 Like

May I ask what vst3 sub-category are you using and is your plugin an instrument?

I can’t use the generator sub-category, because mine is an effect. There is supposed to be a way to add more than 1 sub-category - any chance you are doing that?

mine is an effect as well and i am using the Vst::PlugType::kFxReverb category. (https://www.112db.com/mikron/cascade/)
you must override AudioProcessor::getTailLengthSeconds()

I’ve cherry-picked this onto the master branch, so it’ll be available there too once the change has made it through our CI.

1 Like

@t0m Thanks a lot for cherry-picking this to master. I really appreciate that.

Unfortunately this doesn’t resolve the issue on my end.

I reported the problem and tested this same change, few hours before this topic was posted and I saw no change in the behavior of Cubase.

Just tested again with latest master (I see the commit and the change), but the long tail that I’ve set in my processor doesn’t get acknowledged by Cubase (latest) and the tail still gets cut-off after about 12s.

Here is how I set my subcategory in AppConfig:

//==============================================================================
// [BEGIN_USER_CODE_SECTION]

#define JucePlugin_Vst3Category Vst::PlugType::kFxReverb


// [END_USER_CODE_SECTION]
...

And this is how I override the tail length in my PluginProcessor:

double PluginProcessor::getTailLengthSeconds() const
{
    #undef max

    return std::numeric_limits<double>::max ();
}

I haven’t upgraded to latest VST3 SDK - I am at 3.6.7 because I haven’t noticed when Steinberg released and now I am too close to a release myself, to update dependencies. I am on latest official JUCE (5.2.0) and currently test on Windows 10 with latest Cubase Elements (with enabled “Suspend VST3 plugin processing when no audio signals are received”). BTW, @klus do you have this feature enabled in Cubase → File → Preferences → VST → Plugins? Perhaps it’s disabled on your end? I am not sure if you test in Cubase, sorry if I missed that somewhere in the thread.

P.S.:

  • In the VST3 documentation it says you can achieve this (endless tail) by adding a second subcategory to be kFxGenerator. Sorry for the dumb question, but how do I do that (setting multiple categories)?

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