How to dynamically change numProgram and numParameters on a VST 2.4 based plugin?

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Hi,

How can I update numProgram and numParameters without being at initialization time?

I have tried to change numParameters and numPrograms afterwards and it didnt reflect the changes.

Thanks,

Regards,

Nuno

Post

I don't think you can do this in VST2. Strictly speaking, SDK does not forbid this directly, but it's sort of self-evident since there's no functions to notify host of such changes. (Well, theoretically some hosts may for example re-ask for numPrograms before calling effGetProgram, but you'd better not rely on this since most of host don't.)

Post

Standard solution to the dynamic parameter count issue is to allocate for worst-case and simply ignore the parameters that don't currently do anything; most common approach is to report every possible parameter that might be needed, but you could also report a large set of "generic" parameters and then allocate internally (unfortunately you can't really rely on hosts checking for changes in parameter names either, so it's somewhat ugly from the user point of view).

Standard solution to the program count issue is to ignore the whole "preset banks" concept and simply implement your own preset management (typically reporting a single program to the host) if a fixed-size bank won't do the trick for you.

Post

Ok! Thanks for your help.

Post

Right on. Mystran summed it up perfectly (again) :)

Post Reply

Return to “DSP and Plugin Development”