56 inline virtual void selectTable(uint32_t midiNoteNumber)
override 73 double wtData[2] = { 0.0, 0.0 };
79 double dIntPart = 0.0;
80 double fracPart = modf(wtReadLocation, &dIntPart);
81 uint32_t readIndex = (uint32_t)dIntPart;
113 inline void addWavetable(uint32_t startNoteNumber, uint32_t endNoteNumber,
114 std::shared_ptr<double> _table, uint32_t length,
const char* name)
120 for (uint32_t i = startNoteNumber; i <= endNoteNumber; i++)
double outputComp
output scaling factor (NOT volume or attenuation, waveform specific)
Definition: synthbase.h:1282
virtual void selectTable(uint32_t midiNoteNumber) override
Select a table based on MIDI note number.
Definition: dynamictablesource.h:56
Interface for wavetable sources.
Definition: synthbase.h:609
virtual const char * getWaveformName() override
Definition: dynamictablesource.h:47
double doLinearInterpolation(double x1, double x2, double y1, double y2, double x)
performs linear interpolation of x distance between two (x,y) points; returns interpolated value ...
Definition: synthfunctions.h:1387
DynamicTableSource()
empty constructor
Definition: dynamictablesource.h:41
Definition: addosccore.cpp:4
~DynamicTableSource()
empty destructor
Definition: dynamictablesource.h:42
virtual uint32_t getWaveTableLength() override
Definition: dynamictablesource.h:98
std::shared_ptr< double > table
the table (shared)
Definition: synthbase.h:1279
uint32_t tableLength
length
Definition: synthbase.h:1280
Structure for holding information about a static wavetable, that is read from a static location...
Definition: synthbase.h:1264
uint32_t wrapMask
mask = length - 1
Definition: synthbase.h:1281
DynamicWavetable selectedTable
— selected table, stored here
Definition: dynamictablesource.h:144
virtual double readWaveTable(double normalizedPhaseInc) override
Read and interpolate the table; uses linear interpolation but could be changed to 4th order LaGrange ...
Definition: dynamictablesource.h:70
void addWavetable(uint32_t startNoteNumber, uint32_t endNoteNumber, std::shared_ptr< double > _table, uint32_t length, const char *name)
Adds a new wavetable or tables to the array of 128 tables, one for each MIDI note.
Definition: dynamictablesource.h:113
const uint32_t NUM_MIDI_NOTES
Definition: synthconstants.h:618
DynamicWavetable wavetableSet[NUM_MIDI_NOTES]
— prefab table valid for all MIDI notes
Definition: dynamictablesource.h:143
void clearAllWavetables()
Clear out the wavetables to initialize or re-initialize.
Definition: dynamictablesource.h:132
const char * waveformName
waveform name
Definition: synthbase.h:1284
hard-coded arrays of FIR filter coefficients for the sample rate conversion objects (Interpolator and...
Storage for one dynamic table source; a wavetable that is created dynamically at load time...
Definition: dynamictablesource.h:38