Sound Design Toolkit  075
Physically informed sound synthesis for everyday sounds
SDTLiquids.h
Go to the documentation of this file.
1 
7 #ifndef SDT_LIQUIDS_H
8 #define SDT_LIQUIDS_H
9 
24 typedef struct SDTBubble SDTBubble;
25 
28 extern SDTBubble *SDTBubble_new();
29 
32 extern void SDTBubble_free(SDTBubble *x);
33 
36 extern void SDTBubble_setRadius(SDTBubble *x, double f);
37 
40 extern void SDTBubble_setDepth(SDTBubble *x, double f);
41 
44 extern void SDTBubble_setRiseFactor(SDTBubble *x, double f);
45 
47 extern void SDTBubble_update(SDTBubble *x);
48 
50 extern void SDTBubble_normAmp(SDTBubble *x);
51 
55 extern double SDTBubble_dsp(SDTBubble *x);
56 
72 typedef struct SDTFluidFlow SDTFluidFlow;
73 
77 extern SDTFluidFlow *SDTFluidFlow_new(int nBubbles);
78 
81 extern void SDTFluidFlow_free(SDTFluidFlow *x);
82 
85 extern void SDTFluidFlow_setMinRadius(SDTFluidFlow *x, double f);
86 
89 extern void SDTFluidFlow_setMaxRadius(SDTFluidFlow *x, double f);
90 
93 extern void SDTFluidFlow_setExpRadius(SDTFluidFlow *x, double f);
94 
97 extern void SDTFluidFlow_setMinDepth(SDTFluidFlow *x, double f);
98 
101 extern void SDTFluidFlow_setMaxDepth(SDTFluidFlow *x, double f);
102 
105 extern void SDTFluidFlow_setExpDepth(SDTFluidFlow *x, double f);
106 
109 extern void SDTFluidFlow_setRiseFactor(SDTFluidFlow *x, double f);
110 
113 extern void SDTFluidFlow_setRiseCutoff(SDTFluidFlow *x, double f);
114 
117 extern void SDTFluidFlow_setAvgRate(SDTFluidFlow *x, double f);
118 
122 extern double SDTFluidFlow_dsp(SDTFluidFlow *x);
123 
126 #endif
127 
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:72
double SDTBubble_dsp(SDTBubble *x)
Signal processing routine. Call this function at sample rate to obtain a bubble sound.
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:24
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.
SDTFluidFlow * SDTFluidFlow_new(int nBubbles)
Object constructor.
SDTBubble * SDTBubble_new()
Object constructor.
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.