39 kVoiceControlGate = 0,
41 kVoiceControlPitchBend,
42 kVoiceControlPressure,
50using VoiceInputs = ControlRamp::RampArray<kNumVoiceControlRamps>;
52#pragma mark - Voice class
66 virtual void Trigger(
double level,
bool isRetrigger) {};
80 for (
auto c = 0; c < nOutputs; c++)
82 for (
auto s = startIdx; s < startIdx + nFrames; s++)
106 int64_t mLastTriggeredTime{-1};
107 uint8_t mVoiceNumber{0};
111 double mBasePitch{0.};
IPlug Constant definitions, Types, magic numbers.
IPlug logging a.k.a tracing functionality.
MIDI and sysex structs/utilites.
A monophonic/polyphonic synthesiser base class which can be supplied with a custom voice.
virtual void ProcessSamplesAccumulating(sample **inputs, sample **outputs, int nInputs, int nOutputs, int startIdx, int nFrames)
Process a block of audio data for the voice.
virtual void Trigger(double level, bool isRetrigger)
Trigger is called by the VoiceAllocator when a new voice should start, or if the voice limit has been...
virtual void Release()
As with Trigger, called to do optional tasks when a voice is released.
virtual void SetControl(int controlNumber, float value)
Implement this to respond to control numbers for which there are not ramps.
virtual bool GetBusy() const =0
virtual void SetProgramNumber(int pgm)
Implement this to allow picking a sound program from an integer index, as with MIDI.
virtual void SetSampleRateAndBlockSize(double sampleRate, int blockSize)
Implement this if you need to do work when the sample rate or block size changes.
A generic synthesizer voice to be controlled by a voice allocator.
eControlNames
This enum names the control ramps by which we connect a controller to a synth voice.