parameter count gets changed... how to obtain it?

Oct 14, 2010 at 12:00 PM

Hi marc, I have a trouble with parameter count that gets changed with some plugins during their lifetime. I'm talking about Rea EQ plugin. When you add new band you get 3 more parameters; gain, bandwith and Q. With vstPluginContext.PluginInfo.ParameterCount I get the old count value. I'm not able to find any simple way which will somehow update and return correct value.  With vsthost I get updated parameters with that plugin.

regards, kasaudio

 

Coordinator
Oct 14, 2010 at 12:21 PM
Edited Oct 14, 2010 at 12:24 PM

On the plugin context there's a method thats called AcceptPluginInfoData. The method accepts a bool to indicate if PropertyChanged events should be raised for each property that has changed on the PluginInfo.

Try calling this method before processing audio (or during?) it should update the information in the PluginInfo with the latest information set by the plugin.

Note however, that currently this only works for unmanaged plugins. I haven't implemented it yet for managed plugins...
http://vstnet.codeplex.com/SourceControl/changeset/view/50709#358045

Hope it helps.
Marc

Oct 14, 2010 at 12:24 PM

Tnx marc for info. Will try that soon. Another q comes in a separate topic.

regards, kasaudio.

Oct 14, 2010 at 12:53 PM

Hello marc,

with AcceptPluginInfo(false) I was able to get corret value for number of parameters. I did not test whether AcceptPluginInfo(true) raises events, will do that also.

regards kasaudio

Coordinator
Oct 14, 2010 at 12:55 PM

Great! Well, it should. ;-)

If you do not use the PropertyChanged event, you can use false as a paremeter value.