|
Gin
|
Advanced MPE-capable synthesizer with mono/poly modes, glide, and voice management. More...
#include <gin_synthesiser.h>
Inherits juce::MPESynthesiser.
Public Member Functions | |
| Synthesiser () | |
| void | setMono (bool m) |
| void | setNumVoices (int v) |
| void | setLegato (bool l) |
| void | setGlissando (bool g) |
| void | setPortamento (bool p) |
| void | setGlideRate (float r) |
| void | turnOffAllVoices (bool allowTailOff) override |
| void | setMPE (bool newMPE) |
| void | handleMidiEvent (const juce::MidiMessage &message) override |
| void | setPitchBendRange (int newPB) |
| void | noteAdded (juce::MPENote newNote) override |
| void | noteReleased (juce::MPENote finishedNote) override |
| void | noteAddedMono (juce::MPENote newNote) |
| void | noteReleasedMonoGlide (juce::MPENote finishedNote) |
| void | noteReleasedMono (juce::MPENote finishedNote) |
| bool | isNotePlaying (juce::MPENote &n) |
| int | getNumActiveVoices () |
| juce::Array< SynthesiserVoice * > | getActiveVoices () |
| int | getCpuUsage () |
| void | startBlock () |
| void | endBlock (int blockSize) |
| void | retriggerVoice (SynthesiserVoice *v, juce::MPENote note) |
| virtual void | startVoice (juce::MPESynthesiserVoice *v, juce::MPENote note) |
| void | updateGlide (juce::MPESynthesiserVoice *v) |
| void | stopVoiceFastKill (juce::MPESynthesiserVoice *v, juce::MPENote note, bool tailOff) |
| juce::MPESynthesiserVoice * | findVoiceToSteal (juce::MPENote noteToStealVoiceFor=juce::MPENote()) const override |
| template<typename floatType> | |
| void | renderNextBlock (juce::AudioBuffer< floatType > &outputAudio, const juce::MidiBuffer &inputMidi, int startSample, int numSamples) |
| SynthesiserVoice * | getOldestVoice () |
| SynthesiserVoice * | getNewestVoice () |
Protected Attributes | |
| int | noteOnIndex = -1 |
| int | noteOffIndex = -1 |
Advanced MPE-capable synthesizer with mono/poly modes, glide, and voice management.
Synthesiser extends JUCE's MPESynthesiser with professional features commonly needed in modern synthesizers:
Key Features:
Mono Mode: In monophonic mode, only one voice plays at a time. New notes either retrigger the envelope (non-legato) or smoothly transition pitch without retriggering (legato). Released notes in the note stack will cause the synth to jump back to the most recent held note.
Voice Stealing: When voice limit is reached, the oldest voice is stolen. The fast-kill mechanism allows immediate voice termination rather than waiting for release envelope, preventing audio glitches.
Glide Modes:
Usage:
| Synthesiser::Synthesiser | ( | ) |
| void Synthesiser::setMono | ( | bool | m | ) |
| void Synthesiser::setNumVoices | ( | int | v | ) |
| void Synthesiser::setLegato | ( | bool | l | ) |
| void Synthesiser::setGlissando | ( | bool | g | ) |
| void Synthesiser::setPortamento | ( | bool | p | ) |
| void Synthesiser::setGlideRate | ( | float | r | ) |
|
override |
Referenced by handleMidiEvent().
| void Synthesiser::setMPE | ( | bool | newMPE | ) |
|
override |
References turnOffAllVoices().
| void Synthesiser::setPitchBendRange | ( | int | newPB | ) |
|
override |
References findVoiceToSteal(), getNumActiveVoices(), noteAddedMono(), and startVoice().
|
override |
References noteReleasedMono(), and noteReleasedMonoGlide().
| void Synthesiser::noteAddedMono | ( | juce::MPENote | newNote | ) |
References retriggerVoice(), and startVoice().
Referenced by noteAdded().
| void Synthesiser::noteReleasedMonoGlide | ( | juce::MPENote | finishedNote | ) |
References retriggerVoice(), and startVoice().
Referenced by noteReleased().
| void Synthesiser::noteReleasedMono | ( | juce::MPENote | finishedNote | ) |
References retriggerVoice(), and startVoice().
Referenced by noteReleased().
| bool Synthesiser::isNotePlaying | ( | juce::MPENote & | n | ) |
| int Synthesiser::getNumActiveVoices | ( | ) |
Referenced by noteAdded().
| juce::Array< SynthesiserVoice * > Synthesiser::getActiveVoices | ( | ) |
| int Synthesiser::getCpuUsage | ( | ) |
| void Synthesiser::startBlock | ( | ) |
| void Synthesiser::endBlock | ( | int | blockSize | ) |
| void Synthesiser::retriggerVoice | ( | SynthesiserVoice * | v, |
| juce::MPENote | note ) |
References SynthesiserVoice::noteRetriggered(), SynthesiserVoice::setCurrentlyPlayingNote(), and updateGlide().
Referenced by noteAddedMono(), noteReleasedMono(), and noteReleasedMonoGlide().
|
virtual |
References updateGlide().
Referenced by noteAdded(), noteAddedMono(), noteReleasedMono(), and noteReleasedMonoGlide().
| void Synthesiser::updateGlide | ( | juce::MPESynthesiserVoice * | v | ) |
References GlideInfo::fromNote, GlideInfo::glissando, GlideInfo::portamento, and GlideInfo::rate.
Referenced by retriggerVoice(), and startVoice().
| void Synthesiser::stopVoiceFastKill | ( | juce::MPESynthesiserVoice * | v, |
| juce::MPENote | note, | ||
| bool | tailOff ) |
|
override |
Referenced by noteAdded().
| void Synthesiser::renderNextBlock | ( | juce::AudioBuffer< floatType > & | outputAudio, |
| const juce::MidiBuffer & | inputMidi, | ||
| int | startSample, | ||
| int | numSamples ) |
References getNewestVoice(), noteOffIndex, and noteOnIndex.
| SynthesiserVoice * Synthesiser::getOldestVoice | ( | ) |
| SynthesiserVoice * Synthesiser::getNewestVoice | ( | ) |
Referenced by renderNextBlock().
|
protected |
Referenced by renderNextBlock().
|
protected |
Referenced by renderNextBlock().