Sound Design Toolkit  078
Physically informed sound synthesis for everyday sounds

Typedefs

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

Functions

SDTCombSDTComb_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]inInput sample
Returns
Output sample
void SDTComb_free ( SDTComb x)

Object destructor.

Parameters
[in]xPointer to the instance to destroy
SDTComb * SDTComb_new ( long  maxXDelay,
long  maxYDelay 
)

Object constructor.

Parameters
[in]maxXDelayFeed forward buffer size, in samples
[in]maxXDelayFeedback 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]fFeed forward delay time, in samples
void SDTComb_setXGain ( SDTComb x,
double  f 
)

Sets the gain for the feed forward section.

Parameters
[in]fFeed forward gain [0,1]
void SDTComb_setXYDelay ( SDTComb x,
double  f 
)

Sets the delay time for both sections.

Parameters
[in]fDelay time, in samples
void SDTComb_setXYGain ( SDTComb x,
double  f 
)

Sets the gain for both sections.

Parameters
[in]fGain [0,1]
void SDTComb_setYDelay ( SDTComb x,
double  f 
)

Sets the delay time for the feedback section.

Parameters
[in]fFeedback delay time, in samples
void SDTComb_setYGain ( SDTComb x,
double  f 
)

Sets the gain for the feedback section.

Parameters
[in]fFeedback gain [0,1]