4 #include "synthfunctions.h" 9 class SynthLabCore :
public ModuleCore
16 virtual bool reset(CoreProcData& processInfo);
17 virtual bool update(CoreProcData& processInfo);
18 virtual bool render(CoreProcData& processInfo);
19 virtual bool doNoteOn(CoreProcData& processInfo);
20 virtual bool doNoteOff(CoreProcData& processInfo);
22 virtual bool shutdown()
28 state = EGState::kShutdown;
40 double egStepInc = 0.0;
41 double attackTimeScalar = 0.0;
42 double decayTimeScalar = 0.0;
44 double envelopeOutput = 0.0;
45 inline double setStepInc(
double timeMsec,
double scale = 1.0)
47 double freq = 1000.0 / timeMsec;
48 egStepInc = scale * (1000.0 / (timeMsec*
sampleRate));
virtual bool render(CoreProcData &processInfo)
Renders the output of the module.
Definition: synthlabcore.cpp:164
virtual bool reset(CoreProcData &processInfo)
Resets object to initialized state.
Definition: synthlabcore.cpp:29
SynthLabCore()
Construction: Cores follow the same construction pattern.
Definition: synthlabcore.cpp:7
const double SHUTDOWN_TIME_MSEC
short shutdown time when stealing a voice
Definition: synthconstants.h:89
virtual bool update(CoreProcData &processInfo)
Updates the object for the next block of audio processing.
Definition: synthlabcore.cpp:41
void setSustainOverride(bool b)
set the sustain pedal override to keep the EG stuck in the sustain state until the pedal is released ...
Definition: synthlabcore.h:53
virtual bool doNoteOn(CoreProcData &processInfo)
Note-on handler for the ModuleCore.
Definition: synthlabcore.cpp:202
Definition: synthlabcore.cpp:4
double sampleRate
sample rate
Definition: synthlabcore.h:31
bool sustainOverride
if true, places the EG into sustain mode
Definition: synthlabcore.h:66
bool resetToZero
notes the EG is in reset-to-zero mode
Definition: synthlabcore.h:68
virtual bool doNoteOff(CoreProcData &processInfo)
Note-off handler for the ModuleCore.
Definition: synthlabcore.cpp:212
EGState
Definition: synthlabparams.h:556
bool releasePending
a flag set when a note off event occurs while the sustain pedal is held, telling the EG to go to the ...
Definition: synthlabcore.h:67
double incShutdown
shutdown linear incrementer
Definition: synthlabcore.h:71
This structure holds all of the information needed to call functions on a ModuleCore object...
Definition: synthbase.h:1233
Information about a MIDI note event (note on or note off).
Definition: synthstructures.h:228