SynthLab SDK
fmlfocore.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "synthbase.h"
4 
5 // -----------------------------
6 // --- SynthLab SDK File --- //
7 // ----------------------------
15 // -----------------------------------------------------------------------------
16 namespace SynthLab
17 {
87  class FMLFOCore : public ModuleCore
88  {
89  public:
91  FMLFOCore(); /* C-TOR */
92 
94  virtual ~FMLFOCore() {} /* D-TOR */
95 
97  virtual bool reset(CoreProcData& processInfo) override;
98  virtual bool update(CoreProcData& processInfo) override;
99  virtual bool render(CoreProcData& processInfo) override;
100  virtual bool doNoteOn(CoreProcData& processInfo) override;
101  virtual bool doNoteOff(CoreProcData& processInfo) override;
102 
103  protected:
104  // --- sample rate
105  double sampleRate = 0.0;
106  double outputValue = 0.0;
107  double modStrength = 1.0;
108 
109  // --- timebase
110  SynthClock fmOpClock[NUM_FMLFO_OPS];
111 
112  // --- for one shot renders
113  bool renderComplete = false;
114  };
115 
116 } // namespace
117 
double modStrength
current output,
Definition: fmlfocore.h:107
Compact modulo counter with wrapping used as the timebase for all oscillators.
Definition: synthbase.h:137
virtual ~FMLFOCore()
Definition: fmlfocore.h:94
virtual bool render(CoreProcData &processInfo) override
Renders the output of the module.
Definition: fmlfocore.cpp:169
virtual bool doNoteOff(CoreProcData &processInfo) override
Note-off handler for the ModuleCore.
Definition: fmlfocore.cpp:345
Definition: addosccore.cpp:4
LFO using simple FM algorithms for interesting modulators.
Definition: fmlfocore.h:87
virtual bool update(CoreProcData &processInfo) override
Updates the object for the next block of audio processing.
Definition: fmlfocore.cpp:111
virtual bool reset(CoreProcData &processInfo) override
Resets object to initialized state.
Definition: fmlfocore.cpp:69
bool renderComplete
flag for one-shot
Definition: fmlfocore.h:113
double sampleRate
sample rate
Definition: fmlfocore.h:105
virtual bool doNoteOn(CoreProcData &processInfo) override
Note-on handler for the ModuleCore.
Definition: fmlfocore.cpp:314
double outputValue
current output,
Definition: fmlfocore.h:106
SynthClock fmOpClock[NUM_FMLFO_OPS]
for 3 operators
Definition: fmlfocore.h:110
FMLFOCore()
Construction: Cores follow the same construction pattern.
Definition: fmlfocore.cpp:32
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.