A Fader Module maps an input target to an output value.
Typically, the input comes from a Midi control such as a knob. Because such controls are discrete (for example, integers from 0 to 127), directly mapping the input to the output would result in abropt changes to the Fader value. The Fader object solves this with an internal state that uses proportional feedback to track the target, but moves continuously.
Typically, a list of fader objects is managed by a Controls object and a Fader object is not managed by the user directly.
|
| Fader () |
| Construct a new fader with range [0,1]. The default response is linear. And the default tracking gain is TRACKING_GAIN.
|
|
| Fader (double min, double max) |
|
void | init () |
|
void | update () |
|
void | randomize () |
| Set the target of the fader to a random value from within its min and max values.
|
|
void | set_tracking_gain (double x) |
|
void | linear () |
| Set the response of the fader to lienar.
|
|
void | exponential (double b) |
|
virtual void | init ()=0 |
|
virtual void | update ()=0 |
|
int | add_input (string name) |
|
int | add_output (string name) |
|
int | get_input_index (string name) const |
|
string | get_input_name (int index) const |
|
string | get_output_name (int index) const |
|
int | get_output_index (string name) const |
|
void | set_input (string name, double value) |
|
void | set_input (int index, double value) |
|
double | get_input (int index) const |
|
double | get_input (string name) const |
|
double | get_output (string name) const |
|
double | get_output (int index) const |
|
void | set_output (int index, double value) |
|
void | copy_inputs (const Module &source) |
|
void | copy_outputs (Module &destination) const |
|
void | configure (std::vector< std::tuple< string, double > > assignments) |
|
int | num_inputs () const |
|
int | num_outputs () const |
|
void | emit (Event e) |
|
void | set_ts (double s) |
|
double | get_ts () |
|