Menu

#39 new vamp ParameterDescriptor field

open
nobody
None
5
2007-01-21
2007-01-21
No

It would be useful to have a hide/unhide field
in the ParameterDescriptor data structure used
for user input in Vamp plugins. This field would
be used to control user access to setting parameters
in the host application.

A new field called "hide" would be set to false
(by default) to allow normal user setting of the
parameters setup in the getParameterDescriptors
function. A value of true would supress display
of the parameter in the user interface and use
the default value.

Here is an example:

ParameterDescriptor pd;
pd.name = "windowsamples";
pd.description = "Window size";
pd.unit = "samples";
pd.minValue = 2.0;
pd.maxValue = 20000.0;
pd.defaultValue = 512.0;
pd.isQuantized = true;
pd.quantizeStep = 1.0;
pdlist.push_back(pd);

In this case a parameter called "Window size"
is displayed to the user as input to the plugin
and they can change the value between 2 and 20000,
with the initial value being set to 512.

Now, suppose there were a new field called hide:

ParameterDescriptor pd;
pd.name = "windowsamples";
pd.description = "Window size";
pd.unit = "samples";
pd.minValue = 2.0;
pd.maxValue = 20000.0;
pd.defaultValue = 512.0;
pd.isQuantized = true;
pd.quantizeStep = 1.0;
pd.hide = true;
pdlist.push_back(pd);

When it is set to true, this parameter field
would not be displayed to the user, and the
plugin would be given the default value as input
(512 in this case).

This feature would be useful for switching between
fixed and variable parameters. This would be
particularly useful for migrating between development
and distribution stages of plugin creation; where
variable parameters might be useful for testing
purposes, but would clutter up the input interface
in normal day-to-day use by regular plugin users.

Discussion

  • Chris Cannam

    Chris Cannam - 2007-01-24

    Logged In: YES
    user_id=13489
    Originator: NO

    Perhaps more widely applicable might be a way of grouping parameters into "basic" and "advanced" parameters?

    Or just a way of grouping parameters, full stop.

     
  • Craig Stuart Sapp

    Logged In: YES
    user_id=1261876
    Originator: YES

    > Perhaps more widely applicable might be a way
    > of grouping parameters into "basic" and "advanced"
    > parameters?

    Yes, something like that. There are too many parameters in some of my
    plugins. Most of these are not interesting for a normal user, and I don't
    want to see them on a day-to-day basis when using my own plugin. But
    I don't want to have to manually change the source code to hide them from
    the user, because I am too lazy :-).

    So a "basic" and "expert" mode for the plugin parameters might be useful.
    In basic mode, only the more interesting/useful parameters are displayed
    and the defaults are used for the other parameter inputs. In "expert"
    mode, all of the useless normally fixed parameters are shown and can
    be adjusted by the user.

    For example, in MzSpectralFlux, there is a window size and a step size which
    I allow the user to change. But the code for the plugin is somewhat hardwired
    to the default settings, so those two parameters are not particularly useful,
    but I don't want to get rid of them totally.

     

Log in to post a comment.