8 #define enumToInt(ENUM) static_cast<int>(ENUM) 10 inline double semitonesBetweenFreqs(
double startFrequency,
double endFrequency)
12 return log2(endFrequency / startFrequency)*12.0;
23 const double OSC_FMAX = 20480.0;
26 const double WT_OSC_MIN = MIDI_NOTE_0_FREQ;
27 const double WT_OSC_MAX = 20480.0;
28 const uint32_t WT_OSC_INPUTS = 1;
29 const uint32_t WT_OSC_OUTPUTS = 2;
31 enum { WTO_SHAPE, WTO_HSYNC, WTO_START_PHASE, WTO_PITCH_MOD };
95 double detuneSemis[8] = { 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 };
96 double detuneCents[8] = { 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 };
97 double oscillatorShape[8] = { 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 };
98 double hardSyncRatio[8] = { 1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00 };
99 double morphIntensity[8] = { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00 };
100 double panValue[8] = { 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 };
102 bool doubleOscillator =
true;
113 const double VA_OSC_MAX = 20480.0;
114 const uint32_t VA_OSC_INPUTS = 0;
115 const uint32_t VA_OSC_OUTPUTS = 2;
116 const double VA_MIN_PW = 0.5;
117 const double VA_MAX_PW = 0.95;
118 const double PW_MOD_RANGE = (VA_MAX_PW - VA_MIN_PW);
119 const double HALF_PW_MOD_RANGE = PW_MOD_RANGE / 2.0;
122 enum class VAWaveform { kSawAndSquare, kSawtooth, kSquare };
123 enum { VAO_WAVE_MIX, VAO_PULSE_WIDTH, VAO_C, VAO_PITCH_MOD };
316 std::shared_ptr<std::array<ModSource, kNumberModSources>>
modSourceRows = std::make_shared<std::array<ModSource, kNumberModSources>>();
319 std::shared_ptr<std::array<ModDestination, kNumberModDestinations>>
modDestinationColumns = std::make_shared<std::array<ModDestination, kNumberModDestinations>>();
450 const uint32_t NOISE_OSC_OUTPUTS = 2;
453 enum class NoiseWaveform { kWhiteNoise, kPinkNoise, kGaussWhiteNoise };
484 NoiseWaveform
waveform = NoiseWaveform::kWhiteNoise;
495 const double freqModHigh = 20480.0;
496 const double freqModSemitoneRange = semitonesBetweenFreqs(
freqModLow, freqModHigh);
497 const uint32_t FILTER_AUDIO_INPUTS = 2;
498 const uint32_t FILTER_AUDIO_OUTPUTS = 2;
499 enum class FilterModel { kFirstOrder, kSVF, kKorg35, kMoog, kDiode };
500 enum { FLT_KEYTRACK, FLT_DRIVE, FLT_EG_INT, FLT_BP_INT };
501 enum { FLT1, FLT2, FLT3, FLT4 };
502 const int MOOG_SUBFILTERS = 4;
503 const int DIODE_SUBFILTERS = 4;
504 const int KORG_SUBFILTERS = 3;
505 enum class VAFilterAlgorithm {
506 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
508 enum class BQFilterAlgorithm {
509 kBypassFilter, k1PLPF, k1PHPF, kLPF2, kHPF2
555 enum { kEGNormalOutput, kEGBiasedOutput, kNumEGOutputs };
556 enum class EGState { kOff, kDelay, kAttack, kHold, kDecay, kSlope, kSustain, kRelease, kShutdown };
602 uint32_t moduleIndex = 0;
643 const double FM_OSC_MAX = 20480.0;
644 const uint32_t FM_OSC_INPUTS = 0;
645 const uint32_t FM_OSC_OUTPUTS = 2;
646 enum { FMO_A, FMO_B, FMO_FEEDBACK, FMO_PITCH_MOD };
735 const double LFO_FCMOD_MAX = 200.0;
737 const double LFO_HALF_RANGE = LFO_RANGE / 2.0;
738 const double MAX_LFO_DELAY_MSEC = 5000.0;
739 const double MAX_LFO_FADEIN_MSEC = 5000.0;
741 enum class LFOWaveform {
742 kTriangle, kSin, kRampUp, kRampDown,
743 kExpRampUp, kExpRampDn, kExpTriangle, kSquare,
747 const uint32_t NUM_FMLFO_OPS = 3;
748 enum class FMLFOWaveform { kFM2, kFM3A, kFM3B };
749 enum class LFOMode { kSync, kOneShot, kFreeRun };
758 enum { LFO_SHAPE, LFO_DELAY, LFO_FADE_IN, LFO_BPMSYNC };
792 const double PCM_OSC_MAX = 20480.0;
793 const uint32_t SMPL_OSC_INPUTS = 0;
794 const uint32_t SMPL_OSC_OUTPUTS = 2;
795 enum { PCMO_A, PCMO_B, PCMO_C, PCMO_PITCH_MOD };
842 const double KS_OSC_MAX = 20480.0;
843 const uint32_t KS_OSC_INPUTS = 0;
844 const uint32_t KS_OSC_OUTPUTS = 2;
845 const double MAX_KSO_ATTACK_MSEC = 500.0;
846 const double MAX_KSO_HOLD_MSEC = 2000.0;
847 const double MAX_KSO_RELEASE_MSEC = 5000.0;
848 enum { KSO_OUTPUT, KSO_BODY, KSO_BITE, KSO_PLUCK_POS };
894 uint32_t moduleIndex = 0;
bool enableKeyTrack
key track flag
Definition: synthlabparams.h:541
double dryLevel_dB
dry output level in dB
Definition: synthlabparams.h:937
bool forceLoop
force the wavetable to loop at extremes
Definition: synthlabparams.h:72
const double LFO_FCMOD_MIN
Definition: synthlabparams.h:734
#define enumToInt(ENUM)
macro helper to cast a typed enum to an int
Definition: synthfunctions.h:234
double coarseDetune
+/-12 semitones
Definition: synthlabparams.h:59
double phaseModIndex
[1, 4]
Definition: synthlabparams.h:829
double fc
parameter fc
Definition: synthlabparams.h:533
double modKnobValue[4]
mod knobs
Definition: synthlabparams.h:832
Custom parameter structure for the Exciter object for the KS Oscillator and cores.
Definition: synthlabparams.h:619
const uint32_t NOISE_OSC_INPUTS
Definition: synthlabparams.h:449
double rightDelay_mSec
right delay time
Definition: synthlabparams.h:940
AnalogEGContour
Definition: synthlabparams.h:557
const double KS_OSC_MIN
Definition: synthlabparams.h:841
double waveformMix
[1, +???]
Definition: synthlabparams.h:181
double panValue
[-1, +1] –> [left -> right]
Definition: synthlabparams.h:722
double outputAmplitude_dB
dB
Definition: synthlabparams.h:884
double oscSpecificDetune
+/-12 semitones
Definition: synthlabparams.h:62
double filterDrive
parameter drive (distortion)
Definition: synthlabparams.h:536
bool noteNumberToDecayScaling
one of two EG modulations
Definition: synthlabparams.h:585
Custom GUI control structure for the modulation matrix.
Definition: synthlabparams.h:301
EGParameters dxEGParameters
parameters for embdedded EG
Definition: synthlabparams.h:686
double outputAmplitude_dB
dB
Definition: synthlabparams.h:678
double pulseWidth_Pct
sqr wave only
Definition: synthlabparams.h:174
Custom parameter structure for moving GUI control information to the FMOperator oscillator object and...
Definition: synthlabparams.h:664
double fineDetune
1 = up one half-step, -1 = down one half-step
Definition: synthlabparams.h:882
double sustainLevel
from GUI control
Definition: synthlabparams.h:597
double modKnobValue[4]
mod knobs
Definition: synthlabparams.h:781
double fineDetune
1 = up one half-step, -1 = down one half-step
Definition: synthlabparams.h:169
uint32_t moduleIndex
module identifier
Definition: synthlabparams.h:683
double feedback_Pct
feedback as a % value
Definition: synthlabparams.h:938
double panValue
[-1, +1]
Definition: synthlabparams.h:831
double modKnobValue[4]
mod knobs
Definition: synthlabparams.h:183
double attackTime_mSec
exciter EG
Definition: synthlabparams.h:875
bool enableChannelIntensity
to enable this mode, in addition to or instead of the source and destination intensity controls ...
Definition: synthlabparams.h:278
uint32_t channelEnable[MAX_MODULATION_CHANNELS]
channel enable on/off switches
Definition: synthlabparams.h:271
double phaseModIndex
[0, 4]
Definition: synthlabparams.h:681
Custom parameter structure for wavetable oscillators (note that several SynthLab oscillators are actu...
Definition: synthlabparams.h:50
double unisonDetuneCents
fine tune for unison
Definition: synthlabparams.h:61
double modKnobValue[4]
mod knobs
Definition: synthlabparams.h:545
double hardSyncRatio
[1, +4]
Definition: synthlabparams.h:887
double frequency_Hz
parameter fc
Definition: synthlabparams.h:778
Custom parameter structure for the VAOscillator and its ModuleCores. Notable members: ...
Definition: synthlabparams.h:159
double panValue
[-1, +1]
Definition: synthlabparams.h:890
double panValue
[-1, +1]
Definition: synthlabparams.h:68
double hardSyncRatio
[1, +???]
Definition: synthlabparams.h:67
void setMM_DestIntensity(uint32_t destination, double intensity)
set the destination (column) intensity control
Definition: synthlabparams.h:394
double outputAmplitude_dB
output in dB
Definition: synthlabparams.h:485
double intensity
one final intensity knob
Definition: synthlabparams.h:280
double decayLevel
from GUI control
Definition: synthlabparams.h:596
Custom parameter structure for the any of the synth EGs. This structure is designed to take care of b...
Definition: synthlabparams.h:576
double outputAmplitude_dB
dB
Definition: synthlabparams.h:175
double freqModIndex
[1, 4]
Definition: synthlabparams.h:830
Custom parameter structure for the any of the synth filters. This structure is designed to take care ...
Definition: synthlabparams.h:528
std::shared_ptr< std::array< ModSource, kNumberModSources > > modSourceRows
Definition: synthlabparams.h:316
double ampModIntensity
[0, +1]
Definition: synthlabparams.h:724
uint32_t algorithmIndex
GUI index for KS algorithm.
Definition: synthlabparams.h:873
double modKnobValue[4]
mod knobs
Definition: synthlabparams.h:682
double curvature
from GUI control
Definition: synthlabparams.h:598
Structure that encapsulates the controls for a modulation destination as part of the modulation matri...
Definition: synthlabparams.h:238
int32_t filterIndex
filter index in GUI control
Definition: synthlabparams.h:531
Definition: synthlabcore.cpp:4
double fineDetune
+/-50 cents
Definition: synthlabparams.h:60
uint32_t waveIndex
the waveform string is usually the patch or WAV folder name
Definition: synthlabparams.h:816
double octaveDetune
1 = up one octave, -1 = down one octave
Definition: synthlabparams.h:819
double holdTime_mSec
exciter EG
Definition: synthlabparams.h:876
double keyTrackSemis
key tracking ratio in semitones
Definition: synthlabparams.h:542
double slopeTime_mSec
from GUI control
Definition: synthlabparams.h:590
double outputAmplitude_dB
dB
Definition: synthlabparams.h:65
double alpha
alpha is (wcT/2)
Definition: synthlabparams.h:141
const uint32_t DELAY_AUDIO_OUTPUTS
Definition: synthlabparams.h:903
double hardSyncRatio
[1, 4]
Definition: synthlabparams.h:828
double filterOutputGain_dB
parameter output gain in dB
Definition: synthlabparams.h:535
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:382
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:435
uint32_t moduleIndex
module identifier
Definition: synthlabparams.h:546
double fineDetune
+/-50 cents
Definition: synthlabparams.h:674
double endLevel
from GUI control
Definition: synthlabparams.h:595
double octaveDetune
1 = up one octave, -1 = down one octave
Definition: synthlabparams.h:167
double panValue
[-1, +1]
Definition: synthlabparams.h:179
Custom parameter structure for the PCM sample oscillator and its cores. Notable members: ...
Definition: synthlabparams.h:812
double unisonDetune
1 = up one cent, -1 = down one cent
Definition: synthlabparams.h:824
double modKnobValue[4]
mod knobs
Definition: synthlabparams.h:70
Tiny structure to hold 1st order VA filter coefficients, to make it easier to share them across sync-...
Definition: synthlabparams.h:138
double modKnobValue[4]
mod knob values
Definition: synthlabparams.h:893
const double OSC_FMIN
Definition: synthlabparams.h:22
double decayTime_mSec
from GUI control
Definition: synthlabparams.h:589
const double VA_OSC_MIN
Definition: synthlabparams.h:112
bool channelHardwire[MAX_MODULATION_CHANNELS]
channel hardwire on/off switches
Definition: synthlabparams.h:274
double leftDelay_mSec
left delay time
Definition: synthlabparams.h:939
double oscillatorShape
[-1, +1]
Definition: synthlabparams.h:679
EGState
Definition: synthlabparams.h:556
double phaseModIndex
[1, 4]
Definition: synthlabparams.h:180
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:368
bool analogFGN
use analog FGN filters; adds to CPU load
Definition: synthlabparams.h:538
const double FM_OSC_MIN
Definition: synthlabparams.h:642
double modKnobValue[4]
mod knobs
Definition: synthlabparams.h:601
NoiseWaveform waveform
noise wavform
Definition: synthlabparams.h:484
double bassGainComp
0.0 = no bass compensation, 1.0 = restore all bass
Definition: synthlabparams.h:537
double intensity
one final intensity knob
Definition: synthlabparams.h:220
double beta
beta value, not used
Definition: synthlabparams.h:142
double releaseTime_mSec
from GUI control
Definition: synthlabparams.h:591
uint32_t waveIndex
DX algorithm.
Definition: synthlabparams.h:669
double unisonDetune
1 = up one cent, -1 = down one cent
Definition: synthlabparams.h:883
double oscillatorShape
[-1, +1]
Definition: synthlabparams.h:177
double oscillatorShape
[-1, +1]
Definition: synthlabparams.h:827
double coarseDetune
1 = up one octave, -1 = down one octave
Definition: synthlabparams.h:881
bool priorityModulation
for high-priority modulator; not used in SynthLab
Definition: synthlabparams.h:282
double phaseModIndex
/ [1, +4]
Definition: synthlabparams.h:888
void setMM_HardwireEnable(uint32_t source, uint32_t destination, bool enable)
set/clear a routing as hardwired
Definition: synthlabparams.h:354
double coarseDetune
+/-12 semitones
Definition: synthlabparams.h:673
double hardSyncRatio
[1, +4]
Definition: synthlabparams.h:178
double ampEGIntensity
[-1, +1]
Definition: synthlabparams.h:723
double octaveDetune
+/- 4 octaves
Definition: synthlabparams.h:672
double panModIntensity
[0, +1] for external GUI control only, defaults to 1 to make mm work
Definition: synthlabparams.h:725
void setMM_ChannelEnable(uint32_t source, uint32_t destination, bool enable)
enable/disable a routing channel
Definition: synthlabparams.h:341
uint32_t quantize
for stepped LFOs
Definition: synthlabparams.h:780
double coarseDetune
1 = up one octave, -1 = down one octave
Definition: synthlabparams.h:168
const double MAX_EG_VALUE
Definition: synthlabparams.h:559
double gainValue_dB
for per-voice gain control (not same as master MIDI volume)
Definition: synthlabparams.h:721
int32_t modeIndex
one shot, free run, sync
Definition: synthlabparams.h:777
double coarseDetune
1 = up one octave, -1 = down one octave
Definition: synthlabparams.h:820
DXEGContour
Definition: synthlabparams.h:558
const uint32_t DELAY_AUDIO_INPUTS
Definition: synthlabparams.h:902
std::shared_ptr< std::array< ModDestination, kNumberModDestinations > > modDestinationColumns
Definition: synthlabparams.h:319
double outputAmplitude_dB
in dB
Definition: synthlabparams.h:825
void setMM_DestDefaultValue(uint32_t destination, double defaultValue)
set a defalt value to prevent accidental no-note events
Definition: synthlabparams.h:406
double wetLevel_dB
wet output level in dB
Definition: synthlabparams.h:936
uint32_t moduleIndex
module identifier
Definition: synthlabparams.h:184
Custom parameter structure for the DCA. This is a very simple object.
Definition: synthlabparams.h:716
double unisonDetune
1 = up one cent, -1 = down one cent
Definition: synthlabparams.h:172
bool resetToZero
reset to zero (see book)
Definition: synthlabparams.h:582
Custom parameter structure for the wave sequencer module. Notable members:
Definition: synthlabparams.h:90
double ratio
FM ratio +/- 4 octaves.
Definition: synthlabparams.h:687
uint32_t waveIndex
index of waveform, usually linked to GUI control
Definition: synthlabparams.h:55
uint32_t waveIndex
waveform index in the GUI
Definition: synthlabparams.h:164
const uint32_t DCA_AUDIO_INPUTS
Definition: synthlabparams.h:695
Custom parameter structure for the NoiseOscillator object.
Definition: synthlabparams.h:469
uint32_t pluckPosition
[+1, +12]
Definition: synthlabparams.h:892
double attackTime_mSec
from GUI control
Definition: synthlabparams.h:588
double panValue
[-1, +1]
Definition: synthlabparams.h:680
double octaveDetune
+/- 4 octaves
Definition: synthlabparams.h:58
const uint32_t DCA_AUDIO_OUTPUTS
Definition: synthlabparams.h:696
int32_t waveformIndex
selection index from GUI
Definition: synthlabparams.h:776
double unisonDetune
fine tune for unison
Definition: synthlabparams.h:675
double holdTime_mSec
from a GUI control
Definition: synthlabparams.h:633
const double PCM_OSC_MIN
Definition: synthlabparams.h:791
Custom parameter structure for the LFO object. Notable members:
Definition: synthlabparams.h:774
double decay
[-1, +1]
Definition: synthlabparams.h:891
Custom parameter structure for the AudioDelay object.
Definition: synthlabparams.h:917
double hardwireIntensity[MAX_MODULATION_CHANNELS]
hardwire intensity controls
Definition: synthlabparams.h:275
double defautValue
to allow max down, etc...
Definition: synthlabparams.h:281
Structure that encapsulates the controls for a modulation source as part of the modulation matrix...
Definition: synthlabparams.h:201
double oscillatorShape
[-1, +1]
Definition: synthlabparams.h:66
AudioDelayParameters & operator=(const AudioDelayParameters ¶ms)
Definition: synthlabparams.h:921
double octaveDetune
1 = up one octave, -1 = down one octave
Definition: synthlabparams.h:880
double releaseTime_mSec
from a GUI control
Definition: synthlabparams.h:634
double channelIntensity[MAX_MODULATION_CHANNELS]
channel intensity controls
Definition: synthlabparams.h:272
double outputAmplitude
parameter output gain in dB
Definition: synthlabparams.h:779
void setMM_DestHighPriority(uint32_t destination, bool _priorityModulation)
mark a destination has high-priority
Definition: synthlabparams.h:421
Custom parameter structure for the Karplus-Strong oscillator and its cores. Notable members: ...
Definition: synthlabparams.h:868
double startLevel
from GUI control
Definition: synthlabparams.h:594
int32_t egContourIndex
iundex from GUI control
Definition: synthlabparams.h:579
bool legatoMode
legato
Definition: synthlabparams.h:583
bool velocityToAttackScaling
one of two EG modulations
Definition: synthlabparams.h:584
double attackTime_mSec
from a GUI control
Definition: synthlabparams.h:632
uint32_t moduleIndex
module indentifier
Definition: synthlabparams.h:71
uint32_t moduleIndex
module identifier
Definition: synthlabparams.h:833
uint32_t moduleIndex
module ID
Definition: synthlabparams.h:782
double phaseModIndex
[1, 4]
Definition: synthlabparams.h:69
uint32_t moduleIndex
module identifier
Definition: synthlabparams.h:726
double fineDetune
1 = up one half-step, -1 = down one half-step
Definition: synthlabparams.h:821
double Q
parameter Q
Definition: synthlabparams.h:534
const uint32_t MAX_MODULATION_CHANNELS
Definition: synthconstants.h:28
const double freqModLow
Definition: synthlabparams.h:494
double freqModIndex
[1, +4]
Definition: synthlabparams.h:889
void setMM_SourceIntensity(uint32_t destination, double intensity)
set source intensity value
Definition: synthlabparams.h:328
double releaseTime_mSec
exciter EG
Definition: synthlabparams.h:877
double oscillatorShape
/ [-1, +1]
Definition: synthlabparams.h:886