Sound Design Toolkit  078
Physically informed sound synthesis for everyday sounds

Typedefs

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

Functions

SDTZeroCrossingSDTZeroCrossing_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]xPointer to the instance
[out]outPointer to a double containing the algorithm output
[in]inInput sample
Returns
1 if output available (analysis window full), 0 otherwise
void SDTZeroCrossing_free ( SDTZeroCrossing x)

Destroys a zero crossing rate detector.

Parameters
[in]xPointer to the instance to destroy
SDTZeroCrossing * SDTZeroCrossing_new ( unsigned int  size)

Instantiates a zero crossing rate detector.

Parameters
[in]sizeSize 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]xPointer to the instance
[in]fOverlap ratio [0.0, 1.0]