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 #include "../../../../source/limiter.h"
17 #include "../../../../source/vafilters.h"
18 
19 // -----------------------------
20 // SynthLab SDK File //
21 // for //
22 // DynamicModule //
23 // Development //
24 // ----------------------------
25 
33 // -----------------------------------------------------------------------------
34 namespace SynthLab
35 {
108  class SynthLabCore : public ModuleCore
109  {
110  public:
112  SynthLabCore(); /* C-TOR */
113 
115  virtual ~SynthLabCore() {} /* D-TOR */
116 
118  virtual bool reset(CoreProcData& processInfo) override;
119  virtual bool update(CoreProcData& processInfo) override;
120  virtual bool render(CoreProcData& processInfo) override;
121  virtual bool doNoteOn(CoreProcData& processInfo) override;
122  virtual bool doNoteOff(CoreProcData& processInfo) override;
123 
124  protected:
125  // --- our member filters
126  VA1Filter va1[STEREO];
127  VASVFilter svf[STEREO];
129  VAMoogFilter moog[STEREO];
131 
132  // --- global filter type
133  FilterModel selectedModel = FilterModel::kFirstOrder;
134  uint32_t outputIndex = 0;
135  double outputAmp = 1.0;
136  bool forceDualMonoFilters = false;
137 
138  // --- output limiter
139  Limiter limiter[STEREO];
140 
141  // --- for key track
142  double midiPitch = 440.0;
143  };
144 
145 
146 
147 } // namespace
148 
149 
VADiodeFilter diode[STEREO]
diode
Definition: synthlabcore.h:130
Definition: vafilters.h:295
SynthLabCore()
Construction: Cores follow the same construction pattern.
Definition: synthlabcore.cpp:29
Definition: vafilters.h:191
bool forceDualMonoFilters
DM option for slow machines.
Definition: synthlabcore.h:136
Definition: vafilters.h:25
virtual bool doNoteOff(CoreProcData &processInfo) override
Note-off handler for the ModuleCore.
Definition: synthlabcore.cpp:135
VASVFilter svf[STEREO]
SVF.
Definition: synthlabcore.h:127
Definition: addosccore.cpp:4
uint32_t outputIndex
selected output
Definition: synthlabcore.h:134
Definition: vafilters.h:121
virtual bool update(CoreProcData &processInfo) override
Updates the object for the next block of audio processing.
Definition: synthlabcore.cpp:79
VAMoogFilter moog[STEREO]
moog
Definition: synthlabcore.h:129
Limiter limiter[STEREO]
limiters to squelch oscillations
Definition: synthlabcore.h:139
VAKorg35Filter korg35[STEREO]
Korg35.
Definition: synthlabcore.h:128
virtual bool render(CoreProcData &processInfo) override
Renders the output of the module.
Definition: synthlabcore.cpp:98
virtual bool doNoteOn(CoreProcData &processInfo) override
Note-on handler for the ModuleCore.
Definition: synthlabcore.cpp:116
Implements a custom peak limiter designed especially for self oscillating filters whose outputs are >...
Definition: limiter.h:373
double midiPitch
midi note pitch
Definition: synthlabcore.h:123
Definition: vafilters.h:75
virtual bool reset(CoreProcData &processInfo) override
Resets object to initialized state.
Definition: synthlabcore.cpp:61
virtual ~SynthLabCore()
Definition: synthlabcore.h:115
VA1Filter va1[STEREO]
1st order VA
Definition: synthlabcore.h:126
This structure holds all of the information needed to call functions on a ModuleCore object...
Definition: synthbase.h:1071
double outputAmp
output scaling
Definition: synthlabcore.h:122