Sound Design Toolkit  078
Physically informed sound synthesis for everyday sounds

Typedefs

typedef struct SDTAverage SDTAverage
 Opaque data structure for a moving average filter object.
 
typedef struct SDTAverage SDTAverage
 Opaque data structure for a moving average filter object.
 

Functions

SDTAverageSDTAverage_new (long size)
 Object constructor. More...
 
void SDTAverage_free (SDTAverage *x)
 Object destructor. More...
 
void SDTAverage_setWindow (SDTAverage *x, unsigned int i)
 Sets the averaging window. More...
 
double SDTAverage_dsp (SDTAverage *x, double in)
 Signal processing routine. Call this function at sample rate to compute the filtered signal. More...
 

Detailed Description

Moving average filter, producing as output the average of the last input samples.

Function Documentation

double SDTAverage_dsp ( SDTAverage x,
double  in 
)

Signal processing routine. Call this function at sample rate to compute the filtered signal.

Parameters
[in]inInput sample
Returns
Output sample
void SDTAverage_free ( SDTAverage x)

Object destructor.

Parameters
[in]xPointer to the instance to destroy
SDTAverage * SDTAverage_new ( long  size)

Object constructor.

Parameters
[in]sizeMoving average buffer size
Returns
Pointer to the new instance
void SDTAverage_setWindow ( SDTAverage x,
unsigned int  i 
)

Sets the averaging window.

Parameters
[in]sizeMoving average window size [1,bufferSize]