Sound Design Toolkit 075 Physically informed sound synthesis for everyday sounds

- Main Page
- Modules
- Data Structures
- Files

- File List

SDTResonators.h
1
14 #ifndef SDT_RESONATORS_H
15 #define SDT_RESONATORS_H
16
18 typedef struct SDTResonator SDTResonator;
19
24 extern SDTResonator *SDTResonator_new(unsigned int nModes, unsigned int nPickups);
25
28 extern void SDTResonator_free(SDTResonator *x);
29
33 extern double SDTResonator_getPosition(SDTResonator *x, unsigned int pickup);
34
38 extern double SDTResonator_getVelocity(SDTResonator *x, unsigned int pickup);
39
42 extern double SDTResonator_getMomentum(SDTResonator *x);
43
46 extern double SDTResonator_getNModes(SDTResonator *x);
47
50 extern double SDTResonator_getNPickups(SDTResonator *x);
51
56 extern void SDTResonator_setPosition(SDTResonator *x, unsigned int pickup, unsigned int mode, double f);
57
62 extern void SDTResonator_setVelocity(SDTResonator *x, unsigned int pickup, unsigned int mode, double f);
63
67 extern void SDTResonator_setFrequency(SDTResonator *x, unsigned int mode, double f);
68
72 extern void SDTResonator_setDecay(SDTResonator *x, unsigned int mode, double f);
73
78 extern void SDTResonator_setWeight(SDTResonator *x, unsigned int pickup, unsigned int mode, double f);
79
84 extern void SDTResonator_setMass(SDTResonator *x, unsigned int pickup, unsigned int mode, double f);
85
90 extern void SDTResonator_setFragmentSize(SDTResonator *x, double f);
91
94 extern void SDTResonator_setActiveModes(SDTResonator *x, unsigned int i);
95
102 extern void SDTResonator_applyForce(SDTResonator *x, unsigned int pickup, double f);
103
108 extern void SDTResonator_dsp(SDTResonator *x);
109
110 #endif
111
SDTResonator_setWeight
void SDTResonator_setWeight(SDTResonator *x, unsigned int pickup, unsigned int mode, double f)
Sets the weight for a given mode and pickup.
SDTResonator_getNPickups
double SDTResonator_getNPickups(SDTResonator *x)
Gets the number of pickup points.
SDTResonator_getMomentum
double SDTResonator_getMomentum(SDTResonator *x)
Gets the momentum of the object.
SDTResonator_getVelocity
double SDTResonator_getVelocity(SDTResonator *x, unsigned int pickup)
Gets the velocity of the object at a given pickup point.
SDTResonator_dsp
void SDTResonator_dsp(SDTResonator *x)
Signal processing routine. Call this function at sample rate to update the internal state of the reso...
SDTResonator_setFrequency
void SDTResonator_setFrequency(SDTResonator *x, unsigned int mode, double f)
Sets the resonant frequency for a given mode.
SDTResonator_setPosition
void SDTResonator_setPosition(SDTResonator *x, unsigned int pickup, unsigned int mode, double f)
Sets a modal displacement at a given pickup point.
SDTResonator_new
SDTResonator * SDTResonator_new(unsigned int nModes, unsigned int nPickups)
Object constructor.
SDTResonator_setActiveModes
void SDTResonator_setActiveModes(SDTResonator *x, unsigned int i)
Sets the number of active (actually computed) modes.
SDTResonator_free
void SDTResonator_free(SDTResonator *x)
Object destructor.
SDTResonator_setDecay
void SDTResonator_setDecay(SDTResonator *x, unsigned int mode, double f)
Sets the decay for a given mode.
SDTResonator_applyForce
void SDTResonator_applyForce(SDTResonator *x, unsigned int pickup, double f)
Applies a force to the resonator at a given pickup point. The force is distributed across the modes a...
SDTResonator_getPosition
double SDTResonator_getPosition(SDTResonator *x, unsigned int pickup)
Gets the displacement of the object at a given pickup point.
SDTResonator_setFragmentSize
void SDTResonator_setFragmentSize(SDTResonator *x, double f)
Reduces the object into a smaller fragment. This paramenter influences various aspects of the object:...
SDTResonator
struct SDTResonator SDTResonator
Opaque data structure representing a solid resonator object.
Definition: SDTResonators.h:18
SDTResonator_getNModes
double SDTResonator_getNModes(SDTResonator *x)
Gets the number of resonance modes.
SDTResonator_setVelocity
void SDTResonator_setVelocity(SDTResonator *x, unsigned int pickup, unsigned int mode, double f)
Sets a modal velocity at a given pickup point.
SDTResonator_setMass
void SDTResonator_setMass(SDTResonator *x, unsigned int pickup, unsigned int mode, double f)
Sets the mass for a given mode and pickup.