VST 3 Examples: PianoProcessor Class Reference
Author: Steinberg

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

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
PianoProcessor Class Reference

`#include <mdaPianoProcessor.h>`

Inheritance diagram for PianoProcessor:

## Classes
struct | KGRP
struct | VOICE

## Public Types
enum | { NPARAMS =12, WAVELEN =586348 }
using | Base = BaseProcessor

## Public Member Functions
| PianoProcessor ()
| ~PianoProcessor ()
int32 | getVst2UniqueId () const SMTG_OVERRIDE
tresult | initialize (FUnknown *context) SMTG_OVERRIDE
tresult | terminate () SMTG_OVERRIDE
tresult | setActive (TBool state) SMTG_OVERRIDE
void | doProcessing (ProcessData &data) SMTG_OVERRIDE
bool | hasProgram () const SMTG_OVERRIDE
Steinberg::uint32 | getCurrentProgram () const SMTG_OVERRIDE
Steinberg::uint32 | getNumPrograms () const SMTG_OVERRIDE
void | setCurrentProgram (Steinberg::uint32 val) SMTG_OVERRIDE
void | setCurrentProgramNormalized (ParamValue val) SMTG_OVERRIDE
Public Member Functions inherited from SampleAccurateBaseProcessor
| SampleAccurateBaseProcessor ()
void | allocParameters (int32 numParams) final
tresult | process (ProcessData &data) final
bool | processParameterChanges (IParameterChanges *changes) final

## Static Public Member Functions
static FUnknown * | createInstance (void *)
static | DECLARE_UID (uid, 0xA77EA27C, 0x1F184322, 0xBBD2AD93, 0x73A2B7A0)

## Static Public Attributes
static const int32 | kNumPrograms = 8
static float | programParams [][NPARAMS]

## Protected Types
using | SynthDataT = SynthData< VOICE, kEventBufferSize, kNumVoices >

## Protected Member Functions
void | setParameter (ParamID index, ParamValue newValue, int32 sampleOffset) SMTG_OVERRIDE
void | preProcess () SMTG_OVERRIDE
void | processEvent (const Event &event) SMTG_OVERRIDE
void | noteEvent (const Event &event)
void | recalculate () SMTG_OVERRIDE
void | allNotesOff ()

## Protected Attributes
float | Fs
float | iFs
SynthDataT | synthData
KGRP | kgrp [16]
| global internal variables
int32 | poly
int32 | cpos
short * | waves
int32 | cmax
float * | comb
float | cdep
float | width
float | trim
int32 | size
float | tune
float | fine
float | random
float | stretch
float | muff
float | muffvel
float | sizevel
float | velsens
float | volume
Steinberg::uint32 | currentProgram

## Static Protected Attributes
static constexpr int32 | kNumVoices = 32
static constexpr int32 | kEventBufferSize = 64

## Additional Inherited Members
Public Attributes inherited from AudioEffect
OBJ_METHODS(AudioEffect, Component) DEFINE_INTERFACES DEF_INTERFACE(IAudioProcessor) DEF_INTERFACE(IProcessContextRequirements) END_DEFINE_INTERFACES(Component) REFCOUNT_METHODS(Component) protected ProcessContextRequirements | processContextRequirements
OBJ_METHODS(Component, ComponentBase) DEFINE_INTERFACES DEF_INTERFACE(IComponent) END_DEFINE_INTERFACES(ComponentBase) REFCOUNT_METHODS(ComponentBase) protected BusList | audioInputs
BusList | audioOutputs
BusList | eventInputs
BusList | eventOutputs
OBJ_METHODS(ComponentBase, FObject) DEFINE_INTERFACES DEF_INTERFACE(IPluginBase) DEF_INTERFACE(IConnectionPoint) END_DEFINE_INTERFACES(FObject) REFCOUNT_METHODS(FObject) protected IPtr < IConnectionPoint > | peerConnection

## Member Typedef Documentation

using Base = BaseProcessor

using SynthDataT = SynthData<VOICE, kEventBufferSize, kNumVoices>
| protected

## Member Enumeration Documentation

anonymous enum

Enumerator
NPARAMS |
WAVELEN |

## Constructor & Destructor Documentation

PianoProcessor | ( |  | ) |

~PianoProcessor | ( |  | ) |

## Member Function Documentation

int32 getVst2UniqueId | ( |  | ) | const
| inlinevirtual

Implements Processor.

tresult initialize | ( | FUnknown * | context | ) |
| virtual

Reimplemented from AudioEffect.

tresult terminate | ( |  | ) |
| virtual

Reimplemented from AudioEffect.

tresult setActive | ( | TBool | state | ) |
| virtual

Reimplemented from Processor.

void doProcessing | ( | ProcessData & | data | ) |
| virtual

Implements Processor.

bool hasProgram | ( |  | ) | const
| inlinevirtual

Reimplemented from Processor.

Steinberg::uint32 getCurrentProgram | ( |  | ) | const
| inlinevirtual

Reimplemented from Processor.

Steinberg::uint32 getNumPrograms | ( |  | ) | const
| inlinevirtual

Reimplemented from Processor.

void setCurrentProgram | ( | Steinberg::uint32 | val | ) |
| virtual

Reimplemented from Processor.

void setCurrentProgramNormalized | ( | ParamValue | val | ) |
| virtual

Reimplemented from Processor.

static FUnknown* createInstance | ( | void * |  | ) |
| inlinestatic

static DECLARE_UID | ( | uid | ,
|  | 0xA77EA27C | ,
|  | 0x1F184322 | ,
|  | 0xBBD2AD93 | ,
|  | 0x73A2B7A0 |
| ) |  |
| inlinestatic

void setParameter | ( | ParamID | index,
|  | ParamValue | newValue,
|  | int32 | sampleOffset
| ) |  |
| protectedvirtual

Reimplemented from Processor.

void preProcess | ( |  | ) |
| protectedvirtual

Reimplemented from Processor.

void processEvent | ( | const Event & | event | ) |
| protectedvirtual

Reimplemented from Processor.

void noteEvent | ( | const Event & | event | ) |
| protected

void recalculate | ( |  | ) |
| protectedvirtual

Reimplemented from Processor.

void allNotesOff | ( |  | ) |
| protected

## Member Data Documentation

const int32 kNumPrograms = 8
| static

float programParams
| static

Initial value:
= {
{0.500f, 0.500f, 0.500f, 0.5f, 0.803f, 0.251f, 0.376f, 0.500f, 0.330f, 0.500f, 0.246f, 0.500f},
{0.500f, 0.500f, 0.500f, 0.5f, 0.751f, 0.000f, 0.452f, 0.000f, 0.000f, 0.500f, 0.000f, 0.500f},
{0.902f, 0.399f, 0.623f, 0.5f, 1.000f, 0.331f, 0.299f, 0.499f, 0.330f, 0.500f, 0.000f, 0.500f},
{0.399f, 0.251f, 1.000f, 0.5f, 0.672f, 0.124f, 0.127f, 0.249f, 0.330f, 0.500f, 0.283f, 0.667f},
{0.648f, 0.500f, 0.500f, 0.5f, 0.298f, 0.602f, 0.550f, 0.850f, 0.356f, 0.500f, 0.339f, 0.660f},
{0.500f, 0.602f, 0.000f, 0.5f, 0.304f, 0.200f, 0.336f, 0.651f, 0.330f, 0.500f, 0.317f, 0.500f},
{0.450f, 0.598f, 0.626f, 0.5f, 0.603f, 0.500f, 0.174f, 0.331f, 0.330f, 0.500f, 0.421f, 0.801f},
{0.050f, 0.957f, 0.500f, 0.5f, 0.299f, 1.000f, 0.000f, 0.500f, 0.330f, 0.450f, 0.718f, 0.000f},
}

float Fs
| protected

float iFs
| protected

constexpr int32 kNumVoices = 32
| staticprotected

constexpr int32 kEventBufferSize = 64
| staticprotected

SynthDataT synthData
| protected

KGRP kgrp[16]
| protected

global internal variables

int32 poly
| protected

int32 cpos
| protected

short* waves
| protected

int32 cmax
| protected

float* comb
| protected

float cdep
| protected

float width
| protected

float trim
| protected

int32 size
| protected

float tune
| protected

float fine
| protected

float random
| protected

float stretch
| protected

float muff
| protected

float muffvel
| protected

float sizevel
| protected

float velsens
| protected

float volume
| protected

Steinberg::uint32 currentProgram
| protected

Empty

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