SynthLab SDK
wtoscillator.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "synthbase.h"
4 #include "guiconstants.h"
5 #include "bleptables.h"
6 #include "synthfunctions.h"
7 #include "synthlabwtsource.h"
8 
9 // -----------------------------
10 // --- SynthLab SDK File --- //
11 // ----------------------------
19 // -----------------------------------------------------------------------------
20 namespace SynthLab
21 {
125  class WTOscillator : public SynthModule
126  {
127  public:
129  WTOscillator(std::shared_ptr<MidiInputData> _midiInputData,
130  std::shared_ptr<WTOscParameters> _parameters,
131  std::shared_ptr<WavetableDatabase> _waveTableDatabase,
132  uint32_t blockSize = 64);
133 
135  virtual ~WTOscillator() {}
136 
138  virtual bool reset(double _sampleRate) override;
139  virtual bool update() override;
140  virtual bool render(uint32_t samplesToProcess = 1) override;
141  virtual bool doNoteOn(MIDINoteEvent& noteEvent) override;
142  virtual bool doNoteOff(MIDINoteEvent& noteEvent) override;
143 
145  std::shared_ptr<WTOscParameters> getParameters() { return parameters; }
146 
147  protected:
149  std::shared_ptr<WTOscParameters> parameters = nullptr;
150 
152  std::shared_ptr<WavetableDatabase> waveTableDatabase;
153  };
154 
155 
156 }
virtual ~WTOscillator()
Destructor is empty: all resources are smart pointers.
Definition: wtoscillator.h:135
virtual bool doNoteOn(MIDINoteEvent &noteEvent) override
Calls the note-on handler for all cores.
Definition: wtoscillator.cpp:151
std::shared_ptr< WTOscParameters > parameters
Definition: wtoscillator.h:149
std::shared_ptr< WTOscParameters > getParameters()
Definition: wtoscillator.h:145
std::shared_ptr< WavetableDatabase > waveTableDatabase
Definition: wtoscillator.h:152
virtual bool reset(double _sampleRate) override
Resets object to initialized state.
Definition: wtoscillator.cpp:99
WTOscillator(std::shared_ptr< MidiInputData > _midiInputData, std::shared_ptr< WTOscParameters > _parameters, std::shared_ptr< WavetableDatabase > _waveTableDatabase, uint32_t blockSize=64)
Constructs Wavetable Oscillator module.
Definition: wtoscillator.cpp:33
Definition: addosccore.cpp:4
Abstract base class that encapsulates functionality of a module; used with the Module-Core paradigm...
Definition: synthbase.h:1600
virtual bool update() override
Updates the selected core; sets GLOBAL engine variable unisonDetuneCents that may have changed since ...
Definition: wtoscillator.cpp:120
See also Designing Software Synthesizers in C++ 2nd Ed. by Will Pirkle.
virtual bool doNoteOff(MIDINoteEvent &noteEvent) override
Calls the note-off handler for all cores.
Definition: wtoscillator.cpp:169
Wavetable oscillator module.
Definition: wtoscillator.h:125
hard-coded arrays of FIR filter coefficients for the sample rate conversion objects (Interpolator and...
virtual bool render(uint32_t samplesToProcess=1) override
Renders audio from the selected core.
Definition: wtoscillator.cpp:137
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.