Bug in getTailSamples


#1

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.


#2

Was reported here a few hours ago:


#3

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.


#4

Shouldn’t it be this:

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

#5

yo, this would also work.

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


#6

Well, I did write that bit!


#7

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


#8

this solves the issue:


#9

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?


#10

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()


#11

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.


#12

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

#13

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