JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
Steinberg::Vst::IParamValueQueue Class Referenceabstract

Queue of changes for a specific parameter: Vst::IParamValueQueue. More...

#include "ivstparameterchanges.h"

Inheritance diagram for Steinberg::Vst::IParamValueQueue:
Steinberg::FUnknown

Public Member Functions

virtual ParamID PLUGIN_API getParameterId ()=0
 Returns its associated ID.
 
virtual int32 PLUGIN_API getPointCount ()=0
 Returns count of points in the queue.
 
virtual tresult PLUGIN_API getPoint (int32 index, int32 &sampleOffset, ParamValue &value)=0
 Gets the value and offset at a given index.
 
virtual tresult PLUGIN_API addPoint (int32 sampleOffset, ParamValue value, int32 &index)=0
 Adds a new value at the end of the queue, its index is returned.
 
- Public Member Functions inherited from Steinberg::FUnknown
virtual tresult PLUGIN_API queryInterface (const TUID _iid, void **obj)=0
 Query for a pointer to the specified interface.
 
virtual uint32 PLUGIN_API addRef ()=0
 Adds a reference and returns the new reference count.
 
virtual uint32 PLUGIN_API release ()=0
 Releases a reference and returns the new reference count.
 

Static Public Attributes

static const FUID iid
 
- Static Public Attributes inherited from Steinberg::FUnknown
static const FUID iid
 

Detailed Description

Queue of changes for a specific parameter: Vst::IParamValueQueue.

The change queue can be interpreted as segment of an automation curve. For each processing block, a segment with the size of the block is transmitted to the processor. The curve is expressed as sampling points of a linear approximation of the original automation curve. If the original already is a linear curve, it can be transmitted precisely. A non-linear curve has to be converted to a linear approximation by the host. Every point of the value queue defines a linear section of the curve as a straight line from the previous point of a block to the new one. So the plug-in can calculate the value of the curve for any sample position in the block.

Implicit Points:
In each processing block, the section of the curve for each parameter is transmitted. In order to reduce the amount of points, the point at block position 0 can be omitted.

//------------------------------------------------------------------------
double x1 = -1; // position of last point related to current buffer
double y1 = currentParameterValue; // last transmitted value
int32 pointTime = 0;
ParamValue pointValue = 0;
IParamValueQueue::getPoint (0, pointTime, pointValue);
double x2 = pointTime;
double y2 = pointValue;
double slope = (y2 - y1) / (x2 - x1);
double offset = y1 - (slope * x1);
double curveValue = (slope * bufferTime) + offset; // bufferTime is any position in buffer
virtual tresult PLUGIN_API getPoint(int32 index, int32 &sampleOffset, ParamValue &value)=0
Gets the value and offset at a given index.
double ParamValue
parameter value type
Definition vsttypes.h:80
y1

Jumps:
A jump in the automation curve has to be transmitted as two points: one with the old value and one with the new value at the next sample position.

See IParameterChanges, ProcessData

Definition at line 84 of file ivstparameterchanges.h.

Member Data Documentation

◆ iid

const FUID Steinberg::Vst::IParamValueQueue::iid
static

Definition at line 101 of file ivstparameterchanges.h.


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