SynthLab SDK
|
Analog EG emulator. More...
#include <analogegcore.h>
Public Member Functions | |
AnalogEGCore () | |
Construction: Cores follow the same construction pattern. More... | |
virtual | ~AnalogEGCore () |
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... | |
virtual int32_t | getState () override |
virtual bool | shutdown () override |
Shutdown handler for EG. More... | |
virtual void | setSustainOverride (bool b) override |
Sustain pedal handler for EG. More... | |
![]() | |
ModuleCore () | |
Constructs a ModuleCore. More... | |
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 | calcAttackCoeff (double attackTime, double attackTimeScalar=1.0) |
void | calcDecayCoeff (double decayTime, double decayTimeScalar=1.0) |
void | calcReleaseCoeff (double releaseTime, double releaseTimeScalar=1.0) |
Protected Attributes | |
bool | noteOff = false |
for retriggering EG | |
bool | retriggered = false |
for retriggering EG | |
double | lastTriggerMod = 0.0 |
for retriggering EG trigger detection | |
double | sustainLevel = 1.0 |
level, not time | |
double | attackTime_mSec = 1.0 |
att: is a time duration | |
double | decayTime_mSec = 1.0 |
dcy: is a time to decay from max output to 0.0 | |
double | releaseTime_mSec = 1.0 |
rel: is a time to decay from max output to 0.0 | |
double | sampleRate = 0.0 |
sample rate | |
double | envelopeOutput = 0.0 |
the current envelope output sample | |
double | attackCoeff = 0.0 |
exponential feedback coefficient | |
double | attackOffset = 0.0 |
TCO offset to allow proper attack/decay on [1, 0]. | |
double | attackTCO = 0.0 |
TCO value for calculating offset. | |
double | decayCoeff = 0.0 |
exponential feedback coefficient | |
double | decayOffset = 0.0 |
TCO offset to allow proper attack/decay on [1, 0]. | |
double | decayTCO = 0.0 |
TCO value for calculating offset. | |
double | releaseCoeff = 0.0 |
exponential feedback coefficient | |
double | releaseOffset = 0.0 |
TCO offset to allow proper attack/decay on [1, 0]. | |
double | releaseTCO = 0.0 |
TCO value for calculating offset. | |
bool | sustainOverride = false |
if true, places the EG into sustain mode | |
bool | releasePending = false |
a flag set when a note off event occurs while the sustain pedal is held, telling the EG to go to the release state once the pedal is released | |
double | incShutdown = 0.0 |
shutdown linear incrementer | |
EGState | state = EGState::kOff |
EG state variable. | |
![]() | |
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 | |
Analog EG emulator.
Base Class: ModuleCore
GUI Parameters: EGParameters
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::AnalogEGCore::AnalogEGCore | ( | ) |
Construction: Cores follow the same construction pattern.
simple default constructor
Core Specific:
|
inlinevirtual |
Destructor is empty: all resources are smart pointers
|
inlineprotected |
Calculate Time Coefficients
|
inlineprotected |
Calculate Time Coefficients
|
inlineprotected |
Calculate Time Coefficients
|
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.
|
inlineoverridevirtual |
ModuleCore Overrides for EG Cores only
Reimplemented from SynthLab::ModuleCore.
|
overridevirtual |
Renders the output of the module.
processInfo | the thunk-barrier compliant data structure for passing all needed parameters |
Implements SynthLab::ModuleCore.
|
overridevirtual |
Resets object to initialized state.
ModuleCore Overrides
processInfo | the thunk-barrier compliant data structure for passing all needed parameters |
Implements SynthLab::ModuleCore.
|
overridevirtual |
Sustain pedal handler for EG.
Reimplemented from SynthLab::ModuleCore.
|
overridevirtual |
Shutdown handler for EG.
Reimplemented from 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.