Sound Design Toolkit  078
Physically informed sound synthesis for everyday sounds
SDTLiquids.h
1 
7 #ifndef SDT_LIQUIDS_H
8 #define SDT_LIQUIDS_H
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
28 typedef struct SDTBubble SDTBubble;
29 
32 extern SDTBubble *SDTBubble_new();
33 
36 extern void SDTBubble_free(SDTBubble *x);
37 
40 extern void SDTBubble_setRadius(SDTBubble *x, double f);
41 
44 extern void SDTBubble_setDepth(SDTBubble *x, double f);
45 
48 extern void SDTBubble_setRiseFactor(SDTBubble *x, double f);
49 
51 extern void SDTBubble_update(SDTBubble *x);
52 
54 extern void SDTBubble_normAmp(SDTBubble *x);
55 
59 extern double SDTBubble_dsp(SDTBubble *x);
60 
76 typedef struct SDTFluidFlow SDTFluidFlow;
77 
81 extern SDTFluidFlow *SDTFluidFlow_new(int nBubbles);
82 
85 extern void SDTFluidFlow_free(SDTFluidFlow *x);
86 
89 extern void SDTFluidFlow_setMinRadius(SDTFluidFlow *x, double f);
90 
93 extern void SDTFluidFlow_setMaxRadius(SDTFluidFlow *x, double f);
94 
97 extern void SDTFluidFlow_setExpRadius(SDTFluidFlow *x, double f);
98 
101 extern void SDTFluidFlow_setMinDepth(SDTFluidFlow *x, double f);
102 
105 extern void SDTFluidFlow_setMaxDepth(SDTFluidFlow *x, double f);
106 
109 extern void SDTFluidFlow_setExpDepth(SDTFluidFlow *x, double f);
110 
113 extern void SDTFluidFlow_setRiseFactor(SDTFluidFlow *x, double f);
114 
117 extern void SDTFluidFlow_setRiseCutoff(SDTFluidFlow *x, double f);
118 
121 extern void SDTFluidFlow_setAvgRate(SDTFluidFlow *x, double f);
122 
126 extern double SDTFluidFlow_dsp(SDTFluidFlow *x);
127 
130 #ifdef __cplusplus
131 };
132 #endif
133 
134 #endif
135 
void SDTFluidFlow_setMaxRadius(SDTFluidFlow *x, double f)
Sets the maximum radius for the bubble population.
void SDTBubble_normAmp(SDTBubble *x)
Sets bubble amplitude to the maximum instead of computing it from radius and depth.
struct SDTFluidFlow SDTFluidFlow
Opaque data structure representing a fluid flow object.
Definition: SDTLiquids.h:76
double SDTBubble_dsp(SDTBubble *x)
Signal processing routine. Call this function at sample rate to obtain a bubble sound.
SDTFluidFlow * SDTFluidFlow_new(int nBubbles)
Object constructor.
void SDTBubble_setDepth(SDTBubble *x, double f)
Sets the bubble depth.
void SDTFluidFlow_setAvgRate(SDTFluidFlow *x, double f)
Sets the amount of generated bubbles per second.
void SDTBubble_update(SDTBubble *x)
Triggers a new bubble.
void SDTFluidFlow_setMaxDepth(SDTFluidFlow *x, double f)
Sets the maximum depth value for the bubble population.
struct SDTBubble SDTBubble
Opaque data structure representing a bubble object.
Definition: SDTLiquids.h:28
SDTBubble * SDTBubble_new()
Object constructor.
void SDTBubble_setRadius(SDTBubble *x, double f)
Sets the bubble radius.
void SDTFluidFlow_setExpRadius(SDTFluidFlow *x, double f)
Sets the gamma factor for the radius assignment.
void SDTBubble_free(SDTBubble *x)
Object destructor.
void SDTFluidFlow_setRiseCutoff(SDTFluidFlow *x, double f)
Bubbles deeper than this threshold do not rise in frequency.
double SDTFluidFlow_dsp(SDTFluidFlow *x)
Signal processing routine. Call this function at sample rate to obtain a liquid sound.
void SDTFluidFlow_setRiseFactor(SDTFluidFlow *x, double f)
Sets the amount of blooping for the bubble population.
void SDTFluidFlow_free(SDTFluidFlow *x)
Object destructor.
void SDTFluidFlow_setExpDepth(SDTFluidFlow *x, double f)
Sets the gamma factor for the depth assignment.
void SDTBubble_setRiseFactor(SDTBubble *x, double f)
Sets the amount of blooping.
void SDTFluidFlow_setMinDepth(SDTFluidFlow *x, double f)
Sets the minimum depth value for the bubble population.
void SDTFluidFlow_setMinRadius(SDTFluidFlow *x, double f)
Sets the minimum radius for the bubble population.