Table functions. More...
| Functions | |
| template<class T > | |
| void | cosine (T *dst, uint32_t len) | 
| Fills array with one period of a cosine wave. | |
| template<class T > | |
| void | sine (T *dst, uint32_t len) | 
| Fills array with one period of a sine wave. | |
| template<class T > | |
| void | sinusoid (T *dst, uint32_t len, double phase, double periods) | 
| Fills array with arbitrary phase and length sinusoid. | |
| template<class T > | |
| void | multiImpulse (T *dst, uint32_t len, uint32_t hrmLo, uint32_t hrmHi) | 
| Sums band-limited impulse wave into multi-wavetable array. | |
| template<class T > | |
| void | multiSaw (T *dst, uint32_t len, uint32_t hrmLo, uint32_t hrmHi) | 
| Sums band-limited saw wave into multi-wavetable array. | |
| template<class T > | |
| void | multiSquare (T *dst, uint32_t len, uint32_t hrmLo, uint32_t hrmHi) | 
| Sums band-limited square wave into multi-wavetable array. | |
| template<class T > | |
| void | multiTriangle (T *dst, uint32_t len, uint32_t hrmLo, uint32_t hrmHi) | 
| Sums band-limited triangle wave into multi-wavetable array. | |
| template<class T > | |
| void | multiWave (T *dst, uint32_t len, uint32_t order, void(*func)(T *, uint32_t, uint32_t, uint32_t)) | 
| Create multi-wavetable. | |
| uint32_t | maxHarmonics (uint32_t len) | 
| Returns maximum number of harmonics that will fit in array. | |
| template<class T > | |
| void | window (T *dst, uint32_t len, WindowType type) | 
| Fills array with specified window type. | |
| template<class T > | |
| void | bartlett (T *dst, uint32_t len) | 
| Fills array with Bartlett window. | |
| template<class T > | |
| void | blackman (T *dst, uint32_t len) | 
| Fills array with Blackman window. | |
| template<class T > | |
| void | blackmanHarris (T *dst, uint32_t len) | 
| Fills array with Blackman-Harris window. | |
| template<class T > | |
| void | hamming (T *dst, uint32_t len) | 
| Fills array with Hamming window. | |
| template<class T > | |
| void | hann (T *dst, uint32_t len) | 
| Fills array with von Hann window. | |
| template<class T > | |
| void | welch (T *dst, uint32_t len) | 
| Fills array with Welch window. | |
| template<class T > | |
| void | rectangle (T *dst, uint32_t len) | 
| Fills array with Rectangle window. | |
| template<class T > | |
| void | nyquist (T *dst, uint32_t len, uint32_t str=1) | 
| Fills array with Nyquist window. | |
| float | phaseIncFactor (double framesPerSec) | 
| Returns phase increment factor. | |
Table functions.
| void multiImpulse | ( | T * | dst, | 
| uint32_t | len, | ||
| uint32_t | hrmLo, | ||
| uint32_t | hrmHi | ||
| ) | 
Sums band-limited impulse wave into multi-wavetable array.
The waveform includes harmonics in the range [hrmLo, hrmHi]. The amplitude of the waveform will not be normalized. The ideal waveform shape is [4, -1, 0, -1, 0, -1, 0, -1 ]
| void multiSaw | ( | T * | dst, | 
| uint32_t | len, | ||
| uint32_t | hrmLo, | ||
| uint32_t | hrmHi | ||
| ) | 
Sums band-limited saw wave into multi-wavetable array.
The waveform includes harmonics in the range [hrmLo, hrmHi]. The ideal waveform shape is [1, 0.75, 0.5, 0.25, 0, -0.25, -0.5, -0.75]
| void multiSquare | ( | T * | dst, | 
| uint32_t | len, | ||
| uint32_t | hrmLo, | ||
| uint32_t | hrmHi | ||
| ) | 
Sums band-limited square wave into multi-wavetable array.
The waveform includes harmonics in the range [hrmLo, hrmHi]. The ideal waveform shape is [ 1, 1, 1, 1, -1, -1, -1, -1].
| void multiTriangle | ( | T * | dst, | 
| uint32_t | len, | ||
| uint32_t | hrmLo, | ||
| uint32_t | hrmHi | ||
| ) | 
Sums band-limited triangle wave into multi-wavetable array.
The waveform includes harmonics in the range [hrmLo, hrmHi]. The ideal waveform shape is [ 0, 0.5, 1, 0.5, 0, -0.5, -1, -0.5].
| float phaseIncFactor | ( | double | framesPerSec | ) | 
Returns phase increment factor.
Multiply by desired frequency in Hz to get integer phase increment.