Manages a table that is used for wavetable synthesis. Supports table lookup with linear interpolation.


Public Member Functions

  • WaveTable (size_t mSampleRate, size_t tableSize)
  • void
    resize (size_t tableSize)
  • void
    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
  • 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
  • mBuffer