SynthLab SDK
synthlabcore.h
1 #pragma once
2 
3 #include "synthbase.h"
4 #include "synthfunctions.h"
5 #include "synthlabpcmsource.h" //<- for PCM sample oscillator support; you may remove otherwise
6 #include "synthlabwtsource.h" //<- for wavetable oscillator support; you may remove otherwise
7 
8 // -----------------------------
9 // --- SynthLab SDK File --- //
10 // ----------------------------
18 namespace SynthLab
19 {
94  class SynthLabCore : public ModuleCore
95  {
96  public:
97  // --- constructor/destructor
98  SynthLabCore(); /* C-TOR */
99  virtual ~SynthLabCore(){} /* D-TOR */
100 
101  virtual bool reset(CoreProcData& processInfo) override;
102  virtual bool update(CoreProcData& processInfo) override;
103  virtual bool render(CoreProcData& processInfo) override;
104  virtual bool doNoteOn(CoreProcData& processInfo) override;
105  virtual bool doNoteOff(CoreProcData& processInfo) override;
106 
107  protected:
108  double sampleRate = 1.0;
109 
110  };
111 
112 
113 
114 } // namespace
115 
SynthLabCore()
Construction: Cores follow the same construction pattern.
Definition: synthlabcore.cpp:29
This is the "blank" core template for compiling your own Cores as dynamic modules.
Definition: synthlabcore.h:94
virtual bool doNoteOff(CoreProcData &processInfo) override
Note-off handler for the ModuleCore.
Definition: synthlabcore.cpp:135
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
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
virtual bool reset(CoreProcData &processInfo) override
Resets object to initialized state.
Definition: synthlabcore.cpp:61
hard-coded arrays of FIR filter coefficients for the sample rate conversion objects (Interpolator and...
This structure holds all of the information needed to call functions on a ModuleCore object...
Definition: synthbase.h:1071
Abstract base class that encapsulates functionality of a module core; used with the Module-Core parad...
Definition: synthbase.h:1516
See also Designing Software Synthesizers in C++ 2nd Ed. by Will Pirkle.