Sound Design Toolkit 075 Physically informed sound synthesis for everyday sounds

- Main Page
- Modules
- Data Structures
- Files

Typedefs | Functions
Zero crossing rate
SDTAnalysis.h: Sound analysis tools

## Typedefs
typedef struct SDTZeroCrossing | SDTZeroCrossing
| Opaque data structure for a zero crossing rate detector object.

## Functions
SDTZeroCrossing * | SDTZeroCrossing_new (unsigned int size)
| Instantiates a zero crossing rate detector. More...
void | SDTZeroCrossing_free (SDTZeroCrossing *x)
| Destroys a zero crossing rate detector. More...
void | SDTZeroCrossing_setOverlap (SDTZeroCrossing *x, double f)
| Sets the analysis window overlapping ratio. Accepted values go from 0.0 to 1.0, with 0.0 meaning no overlap and 1.0 meaning total overlap. More...
int | SDTZeroCrossing_dsp (SDTZeroCrossing *x, double *out, double in)
| Signal processing routine. Call this function at sample rate to perform signal analysis. More...

## Detailed Description

Zero crossing rate signal analyzer.

## Function Documentation

int SDTZeroCrossing_dsp | ( | SDTZeroCrossing * | x,
|  | double * | out,
|  | double | in
| ) |  |

Signal processing routine. Call this function at sample rate to perform signal analysis.

Parameters

  [in] | x | Pointer to the instance
  [out] | out | Pointer to a double containing the algorithm output
  [in] | in | Input sample

Returns
  1 if output available (analysis window full), 0 otherwise

void SDTZeroCrossing_free | ( | SDTZeroCrossing * | x | ) |

Destroys a zero crossing rate detector.

Parameters

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

SDTZeroCrossing* SDTZeroCrossing_new | ( | unsigned int | size | ) |

Instantiates a zero crossing rate detector.

Parameters

  [in] | size | Size of the analysis window, in samples

Returns
  Pointer to the new instance

void SDTZeroCrossing_setOverlap | ( | SDTZeroCrossing * | x,
|  | double | f
| ) |  |

Sets the analysis window overlapping ratio. Accepted values go from 0.0 to 1.0, with 0.0 meaning no overlap and 1.0 meaning total overlap.

Parameters

  [in] | x | Pointer to the instance
  [in] | f | Overlap ratio [0.0, 1.0]