SynthLab SDK
Go to the documentation of this file.
1 #pragma once
3 #include "synthbase.h"
4 #include "basiclookuptables.h"
6 // -----------------------------
7 // --- SynthLab SDK File --- //
8 // ----------------------------
16 // -----------------------------------------------------------------------------
17 namespace SynthLab
18 {
92  class LFOCore : public ModuleCore
93  {
94  public:
96  LFOCore(); /* C-TOR */
99  virtual ~LFOCore() {} /* D-TOR */
102  virtual bool reset(CoreProcData& processInfo) override;
103  virtual bool update(CoreProcData& processInfo) override;
104  virtual bool render(CoreProcData& processInfo) override;
105  virtual bool doNoteOn(CoreProcData& processInfo) override;
106  virtual bool doNoteOff(CoreProcData& processInfo) override;
108  protected:
109  std::unique_ptr<BasicLookupTables> lookupTables = nullptr;
111  // --- sample rate
112  double sampleRate = 0.0;
113  double outputValue = 0.0;
114  double rshOutputValue = 0.0;
116  // --- timebase
119  // --- for one shot renders
120  bool renderComplete = false;
122  // --- for noisy LFOs
125  // --- timer for RSH
128  // --- timer for delay
131  // --- ramp mod for fade-in
133  };
135 } // namespace
Timer delayTimer
LFO turn on delay.
Definition: lfocore.h:129
Ultra compact timer object that is used for many different functionalities.
Definition: synthbase.h:195
RampModulator fadeInModulator
LFO fade-in modulator.
Definition: lfocore.h:132
virtual bool doNoteOff(CoreProcData &processInfo) override
Note-off handler for the ModuleCore.
Definition: lfocore.cpp:400
double rshOutputValue
current output,
Definition: lfocore.h:114
Compact modulo counter with wrapping used as the timebase for all oscillators.
Definition: synthbase.h:137
NoiseGenerator noiseGen
for noise based LFOs
Definition: lfocore.h:123
bool renderComplete
flag for one-shot
Definition: lfocore.h:120
virtual bool reset(CoreProcData &processInfo) override
Resets object to initialized state.
Definition: lfocore.cpp:71
virtual bool update(CoreProcData &processInfo) override
Updates the object for the next block of audio processing.
Definition: lfocore.cpp:118
Simple object that generates white, gaussian white or pink noise.
Definition: synthbase.h:495
Definition: addosccore.cpp:4
See also Designing Software Synthesizers in C++ 2nd Ed. by Will Pirkle.
LFO that renders all classical and many noisy wavforms.
Definition: lfocore.h:92
double sampleRate
sample rate
Definition: lfocore.h:112
Timer sampleHoldTimer
for sample and hold waveforms
Definition: lfocore.h:126
SynthClock lfoClock
Definition: lfocore.h:117
double outputValue
current output,
Definition: lfocore.h:113
std::unique_ptr< BasicLookupTables > lookupTables
LUTs for some waveforms.
Definition: lfocore.h:109
Construction: Cores follow the same construction pattern.
Definition: lfocore.cpp:31
virtual bool render(CoreProcData &processInfo) override
Renders the output of the module.
Definition: lfocore.cpp:176
This is a tiny modulator object that produces an output that ramps up or down linearly between two va...
Definition: synthbase.h:412
virtual ~LFOCore()
Definition: lfocore.h:99
virtual bool doNoteOn(CoreProcData &processInfo) override
Note-on handler for the ModuleCore.
Definition: lfocore.cpp:356
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.