SynthLab SDK
synthlabcore.h
1 #pragma once
2 
3 // *** NOTE: relative paths to SDK files ********************************************
4 // these are setup so that ModuleCore DM projects are compiled directly
5 // from the SDK itself with minimal effort
6 //
7 // You may want to adjust these to suit your particular development folder
8 // system if you only want to use parts of the SDK or plan on modifying
9 // SDK files, or need to alter the folder hierarchy for your setup.
10 //
11 // Alternatively, you may add a new "Include Path" to your compiler setup.
12 // **********************************************************************************
13 
14 #include "../../../../source/synthbase.h"
15 #include "../../../../source/synthfunctions.h"
16 
17 // -----------------------------
18 // SynthLab SDK File //
19 // for //
20 // DynamicModule //
21 // Development //
22 // ----------------------------
23 
31 // -----------------------------------------------------------------------------
32 namespace SynthLab
33 {
103  class SynthLabCore : public ModuleCore
104  {
105  public:
107  SynthLabCore(); /* C-TOR */
108 
110  virtual ~SynthLabCore() {} /* D-TOR */
111 
113  virtual bool reset(CoreProcData& processInfo) override;
114  virtual bool update(CoreProcData& processInfo) override;
115  virtual bool render(CoreProcData& processInfo) override;
116  virtual bool doNoteOn(CoreProcData& processInfo) override;
117  virtual bool doNoteOff(CoreProcData& processInfo) override;
118 
119  protected:
120  // --- sample rate
121  double sampleRate = 0.0;
122  double outputValue = 0.0;
123  double modStrength = 1.0;
124 
125  // --- timebase
126  SynthClock fmOpClock[NUM_FMLFO_OPS];
127 
128  // --- for one shot renders
129  bool renderComplete = false;
130  };
131 
132 } // namespace
133 
bool renderComplete
flag for one-shot
Definition: synthlabcore.h:135
SynthLabCore()
Construction: Cores follow the same construction pattern.
Definition: synthlabcore.cpp:29
Compact modulo counter with wrapping used as the timebase for all oscillators.
Definition: synthbase.h:137
virtual bool doNoteOff(CoreProcData &processInfo) override
Note-off handler for the ModuleCore.
Definition: synthlabcore.cpp:135
Definition: addosccore.cpp:4
SynthClock fmOpClock[NUM_FMLFO_OPS]
for 3 operators
Definition: synthlabcore.h:126
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
double modStrength
current output,
Definition: synthlabcore.h:123
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
virtual ~SynthLabCore()
Definition: synthlabcore.h:110
This structure holds all of the information needed to call functions on a ModuleCore object...
Definition: synthbase.h:1071
double outputValue
current output,
Definition: synthlabcore.h:128