Storage for one static sinusoidal table source; stores a single sine table that is used for all notes.
More...
#include <sinetablesource.h>
Storage for one static sinusoidal table source; stores a single sine table that is used for all notes.
- exposes the IWavetavleSource interface
- simplest wavetable source example
- the owning object (a wavetable core) selects the table based on pitch during the update() phase which is ignored since the source only has one table. Then, the owning object makes calls to read the table during the render() phase
- see also StaticWavetable
- Author
- Will Pirkle http://www.willpirkle.com
- Version
- Revision : 1.0
- Date
- Date : 2021 / 04 / 26
◆ SineTableSource()
SynthLab::SineTableSource::SineTableSource |
( |
| ) |
|
|
inline |
Stores the information about the static sinusoidal wavetable (see synthconstants.h)
- sets up the length and mask
◆ getWaveformName()
virtual const char* SynthLab::SineTableSource::getWaveformName |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getWaveTableLength()
virtual uint32_t SynthLab::SineTableSource::getWaveTableLength |
( |
| ) |
|
|
inlineoverridevirtual |
◆ readWaveTable()
virtual double SynthLab::SineTableSource::readWaveTable |
( |
double |
normalizedPhaseInc | ) |
|
|
inlineoverridevirtual |
Read and interpolate the table; uses linear interpolation but could be changed to 4th order LaGrange interpolation instead.
- Parameters
-
normalizedPhaseInc | the phase increment value; usually this is the mcounter member of a SynthClock object and is fo/fs where fo is the desired oscillator frequency |
Implements SynthLab::IWavetableSource.
The documentation for this class was generated from the following file: