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));
SynthLabCore()
Construction: Cores follow the same construction pattern.
Definition: synthlabcore.cpp:29
const double SHUTDOWN_TIME_MSEC
short shutdown time when stealing a voice
Definition: synthconstants.h:100
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 doNoteOff(CoreProcData &processInfo) override
Note-off handler for the ModuleCore.
Definition: synthlabcore.cpp:135
Definition: synthengine.cpp:16
virtual bool update(CoreProcData &processInfo) override
Updates the object for the next block of audio processing.
Definition: synthlabcore.cpp:79
double sampleRate
sample rate
Definition: synthlabcore.h:108
virtual bool render(CoreProcData &processInfo) override
Renders the output of the module.
Definition: synthlabcore.cpp:98
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
EGState
Definition: synthlabparams.h:728
virtual bool doNoteOn(CoreProcData &processInfo) override
Note-on handler for the ModuleCore.
Definition: synthlabcore.cpp:116
virtual bool reset(CoreProcData &processInfo) override
Resets object to initialized state.
Definition: synthlabcore.cpp:61
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:1020
Information about a MIDI note event (note on or note off).
Definition: synthstructures.h:212