18 #define enumToInt(ENUM) static_cast<int>(ENUM) 20 inline double semitonesBetweenFreqs(
double startFrequency,
double endFrequency)
22 return log2(endFrequency / startFrequency)*12.0;
154 double detuneSemis[8] = { 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 };
155 double detuneCents[8] = { 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 };
156 double oscillatorShape[8] = { 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 };
157 double hardSyncRatio[8] = { 1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00 };
158 double morphIntensity[8] = { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00 };
159 double panValue[8] = { 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 };
161 bool doubleOscillator =
true;
162 int32_t soloWaveWSIndex = -1;
173 const double VA_OSC_MAX = 20480.0;
174 const uint32_t VA_OSC_INPUTS = 0;
175 const uint32_t VA_OSC_OUTPUTS = 2;
176 const double VA_MIN_PW = 0.5;
177 const double VA_MAX_PW = 0.95;
178 const double PW_MOD_RANGE = (VA_MAX_PW - VA_MIN_PW);
179 const double HALF_PW_MOD_RANGE = PW_MOD_RANGE / 2.0;
182 enum class VAWaveform { kSawAndSquare, kSawtooth, kSquare };
353 uint32_t moduleIndex = 0;
484 std::shared_ptr<std::array<ModSource, kNumberModSources>>
modSourceRows = std::make_shared<std::array<ModSource, kNumberModSources>>();
487 std::shared_ptr<std::array<ModDestination, kNumberModDestinations>>
modDestinationColumns = std::make_shared<std::array<ModDestination, kNumberModDestinations>>();
618 const uint32_t NOISE_OSC_OUTPUTS = 2;
621 enum class NoiseWaveform { kWhiteNoise, kPinkNoise, kGaussWhiteNoise };
652 NoiseWaveform
waveform = NoiseWaveform::kWhiteNoise;
663 const double freqModHigh = 18000.0;
664 const double freqModSemitoneRange = semitonesBetweenFreqs(
freqModLow, freqModHigh);
665 const uint32_t FILTER_AUDIO_INPUTS = 2;
666 const uint32_t FILTER_AUDIO_OUTPUTS = 2;
667 enum class FilterModel { kFirstOrder, kSVF, kKorg35, kMoog, kDiode };
668 enum { FLT1, FLT2, FLT3, FLT4 };
669 const int MOOG_SUBFILTERS = 4;
670 const int DIODE_SUBFILTERS = 4;
671 const int KORG_SUBFILTERS = 3;
672 enum class VAFilterAlgorithm {
673 kBypassFilter, kLPF1, kHPF1, kAPF1, kSVF_LP, kSVF_HP, kSVF_BP, kSVF_BS, kKorg35_LP, kKorg35_HP, kMoog_LP1, kMoog_LP2, kMoog_LP3, kMoog_LP4, kDiode_LP4
675 enum class BQFilterAlgorithm {
676 kBypassFilter, k1PLPF, k1PHPF, kLPF2, kHPF2
722 enum { kEGNormalOutput, kEGBiasedOutput, kNumEGOutputs };
723 enum class EGState { kOff, kDelay, kAttack, kHold, kDecay, kSlope, kSustain, kRelease, kShutdown };
769 uint32_t moduleIndex = 0;
901 const double LFO_FCMOD_MAX = 200.0;
903 const double LFO_HALF_RANGE = LFO_RANGE / 2.0;
904 const double MAX_LFO_DELAY_MSEC = 5000.0;
905 const double MAX_LFO_FADEIN_MSEC = 5000.0;
908 enum class LFOWaveform {
909 kTriangle, kSin, kRampUp, kRampDown,
910 kExpRampUp, kExpRampDn, kExpTriangle, kSquare,
914 const uint32_t NUM_FMLFO_OPS = 3;
915 enum class FMLFOWaveform { kFM2, kFM3A, kFM3B };
916 enum class LFOMode { kSync, kOneShot, kFreeRun };
bool enableKeyTrack
key track flag
Definition: synthlabparams.h:708
double dryLevel_dB
dry output level in dB
Definition: synthlabparams.h:992
bool forceLoop
force the wavetable to loop at extremes
Definition: synthlabparams.h:131
const double LFO_FCMOD_MIN
Definition: synthlabparams.h:900
#define enumToInt(ENUM)
macro helper to cast a typed enum to an int
Definition: synthfunctions.h:251
double coarseDetune
+/-12 semitones
Definition: synthlabparams.h:118
double phaseModIndex
[1, 4]
Definition: synthlabparams.h:289
double fc
parameter fc
Definition: synthlabparams.h:700
double modKnobValue[4]
mod knobs
Definition: synthlabparams.h:848
const double FM_OSC_MAX
Definition: synthlabparams.h:810
Custom parameter structure for the Exciter object for the KS Oscillator and cores.
Definition: synthlabparams.h:786
const uint32_t NOISE_OSC_INPUTS
Definition: synthlabparams.h:617
double rightDelay_mSec
right delay time
Definition: synthlabparams.h:995
AnalogEGContour
Definition: synthlabparams.h:724
const double KS_OSC_MIN
Definition: synthlabparams.h:301
double waveformMix
[1, +???]
Definition: synthlabparams.h:240
double panValue
[-1, +1] –> [left -> right]
Definition: synthlabparams.h:888
double hardSyncRatio
[1, +???]
Definition: synthlabparams.h:67
double modKnobValue[4]
mod knobs
Definition: synthlabparams.h:712
double outputAmplitude_dB
dB
Definition: synthlabparams.h:343
double oscSpecificDetune
+/-12 semitones
Definition: synthlabparams.h:121
double filterDrive
parameter drive (distortion)
Definition: synthlabparams.h:703
Custom parameter structure for general purpose oscillators or those that don't fit into one of the ot...
Definition: synthlabparams.h:50
bool noteNumberToDecayScaling
one of two EG modulations
Definition: synthlabparams.h:752
Custom GUI control structure for the modulation matrix.
Definition: synthlabparams.h:469
EGParameters dxEGParameters
parameters for embdedded EG
Definition: synthlabparams.h:852
double outputAmplitude_dB
dB
Definition: synthlabparams.h:844
const uint32_t SMPL_OSC_OUTPUTS
Definition: synthlabparams.h:255
double pulseWidth_Pct
sqr wave only
Definition: synthlabparams.h:233
Custom parameter structure for moving GUI control information to the FMOperator oscillator object and...
Definition: synthlabparams.h:830
bool channelHardwire[MAX_MODULATION_CHANNELS]
channel hardwire on/off switches
Definition: synthlabparams.h:442
double fineDetune
1 = up one half-step, -1 = down one half-step
Definition: synthlabparams.h:341
uint32_t channelEnable[MAX_MODULATION_CHANNELS]
channel enable on/off switches
Definition: synthlabparams.h:439
double sustainLevel
from GUI control
Definition: synthlabparams.h:764
const uint32_t MONO_INPUT
Definition: synthlabparams.h:30
double fineDetune
1 = up one half-step, -1 = down one half-step
Definition: synthlabparams.h:228
uint32_t moduleIndex
module identifier
Definition: synthlabparams.h:849
double feedback_Pct
feedback as a % value
Definition: synthlabparams.h:993
double panValue
[-1, +1]
Definition: synthlabparams.h:291
double hardwireIntensity[MAX_MODULATION_CHANNELS]
hardwire intensity controls
Definition: synthlabparams.h:443
const double MAX_KSO_HOLD_MSEC
Definition: synthlabparams.h:306
double attackTime_mSec
exciter EG
Definition: synthlabparams.h:334
bool enableChannelIntensity
to enable this mode, in addition to or instead of the source and destination intensity controls ...
Definition: synthlabparams.h:446
double modKnobValue[4]
mod knobs
Definition: synthlabparams.h:292
std::shared_ptr< std::array< ModSource, kNumberModSources > > modSourceRows
Definition: synthlabparams.h:484
double phaseModIndex
[0, 4]
Definition: synthlabparams.h:847
const double OSC_FMAX
Definition: synthlabparams.h:84
Custom parameter structure for wavetable oscillators (note that several SynthLab oscillators are actu...
Definition: synthlabparams.h:109
double unisonDetuneCents
fine tune for unison
Definition: synthlabparams.h:120
double hardSyncRatio
[1, +4]
Definition: synthlabparams.h:346
double frequency_Hz
parameter fc
Definition: synthlabparams.h:944
Custom parameter structure for the VAOscillator and its ModuleCores. Notable members: ...
Definition: synthlabparams.h:218
double panValue
[-1, +1]
Definition: synthlabparams.h:349
double panValue
[-1, +1]
Definition: synthlabparams.h:127
double unisonDetuneCents
fine tune for unison
Definition: synthlabparams.h:61
double hardSyncRatio
[1, +???]
Definition: synthlabparams.h:126
void setMM_DestIntensity(uint32_t destination, double intensity)
set the destination (column) intensity control
Definition: synthlabparams.h:562
const uint32_t WT_OSC_OUTPUTS
Definition: synthlabparams.h:92
double outputAmplitude_dB
output in dB
Definition: synthlabparams.h:653
double oscillatorShape
[-1, +1]
Definition: synthlabparams.h:66
double intensity
one final intensity knob
Definition: synthlabparams.h:448
double decayLevel
from GUI control
Definition: synthlabparams.h:763
Custom parameter structure for the any of the synth EGs. This structure is designed to take care of b...
Definition: synthlabparams.h:743
double modKnobValue[4]
mod knobs
Definition: synthlabparams.h:129
double outputAmplitude_dB
dB
Definition: synthlabparams.h:234
double freqModIndex
[1, 4]
Definition: synthlabparams.h:290
bool forceLoop
force the wavetable/sample to loop at extremes
Definition: synthlabparams.h:73
Custom parameter structure for the any of the synth filters. This structure is designed to take care ...
Definition: synthlabparams.h:695
double ampModIntensity
[0, +1]
Definition: synthlabparams.h:890
uint32_t moduleIndex
module indentifier
Definition: synthlabparams.h:72
uint32_t algorithmIndex
GUI index for KS algorithm.
Definition: synthlabparams.h:332
double curvature
from GUI control
Definition: synthlabparams.h:765
Structure that encapsulates the controls for a modulation destination as part of the modulation matri...
Definition: synthlabparams.h:406
int32_t filterIndex
filter index in GUI control
Definition: synthlabparams.h:698
Definition: addosccore.cpp:4
double fineDetune
+/-50 cents
Definition: synthlabparams.h:119
const double WT_OSC_MIN
Definition: synthlabparams.h:89
const double MAX_KSO_ATTACK_MSEC
Definition: synthlabparams.h:305
uint32_t waveIndex
the waveform string is usually the patch or WAV folder name
Definition: synthlabparams.h:276
double octaveDetune
1 = up one octave, -1 = down one octave
Definition: synthlabparams.h:279
double holdTime_mSec
exciter EG
Definition: synthlabparams.h:335
double keyTrackSemis
key tracking ratio in semitones
Definition: synthlabparams.h:709
double slopeTime_mSec
from GUI control
Definition: synthlabparams.h:757
double modKnobValue[4]
mod knob values
Definition: synthlabparams.h:352
double outputAmplitude_dB
dB
Definition: synthlabparams.h:124
double alpha
alpha is (wcT/2)
Definition: synthlabparams.h:200
const uint32_t DELAY_AUDIO_OUTPUTS
Definition: synthlabparams.h:958
double filterOutputGain_dB
parameter output gain in dB
Definition: synthlabparams.h:702
double hardSyncRatio
[1, 4]
Definition: synthlabparams.h:288
void setMM_DestHardwireIntensity(uint32_t source, uint32_t destination, double intensity)
set the hardwired intensity control that connects a source/destination pair in a routing and bypasses...
Definition: synthlabparams.h:550
void setMM_HardwiredRouting(uint32_t source, uint32_t destination, double intensity=1.0)
Helper function to set a source/destination/intensity trio that defines a hard-wired routing...
Definition: synthlabparams.h:603
double modKnobValue[4]
mod knobs
Definition: synthlabparams.h:71
uint32_t moduleIndex
module identifier
Definition: synthlabparams.h:713
double fineDetune
+/-50 cents
Definition: synthlabparams.h:840
double endLevel
from GUI control
Definition: synthlabparams.h:762
double fineDetune
+/-50 cents
Definition: synthlabparams.h:60
double channelIntensity[MAX_MODULATION_CHANNELS]
channel intensity controls
Definition: synthlabparams.h:440
double octaveDetune
1 = up one octave, -1 = down one octave
Definition: synthlabparams.h:226
double panValue
[-1, +1]
Definition: synthlabparams.h:238
double shape
[-1, +1]
Definition: synthlabparams.h:70
Custom parameter structure for the PCM sample oscillator and its cores. Notable members: ...
Definition: synthlabparams.h:272
double unisonDetune
1 = up one cent, -1 = down one cent
Definition: synthlabparams.h:284
double octaveDetune
+/- 4 octaves
Definition: synthlabparams.h:58
Tiny structure to hold 1st order VA filter coefficients, to make it easier to share them across sync-...
Definition: synthlabparams.h:197
const double OSC_FMIN
Definition: synthlabparams.h:83
double decayTime_mSec
from GUI control
Definition: synthlabparams.h:756
const double VA_OSC_MIN
Definition: synthlabparams.h:172
double leftDelay_mSec
left delay time
Definition: synthlabparams.h:994
double oscillatorShape
[-1, +1]
Definition: synthlabparams.h:845
const uint32_t SMPL_OSC_INPUTS
Definition: synthlabparams.h:254
EGState
Definition: synthlabparams.h:723
const uint32_t OSC_INPUTS
Definition: synthlabparams.h:85
double phaseModIndex
[1, 4]
Definition: synthlabparams.h:239
void setMM_ChannelIntensity(uint32_t source, uint32_t destination, double intensity)
set the channel intensity control that connects a source/destination pair in a routing ...
Definition: synthlabparams.h:536
bool analogFGN
use analog FGN filters; adds to CPU load
Definition: synthlabparams.h:705
const double FM_OSC_MIN
Definition: synthlabparams.h:809
NoiseWaveform waveform
noise wavform
Definition: synthlabparams.h:652
double bassGainComp
0.0 = no bass compensation, 1.0 = restore all bass
Definition: synthlabparams.h:704
const double KS_OSC_MAX
Definition: synthlabparams.h:302
const uint32_t FM_OSC_OUTPUTS
Definition: synthlabparams.h:812
double intensity
one final intensity knob
Definition: synthlabparams.h:388
double beta
beta value, not used
Definition: synthlabparams.h:201
double releaseTime_mSec
from GUI control
Definition: synthlabparams.h:758
uint32_t waveIndex
DX algorithm.
Definition: synthlabparams.h:835
double unisonDetune
1 = up one cent, -1 = down one cent
Definition: synthlabparams.h:342
double oscillatorShape
[-1, +1]
Definition: synthlabparams.h:236
uint32_t waveIndex
index of waveform, usually linked to GUI control
Definition: synthlabparams.h:55
double oscillatorShape
[-1, +1]
Definition: synthlabparams.h:287
double coarseDetune
1 = up one octave, -1 = down one octave
Definition: synthlabparams.h:340
bool priorityModulation
for high-priority modulator; not used in SynthLab
Definition: synthlabparams.h:450
double phaseModIndex
/ [1, +4]
Definition: synthlabparams.h:347
void setMM_HardwireEnable(uint32_t source, uint32_t destination, bool enable)
set/clear a routing as hardwired
Definition: synthlabparams.h:522
double coarseDetune
+/-12 semitones
Definition: synthlabparams.h:839
double hardSyncRatio
[1, +4]
Definition: synthlabparams.h:237
double ampEGIntensity
[-1, +1]
Definition: synthlabparams.h:889
double octaveDetune
+/- 4 octaves
Definition: synthlabparams.h:838
const uint32_t STEREO_OUTPUTS
Definition: synthlabparams.h:33
double panModIntensity
[0, +1] for external GUI control only, defaults to 1 to make mm work
Definition: synthlabparams.h:891
void setMM_ChannelEnable(uint32_t source, uint32_t destination, bool enable)
enable/disable a routing channel
Definition: synthlabparams.h:509
uint32_t quantize
for stepped LFOs
Definition: synthlabparams.h:946
double coarseDetune
1 = up one octave, -1 = down one octave
Definition: synthlabparams.h:227
const double MAX_EG_VALUE
Definition: synthlabparams.h:726
double gainValue_dB
for per-voice gain control (not same as master MIDI volume)
Definition: synthlabparams.h:887
double outputAmplitude_dB
dB
Definition: synthlabparams.h:65
int32_t modeIndex
one shot, free run, sync
Definition: synthlabparams.h:943
double coarseDetune
1 = up one octave, -1 = down one octave
Definition: synthlabparams.h:280
const double MIDI_NOTE_0_FREQ
Definition: synthconstants.h:621
double modKnobValue[4]
mod knobs
Definition: synthlabparams.h:947
DXEGContour
Definition: synthlabparams.h:725
const uint32_t DELAY_AUDIO_INPUTS
Definition: synthlabparams.h:957
double outputAmplitude_dB
in dB
Definition: synthlabparams.h:285
void setMM_DestDefaultValue(uint32_t destination, double defaultValue)
set a defalt value to prevent accidental no-note events
Definition: synthlabparams.h:574
double wetLevel_dB
wet output level in dB
Definition: synthlabparams.h:991
uint32_t moduleIndex
module identifier
Definition: synthlabparams.h:243
Custom parameter structure for the DCA. This is a very simple object.
Definition: synthlabparams.h:882
double unisonDetune
1 = up one cent, -1 = down one cent
Definition: synthlabparams.h:231
double modKnobValue[4]
mod knobs
Definition: synthlabparams.h:768
bool resetToZero
reset to zero (see book)
Definition: synthlabparams.h:749
double oscSpecificDetune
+/-12 semitones
Definition: synthlabparams.h:62
Custom parameter structure for the wave sequencer module. Notable members:
Definition: synthlabparams.h:149
double ratio
FM ratio +/- 4 octaves.
Definition: synthlabparams.h:853
uint32_t waveIndex
index of waveform, usually linked to GUI control
Definition: synthlabparams.h:114
uint32_t waveIndex
waveform index in the GUI
Definition: synthlabparams.h:223
const uint32_t DCA_AUDIO_INPUTS
Definition: synthlabparams.h:861
double modKnobValue[4]
mod knobs
Definition: synthlabparams.h:242
Custom parameter structure for the NoiseOscillator object.
Definition: synthlabparams.h:637
double phaseModIndex
[1, 4]
Definition: synthlabparams.h:69
uint32_t pluckPosition
[+1, +12]
Definition: synthlabparams.h:351
double attackTime_mSec
from GUI control
Definition: synthlabparams.h:755
double panValue
[-1, +1]
Definition: synthlabparams.h:846
double octaveDetune
+/- 4 octaves
Definition: synthlabparams.h:117
double panValue
[-1, +1]
Definition: synthlabparams.h:68
const uint32_t DCA_AUDIO_OUTPUTS
Definition: synthlabparams.h:862
int32_t waveformIndex
selection index from GUI
Definition: synthlabparams.h:942
double unisonDetune
fine tune for unison
Definition: synthlabparams.h:841
double holdTime_mSec
from a GUI control
Definition: synthlabparams.h:800
const double PCM_OSC_MIN
Definition: synthlabparams.h:252
Custom parameter structure for the LFO object. Notable members:
Definition: synthlabparams.h:940
double decay
[-1, +1]
Definition: synthlabparams.h:350
Custom parameter structure for the AudioDelay object.
Definition: synthlabparams.h:972
const double MAX_KSO_RELEASE_MSEC
Definition: synthlabparams.h:307
const uint32_t OSC_OUTPUTS
Definition: synthlabparams.h:86
double defautValue
to allow max down, etc...
Definition: synthlabparams.h:449
const uint32_t MONO_OUTPUT
Definition: synthlabparams.h:31
Structure that encapsulates the controls for a modulation source as part of the modulation matrix...
Definition: synthlabparams.h:369
double oscillatorShape
[-1, +1]
Definition: synthlabparams.h:125
AudioDelayParameters & operator=(const AudioDelayParameters ¶ms)
Definition: synthlabparams.h:976
double octaveDetune
1 = up one octave, -1 = down one octave
Definition: synthlabparams.h:339
double releaseTime_mSec
from a GUI control
Definition: synthlabparams.h:801
const double WT_OSC_MAX
Definition: synthlabparams.h:90
const uint32_t FM_OSC_INPUTS
Definition: synthlabparams.h:811
double coarseDetune
+/-12 semitones
Definition: synthlabparams.h:59
double outputAmplitude
parameter output gain in dB
Definition: synthlabparams.h:945
void setMM_DestHighPriority(uint32_t destination, bool _priorityModulation)
mark a destination has high-priority
Definition: synthlabparams.h:589
Custom parameter structure for the Karplus-Strong oscillator and its cores. Notable members: ...
Definition: synthlabparams.h:327
double startLevel
from GUI control
Definition: synthlabparams.h:761
int32_t egContourIndex
iundex from GUI control
Definition: synthlabparams.h:746
std::shared_ptr< std::array< ModDestination, kNumberModDestinations > > modDestinationColumns
Definition: synthlabparams.h:487
bool legatoMode
legato
Definition: synthlabparams.h:750
bool velocityToAttackScaling
one of two EG modulations
Definition: synthlabparams.h:751
double attackTime_mSec
from a GUI control
Definition: synthlabparams.h:799
uint32_t moduleIndex
module indentifier
Definition: synthlabparams.h:130
uint32_t moduleIndex
module identifier
Definition: synthlabparams.h:293
const uint32_t WT_OSC_INPUTS
Definition: synthlabparams.h:91
uint32_t moduleIndex
module ID
Definition: synthlabparams.h:948
double phaseModIndex
[1, 4]
Definition: synthlabparams.h:128
uint32_t moduleIndex
module identifier
Definition: synthlabparams.h:892
const uint32_t KS_OSC_OUTPUTS
Definition: synthlabparams.h:304
const double PCM_OSC_MAX
Definition: synthlabparams.h:253
const uint32_t STEREO_INPUTS
Definition: synthlabparams.h:32
double fineDetune
1 = up one half-step, -1 = down one half-step
Definition: synthlabparams.h:281
double Q
parameter Q
Definition: synthlabparams.h:701
const uint32_t MAX_MODULATION_CHANNELS
Definition: synthconstants.h:39
const double freqModLow
Definition: synthlabparams.h:662
double freqModIndex
[1, +4]
Definition: synthlabparams.h:348
void setMM_SourceIntensity(uint32_t destination, double intensity)
set source intensity value
Definition: synthlabparams.h:496
const uint32_t KS_OSC_INPUTS
Definition: synthlabparams.h:303
double releaseTime_mSec
exciter EG
Definition: synthlabparams.h:336
double oscillatorShape
/ [-1, +1]
Definition: synthlabparams.h:345