Skip to content

Class daisy::Parameter

ClassList > daisy > Parameter

More...

  • #include <parameter.h>

Public Types

Type Name
enum Curve

Public Functions

Type Name
void Init (AnalogControl input, float min, float max, Curve curve)
Parameter ()
float Process ()
float Value ()
~Parameter ()

Detailed Description

Simple parameter mapping tool that takes a 0-1 input from an hid_ctrl.

Public Types Documentation

enum Curve

enum daisy::Parameter::Curve {
    LINEAR,
    EXPONENTIAL,
    LOGARITHMIC,
    CUBE,
    LAST
};

Curves are applied to the output signal


Public Functions Documentation

function Init

void daisy::Parameter::Init (
    AnalogControl input,
    float min,
    float max,
    Curve curve
) 

initialize a parameter using an hid_ctrl object.

Parameters:

  • 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.

function Parameter

inline daisy::Parameter::Parameter () 

Constructor


function Process

float daisy::Parameter::Process () 

processes the input signal, this should be called at the samplerate of the hid_ctrl passed in.

Returns:

a float with the specified transformation applied.


function Value

inline float daisy::Parameter::Value () 

Returns:

the current value from the parameter without processing another sample. this is useful if you need to use the value multiple times, and don't store

the output of process in a local variable.


function ~Parameter

inline daisy::Parameter::~Parameter () 

Destructor



The documentation for this class was generated from the following file external-docs/libDaisy/src/hid/parameter.h