VST 3 Examples VST 3.7 SDK for developing VST plug-in

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
VoiceBase< numValues, SamplePrecision, numChannels, GlobalParameterStorage > Class Template Reference

Example Voice class for the Steinberg::Vst::VoiceProcessorImplementation. More...

`#include <voicebase.h>`

## Public Member Functions
int32 | getNoteId () const
| Returns the current note id of this voice. More...
virtual void | setGlobalParameterStorage (GlobalParameterStorage *globalParameters)
| Sets a new GlobalParameterStorage. More...
virtual void | setSampleRate (ParamValue sampleRate)
| Sets the sampleRate. More...
float | getSampleRate () const
| Returns the sampleRate. More...
virtual void | setNoteExpressionValue (int32 index, ParamValue value)
virtual void | noteOn (int32 pitch, ParamValue velocity, float tuning, int32 sampleOffset, int32 noteId)
virtual void | noteOff (ParamValue velocity, int32 sampleOffset)
virtual void | reset ()

## Protected Member Functions
| VoiceBase ()
| VoiceBase (const VoiceBase &vb)
virtual | ~VoiceBase ()

## Protected Attributes
GlobalParameterStorage * | globalParameters
int32 | noteId
int32 | pitch
int32 | noteOnSampleOffset
int32 | noteOffSampleOffset
float | tuning {0}
ParamValue | sampleRate
ParamValue | noteOnVelocity
ParamValue | noteOffVelocity
ParamValue | values [numValues]

## Detailed Description

template<uint32 numValues, class SamplePrecision, uint32 numChannels, class GlobalParameterStorage>
class Steinberg::Vst::VoiceBase< numValues, SamplePrecision, numChannels, GlobalParameterStorage >

Example Voice class for the Steinberg::Vst::VoiceProcessorImplementation.

Implementation classes need to implement the following additional method:

bool process (SamplePrecision* outputBuffers[numChannels], int32 numSamples);
int32
int32_t int32

## Constructor & Destructor Documentation

## ◆ VoiceBase() [1/2]

VoiceBase
| protected

## ◆ VoiceBase() [2/2]

VoiceBase | ( | const VoiceBase< numValues, SamplePrecision, numChannels, GlobalParameterStorage > & | vb | ) |
| protected

## ◆ ~VoiceBase()

~VoiceBase
| protected virtual

## Member Function Documentation

## ◆ getNoteId()

int32 getNoteId | ( |  | ) | const
| inline

Returns the current note id of this voice.

## ◆ setGlobalParameterStorage()

virtual void setGlobalParameterStorage | ( | GlobalParameterStorage * | globalParameters | ) |
| inline virtual

Sets a new GlobalParameterStorage.

## ◆ setSampleRate()

virtual void setSampleRate | ( | ParamValue | sampleRate | ) |
| inline virtual

Sets the sampleRate.

Reimplemented in Voice< SamplePrecision >.

## ◆ getSampleRate()

float getSampleRate | ( |  | ) | const
| inline

Returns the sampleRate.

## ◆ setNoteExpressionValue()

virtual void setNoteExpressionValue | ( | int32 | index,
|  | ParamValue | value
| ) |  |
| inline virtual

Reimplemented in Voice< SamplePrecision >.

## ◆ noteOn()

void noteOn | ( | int32 | pitch,
|  | ParamValue | velocity,
|  | float | tuning,
|  | int32 | sampleOffset,
|  | int32 | noteId
| ) |  |
| virtual

Reimplemented in Voice< SamplePrecision >.

## ◆ noteOff()

void noteOff | ( | ParamValue | velocity,
|  | int32 | sampleOffset
| ) |  |
| virtual

Reimplemented in Voice< SamplePrecision >.

## ◆ reset()

virtual void reset | ( |  | ) |
| inline virtual

Reimplemented in Voice< SamplePrecision >.

## Member Data Documentation

## ◆ globalParameters

GlobalParameterStorage* globalParameters
| protected

## ◆ noteId

int32 noteId
| protected

## ◆ pitch

int32 pitch
| protected

## ◆ noteOnSampleOffset

int32 noteOnSampleOffset
| protected

## ◆ noteOffSampleOffset

int32 noteOffSampleOffset
| protected

## ◆ tuning

float tuning {0}
| protected

## ◆ sampleRate

ParamValue sampleRate
| protected

## ◆ noteOnVelocity

ParamValue noteOnVelocity
| protected

## ◆ noteOffVelocity

ParamValue noteOffVelocity
| protected

## ◆ values

ParamValue values[numValues]
| protected

Empty

Copyright © Steinberg Media Technologies GmbH. All Rights Reserved. This documentation is under this license.