Request: Plugin Tails


#1

Hi Jules,

Would you mind adding the following feature: getting plugin tails? There’s currently no support for this, afaict…

May be worth noting that there is somewhat of a caveat: Audio Units give this value as a double (Float64), while VST gives this value as a platform-dependent integer (VstIntPtr)…

juce_AudioProcessor:

/** Tells the host that this plugin has a tail, and what its length is (in seconds)

    For VSTs, 0 is default, 1 means 'no tail', any other value is a tail length. (This is as mostly stated in the VST SDK documentation online)
    For AUs, you simply return a tail length
 */
virtual double getTailSize() { return 0.0; }

juce_VSTPluginFormat - VSTPluginInstance:

double getTailSize() { return (double)dispatch (effGetTailSize, 0, 0, 0, 0); }

#2

Just noticed the Introjucer is setup to add this functionality…

I personally don’t think it’s a good idea to have it setup through the Introjucer since, for example, a reverb plugin can have varying tail lengths. Instead, when creating a plugin via the Introjucer, the getTailSize() method (as I’ve called it) should be generated for the user, returning 0.


#3

That would indeed be a better solution, but would need to be rolled out to all the formats, etc. No time to look at it right now…


#4

Multiformat feature implementation challenge accepted (for when you’ve time to take a look, of course):

juce_AudioUnitPluginFormat.mm:

double getTailSize()
{
    double tailSize = 0.0;

    AudioUnitGetProperty (audioUnit, kAudioUnitProperty_TailTime,
                          kAudioUnitScope_Global, 0, &tailSize, sizeof (double));

    return tailSize;
}

(Not tested)


#5

Going all out for shits and giggles - Introjucer implementation(?)

jucer_AudioPluginFilterTemplate.cpp:

double FILTERCLASSNAME::getTailSize()
{
    return 0.0;
}

BinaryData.cpp:

"double FILTERCLASSNAME::getTailSize()\r\n"
"{\r\n"
"    return 0.0;\r\n"
"}\r\n"
"\r\n"

#6

Cool. But do the RTAS/AAX formats have an equivalent concept too?


#7

Ah, sorry - I can’t say since I don’t have the SDK; I’m not an Avid-registered plugin developer…


#8

I’ve begun implementing this in my fork (see my signature). I’ve no idea if the AudioUnit code is correct - I wrote it by deduction. Also, I do not have the means of writing the AAX/RTAS code to support this feature.

If anyone can take a look and let me know if it’s right, I’d appreciate it!


#9

(Bump)

Mind taking a better look at this, Jules?


#10

Ok, sanity-checking welcome…


#11

Alright so when creating a dummy/test VST plugin with JUCE; I specify 10 seconds for tail, and receive 0 in the PluginHost when running it. I guess it’s not being truly implemented?


#12

Right, so the VST wrapper is just missing the VST implementation of the nicely named method: “getGetTailSize()”:

    VstInt32 getGetTailSize()
    {
        return (VstInt32) (filter->getTailLengthSeconds() * (double) getSampleRate());
    }

#13

“getGetTailSize”?? Was one “get” not enough?


#14

Not a clue. Maybe Steinberg foresaw the implementation being a “getting” of “getting” a tail size.


#15

Bizarre… Oh well, I’ve added that now, thanks!