Skip to content
pierreguillot edited this page Apr 14, 2018 · 1 revision

Parameter

A parameter represents an aspect of the plugin engine with a number, such as the frequency of a ring modulation for example. Parameters are used to record and play automations, save and recall presets, and so on. Thus, the parameters are part of the protocol that allows digital audio workstations to control the plugin engine. The use of the parameters first requires defining them and then creating the communication system in the patch to interact with the digital audio workstations via the plugin.

Creation

Each new param entry in the plugin properties file adds a new parameter to the plugin. The only essential properties of the parameters are their indices defined according to their order of creation which depends on the reading of the property file from top to bottom:

param;
param;

Important: Digital audio workstations only support the addition or deletion of parameters at the end of the parameter lists. Inserting or deleting parameters in the middle of the list breaks the compatibility of automations and presets.

By default, a parameter is just a value between 0 and 1. A set of optional arguments can be used after the param entry to define several aspects of their properties using options. A dash - with a name allows to define an option. The options are:

  • name followed by a string of characters defines the name of the parameter, for example -name Frequency .
  • label followed by a string of characters defines the label of the parameter, for example -name Hertz.
  • min followed by a number defines the minimum value of the parameter, for example -min 20 (the default is -min 0).
  • max followed by a number defines the maximum value of the parameter, for example -max 44100 (the default is -max 1).
  • default followed by a number defines the default value of the parameter, for example -default 220 (the default is the minimum value).
  • nsteps followed by a number defines the number of step between the minimum and the maximum values of the parameters, for example a switch has two steps -nsteps 2 (the default is -nsteps 0 for continuous values).
  • auto followed by a boolean value defines if the parameter is automatable, for example -auto false, (the default is -auto true).
  • meta followed by a boolean value defines if the parameter is meta-parameter (if it controls other parameters), for example -meta true, (the default is -meta false).
  • list followed by a list of strings of characters enable the list mode of the parameter. The graphical interface no longer displays number but the elements of the list depending on the value of the parameter. With the list mode, the mninimum value of the parameter is zero, the maximum value of the parameter is the number of elements in the list minus one and the number of steps is the number of elements in the list (thus these options are no more supported). The elements of the list are separated by slash /, for example -list Triangular/Sawtooth/Square.

Here are examples of parameters:

param -name Frequency -min 0 -max 22050 -default 220;
param -name Modulation -label % -min 0 -max 100 -default 0;
param -name Volume -label dB -min -90 -max 0 -default 0;
param -name Octave -min -3 -max 3 -default 0 -nsteps 7;
param -name Waveform -list Triangular/Sawtooth/Narrow Rectangular/Square

Communication

MIDI In Example