Sound Design Toolkit 075 Physically informed sound synthesis for everyday sounds

- Main Page
- Modules
- Data Structures
- Files

Typedefs | Functions
Comb filter
SDTFilters.h: Audio filters

## Typedefs
typedef struct SDTComb | SDTComb
| Opaque data structure representing a comb filter object.

## Functions
SDTComb * | SDTComb_new (long maxXDelay, long maxYDelay)
| Object constructor. More...
void | SDTComb_free (SDTComb *x)
| Object destructor. More...
void | SDTComb_setXDelay (SDTComb *x, double f)
| Sets the delay time for the feed forward section. More...
void | SDTComb_setYDelay (SDTComb *x, double f)
| Sets the delay time for the feedback section. More...
void | SDTComb_setXYDelay (SDTComb *x, double f)
| Sets the delay time for both sections. More...
void | SDTComb_setXGain (SDTComb *x, double f)
| Sets the gain for the feed forward section. More...
void | SDTComb_setYGain (SDTComb *x, double f)
| Sets the gain for the feedback section. More...
void | SDTComb_setXYGain (SDTComb *x, double f)
| Sets the gain for both sections. More...
double | SDTComb_dsp (SDTComb *x, double in)
| Signal processing routine. Call this function at sample rate to output the filtered signal. More...

## Detailed Description

Comb filter, obtained adding to the input signal a rescaled and delayed copy of itself. The filter works both in feed forward (delayed copy added to the output) and feedback (delayed copy added to the input, causing a loop) configurations, with independent gains and delay times.

## Function Documentation

double SDTComb_dsp | ( | SDTComb * | x,
|  | double | in
| ) |  |

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

Parameters

  [in] | in | Input sample

Returns
  Output sample

void SDTComb_free | ( | SDTComb * | x | ) |

Object destructor.

Parameters

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

SDTComb* SDTComb_new | ( | long | maxXDelay,
|  | long | maxYDelay
| ) |  |

Object constructor.

Parameters

  [in] | maxXDelay | Feed forward buffer size, in samples
  [in] | maxXDelay | Feedback buffer size, in samples

Returns
  Pointer to the new instance

void SDTComb_setXDelay | ( | SDTComb * | x,
|  | double | f
| ) |  |

Sets the delay time for the feed forward section.

Parameters

  [in] | f | Feed forward delay time, in samples

void SDTComb_setXGain | ( | SDTComb * | x,
|  | double | f
| ) |  |

Sets the gain for the feed forward section.

Parameters

  [in] | f | Feed forward gain [0,1]

void SDTComb_setXYDelay | ( | SDTComb * | x,
|  | double | f
| ) |  |

Sets the delay time for both sections.

Parameters

  [in] | f | Delay time, in samples

void SDTComb_setXYGain | ( | SDTComb * | x,
|  | double | f
| ) |  |

Sets the gain for both sections.

Parameters

  [in] | f | Gain [0,1]

void SDTComb_setYDelay | ( | SDTComb * | x,
|  | double | f
| ) |  |

Sets the delay time for the feedback section.

Parameters

  [in] | f | Feedback delay time, in samples

void SDTComb_setYGain | ( | SDTComb * | x,
|  | double | f
| ) |  |

Sets the gain for the feedback section.

Parameters

  [in] | f | Feedback gain [0,1]