I am developing an graphical EQ plugin and I do all the filter calculations in the process-thread. I would then like to send the calculated filter coefficients to the controller to be able to plot the filter response of the filter. What is the recommended way for doing this?
Using the message passing stuffs to send an array of floats with the help of the notify mechanism?
Or creating a dedicated parameter for every coefficient and using the data.outputParameterChanges to send all the different coefficients one by one and receive them in the setParamNormalized in the controller?
Or is there any other recommended way of doing this kind of functionality for plotting the filter response?
Not an authoritative answer, but in my mind this kind of data should be sent via the messaging system. The only catch with using this mechanism is that the “send” can be tricky because it happens on the process side, yet the actual sending must be done outside the RT thread, (you need to call
allocateMessage() which should not be called from the RT thread). The framework I wrote (Jamba) takes care of all the nitty gritty aspects of this and if you want to take a look at the code it is open source.
Using output parameters would alleviate this logic but you are constrained with values between 0.0 and 1.0 since that is the only values VST parameters can represent…
Thank you for your reply!
I totally forgot that the VST parameters only can represent values between 0.0 and 1.0, so that concludes that it is a much clever idea to use the messaging system instead of trying to downscale every parameter in the process and then upscale all of them in the controller. Also since the message system can pass an entire array of floats instead of sending each coefficients separately if using them as parameters.
I also checked some other EQ plugins and when looking at the info sections of the plugin and then go to the tab “parameters” there were no visible coefficients as parameters. But if I tried using one coefficient in my plugin as a parameters (both readonly and hidden flag set), the parameter were still visible under the parameter tab in the info section of my plugin. So I guess no one is using output parameters for sending filter coefficients to the controller when plotting them