![]() |
Cinder
0.9.1
|
#include <WaveTable.h>
Inherited by cinder::audio::WaveTable2d.
Public Member Functions | |
WaveTable (size_t mSampleRate, size_t tableSize) | |
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 | fillSinesum (float *array, size_t length, const std::vector< float > &partialCoeffs) |
Protected Attributes | |
size_t | mSampleRate |
size_t | mTableSize |
float | mSamplePeriod |
BufferDynamic | mBuffer |
Manages a table that is used for wavetable synthesis. Supports table lookup with linear interpolation.
cinder::audio::WaveTable::WaveTable | ( | size_t | mSampleRate, |
size_t | tableSize | ||
) |
void cinder::audio::WaveTable::resize | ( | size_t | tableSize | ) |
void cinder::audio::WaveTable::fillSine | ( | ) |
void cinder::audio::WaveTable::setSampleRate | ( | size_t | sampleRate | ) |
Does not update data, lookup will be inaccurate until next fill.
size_t cinder::audio::WaveTable::getSampleRate | ( | ) | const |
size_t cinder::audio::WaveTable::getTableSize | ( | ) | const |
float cinder::audio::WaveTable::lookup | ( | float | phase | ) | const |
float cinder::audio::WaveTable::lookup | ( | float * | outputArray, |
size_t | outputLength, | ||
float | currentPhase, | ||
float | freq | ||
) | const |
float cinder::audio::WaveTable::lookup | ( | float * | outputArray, |
size_t | outputLength, | ||
float | currentPhase, | ||
const float * | freqArray | ||
) | const |
void cinder::audio::WaveTable::copyTo | ( | float * | array | ) | const |
void cinder::audio::WaveTable::copyFrom | ( | const float * | array | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |