Sound Design Toolkit  078
Physically informed sound synthesis for everyday sounds
SDTAnalysis.h
1 
8 #ifndef SDT_ANALYSIS_H
9 #define SDT_ANALYSIS_H
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
21 
25 extern SDTZeroCrossing *SDTZeroCrossing_new(unsigned int size);
26 
30 
36 extern void SDTZeroCrossing_setOverlap(SDTZeroCrossing *x, double f);
37 
44 extern int SDTZeroCrossing_dsp(SDTZeroCrossing *x, double *out, double in);
45 
55 
58 extern SDTMyoelastic *SDTMyoelastic_new(int size);
59 
62 extern void SDTMyoelastic_free(SDTMyoelastic *x);
63 
67 extern void SDTMyoelastic_setDcFrequency(SDTMyoelastic *x, double f);
68 
72 extern void SDTMyoelastic_setLowFrequency(SDTMyoelastic *x, double f);
73 
77 extern void SDTMyoelastic_setHighFrequency(SDTMyoelastic *x, double f);
78 
83 extern void SDTMyoelastic_setThreshold(SDTMyoelastic *x, double f);
84 
92 extern int SDTMyoelastic_dsp(SDTMyoelastic *x, double *outs, double in);
93 
104 
108 extern SDTSpectralFeats *SDTSpectralFeats_new(unsigned int size);
109 
113 
119 extern void SDTSpectralFeats_setOverlap(SDTSpectralFeats *x, double f);
120 
125 extern void SDTSpectralFeats_setMinFreq(SDTSpectralFeats *x, double f);
126 
131 extern void SDTSpectralFeats_setMaxFreq(SDTSpectralFeats *x, double f);
132 
147 extern int SDTSpectralFeats_dsp(SDTSpectralFeats *x, double *outs, double in);
148 
160 typedef struct SDTPitch SDTPitch;
161 
165 extern SDTPitch *SDTPitch_new(unsigned int size);
166 
169 extern void SDTPitch_free(SDTPitch *x);
170 
176 extern void SDTPitch_setOverlap(SDTPitch *x, double f);
177 
189 extern void SDTPitch_setTolerance(SDTPitch *x, double f);
190 
200 extern int SDTPitch_dsp(SDTPitch *x, double *outs, double in);
201 
204 #ifdef __cplusplus
205 };
206 #endif
207 
208 #endif
209 
SDTSpectralFeats * SDTSpectralFeats_new(unsigned int size)
Instantiates a spectral features extractor.
void SDTMyoelastic_setThreshold(SDTMyoelastic *x, double f)
Sets the amplitude threshold of the input gate. Myoelastic activity is not computed for signals whose...
void SDTSpectralFeats_setOverlap(SDTSpectralFeats *x, double f)
Sets the analysis window overlapping ratio. Accepted values go from 0.0 to 1.0, with 0...
int SDTSpectralFeats_dsp(SDTSpectralFeats *x, double *outs, double in)
Signal processing routine. Call this function for each sample to perform signal analysis.
void SDTMyoelastic_free(SDTMyoelastic *x)
Destroys a myoelastic feature extractor.
void SDTMyoelastic_setHighFrequency(SDTMyoelastic *x, double f)
Sets the high frequency cutoff.
void SDTPitch_setTolerance(SDTPitch *x, double f)
Sets the peak detection tolerance. Always choosing the greatest NSDF peak as pitch estimation sometim...
struct SDTZeroCrossing SDTZeroCrossing
Opaque data structure for a zero crossing rate detector object.
Definition: SDTAnalysis.h:20
SDTPitch * SDTPitch_new(unsigned int size)
Instantiates a fundamental frequency estimator object.
void SDTPitch_setOverlap(SDTPitch *x, double f)
Sets the analysis window overlapping ratio. Accepted values go from 0.0 to 1.0, with 0...
void SDTZeroCrossing_setOverlap(SDTZeroCrossing *x, double f)
Sets the analysis window overlapping ratio. Accepted values go from 0.0 to 1.0, with 0...
int SDTMyoelastic_dsp(SDTMyoelastic *x, double *outs, double in)
Signal processing routine. Call this function at sample rate to perform signal analysis.
SDTMyoelastic * SDTMyoelastic_new(int size)
Instantiates a myoelastic feature extractor.
struct SDTSpectralFeats SDTSpectralFeats
Opaque data structure for a spectral features extractor.
Definition: SDTAnalysis.h:103
SDTZeroCrossing * SDTZeroCrossing_new(unsigned int size)
Instantiates a zero crossing rate detector.
void SDTSpectralFeats_setMinFreq(SDTSpectralFeats *x, double f)
Sets the lower frequency bound for spectral analysis. Spectral bins below this frequency are ignored ...
void SDTPitch_free(SDTPitch *x)
Destroys a fundamental frequency estimator instance.
void SDTMyoelastic_setLowFrequency(SDTMyoelastic *x, double f)
Sets the low frequency cutoff.
void SDTSpectralFeats_setMaxFreq(SDTSpectralFeats *x, double f)
Sets the upper frequency bound for spectral analysis. Spectral bins above this frequency are ignored ...
int SDTPitch_dsp(SDTPitch *x, double *outs, double in)
Signal processing routine. Call this function for each sample to perform signal analysis.
void SDTMyoelastic_setDcFrequency(SDTMyoelastic *x, double f)
Sets the DC offset cutoff.
struct SDTMyoelastic SDTMyoelastic
Opaque data structure for a myoelastic feature extractor object.
Definition: SDTAnalysis.h:54
void SDTSpectralFeats_free(SDTSpectralFeats *x)
Destroys a spectral features extractor.
int SDTZeroCrossing_dsp(SDTZeroCrossing *x, double *out, double in)
Signal processing routine. Call this function at sample rate to perform signal analysis.
void SDTZeroCrossing_free(SDTZeroCrossing *x)
Destroys a zero crossing rate detector.
struct SDTPitch SDTPitch
Opaque data structure for a fundamental frequency estimator.
Definition: SDTAnalysis.h:160