Gin
Loading...
Searching...
No Matches
SynthesiserVoice Class Referenceabstract

Extended synthesizer voice with glide support and fast-kill capability. More...

#include <gin_synthesiser.h>

Inherits juce::MPESynthesiserVoice.

Public Member Functions

virtual void setFastKill ()
bool isFastKill ()
virtual void noteRetriggered ()
virtual float getCurrentNote ()=0
void setCurrentlyPlayingNote (juce::MPENote note)
void setGlideInfo (const GlideInfo &gi)

Protected Attributes

GlideInfo glideInfo
bool fastKill = false

Detailed Description

Extended synthesizer voice with glide support and fast-kill capability.

SynthesiserVoice extends JUCE's MPESynthesiserVoice with additional features needed for professional synthesizer implementations:

  • Pitch glide (portamento/glissando)
  • Fast kill for voice stealing (bypass release envelope)
  • Note retriggering support for monophonic/legato playing

When implementing a voice, override:

  • getCurrentNote(): Return the current MIDI note being played
  • noteRetriggered(): Handle retriggering when in legato/mono mode
  • renderNextBlock(): Generate audio (inherited from MPESynthesiserVoice)

Fast Kill: When a voice needs to be stolen while still in release phase, setFastKill() allows immediate termination without waiting for the release envelope to finish.

Usage:

class MyVoice : public SynthesiserVoice
{
void renderNextBlock(AudioBuffer<float>& buffer, int start, int num) override
{
if (isFastKill())
{
// Quick fade out instead of full release
}
// ... render audio
}
float getCurrentNote() override { return currentNote; }
void noteRetriggered() override { // Handle legato retrigger }
};
Extended synthesizer voice with glide support and fast-kill capability.
Definition gin_synthesiser.h:69
virtual float getCurrentNote()=0
virtual void noteRetriggered()
Definition gin_synthesiser.h:74
bool isFastKill()
Definition gin_synthesiser.h:72
See also
Synthesiser, GlideInfo

Member Function Documentation

◆ setFastKill()

virtual void SynthesiserVoice::setFastKill ( )
virtual

References fastKill.

◆ isFastKill()

bool SynthesiserVoice::isFastKill ( )

References fastKill.

◆ noteRetriggered()

virtual void SynthesiserVoice::noteRetriggered ( )
virtual

◆ getCurrentNote()

virtual float SynthesiserVoice::getCurrentNote ( )
pure virtual

◆ setCurrentlyPlayingNote()

void SynthesiserVoice::setCurrentlyPlayingNote ( juce::MPENote note)

◆ setGlideInfo()

void SynthesiserVoice::setGlideInfo ( const GlideInfo & gi)

References glideInfo.

Member Data Documentation

◆ glideInfo

GlideInfo SynthesiserVoice::glideInfo
protected

Referenced by setGlideInfo().

◆ fastKill

bool SynthesiserVoice::fastKill = false
protected

Referenced by isFastKill(), and setFastKill().


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