GClasses
|
This is an abstract class that processes a wave file in blocks. Specifically, it divides the wave file up into overlapping blocks, converts them into Fourier space, calls the abstract "process" method with each block, converts back from Fourier space, and then interpolates to create the wave output.
#include <GWave.h>
Public Member Functions | |
GFourierWaveProcessor (size_t blockSize) | |
blockSize must be a power of 2. More... | |
virtual | ~GFourierWaveProcessor () |
void | reduce (GWave &signal) |
Transforms signal. More... | |
Protected Member Functions | |
void | decodeBlock (GWaveIterator &it, unsigned short chan) |
Convert an array of complex numbers (in temporal space) to the specified channel of a wave file. More... | |
void | encodeBlock (GWaveIterator &it, struct ComplexNumber *pBuf, unsigned short chan) |
Convert the specified channel from an iterator to an array of complex numbers (in temporal space). More... | |
void | interpolate (struct ComplexNumber *pPre, struct ComplexNumber *pCur, struct ComplexNumber *pPost, size_t graftSamples) |
Given 3 overlapping blocks (in temporal space), interpolate to create a final block of values. More... | |
virtual void | process (struct ComplexNumber *pBuf)=0 |
pBuf represents a block of m_blockSize complex numbers in Fourier space. This method should transform the block in some way. More... | |
Protected Attributes | |
size_t | m_blockSize |
struct ComplexNumber * | m_pBufA |
struct ComplexNumber * | m_pBufB |
struct ComplexNumber * | m_pBufC |
struct ComplexNumber * | m_pBufD |
struct ComplexNumber * | m_pBufE |
struct ComplexNumber * | m_pBufFinal |
GClasses::GFourierWaveProcessor::GFourierWaveProcessor | ( | size_t | blockSize | ) |
blockSize must be a power of 2.
|
virtual |
|
protected |
Convert an array of complex numbers (in temporal space) to the specified channel of a wave file.
|
protected |
Convert the specified channel from an iterator to an array of complex numbers (in temporal space).
|
protected |
Given 3 overlapping blocks (in temporal space), interpolate to create a final block of values.
|
protectedpure virtual |
pBuf represents a block of m_blockSize complex numbers in Fourier space. This method should transform the block in some way.
void GClasses::GFourierWaveProcessor::reduce | ( | GWave & | signal | ) |
Transforms signal.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |