VST 3 SDK
VST 3.7
SDK for developing VST plug-in
|
Utility class to handle sample accurate parameter changes coming from IParamValueQueue. More...
#include <sampleaccurate.h>
Public Member Functions | |
Parameter (ParamID pid=0, ParamValue initValue=0.) noexcept | |
void | setValue (ParamValue v) noexcept |
Set the value of the parameter. | |
void | setParamID (ParamID pid) noexcept |
Set the ID of the parameter. | |
ParamID | getParamID () const noexcept |
Get the ID of the parameter. | |
ParamValue | getValue () const noexcept |
Get the current value of the parameter. | |
bool | hasChanges () const noexcept |
Are there any pending changes. | |
void | beginChanges (IParamValueQueue *valueQueue) noexcept |
Begin change sequence. | |
ParamValue | advance (int32 numSamples) noexcept |
Advance the changes in queue. | |
ParamValue | flushChanges () noexcept |
Flush all changes in the queue. | |
ParamValue | endChanges () noexcept |
End change sequence. | |
template<typename Proc > | |
void | advance (int32 numSamples, Proc p) noexcept |
Templated variant of advance. | |
template<typename Proc > | |
void | flushChanges (Proc p) noexcept |
Templated variant of flushChanges. | |
template<typename Proc > | |
void | endChanges (Proc p) noexcept |
Templated variant of endChanges. | |
Utility class to handle sample accurate parameter changes coming from IParamValueQueue.
The normal use case is to setup the Parameter class once for a specific ParamID and then only use it in the realtime process method.
If there's a change for the parameter in the inputParameterChanges of the ProcessData structure the Parameters beginChange method should be called with the valueQueue of the parmID and then while processing the current audio block the parameter should be advanced as many samples as you would like to handle parameter changes. In the end the endChanges method must be called to cleanup internal data structures. For convenience the endChanges method can be called without a previous beginChanges call.
|
noexcept |
|
noexcept |
Set the value of the parameter.
When this is called during the beginChanges() and endChanges() sequence, the changes in the value queue are ignored
v | the new value of the parameter |
|
noexcept |
Set the ID of the parameter.
pid | the new ID of the parameter |
|
noexcept |
Get the ID of the parameter.
|
noexcept |
Get the current value of the parameter.
|
noexcept |
Are there any pending changes.
|
noexcept |
Begin change sequence.
valueQueue | the queue with the changes |
|
noexcept |
Advance the changes in queue.
numSamples | how many samples to advance in the queue |
|
noexcept |
Flush all changes in the queue.
|
noexcept |
End change sequence.
|
noexcept |
Templated variant of advance.
calls Proc p with the new value if the value changes
|
noexcept |
Templated variant of flushChanges.
calls Proc p with the new value if the value changes
|
noexcept |
Templated variant of endChanges.
calls Proc p with the new value if the value changes