Ardour
9.0-pre0-582-g084a23a80d
|
#include <parameter_descriptor.h>
Public Types | |
enum | Unit { NONE , DB , MIDI_NOTE , HZ } |
typedef std::map< std::string, uint8_t > | NameNumMap |
Public Member Functions | |
ParameterDescriptor (const Evoral::Parameter ¶meter) | |
ParameterDescriptor () | |
float | to_interface (float v, bool rotary=false) const |
float | from_interface (float v, bool rotary=false) const |
bool | is_linear () const |
float | compute_delta (float from, float to) const |
float | apply_delta (float value, float delta) const |
float | step_enum (float val, bool prev) const |
void | update_steps () |
Public Member Functions inherited from Evoral::ParameterDescriptor | |
ParameterDescriptor () | |
virtual | ~ParameterDescriptor () |
Static Public Member Functions | |
static std::string | midi_note_name (uint8_t, bool translate=true) |
static std::string | normalize_note_name (const std::string &name) |
static NameNumMap | build_midi_name2num () |
static uint8_t | midi_note_num (const std::string &name) |
Public Attributes | |
std::string | label |
std::string | print_fmt |
format string for pretty printing More... | |
std::shared_ptr< ScalePoints > | scale_points |
uint32_t | key |
for properties More... | |
Variant::Type | datatype |
for properties More... | |
AutomationType | type |
Unit | unit |
float | step |
float | smallstep |
float | largestep |
bool | integer_step |
bool | sr_dependent |
bool | enumeration |
bool | inline_ctrl |
uint32_t | display_priority |
higher is more important http://lv2plug.in/ns/ext/port-props#displayPriority More... | |
Public Attributes inherited from Evoral::ParameterDescriptor | |
float | normal |
Default value. More... | |
float | lower |
Minimum value (in Hz, for frequencies) More... | |
float | upper |
Maximum value (in Hz, for frequencies) More... | |
bool | toggled |
True iff parameter is boolean. More... | |
bool | logarithmic |
True for log-scale parameters. More... | |
unsigned int | rangesteps |
number of steps, [min,max] (inclusive). <= 1 means continuous. == 2 only min, max. For integer controls this is usually (1 + max - min) More... | |
Descriptor of a parameter or control.
Essentially a union of LADSPA, VST and LV2 info.
Definition at line 43 of file parameter_descriptor.h.
typedef std::map<std::string, uint8_t> ARDOUR::ParameterDescriptor::NameNumMap |
Dual of midi_note_name, convert a note name into its midi note number.
Definition at line 55 of file parameter_descriptor.h.
Enumerator | |
---|---|
NONE | No unit. |
DB | Decibels. |
MIDI_NOTE | MIDI note number. |
HZ | Frequency in Hertz. |
Definition at line 45 of file parameter_descriptor.h.
ARDOUR::ParameterDescriptor::ParameterDescriptor | ( | const Evoral::Parameter & | parameter | ) |
ARDOUR::ParameterDescriptor::ParameterDescriptor | ( | ) |
float ARDOUR::ParameterDescriptor::apply_delta | ( | float | value, |
float | delta | ||
) | const |
|
static |
float ARDOUR::ParameterDescriptor::compute_delta | ( | float | from, |
float | to | ||
) | const |
float ARDOUR::ParameterDescriptor::from_interface | ( | float | v, |
bool | rotary = false |
||
) | const |
normalized [0..1] to control-value range
Convert [0..1] to the control's range of this AutomationType using settings from Evoral::ParameterDescriptor.
default for AutomationControl::interface_to_internal ();
v | the value in range 0..1 to on convert |
rotary | set to true if the GUI control is a rotary knob |
bool ARDOUR::ParameterDescriptor::is_linear | ( | ) | const |
|
static |
|
static |
|
static |
float ARDOUR::ParameterDescriptor::step_enum | ( | float | val, |
bool | prev | ||
) | const |
|
virtual |
control-value to normalized [0..1] range
Convert given AutomationType from lower/upper range to [0..1] interface value, using settings from Evoral::ParameterDescriptor.
default for AutomationControl::internal_to_interface ();
v | the control-value to convert |
rotary | set to true if the GUI control is a rotary knob |
Reimplemented from Evoral::ParameterDescriptor.
void ARDOUR::ParameterDescriptor::update_steps | ( | ) |
Set step, smallstep, and largestep, based on current description.
Variant::Type ARDOUR::ParameterDescriptor::datatype |
for properties
Definition at line 112 of file parameter_descriptor.h.
uint32_t ARDOUR::ParameterDescriptor::display_priority |
higher is more important http://lv2plug.in/ns/ext/port-props#displayPriority
Definition at line 122 of file parameter_descriptor.h.
bool ARDOUR::ParameterDescriptor::enumeration |
Definition at line 120 of file parameter_descriptor.h.
bool ARDOUR::ParameterDescriptor::inline_ctrl |
Definition at line 121 of file parameter_descriptor.h.
bool ARDOUR::ParameterDescriptor::integer_step |
Definition at line 118 of file parameter_descriptor.h.
uint32_t ARDOUR::ParameterDescriptor::key |
for properties
Definition at line 111 of file parameter_descriptor.h.
std::string ARDOUR::ParameterDescriptor::label |
Definition at line 108 of file parameter_descriptor.h.
float ARDOUR::ParameterDescriptor::largestep |
Definition at line 117 of file parameter_descriptor.h.
std::string ARDOUR::ParameterDescriptor::print_fmt |
format string for pretty printing
Definition at line 109 of file parameter_descriptor.h.
std::shared_ptr<ScalePoints> ARDOUR::ParameterDescriptor::scale_points |
Definition at line 110 of file parameter_descriptor.h.
float ARDOUR::ParameterDescriptor::smallstep |
Definition at line 116 of file parameter_descriptor.h.
bool ARDOUR::ParameterDescriptor::sr_dependent |
Definition at line 119 of file parameter_descriptor.h.
float ARDOUR::ParameterDescriptor::step |
Definition at line 115 of file parameter_descriptor.h.
AutomationType ARDOUR::ParameterDescriptor::type |
Definition at line 113 of file parameter_descriptor.h.
Unit ARDOUR::ParameterDescriptor::unit |
Definition at line 114 of file parameter_descriptor.h.