How to dynamically change numProgram and numParameters on a VST 2.4 based plugin?
-
- KVRist
- Topic Starter
- 69 posts since 3 Jun, 2011 from Braga, Portugal
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
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
Website http://www.imaginando.pt
- KVRist
- 347 posts since 20 Apr, 2005 from Moscow, Russian Federation
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.)
- KVRAF
- 7896 posts since 12 Feb, 2006 from Helsinki, Finland
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.
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.
-
- KVRist
- Topic Starter
- 69 posts since 3 Jun, 2011 from Braga, Portugal
-
- KVRAF
- 3388 posts since 29 May, 2001 from New York, NY