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 #include "../../../../source/synthbase.h"
14 #include "../../../../source/basiclookuptables.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 {
107  class SynthLabCore : public ModuleCore
108  {
109  public:
111  SynthLabCore(); /* C-TOR */
112 
114  virtual ~SynthLabCore() {} /* D-TOR */
115 
117  virtual bool reset(CoreProcData& processInfo) override;
118  virtual bool update(CoreProcData& processInfo) override;
119  virtual bool render(CoreProcData& processInfo) override;
120  virtual bool doNoteOn(CoreProcData& processInfo) override;
121  virtual bool doNoteOff(CoreProcData& processInfo) override;
122 
123  protected:
124  std::unique_ptr<BasicLookupTables> lookupTables = nullptr;
125 
126  // --- sample rate
127  double sampleRate = 0.0;
128  double outputValue = 0.0;
129  double rshOutputValue = 0.0;
130 
131  // --- timebase
133 
134  // --- for one shot renders
135  bool renderComplete = false;
136 
137  // --- for noisy LFOs
139 
140  // --- timer for RSH
142 
143  // --- timer for delay
145 
146  // --- ramp mod for fade-in
148  };
149 
150 } // namespace
151 
Ultra compact timer object that is used for many different functionalities.
Definition: synthbase.h:195
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
SynthClock lfoClock
timbase
Definition: synthlabcore.h:132
virtual bool doNoteOff(CoreProcData &processInfo) override
Note-off handler for the ModuleCore.
Definition: synthlabcore.cpp:135
Simple object that generates white, gaussian white or pink noise.
Definition: synthbase.h:495
std::unique_ptr< BasicLookupTables > lookupTables
LUTs for some waveforms.
Definition: synthlabcore.h:124
Definition: addosccore.cpp:4
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
Timer delayTimer
LFO turn on delay.
Definition: synthlabcore.h:144
virtual bool render(CoreProcData &processInfo) override
Renders the output of the module.
Definition: synthlabcore.cpp:98
RampModulator fadeInModulator
LFO fade-in modulator.
Definition: synthlabcore.h:147
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:114
This is a tiny modulator object that produces an output that ramps up or down linearly between two va...
Definition: synthbase.h:412
NoiseGenerator noiseGen
for noise based LFOs
Definition: synthlabcore.h:138
Timer sampleHoldTimer
for sample and hold waveforms
Definition: synthlabcore.h:141
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
double rshOutputValue
current output,
Definition: synthlabcore.h:129