This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
juce_and_parameter_automation [2017/10/22 18:45] shane created |
juce_and_parameter_automation [2017/10/22 20:32] (current) shane [The newer approach: AudioProcessorValueTreeState] |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| * Plugin to host: user manipulates GUI controls, changes are recorded by a host DAW. | * Plugin to host: user manipulates GUI controls, changes are recorded by a host DAW. | ||
| * Host to plugin: DAW recreates user's manipulations automatically using playback. | * Host to plugin: DAW recreates user's manipulations automatically using playback. | ||
| + | |||
| + | **Automation vs. saving/ | ||
| + | |||
| + | JUCE 5 provides two distinct sets of classes to support parameter automation via an older and a newer approach. The older approach, which pre-dates JUCE version 5, involves instantiating parameter objects based on classes derived from // | ||
| + | |||
| + | ===== The older approach: AudioParameter ===== | ||
| + | |||
| + | The older approach, which pre-dates JUCE version 5, involves instantiating parameter objects based on classes derived from // | ||
| + | * **AudioParameterFloat** represents a floating-point value, e.g. a value set by a knob or slider. This is the most basic kind of parameter, because floating-point parameters are supported by all plugin hosts, regardless of the specific interface technology. | ||
| + | * **AudioParameterInt** represents an integer value, e.g. something like a MIDI note-number or velocity. | ||
| + | * **AudioParameterChoice** represents a discrete choice among a defined set of values, e.g. an oscillator waveform type chosen from the set { *sine, triangle, square, sawtooth* }. You could think of this as a specialized form of integer parameter, where the range is restricted to [0, *number_of_choices*-1]. | ||
| + | * **AudioParameterBool** represents a logical value (*true* or *false*), e.g. whether a certain effect or function is enabled or not. You could think of this a limited form of choice parameter where the available choices is { *false, true* }. | ||
| + | |||
| + | Updates //from the plugin to the host// are sent by calling // | ||
| + | * **beginChangeGesture()** alerts the host that a sequence of parameter changes is forthcoming | ||
| + | * **operator=** (which itself calls // | ||
| + | * **endChangeGesture()** informs the host that this sequence of changes is done | ||
| + | |||
| + | This three-stage approach is obviously designed for use with continuous controls such as knobs or sliders, but is actually required for all kinds of parameters. (If you omit the // | ||
| + | |||
| + | Updates //from the host to the plugin// are received as asynchronous calls (callbacks) to the // | ||
| + | method has been marked as deprecated, meaning that it will eventually be unavailable, | ||
| + | |||
| + | I have put together a practical demo of how to apply this approach in a new project on GitHub at https:// | ||
| + | |||
| + | ===== The newer approach: AudioProcessorValueTreeState ===== | ||
| + | JUCE version 5 introduces a new class // | ||
| + | |||
| + | This will be the subject of my second exploratory project. See [[AudioParameterTest2]]. | ||
| More to come... | More to come... | ||