SynthLab SDK
All Classes Files Functions Variables Typedefs Enumerations Modules Pages
SynthVoiceParameters

The SynthVoiceParameters structure is declared in the synthvoice.h file to keep it close to the object that owns it. When you add or remove SynthModules from the voice object, you will likely also be adding or removing shared pointers to parameter structures from this voice-level structure as well, and that is part of the SynthLab architecture for sharing data and parameters from a centralized location. The template SynthVoiceParameter structure only include a few parameters that are voice-level.

Some things to note:

  • the synthModeIndex encodes the overal mode of the engine: mono, unison, poly and legato variations
  • the filterModeIndex encodes the signal flow in the two filter objecs as (0) series or (1) parallel
  • portamento/glide time variables are per-voice
  • unison mode tweaks are per-voice
// --- GUI Parameter struc for voice AND its sub-modules
struct SynthVoiceParameters
{
SynthVoiceParameters() {}
// --- synth mode; engine has same variable
uint32_t synthModeIndex = enumToInt(SynthMode::kMono);
// --- synth mode; engine has same variable
uint32_t filterModeIndex = enumToInt(FilterMode::kSeries);
// --- portamento (glide)
bool enablePortamento = false;
// --- glide time
double glideTime_mSec = 0.0;
// --- legato mode
bool legatoMode = false;
// --- unison Detune - each voice will be detuned differently
double unisonDetuneCents = 0.0;
double unisonStartPhase = 0.0;
double unisonPan = 0.0;
// --- add your module GUI parametrs here
// --- shared pointers to SynthModule member parameter structures
};
// ---


synthlab_4.png