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

Used to add a floating point parameter to a plugin. More...

#include <ParamFloat.h>

Public Types

using Range = juce::NormalisableRange<float>
 Used to specify the parameter's range. See the JUCE docs for details.
 
using Attributes = juce::AudioParameterFloatAttributes
 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::AudioParameterFloat object from the given parameters.
 

Static Public Member Functions

static Range freqRange (float min=20.0f, float max=20 '000.0f, float interval=1.0f)
 Returns a range with a skew factor that is suitable for logarithmic frequency sliders in audio.
 

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.
 
Range range
 The parameter's range, including optional step size and skew factor.
 
float defaultVal = 0.0
 The parameter's default value.
 
Attributes attributes = {}
 The parameter's attributes, e.g. a label.
 

Detailed Description

Used to add a floating point parameter to a plugin.

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

fsh::ParamFloat{
.id = "parameter_id",
.name = "The Name of the Parameter",
.range = { [min], [max] },
}.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: