Sound Design Toolkit 075 Physically informed sound synthesis for everyday sounds

- Main Page
- Modules
- Data Structures
- Files

Typedefs | Functions
Moving average
SDTFilters.h: Audio filters

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

## Functions
SDTAverage * | SDTAverage_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] | in | Input sample

Returns
  Output sample

void SDTAverage_free | ( | SDTAverage * | x | ) |

Object destructor.

Parameters

  [in] | x | Pointer to the instance to destroy

SDTAverage* SDTAverage_new | ( | long | size | ) |

Object constructor.

Parameters

  [in] | size | Moving average buffer size

Returns
  Pointer to the new instance

void SDTAverage_setWindow | ( | SDTAverage * | x,
|  | unsigned int | i
| ) |  |

Sets the averaging window.

Parameters

  [in] | size | Moving average window size [1,bufferSize]