Storage for one static table source, specifically for drums which are pitchless and one-shot.
More...
#include <synthlabwtsource.h>
|
|
| DrumWTSource () |
| | empty constructor
|
| |
|
| ~DrumWTSource () |
| | empty destructor
|
| |
| virtual const char * | getWaveformName () override |
| |
|
virtual void | selectTable (uint32_t midiNoteNumber) override |
| | Select a table based on MIDI note number; nothing to do here.
|
| |
| virtual double | readWaveTable (double normalizedPhaseInc) override |
| | Read and interpolate the table; uses linear interpolation but could be changed to 4th order LaGrange interpolation instead. More...
|
| |
| virtual uint32_t | getWaveTableLength () override |
| |
| void | addWavetable (const double *_table, uint32_t length, const char *name, double outputComp=1.0) |
| | Adds a new wavetable to the array of 128 tables, one for each MIDI note. More...
|
| |
| void | addWavetable (const uint64_t *_table, uint32_t length, const char *name, double outputComp=1.0) |
| | Adds a new wavetable to the array of 128 tables, one for each MIDI note. More...
|
| |
Storage for one static table source, specifically for drums which are pitchless and one-shot.
- exposes the IWavetableSource interface
- the owning object (a wavetable core) selects the table based on MIDI note number during the update() phase, then 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
◆ addWavetable() [1/2]
| void SynthLab::DrumWTSource::addWavetable |
( |
const double * |
_table, |
|
|
uint32_t |
length, |
|
|
const char * |
name, |
|
|
double |
outputComp = 1.0 |
|
) |
| |
|
inline |
Adds a new wavetable to the array of 128 tables, one for each MIDI note.
- this function uses pointers to double arrays
- Parameters
-
| _table | the shared pointer to the table (array) |
| length | the size of the table (array) |
| name | the unique name of this table |
| outputComp | a scaling factor used on playback to amplify or attenuate the output |
◆ addWavetable() [2/2]
| void SynthLab::DrumWTSource::addWavetable |
( |
const uint64_t * |
_table, |
|
|
uint32_t |
length, |
|
|
const char * |
name, |
|
|
double |
outputComp = 1.0 |
|
) |
| |
|
inline |
Adds a new wavetable to the array of 128 tables, one for each MIDI note.
- this function uses pointers to unsinged 64-bit int arrays
- Parameters
-
| _table | the shared pointer to the table (array) |
| length | the size of the table (array) |
| name | the unique name of this table |
| outputComp | a scaling factor used on playback to amplify or attenuate the output |
◆ getWaveformName()
| virtual const char* SynthLab::DrumWTSource::getWaveformName |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getWaveTableLength()
| virtual uint32_t SynthLab::DrumWTSource::getWaveTableLength |
( |
| ) |
|
|
inlineoverridevirtual |
◆ readWaveTable()
| virtual double SynthLab::DrumWTSource::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: