SynthLab SDK
lfo.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 {
104  class SynthLFO : public SynthModule
105  {
106  public:
108  SynthLFO(std::shared_ptr<MidiInputData> _midiInputData,
109  std::shared_ptr<LFOParameters> _parameters,
110  uint32_t blockSize = 64); /* C-TOR */
111 
113  virtual ~SynthLFO() {}/* D-TOR */
114 
116  virtual bool reset(double _sampleRate) override;
117  virtual bool update() override;
118  virtual bool render(uint32_t samplesToProcess = 1) override;
119  virtual bool doNoteOn(MIDINoteEvent& noteEvent) override;
120  virtual bool doNoteOff(MIDINoteEvent& noteEvent) override;
121 
123  std::shared_ptr<LFOParameters> getParameters() { return parameters; }
124 
125  protected:
127  std::shared_ptr<LFOParameters> parameters = nullptr;
128  };
129 
130 
131 } // namespace
132 
virtual bool doNoteOn(MIDINoteEvent &noteEvent) override
Calls the note-on handler for all cores.
Definition: lfo.cpp:121
LFO module.
Definition: lfo.h:104
std::shared_ptr< LFOParameters > parameters
Definition: lfo.h:127
Definition: addosccore.cpp:4
virtual bool doNoteOff(MIDINoteEvent &noteEvent) override
Calls the note-off handler for all cores.
Definition: lfo.cpp:137
SynthLFO(std::shared_ptr< MidiInputData > _midiInputData, std::shared_ptr< LFOParameters > _parameters, uint32_t blockSize=64)
Constructs Wavetable Oscillator module.
Definition: lfo.cpp:29
virtual bool reset(double _sampleRate) override
Resets object to initialized state.
Definition: lfo.cpp:71
Abstract base class that encapsulates functionality of a module; used with the Module-Core paradigm...
Definition: synthbase.h:1600
virtual ~SynthLFO()
Definition: lfo.h:113
std::shared_ptr< LFOParameters > getParameters()
Definition: lfo.h:123
virtual bool render(uint32_t samplesToProcess=1) override
Renders audio from the selected core.
Definition: lfo.cpp:107
virtual bool update() override
Updates the selected core; sets GLOBAL engine variable unisonDetuneCents that may have changed since ...
Definition: lfo.cpp:91
Information about a MIDI note event (note on or note off).
Definition: synthstructures.h:212
See also Designing Software Synthesizers in C++ 2nd Ed. by Will Pirkle.