Sound Design Toolkit  075
Physically informed sound synthesis for everyday sounds
SDTControl.h
Go to the documentation of this file.
1 
7 #ifndef SDT_CONTROL_H
8 #define SDT_CONTROL_H
9 
16 typedef struct SDTBouncing SDTBouncing;
17 
21 
24 extern void SDTBouncing_free(SDTBouncing *x);
25 
28 extern void SDTBouncing_setRestitution(SDTBouncing *x, double f);
29 
32 extern void SDTBouncing_setHeight(SDTBouncing *x, double f);
33 
36 extern void SDTBouncing_setIrregularity(SDTBouncing *x, double f);
37 
39 extern void SDTBouncing_reset(SDTBouncing *x);
40 
45 extern double SDTBouncing_dsp(SDTBouncing *x);
46 
50 
60 typedef struct SDTBreaking SDTBreaking;
61 
65 
68 extern void SDTBreaking_free(SDTBreaking *x);
69 
72 extern void SDTBreaking_setStoredEnergy(SDTBreaking *x, double f);
73 
76 extern void SDTBreaking_setCrushingEnergy(SDTBreaking *x, double f);
77 
80 extern void SDTBreaking_setGranularity(SDTBreaking *x, double f);
81 
84 extern void SDTBreaking_setFragmentation(SDTBreaking *x, double f);
85 
89 extern void SDTBreaking_reset(SDTBreaking *x);
90 
95 extern void SDTBreaking_dsp(SDTBreaking *x, double *outs);
96 
100 
110 typedef struct SDTCrumpling SDTCrumpling;
111 
115 
118 extern void SDTCrumpling_free(SDTCrumpling *x);
119 
122 extern void SDTCrumpling_setCrushingEnergy(SDTCrumpling *x, double f);
123 
126 extern void SDTCrumpling_setGranularity(SDTCrumpling *x, double f);
127 
130 extern void SDTCrumpling_setFragmentation(SDTCrumpling *x, double f);
131 
137 extern void SDTCrumpling_dsp(SDTCrumpling *x, double *outs);
138 
147 typedef struct SDTRolling SDTRolling;
148 
151 extern SDTRolling *SDTRolling_new();
152 
155 extern void SDTRolling_free(SDTRolling *x);
156 
162 extern void SDTRolling_setGrain(SDTRolling *x, double f);
163 
167 extern void SDTRolling_setDepth(SDTRolling *x, double f);
168 
172 extern void SDTRolling_setMass(SDTRolling *x, double f);
173 
176 extern void SDTRolling_setVelocity(SDTRolling *x, double f);
177 
182 extern double SDTRolling_dsp(SDTRolling *x, double in);
183 
194 typedef struct SDTScraping SDTScraping;
195 
198 extern SDTScraping *SDTScraping_new();
199 
202 extern void SDTScraping_free(SDTScraping *x);
203 
209 extern void SDTScraping_setGrain(SDTScraping *x, double f);
210 
214 extern void SDTScraping_setForce(SDTScraping *x, double f);
215 
218 extern void SDTScraping_setVelocity(SDTScraping *x, double f);
219 
224 extern double SDTScraping_dsp(SDTScraping *x, double in);
225 
228 #endif
229 
int SDTBreaking_hasFinished(SDTBreaking *x)
Checks if the breaking process is finished, i.e. if the remaining energy is 0.
SDTCrumpling * SDTCrumpling_new()
Object constructor.
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...
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.
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:16
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.
SDTBouncing * SDTBouncing_new()
Object constructor.
struct SDTCrumpling SDTCrumpling
Opaque data structure for the crumpling object.
Definition: SDTControl.h:110
SDTBreaking * SDTBreaking_new()
Object constructor.
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:60
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:194
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:147
SDTScraping * SDTScraping_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...
SDTRolling * SDTRolling_new()
Object constructor.
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.
void SDTBouncing_setRestitution(SDTBouncing *x, double f)
Sets the coefficient of restitution.
void SDTRolling_setVelocity(SDTRolling *x, double f)
Sets the rolling velocity.