Sound Design Toolkit  078
Physically informed sound synthesis for everyday sounds
SDTControl.h
1 
7 #ifndef SDT_CONTROL_H
8 #define SDT_CONTROL_H
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
20 typedef struct SDTBouncing SDTBouncing;
21 
25 
28 extern void SDTBouncing_free(SDTBouncing *x);
29 
32 extern void SDTBouncing_setRestitution(SDTBouncing *x, double f);
33 
36 extern void SDTBouncing_setHeight(SDTBouncing *x, double f);
37 
40 extern void SDTBouncing_setIrregularity(SDTBouncing *x, double f);
41 
43 extern void SDTBouncing_reset(SDTBouncing *x);
44 
49 extern double SDTBouncing_dsp(SDTBouncing *x);
50 
54 
64 typedef struct SDTBreaking SDTBreaking;
65 
69 
72 extern void SDTBreaking_free(SDTBreaking *x);
73 
76 extern void SDTBreaking_setStoredEnergy(SDTBreaking *x, double f);
77 
80 extern void SDTBreaking_setCrushingEnergy(SDTBreaking *x, double f);
81 
84 extern void SDTBreaking_setGranularity(SDTBreaking *x, double f);
85 
88 extern void SDTBreaking_setFragmentation(SDTBreaking *x, double f);
89 
93 extern void SDTBreaking_reset(SDTBreaking *x);
94 
99 extern void SDTBreaking_dsp(SDTBreaking *x, double *outs);
100 
103 extern int SDTBreaking_hasFinished(SDTBreaking *x);
104 
114 typedef struct SDTCrumpling SDTCrumpling;
115 
119 
122 extern void SDTCrumpling_free(SDTCrumpling *x);
123 
126 extern void SDTCrumpling_setCrushingEnergy(SDTCrumpling *x, double f);
127 
130 extern void SDTCrumpling_setGranularity(SDTCrumpling *x, double f);
131 
134 extern void SDTCrumpling_setFragmentation(SDTCrumpling *x, double f);
135 
141 extern void SDTCrumpling_dsp(SDTCrumpling *x, double *outs);
142 
151 typedef struct SDTRolling SDTRolling;
152 
155 extern SDTRolling *SDTRolling_new();
156 
159 extern void SDTRolling_free(SDTRolling *x);
160 
166 extern void SDTRolling_setGrain(SDTRolling *x, double f);
167 
171 extern void SDTRolling_setDepth(SDTRolling *x, double f);
172 
176 extern void SDTRolling_setMass(SDTRolling *x, double f);
177 
180 extern void SDTRolling_setVelocity(SDTRolling *x, double f);
181 
186 extern double SDTRolling_dsp(SDTRolling *x, double in);
187 
198 typedef struct SDTScraping SDTScraping;
199 
202 extern SDTScraping *SDTScraping_new();
203 
206 extern void SDTScraping_free(SDTScraping *x);
207 
213 extern void SDTScraping_setGrain(SDTScraping *x, double f);
214 
218 extern void SDTScraping_setForce(SDTScraping *x, double f);
219 
222 extern void SDTScraping_setVelocity(SDTScraping *x, double f);
223 
228 extern double SDTScraping_dsp(SDTScraping *x, double in);
229 
232 #ifdef __cplusplus
233 };
234 #endif
235 
236 #endif
237 
int SDTBreaking_hasFinished(SDTBreaking *x)
Checks if the breaking process is finished, i.e. if the remaining energy is 0.
void SDTCrumpling_dsp(SDTCrumpling *x, double *outs)
Single iteration of a crumpling process. Call this routine in a loop to simulate a crumpling process...
double SDTBouncing_dsp(SDTBouncing *x)
Single iteration of the whole buncing process. Call this routine in a loop to simulate the bouncing p...
void SDTBreaking_dsp(SDTBreaking *x, double *outs)
Single iteration of the whole breaking process. Call this routine in a loop to simulate a breaking pr...
SDTBreaking * SDTBreaking_new()
Object constructor.
void SDTScraping_setForce(SDTScraping *x, double f)
Sets the normal force of the scraping probe on the surface. This parameter affects the energy of the ...
void SDTBreaking_setFragmentation(SDTBreaking *x, double f)
Sets the amount of progressive fragmentation of the object during the process.
SDTCrumpling * SDTCrumpling_new()
Object constructor.
void SDTRolling_free(SDTRolling *x)
Object destructor.
void SDTBouncing_setHeight(SDTBouncing *x, double f)
Sets the initial height of the falling object.
struct SDTBouncing SDTBouncing
Opaque data structure for the crumpling object.
Definition: SDTControl.h:20
SDTBouncing * SDTBouncing_new()
Object constructor.
double SDTRolling_dsp(SDTRolling *x, double in)
Signal processing routine. Call this function at sample rate to compute the force acting on the rolli...
void SDTRolling_setMass(SDTRolling *x, double f)
Sets the rolling mass. The mass parameter of the controlled object should be updated accordingly...
int SDTBouncing_hasFinished(SDTBouncing *x)
Checks if the bouncing process is finished, i.e. if the remaining energy is 0.
void SDTRolling_setDepth(SDTRolling *x, double f)
Sets the average bump depth. This parameter affects the energy of the micro-impacts.
struct SDTCrumpling SDTCrumpling
Opaque data structure for the crumpling object.
Definition: SDTControl.h:114
void SDTCrumpling_free(SDTCrumpling *x)
Object destructor.
void SDTScraping_free(SDTScraping *x)
Object destructor.
struct SDTBreaking SDTBreaking
Opaque data structure for the breaking object.
Definition: SDTControl.h:64
void SDTBreaking_setGranularity(SDTBreaking *x, double f)
Sets the event density of the crumpling process.
void SDTCrumpling_setFragmentation(SDTCrumpling *x, double f)
Sets the amount of fragmentation of the object during the process.
struct SDTScraping SDTScraping
Opaque data structure for the scraping object.
Definition: SDTControl.h:198
void SDTCrumpling_setGranularity(SDTCrumpling *x, double f)
Sets the event density of the crumpling process.
void SDTCrumpling_setCrushingEnergy(SDTCrumpling *x, double f)
Sets the crushing energy.
void SDTScraping_setVelocity(SDTScraping *x, double f)
Sets the scraping velocity.
void SDTBouncing_setIrregularity(SDTBouncing *x, double f)
Sets the irregularity of the shape of the object.
struct SDTRolling SDTRolling
Opaque data structure for the rolling object.
Definition: SDTControl.h:151
SDTRolling * SDTRolling_new()
Object constructor.
void SDTBouncing_reset(SDTBouncing *x)
Resets the bouncing process, restoring its initial energy.
void SDTScraping_setGrain(SDTScraping *x, double f)
Sets the grain of the surface. This parameter affects the density of the micro-impacts: Lower values ...
double SDTScraping_dsp(SDTScraping *x, double in)
Signal processing routine. Call this function at sample rate to compute the force acting on the scrap...
void SDTBreaking_setStoredEnergy(SDTBreaking *x, double f)
Sets the total energy stored in the object.
void SDTBreaking_reset(SDTBreaking *x)
Resets the crumpling process, restoring its initial energy and triggering the first micro impact...
void SDTRolling_setGrain(SDTRolling *x, double f)
Sets the grain of the surface. This parameter affects the density of the micro-impacts: Lower values ...
void SDTBreaking_setCrushingEnergy(SDTBreaking *x, double f)
Sets the crushing energy.
void SDTBreaking_free(SDTBreaking *x)
Object destructor.
void SDTBouncing_free(SDTBouncing *x)
Object destructor.
SDTScraping * SDTScraping_new()
Object constructor.
void SDTBouncing_setRestitution(SDTBouncing *x, double f)
Sets the coefficient of restitution.
void SDTRolling_setVelocity(SDTRolling *x, double f)
Sets the rolling velocity.