WaveTable2d /

#includecinder/audio/WaveTable.h

Manages an array of tables that is used for bandlimited wavetable synthesis. Supports table lookup with linear interpolation.


Public Member Functions

  • WaveTable2d (size_t sampleRate, size_t tableSize, size_t numTables)
  • 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
  • copyTo (float *array, size_t tableIndex) const
  • copyFrom (const float *array, size_t tableIndex)
  • float
    calcBandlimitedTableIndex (float f0) const
  • size_t
    getNumTables () const
  • resize (size_t tableSize)
  • fillSine ()
  • 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
  • copyTo (float *array) const
  • copyFrom (const float *array)

Protected Member Functions

  • calcLimits ()
  • 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
  • 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
  • mBuffer