Simple parameter mapping tool that takes a 0-1 input from an hid_ctrl.
#include <parameter.h>
Public Types | |
enum | Curve { LINEAR , EXPONENTIAL , LOGARITHMIC , CUBE , LAST } |
Public Member Functions | |
Parameter () | |
~Parameter () | |
void | Init (AnalogControl input, float min, float max, Curve curve) |
float | Process () |
float | Value () |
|
inline |
Constructor
|
inline |
Destructor
void daisy::Parameter::Init | ( | AnalogControl | input, |
float | min, | ||
float | max, | ||
Curve | curve | ||
) |
initialize a parameter using an hid_ctrl object.
input | - object containing the direct link to a hardware control source. |
min | - bottom of range. (when input is 0.0) |
max | - top of range (when input is 1.0) |
curve | - the scaling curve for the input->output transformation. |
float daisy::Parameter::Process | ( | ) |
processes the input signal, this should be called at the samplerate of the hid_ctrl passed in.
|
inline |
the output of process in a local variable.