![]() |
Cinder
0.9.1
|
#include <WaveTable.h>
Inherits cinder::audio::WaveTable.
Public Member Functions | |
WaveTable2d (size_t sampleRate, size_t tableSize, size_t numTables) | |
void | resize (size_t tableSize, size_t numTables) |
void | fillBandlimited (WaveformType type) |
float | lookupBandlimited (float phase, float f0) const |
float | lookupBandlimited (float *outputArray, size_t outputLength, float currentPhase, float f0) const |
float | lookupBandlimited (float *outputArray, size_t outputLength, float currentPhase, const float *f0Array) const |
void | copyTo (float *array, size_t tableIndex) const |
void | copyFrom (const float *array, size_t tableIndex) |
float | calcBandlimitedTableIndex (float f0) const |
size_t | getNumTables () const |
void | resize (size_t tableSize) |
void | fillSine () |
void | setSampleRate (size_t sampleRate) |
size_t | getSampleRate () const |
size_t | getTableSize () const |
float | lookup (float phase) const |
float | lookup (float *outputArray, size_t outputLength, float currentPhase, float freq) const |
float | lookup (float *outputArray, size_t outputLength, float currentPhase, const float *freqArray) const |
void | copyTo (float *array) const |
void | copyFrom (const float *array) |
Protected Member Functions | |
void | calcLimits () |
void | fillBandLimitedTable (WaveformType type, float *table, size_t numPartials) |
size_t | getMaxHarmonicsForTable (size_t tableIndex) const |
const float * | getBandLimitedTable (float f0) const |
std::tuple< const float *, const float *, float > | getBandLimitedTablesLerp (float f0) const |
void | fillSinesum (float *array, size_t length, const std::vector< float > &partialCoeffs) |
Protected Attributes | |
size_t | mNumTables |
float | mMinMidiRange |
float | mMaxMidiRange |
size_t | mSampleRate |
size_t | mTableSize |
float | mSamplePeriod |
BufferDynamic | mBuffer |
Manages an array of tables that is used for bandlimited wavetable synthesis. Supports table lookup with linear interpolation.
cinder::audio::WaveTable2d::WaveTable2d | ( | size_t | sampleRate, |
size_t | tableSize, | ||
size_t | numTables | ||
) |
void cinder::audio::WaveTable2d::resize | ( | size_t | tableSize, |
size_t | numTables | ||
) |
Adjusts the parameters effecting table size and calculate.
void cinder::audio::WaveTable2d::fillBandlimited | ( | WaveformType | type | ) |
float cinder::audio::WaveTable2d::lookupBandlimited | ( | float | phase, |
float | f0 | ||
) | const |
float cinder::audio::WaveTable2d::lookupBandlimited | ( | float * | outputArray, |
size_t | outputLength, | ||
float | currentPhase, | ||
float | f0 | ||
) | const |
float cinder::audio::WaveTable2d::lookupBandlimited | ( | float * | outputArray, |
size_t | outputLength, | ||
float | currentPhase, | ||
const float * | f0Array | ||
) | const |
void cinder::audio::WaveTable2d::copyTo | ( | float * | array, |
size_t | tableIndex | ||
) | const |
void cinder::audio::WaveTable2d::copyFrom | ( | const float * | array, |
size_t | tableIndex | ||
) |
float cinder::audio::WaveTable2d::calcBandlimitedTableIndex | ( | float | f0 | ) | const |
size_t cinder::audio::WaveTable2d::getNumTables | ( | ) | const |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
inherited |
|
inherited |
|
inherited |
Does not update data, lookup will be inaccurate until next fill.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
protectedinherited |
|
protected |
|
protected |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |