fsh::stk
fantastic spatial holophonic synthesis toolkit
Loading...
Searching...
No Matches
fsh::plugin::ParamChoice Struct Reference

Used to add a choice (enum) parameter to a plugin. More...

#include <ParamChoice.h>

Public Types

using Attributes = juce::AudioParameterChoiceAttributes
 Used to specify the parameter's attributes, e.g. a label. See the JUCE docs for details.
 

Public Member Functions

auto create () const
 Creates a juce::AudioParameterChoice object from the given parameters.
 

Public Attributes

juce::ParameterID id
 The parameter's unique ID, used to identify it in the DAW.
 
juce::String name
 The parameter's name, displayed in the DAW's automation.
 
juce::StringArray choices
 The parameter's choices, displayed in the DAW's automation.
 
float defaultIndex = 0.0
 The parameter's default value, as an index into the choices array.
 
Attributes attributes = {}
 The parameter's attributes, e.g. a label.
 

Detailed Description

Used to add a choice (enum) parameter to a plugin.

Use a designated initializer and call create() directly for maximum readability, e.g.:

fsh::ParamChoice{
.id = "parameter_id",
.name = "The Name of the Parameter",
.choices = { "Foo", "Bar", "Baz" },
}.create()

Return a list of these inside a function returning a juce::AudioProcessorValueTreeState::ParameterLayout object to create the parameter layout, which you can then pass to the constructor of your plugin's PluginState class.


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