79 return details_lookup_.count(name);
89 auto details = details_lookup_.find(name);
91 return details->second;
101 return details_list_[index];
120 return static_cast<int>(details_list_.size());
130 auto details = details_lookup_.find(name);
132 return details->second.max - details->second.min;
141 return details_lookup_;
157 std::string id_prefix, std::string name_prefix,
int version = -1);
170 std::string id_prefix, std::string name_prefix,
int version = -1);
182 std::map<std::string, ValueDetails> details_lookup_;
183 std::vector<const ValueDetails*> details_list_;
A static utility class to access parameter details globally.
Definition synth_parameters.h:198
static const ValueDetails * getDetails(int index)
Definition synth_parameters.h:208
static ValueDetailsLookup lookup_
Definition synth_parameters.h:228
static int getNumParameters()
Definition synth_parameters.h:204
static const bool isParameter(const std::string &name)
Definition synth_parameters.h:220
static std::map< std::string, ValueDetails > getAllDetails()
Definition synth_parameters.h:224
static const ValueDetails & getDetails(const std::string &name)
Definition synth_parameters.h:200
static std::string getDisplayName(const std::string &name)
Definition synth_parameters.h:212
static const mono_float getParameterRange(const std::string &name)
Definition synth_parameters.h:216
Maintains a lookup table for all parameters defined in Vital.
Definition synth_parameters.h:63
int getNumParameters() const
Gets the number of parameters defined.
Definition synth_parameters.h:119
mono_float getParameterRange(const std::string &name) const
Gets the full parameter range (max - min).
Definition synth_parameters.h:129
static const ValueDetails parameter_list[]
Definition synth_parameters.h:173
const bool isParameter(const std::string &name) const
Checks if a given name corresponds to a known parameter.
Definition synth_parameters.h:78
static const ValueDetails osc_parameter_list[]
Definition synth_parameters.h:178
std::map< std::string, ValueDetails > getAllDetails() const
Returns a copy of all parameter details in a map.
Definition synth_parameters.h:140
static const ValueDetails random_lfo_parameter_list[]
Definition synth_parameters.h:176
const ValueDetails & getDetails(const std::string &name) const
Retrieves ValueDetails for a given parameter name.
Definition synth_parameters.h:88
static const ValueDetails env_parameter_list[]
Definition synth_parameters.h:174
static const ValueDetails filter_parameter_list[]
Definition synth_parameters.h:177
std::string getDisplayName(const std::string &name) const
Gets a human-readable display name for a parameter.
Definition synth_parameters.h:110
ValueDetailsLookup()
Constructs a ValueDetailsLookup and initializes its parameter tables.
Definition synth_parameters.cpp:537
static const ValueDetails mod_parameter_list[]
Definition synth_parameters.h:179
static const ValueDetails lfo_parameter_list[]
Definition synth_parameters.h:175
const ValueDetails * getDetails(int index) const
Retrieves ValueDetails by parameter index.
Definition synth_parameters.h:100
void addParameterGroup(const ValueDetails *list, int num_parameters, int index, std::string id_prefix, std::string name_prefix, int version=-1)
Adds a group of parameters, each with prefixed names and display names.
Definition synth_parameters.cpp:608
#define VITAL_ASSERT(x)
Definition common.h:11
Contains classes and functions used within the Vital synthesizer framework.
float mono_float
Definition common.h:33
Holds metadata about a single parameter (control) in the Vital synthesizer.
Definition synth_parameters.h:23
mono_float max
Maximum parameter value.
Definition synth_parameters.h:41
mono_float display_multiply
Multiplier for converting internal values to display units.
Definition synth_parameters.h:44
bool display_invert
If true, invert the displayed value range.
Definition synth_parameters.h:46
mono_float post_offset
Offset applied after scaling (for certain scale types).
Definition synth_parameters.h:43
ValueScale
Describes the scaling mode used to interpret and display parameter values.
Definition synth_parameters.h:28
@ kQuartic
Parameter value transformed by a quartic curve.
Definition synth_parameters.h:33
@ kSquareRoot
Parameter value transformed by a square root function.
Definition synth_parameters.h:34
@ kLinear
Parameter scales linearly between min and max.
Definition synth_parameters.h:30
@ kCubic
Parameter value transformed by a cubic curve.
Definition synth_parameters.h:32
@ kExponential
Parameter value transformed by an exponential function.
Definition synth_parameters.h:35
@ kIndexed
Parameter steps through discrete indexed values.
Definition synth_parameters.h:29
@ kQuadratic
Parameter value transformed by a quadratic curve.
Definition synth_parameters.h:31
mono_float min
Minimum parameter value.
Definition synth_parameters.h:40
std::string display_name
Human-readable name for display in UI.
Definition synth_parameters.h:48
std::string local_description
Local description or additional metadata.
Definition synth_parameters.h:50
int version_added
Version code when the parameter was introduced or changed.
Definition synth_parameters.h:39
const std::string * string_lookup
Optional lookup table for indexed parameter names.
Definition synth_parameters.h:49
mono_float default_value
Default value for the parameter.
Definition synth_parameters.h:42
std::string name
Unique parameter name/identifier.
Definition synth_parameters.h:38
ValueScale value_scale
The scaling mode of the parameter value.
Definition synth_parameters.h:45
std::string display_units
Units to display next to the parameter (e.g., "Hz", "dB").
Definition synth_parameters.h:47