SynthLab SDK
|
Morphing Wavetable oscillator. More...
#include <morphwtcore.h>
Public Member Functions | |
MorphWTCore () | |
Construction: Cores follow the same construction pattern. More... | |
virtual | ~MorphWTCore () |
virtual bool | reset (CoreProcData &processInfo) override |
Resets object to initialized state. More... | |
virtual bool | update (CoreProcData &processInfo) override |
Updates the object for the next block of audio processing. More... | |
virtual bool | render (CoreProcData &processInfo) override |
Renders the output of the module. More... | |
virtual bool | doNoteOn (CoreProcData &processInfo) override |
Note-on handler for the ModuleCore. More... | |
virtual bool | doNoteOff (CoreProcData &processInfo) override |
Note-off handler for the ModuleCore. More... | |
double | renderSample (SynthClock &clock) |
render a sample More... | |
double | renderHardSyncSample (SynthClock &clock) |
render a hard-sunk sample More... | |
![]() | |
ModuleCore () | |
Constructs a ModuleCore. More... | |
virtual int32_t | getState () |
virtual bool | shutdown () |
virtual void | setSustainOverride (bool sustain) |
virtual void | setStandAloneMode (bool b) |
bool | startGlideModulation (GlideInfo &glideInfo) |
uint32_t | getModuleType () |
const char * | getModuleName () |
void * | getModuleHandle () |
void | setModuleHandle (void *handle) |
uint32_t | getModuleIndex () |
void | setModuleIndex (uint32_t index) |
int32_t | getPreferredModuleIndex () |
void | setPreferredModuleIndex (uint32_t index) |
ModuleCoreData & | getModuleData () |
provides access to the core data: More... | |
Protected Member Functions | |
void | addMorphBankData (std::string name, SynthLabBankSet &slTableSet, uint32_t index) |
add a bank top database More... | |
void | checkAddWaveBank (SynthLabBankSet &slTableSet, CoreProcData &processInfo, uint32_t waveIndex) |
Calls the querying function to check and add a new wavebank (set of wavetables) More... | |
int32_t | checkAddWavetable (SynthLabTableSet &slTableSet, StaticTableSource *tableSource, CoreProcData &processInfo) |
Function that queries the datbase for the various tables based on unique table names. More... | |
Protected Attributes | |
double | sampleRate = 0.0 |
sample rate | |
double | currentTableRate = 0.0 |
sample rate | |
double | midiPitch = 0.0 |
the midi pitch | |
double | outputAmplitude = 1.0 |
amplitude in dB | |
double | panLeftGain = 0.707 |
left channel gain | |
double | panRightGain = 0.707 |
right channel gain | |
double | hardSyncRatio = 1.0 |
hard sync ratio with modulators applied | |
int32_t | currentWaveIndex = -1 |
to minimize dictionary (map) lookup iterating | |
int32_t | currentTable0 = -1 |
to minimize dictionary (map) lookup iterating | |
int32_t | currentTable1 = -1 |
to minimize dictionary (map) lookup iterating | |
double | mixValue0 = 0.0 |
double | mixValue1 = 0.0 |
SynthClock | oscClock |
timebase | |
IWavetableSource * | selectedTableSource [2] = { nullptr, nullptr } |
two tables to morph across | |
Synchronizer | hardSyncronizer |
hard synchronizer | |
MorphBankData | morphBankData [MODULE_STRINGS] |
morphing bank of wavetables | |
int32_t | table0last = -1 |
running index of last table_0 | |
int32_t | table1last = -1 |
running index of last table_1 | |
double | morphLocation = 0.0 |
fractional location to morph between table_0 and table_1 | |
double | lastMorphMod = -10.0 |
last morph modulator | |
![]() | |
uint32_t | moduleType = UNDEFINED_MODULE |
type of module, LFO_MODULE, EG_MODULE, etc... | |
const char * | moduleName = nullptr |
module name must be set in derived constructor | |
void * | moduleHandle = nullptr |
used for dynamically loading cores from DLLs | |
uint32_t | moduleIndex = 0 |
index of this core | |
int32_t | preferredIndex = -1 |
preferred index of this DYNAMIC core | |
ModuleCoreData | coreData |
core strings (16) and mod knob labels (4) | |
bool | standAloneMode = false |
flag for stand-alone mode of operation outside of SynthLab | |
std::unique_ptr< GlideModulator > | glideModulator |
built-in glide modulator for oscillators | |
Morphing Wavetable oscillator.
Base Class: ModuleCore
GUI Parameters: WTOscParameters
Access to Modulators is done via the thunk-barrier compliant CoreProcData argument
Access to audio buffers (I/O/FM) is done via the thunk-barrier compliant CoreProcData argument
Construction: Cores follow the same construction pattern
Standalone Mode:
Module Strings, zero-indexed for your GUI Control:
ModKnob Strings, for fixed GUI controls by index constant
Render:
SynthLab::MorphWTCore::MorphWTCore | ( | ) |
Construction: Cores follow the same construction pattern.
simple default constructor
Core Specific:
|
inlinevirtual |
Destructor is empty: all resources are smart pointers
|
protected |
add a bank top database
Adds a set of tables to the morph bank data structures, storing names of the tables.
Core Specific:
name | name of wavetable |
slTableSet | set of tables tp be added |
processInfo | is the thunk-barrier compliant data structure for passing all needed parameters |
index | index in MorphBankData structure |
|
protected |
Calls the querying function to check and add a new wavebank (set of wavetables)
slTableSet | set of tables tp be added |
processInfo | is the thunk-barrier compliant data structure for passing all needed parameters |
|
protected |
Function that queries the datbase for the various tables based on unique table names.
slTableSet | set of tables tp be added |
processInfo | is the thunk-barrier compliant data structure for passing all needed parameters |
|
overridevirtual |
Note-off handler for the ModuleCore.
Core Specific:
processInfo | is the thunk-barrier compliant data structure for passing all needed parameters |
Implements SynthLab::ModuleCore.
|
overridevirtual |
Note-on handler for the ModuleCore.
Core Specific:
processInfo | is the thunk-barrier compliant data structure for passing all needed parameters |
Implements SynthLab::ModuleCore.
|
overridevirtual |
Renders the output of the module.
processInfo | the thunk-barrier compliant data structure for passing all needed parameters |
Implements SynthLab::ModuleCore.
double SynthLab::MorphWTCore::renderHardSyncSample | ( | SynthClock & | clock | ) |
render a hard-sunk sample
Renders one hard-synced sample from the wavetable Core Specific:
clock | the current timebase |
double SynthLab::MorphWTCore::renderSample | ( | SynthClock & | clock | ) |
render a sample
Renders one sample out of the wavetable Core Specific:
Render helper functions
clock | the current timebase |
|
overridevirtual |
Resets object to initialized state.
ModuleCore Overrides
processInfo | the thunk-barrier compliant data structure for passing all needed parameters |
Implements SynthLab::ModuleCore.
|
overridevirtual |
Updates the object for the next block of audio processing.
processInfo | the thunk-barrier compliant data structure for passing all needed parameters |
Implements SynthLab::ModuleCore.