1 #ifndef _SynthLabWTSource_h 2 #define _SynthLabWTSource_h 57 inline virtual void selectTable(uint32_t midiNoteNumber)
override 73 double wtData[2] = { 0.0, 0.0 };
81 uint32_t readIndex = (uint32_t)wtReadLocation;
87 wtData[0] = *(reinterpret_cast<double*>(&u0));
88 wtData[1] = *(
reinterpret_cast<double*
>(&u1));
91 double fracPart = wtReadLocation - readIndex;
121 synthLabTableSet->tableFs);
169 inline virtual void selectTable(uint32_t midiNoteNumber)
override { }
191 output = *(
reinterpret_cast<double*
>(&u0));
213 inline void addWavetable(
const double* _table, uint32_t length,
const char* name,
double outputComp = 1.0)
230 inline void addWavetable(
const uint64_t* _table, uint32_t length,
const char* name,
double outputComp = 1.0)
259 int32_t
tableIndexes[
MODULE_STRINGS] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 };
uint32_t tableLength
length
Definition: synthbase.h:1239
const uint32_t MIDI_NOTE_A4
Definition: synthconstants.h:620
virtual const char * getWaveformName() override
Definition: synthlabwtsource.h:48
uint32_t numTables
number of wavetables in bank (up to 16)
Definition: synthlabwtsource.h:257
int32_t tableIndexes[MODULE_STRINGS]
unique indexes for faster lookup
Definition: synthlabwtsource.h:259
double outputComp
output scaling factor
Definition: synthbase.h:1146
StaticWavetable drumTable
one table per drum
Definition: synthlabwtsource.h:239
Interface for wavetable sources.
Definition: synthbase.h:609
std::string tableNames[MODULE_STRINGS]
names of wavetables
Definition: synthlabwtsource.h:258
Storage for one static table source, specifically for drums which are pitchless and one-shot...
Definition: synthlabwtsource.h:151
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
DrumWTSource()
empty constructor
Definition: synthlabwtsource.h:154
virtual uint32_t getWaveTableLength() override
Definition: synthlabwtsource.h:101
const char * waveformName
string for the GUI
Definition: synthbase.h:1149
uint32_t wrapMask
wrapping mask = length - 1
Definition: synthbase.h:1240
Information about a bank of wavetables that are used in the morphing wavetable core.
Definition: synthlabwtsource.h:254
Definition: addosccore.cpp:4
const uint32_t MODULE_STRINGS
Definition: synthconstants.h:130
uint32_t * tableLengths
pointers to lengths of each of the hex encoded tables
Definition: synthbase.h:1139
Structure for holding information about a static wavetable, that is read from a static location...
Definition: synthbase.h:1208
virtual uint32_t getWaveTableLength() override
Definition: synthlabwtsource.h:201
StaticWavetable wavetableSet[NUM_MIDI_NOTES]
— prefab table valid for all MIDI notes
Definition: synthlabwtsource.h:131
const char * waveformName
waveform name string
Definition: synthbase.h:1243
double outputComp
output scaling factor (NOT volume or attenuation, waveform specific)
Definition: synthbase.h:1241
virtual void selectTable(uint32_t midiNoteNumber) override
Select a table based on MIDI note number; nothing to do here.
Definition: synthlabwtsource.h:169
const double * dTable
table of 64-bit doubles
Definition: synthbase.h:1238
virtual const char * getWaveformName() override
Definition: synthlabwtsource.h:160
virtual double readWaveTable(double normalizedPhaseInc) override
Read and interpolate the table; uses linear interpolation but could be changed to 4th order LaGrange ...
Definition: synthlabwtsource.h:179
StaticTableSource()
empty constructor
Definition: synthlabwtsource.h:42
const uint32_t NUM_MIDI_NOTES
Definition: synthconstants.h:618
Storage for one static table source; a static table is pre-compiled into the synth, or (optionally) read from a file. The "source" stores a set of these tables to maximize frequency content while prohibiting aliasing.
Definition: synthlabwtsource.h:39
virtual double readWaveTable(double normalizedPhaseInc) override
Read and interpolate the table; uses linear interpolation but could be changed to 4th order LaGrange ...
Definition: synthlabwtsource.h:70
const std::string empty_string
Definition: synthconstants.h:184
StaticWavetable selectedTable
— selected table, stored here
Definition: synthlabwtsource.h:132
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.
Definition: synthlabwtsource.h:230
const uint64_t * uTable
table of 64-bit HEX values
Definition: synthbase.h:1237
~StaticTableSource()
empty destructor
Definition: synthlabwtsource.h:43
std::string bankName
one name for bank
Definition: synthlabwtsource.h:256
void addSynthLabTableSet(SynthLabTableSet *synthLabTableSet)
Adds a new SET of wavetables to the array of 128 tables, one for each MIDI note.
Definition: synthlabwtsource.h:113
This structure defines a set of wavetables that are usually found in .h files and compiled into the s...
Definition: synthbase.h:1126
hard-coded arrays of FIR filter coefficients for the sample rate conversion objects (Interpolator and...
uint64_t ** ppHexTableSet
pointers to sets of hex encoded tables
Definition: synthbase.h:1140
~DrumWTSource()
empty destructor
Definition: synthlabwtsource.h:155
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.
Definition: synthlabwtsource.h:213
virtual void selectTable(uint32_t midiNoteNumber) override
Select a table based on MIDI note number.
Definition: synthlabwtsource.h:57