4 #include "synthfunctions.h" 28 if (midiNoteNumber >= NUM_MIDI_NOTES)
return;
36 double wtData[2] = { 0.0, 0.0 };
42 double dIntPart = 0.0;
43 double fracPart = modf(wtReadLocation, &dIntPart);
44 uint32_t readIndex = (uint32_t)dIntPart;
62 inline void addWavetable(uint32_t startNoteNumber, uint32_t endNoteNumber, std::shared_ptr<double> _table, uint32_t length,
const char* name)
64 if (endNoteNumber >= NUM_MIDI_NOTES)
return;
68 for (uint32_t i = startNoteNumber; i <= endNoteNumber; i++)
76 inline void clearAllWavetables()
78 for (uint32_t i = 0; i < NUM_MIDI_NOTES; i++)
virtual void selectTable(uint32_t midiNoteNumber)
Objects that access the database will select a table based on the user's waveform selection...
Definition: dynamictablesource.h:26
double outputComp
output scaling factor (NOT volume or attenuation, waveform specific)
Definition: synthbase.h:1440
Interface for wavetable sources.
Definition: synthbase.h:801
virtual const char * getWaveformName()
Definition: dynamictablesource.h:20
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:1339
Definition: synthlabcore.cpp:4
uint32_t tableLength
length
Definition: synthbase.h:1438
Structure for holding information about a static wavetable, that is read from a static location...
Definition: synthbase.h:1422
uint32_t wrapMask
mask = length - 1
Definition: synthbase.h:1439
DynamicWavetable selectedTable
— selected table, stored here
Definition: dynamictablesource.h:88
const char * waveformName
waveform name
Definition: synthbase.h:1442
virtual uint32_t getWaveTableLength()
Definition: dynamictablesource.h:59
DynamicWavetable wavetableSet[NUM_MIDI_NOTES]
— prefab table valid for all MIDI notes
Definition: dynamictablesource.h:87
std::shared_ptr< double > table
the table (shared)
Definition: synthbase.h:1437
virtual double readWaveTable(double oscClockIndex)
Read a table at a normalized index where 0.0 is the start of the table and 1.0 is the end of it...
Definition: dynamictablesource.h:33
Storage for one dynamic table source; a wavetable that is created dynamically at load time...
Definition: dynamictablesource.h:9