Menu

#4 Default parameter handling in vamp plugins

open
nobody
None
5
2006-05-22
2006-05-22
No

It would be useful if the programming interface
for vamp plugins used in the "Analysis Plugins"
section of Sonic Visualiser had a base class which
handled parameter values in a graceful default manner
(which could be over-ridden by an inherited class).

Currently the PluginBase class defines the
getParameter() function to always return 0.0 if it
is not overridden. Also, the default setParameter()
behaviour is to do nothing when asked to set a
parameter value.

There would be less overhead in creating new plugins
which use parameters if there were storage of the
current values for parameters in either the Plugin
class or the PluginBase class.

Attached to this feature request is an example class
which I will use for parameter-enabled plugins until
you steal (feel free to) the functionality of the
built-in parameter database.

To use the example parameter base class, you currently
do the following function call in the contructor to
your vamp plugin:
initializeParameterDatabase(getParameterDescriptors());

This stores the Parameter Descriptors and also places
the default values into the currentValue storage.
Then setParameter() and getParameter() interface to
this storage so that inherited classes do not have
to bother with parameter maintentance at all.

Discussion

  • Craig Stuart Sapp

    Header file for MazurkaPlugin base class

     
  • Craig Stuart Sapp

    Source code for MazurkaPlugin base class

     

Log in to post a comment.