Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::ParameterDescriptor Struct Reference

#include <parameter_descriptor.h>

Inheritance diagram for ARDOUR::ParameterDescriptor:
[legend]

Public Types

enum  Unit { NONE , DB , MIDI_NOTE , HZ }
 
typedef std::map< std::string, uint8_t > NameNumMap
 

Public Member Functions

 ParameterDescriptor (const Evoral::Parameter &parameter)
 
 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< ScalePointsscale_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...
 

Detailed Description

Descriptor of a parameter or control.

Essentially a union of LADSPA, VST and LV2 info.

Definition at line 43 of file parameter_descriptor.h.

Member Typedef Documentation

◆ NameNumMap

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.

Member Enumeration Documentation

◆ Unit

Enumerator
NONE 

No unit.

DB 

Decibels.

MIDI_NOTE 

MIDI note number.

HZ 

Frequency in Hertz.

Definition at line 45 of file parameter_descriptor.h.

Constructor & Destructor Documentation

◆ ParameterDescriptor() [1/2]

ARDOUR::ParameterDescriptor::ParameterDescriptor ( const Evoral::Parameter parameter)

◆ ParameterDescriptor() [2/2]

ARDOUR::ParameterDescriptor::ParameterDescriptor ( )

Member Function Documentation

◆ apply_delta()

float ARDOUR::ParameterDescriptor::apply_delta ( float  value,
float  delta 
) const

◆ build_midi_name2num()

static NameNumMap ARDOUR::ParameterDescriptor::build_midi_name2num ( )
static

◆ compute_delta()

float ARDOUR::ParameterDescriptor::compute_delta ( float  from,
float  to 
) const

◆ from_interface()

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 ();

Parameters
vthe value in range 0..1 to on convert
rotaryset to true if the GUI control is a rotary knob
Returns
control-value in range lower..upper

◆ is_linear()

bool ARDOUR::ParameterDescriptor::is_linear ( ) const

◆ midi_note_name()

static std::string ARDOUR::ParameterDescriptor::midi_note_name ( uint8_t  ,
bool  translate = true 
)
static

◆ midi_note_num()

static uint8_t ARDOUR::ParameterDescriptor::midi_note_num ( const std::string &  name)
static

◆ normalize_note_name()

static std::string ARDOUR::ParameterDescriptor::normalize_note_name ( const std::string &  name)
static

◆ step_enum()

float ARDOUR::ParameterDescriptor::step_enum ( float  val,
bool  prev 
) const

◆ to_interface()

float ARDOUR::ParameterDescriptor::to_interface ( float  v,
bool  rotary = false 
) 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 ();

Parameters
vthe control-value to convert
rotaryset to true if the GUI control is a rotary knob
Returns
interface value in range 0..1

Reimplemented from Evoral::ParameterDescriptor.

◆ update_steps()

void ARDOUR::ParameterDescriptor::update_steps ( )

Set step, smallstep, and largestep, based on current description.

Member Data Documentation

◆ datatype

Variant::Type ARDOUR::ParameterDescriptor::datatype

for properties

Definition at line 112 of file parameter_descriptor.h.

◆ display_priority

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.

◆ enumeration

bool ARDOUR::ParameterDescriptor::enumeration

Definition at line 120 of file parameter_descriptor.h.

◆ inline_ctrl

bool ARDOUR::ParameterDescriptor::inline_ctrl

Definition at line 121 of file parameter_descriptor.h.

◆ integer_step

bool ARDOUR::ParameterDescriptor::integer_step

Definition at line 118 of file parameter_descriptor.h.

◆ key

uint32_t ARDOUR::ParameterDescriptor::key

for properties

Definition at line 111 of file parameter_descriptor.h.

◆ label

std::string ARDOUR::ParameterDescriptor::label

Definition at line 108 of file parameter_descriptor.h.

◆ largestep

float ARDOUR::ParameterDescriptor::largestep

Definition at line 117 of file parameter_descriptor.h.

◆ print_fmt

std::string ARDOUR::ParameterDescriptor::print_fmt

format string for pretty printing

Definition at line 109 of file parameter_descriptor.h.

◆ scale_points

std::shared_ptr<ScalePoints> ARDOUR::ParameterDescriptor::scale_points

Definition at line 110 of file parameter_descriptor.h.

◆ smallstep

float ARDOUR::ParameterDescriptor::smallstep

Definition at line 116 of file parameter_descriptor.h.

◆ sr_dependent

bool ARDOUR::ParameterDescriptor::sr_dependent

Definition at line 119 of file parameter_descriptor.h.

◆ step

float ARDOUR::ParameterDescriptor::step

Definition at line 115 of file parameter_descriptor.h.

◆ type

AutomationType ARDOUR::ParameterDescriptor::type

Definition at line 113 of file parameter_descriptor.h.

◆ unit

Unit ARDOUR::ParameterDescriptor::unit

Definition at line 114 of file parameter_descriptor.h.


The documentation for this struct was generated from the following file: