Sound Design Toolkit 075 Physically informed sound synthesis for everyday sounds

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

SDTFilters.h
Go to the documentation of this file.
1
8 #ifndef SDT_FILTERS_H
9 #define SDT_FILTERS_H
10
16 typedef struct SDTOnePole SDTOnePole;
17
20 extern SDTOnePole *SDTOnePole_new();
21
24 extern void SDTOnePole_free(SDTOnePole *x);
25
28 extern void SDTOnePole_setFeedback(SDTOnePole *x, double f);
29
32 extern void SDTOnePole_lowpass(SDTOnePole *x, double f);
33
36 extern void SDTOnePole_highpass(SDTOnePole *x, double f);
37
42 extern double SDTOnePole_dsp(SDTOnePole *x, double in);
43
51 typedef struct SDTAllPass SDTAllPass;
52
55 extern SDTAllPass *SDTAllPass_new();
56
59 extern void SDTAllPass_free(SDTAllPass *x);
60
63 extern void SDTAllPass_setFeedback(SDTAllPass *x, double f);
64
69 extern double SDTAllPass_dsp(SDTAllPass *x, double in);
70
78 typedef struct SDTEnvelope SDTEnvelope;
79
82 extern SDTEnvelope *SDTEnvelope_new();
83
86 extern void SDTEnvelope_free(SDTEnvelope *x);
87
90 extern void SDTEnvelope_setAttack(SDTEnvelope *x, double a);
91
94 extern void SDTEnvelope_setRelease(SDTEnvelope *x, double r);
95
100 extern double SDTEnvelope_dsp(SDTEnvelope *x, double in);
101
109 typedef struct SDTTwoPoles SDTTwoPoles;
110
113 extern SDTTwoPoles *SDTTwoPoles_new();
114
117 extern void SDTTwoPoles_free(SDTTwoPoles *x);
118
121 extern void SDTTwoPoles_lowpass(SDTTwoPoles *x, double fc);
122
125 extern void SDTTwoPoles_highpass(SDTTwoPoles *x, double fc);
126
130 extern void SDTTwoPoles_resonant(SDTTwoPoles *x, double fc, double q);
131
136 extern double SDTTwoPoles_dsp(SDTTwoPoles *x, double in);
137
145 typedef struct SDTAverage SDTAverage;
146
150 extern SDTAverage *SDTAverage_new(long size);
151
154 extern void SDTAverage_free(SDTAverage *x);
155
158 extern void SDTAverage_setWindow(SDTAverage *x, unsigned int i);
159
164 extern double SDTAverage_dsp(SDTAverage *x, double in);
165
173 typedef struct SDTDelay SDTDelay;
174
178 extern SDTDelay *SDTDelay_new(long maxDelay);
179
182 extern void SDTDelay_free(SDTDelay *x);
183
185 extern void SDTDelay_clear(SDTDelay *x);
186
191 extern void SDTDelay_setDelay(SDTDelay *x, double f);
192
197 extern double SDTDelay_dsp(SDTDelay *x, double in);
198
209 typedef struct SDTComb SDTComb;
210
215 extern SDTComb *SDTComb_new(long maxXDelay, long maxYDelay);
216
219 extern void SDTComb_free(SDTComb *x);
220
223 extern void SDTComb_setXDelay(SDTComb *x, double f);
224
227 extern void SDTComb_setYDelay(SDTComb *x, double f);
228
231 extern void SDTComb_setXYDelay(SDTComb *x, double f);
232
235 extern void SDTComb_setXGain(SDTComb *x, double f);
236
239 extern void SDTComb_setYGain(SDTComb *x, double f);
240
243 extern void SDTComb_setXYGain(SDTComb *x, double f);
244
249 extern double SDTComb_dsp(SDTComb *x, double in);
250
260 typedef struct SDTWaveguide SDTWaveguide;
261
265 extern SDTWaveguide *SDTWaveguide_new(int maxDelay);
266
269 extern void SDTWaveguide_free(SDTWaveguide *x);
270
273 extern double SDTWaveguide_getFwdOut(SDTWaveguide *x);
274
277 extern double SDTWaveguide_getRevOut(SDTWaveguide *x);
278
281 extern void SDTWaveguide_setDelay(SDTWaveguide *x, double f);
282
289 extern void SDTWaveguide_setFwdFeedback(SDTWaveguide *x, double f);
290
297 extern void SDTWaveguide_setRevFeedback(SDTWaveguide *x, double f);
298
301 extern void SDTWaveguide_setFwdDamping(SDTWaveguide *x, double f);
302
305 extern void SDTWaveguide_setRevDamping(SDTWaveguide *x, double f);
306
313 extern void SDTWaveguide_dsp(SDTWaveguide *x, double fwdIn, double revIn);
314
317 #endif
318
SDTWaveguide_free
void SDTWaveguide_free(SDTWaveguide *x)
Object destructor.
SDTComb_free
void SDTComb_free(SDTComb *x)
Object destructor.
SDTEnvelope_free
void SDTEnvelope_free(SDTEnvelope *x)
Object destructor.
SDTTwoPoles_new
SDTTwoPoles * SDTTwoPoles_new()
Object constructor.
SDTWaveguide_setRevDamping
void SDTWaveguide_setRevDamping(SDTWaveguide *x, double f)
Sets the frequency damping on the left side.
SDTAverage
struct SDTAverage SDTAverage
Opaque data structure for a moving average filter object.
Definition: SDTFilters.h:145
SDTTwoPoles_free
void SDTTwoPoles_free(SDTTwoPoles *x)
Object destructor.
SDTWaveguide_setDelay
void SDTWaveguide_setDelay(SDTWaveguide *x, double f)
Sets the length of the waveguide, in samples.
SDTWaveguide_getRevOut
double SDTWaveguide_getRevOut(SDTWaveguide *x)
Reads the output signal coming from the left side of the waveguide.
SDTDelay_new
SDTDelay * SDTDelay_new(long maxDelay)
Object constructor.
SDTAverage_new
SDTAverage * SDTAverage_new(long size)
Object constructor.
SDTWaveguide_setFwdDamping
void SDTWaveguide_setFwdDamping(SDTWaveguide *x, double f)
Sets the frequency damping on the right side.
SDTAllPass_setFeedback
void SDTAllPass_setFeedback(SDTAllPass *x, double f)
Sets the feedback coefficient.
SDTComb_setXDelay
void SDTComb_setXDelay(SDTComb *x, double f)
Sets the delay time for the feed forward section.
SDTWaveguide_setFwdFeedback
void SDTWaveguide_setFwdFeedback(SDTWaveguide *x, double f)
Sets the feedback on the right side. Determines how much energy gets fed back into the system after t...
SDTComb_setXYGain
void SDTComb_setXYGain(SDTComb *x, double f)
Sets the gain for both sections.
SDTComb
struct SDTComb SDTComb
Opaque data structure representing a comb filter object.
Definition: SDTFilters.h:209
SDTWaveguide_setRevFeedback
void SDTWaveguide_setRevFeedback(SDTWaveguide *x, double f)
Sets the feedback on the left side. Determines how much energy gets fed back into the system after th...
SDTEnvelope
struct SDTEnvelope SDTEnvelope
Opaque data structure for an envelope tracker object.
Definition: SDTFilters.h:78
SDTEnvelope_dsp
double SDTEnvelope_dsp(SDTEnvelope *x, double in)
Signal processing routine. Call this function at sample rate to compute the filtered signal...
SDTEnvelope_new
SDTEnvelope * SDTEnvelope_new()
Object constructor.
SDTOnePole_lowpass
void SDTOnePole_lowpass(SDTOnePole *x, double f)
Puts the filter in lowpass mode, at the given cutoff frequency.
SDTAverage_dsp
double SDTAverage_dsp(SDTAverage *x, double in)
Signal processing routine. Call this function at sample rate to compute the filtered signal...
SDTTwoPoles_lowpass
void SDTTwoPoles_lowpass(SDTTwoPoles *x, double fc)
Puts the filter in lowpass mode, at the given cutoff frequency.
SDTWaveguide_getFwdOut
double SDTWaveguide_getFwdOut(SDTWaveguide *x)
Reads the output signal coming from the right side of the waveguide.
SDTAverage_setWindow
void SDTAverage_setWindow(SDTAverage *x, unsigned int i)
Sets the averaging window.
SDTAllPass_dsp
double SDTAllPass_dsp(SDTAllPass *x, double in)
Signal processing routine. Call this function at sample rate to compute the filtered signal...
SDTTwoPoles
struct SDTTwoPoles SDTTwoPoles
Opaque data structure for a two poles filter object.
Definition: SDTFilters.h:109
SDTAverage_free
void SDTAverage_free(SDTAverage *x)
Object destructor.
SDTDelay_setDelay
void SDTDelay_setDelay(SDTDelay *x, double f)
Sets the delay time. Fractional values are allowed. The delay time can be continuously changed over t...
SDTDelay_clear
void SDTDelay_clear(SDTDelay *x)
Clears the buffer, therefore silencing the delayed signal.
SDTWaveguide
struct SDTWaveguide SDTWaveguide
Opaque data structure representing a digital waveguide object.
Definition: SDTFilters.h:260
SDTComb_new
SDTComb * SDTComb_new(long maxXDelay, long maxYDelay)
Object constructor.
SDTEnvelope_setAttack
void SDTEnvelope_setAttack(SDTEnvelope *x, double a)
Sets the attack time.
SDTDelay
struct SDTDelay SDTDelay
Opaque data structure for a delay line object.
Definition: SDTFilters.h:173
SDTComb_setYDelay
void SDTComb_setYDelay(SDTComb *x, double f)
Sets the delay time for the feedback section.
SDTDelay_free
void SDTDelay_free(SDTDelay *x)
Object destructor.
SDTOnePole_setFeedback
void SDTOnePole_setFeedback(SDTOnePole *x, double f)
Manually sets the alpha coefficient.
SDTOnePole_dsp
double SDTOnePole_dsp(SDTOnePole *x, double in)
Signal processing routine. Call this function at sample rate to compute the filtered signal...
SDTAllPass
struct SDTAllPass SDTAllPass
Opaque data structure for an allpass filter object.
Definition: SDTFilters.h:51
SDTTwoPoles_dsp
double SDTTwoPoles_dsp(SDTTwoPoles *x, double in)
Signal processing routine. Call this function at sample rate to compute the filtered signal...
SDTAllPass_new
SDTAllPass * SDTAllPass_new()
Object constructor.
SDTComb_setXGain
void SDTComb_setXGain(SDTComb *x, double f)
Sets the gain for the feed forward section.
SDTEnvelope_setRelease
void SDTEnvelope_setRelease(SDTEnvelope *x, double r)
Sets the release time.
SDTOnePole_highpass
void SDTOnePole_highpass(SDTOnePole *x, double f)
Puts the filter in highpass mode, at the given cutoff frequency.
SDTTwoPoles_resonant
void SDTTwoPoles_resonant(SDTTwoPoles *x, double fc, double q)
Puts the filter in resonant bandpass mode, at the given center frequency and Q.
SDTOnePole_new
SDTOnePole * SDTOnePole_new()
Object constructor.
SDTComb_dsp
double SDTComb_dsp(SDTComb *x, double in)
Signal processing routine. Call this function at sample rate to output the filtered signal...
SDTTwoPoles_highpass
void SDTTwoPoles_highpass(SDTTwoPoles *x, double fc)
Puts the filter in highpass mode, at the given cutoff frequency.
SDTAllPass_free
void SDTAllPass_free(SDTAllPass *x)
Object destructor.
SDTOnePole
struct SDTOnePole SDTOnePole
Opaque data structure for a one pole filter object.
Definition: SDTFilters.h:16
SDTDelay_dsp
double SDTDelay_dsp(SDTDelay *x, double in)
Signal processing routine. Call this function at sample rate to output the delayed signal...
SDTComb_setYGain
void SDTComb_setYGain(SDTComb *x, double f)
Sets the gain for the feedback section.
SDTWaveguide_new
SDTWaveguide * SDTWaveguide_new(int maxDelay)
Object constructor.
SDTOnePole_free
void SDTOnePole_free(SDTOnePole *x)
Object destructor.
SDTComb_setXYDelay
void SDTComb_setXYDelay(SDTComb *x, double f)
Sets the delay time for both sections.
SDTWaveguide_dsp
void SDTWaveguide_dsp(SDTWaveguide *x, double fwdIn, double revIn)
Signal processing routine. Call this function at sample rate to compute the output samples...