Container class for a single parameter.
More...
#include <mostlyharmless_Parameters.h>
|
| Parameter (ParameterID parameterId_, std::string_view name_, std::string_view category_, marvin::utils::Range< SampleType > range_, SampleType defaultValue_, std::uint32_t flags_) |
|
| Parameter (std::uint32_t pid_, std::string_view name_, std::string_view category_, marvin::utils::Range< SampleType > range_, SampleType defaultValue_, std::uint32_t flags_) |
|
template<
marvin::FloatType SampleType>
struct mostly_harmless::Parameter< SampleType >
Container class for a single parameter.
◆ Parameter() [1/2]
Creates a Parameter, setting the pid field based on a ParameterID instance. We'd recommend using this constructor, but the other overload is available if you want custom logic for your PIDs.
- Parameters
-
parameterId_ | A ParameterID constructed with the unique internal name for your parameter. If you want to remain backwards compatible, make sure these strings do not change, and are unique. |
name_ | The parameter's user-facing name. |
category_ | The parameter's category - a clap feature supported by some hosts, to organise parameters in trees as opposed to an overwhelming flat list. |
range_ | The parameter's range. |
defaultValue_ | The parameter's default value. |
flags_ | The parameter's clap param flags - see here for more details. |
◆ Parameter() [2/2]
Creates a Parameter, setting the pid directly from the pid_ arg. Most of the time, the other overload is preferable here, but if you really want to manage your own PIDs, use this one.
- Parameters
-
pid_ | A unique uint32_t pid for your parameter. For backwards compatability, this must stay fixed, and must be unique. |
name_ | The parameter's user-facing name. |
category_ | The parameter's category - a clap feature supported by some hosts, to organise parameters in trees as opposed to an overwhelming flat list. |
range_ | The parameter's range. |
defaultValue_ | The parameter's default value. |
flags_ | The parameter's clap param flags - see here for more details. |
◆ category
The parameter's category - a clap feature supported by some hosts, to organise parameters in trees as opposed to an overwhelming flat list.
◆ defaultValue
The parameter's default value.
◆ flags
The parameter's clap param flags - see here for more details.
◆ name
The parameter's user-facing name.
◆ pid
The Parameter's internal ID, used for lookups, etc. CLAP requires that this stay fixed to avoid compatability issues, and it must be unique.
◆ range
◆ value
The parameter's internal value.
◆ valueToString
An optional user-provided function for custom value displaying.
The documentation for this struct was generated from the following file: