14 #ifndef SDT_RESONATORS_H
15 #define SDT_RESONATORS_H
double SDTResonator_getVelocity(SDTResonator *x, unsigned int pickup)
Gets the velocity of the object at a given pickup point.
void SDTResonator_dsp(SDTResonator *x)
Signal processing routine. Call this function at sample rate to update the internal state of the reso...
void SDTResonator_setGain(SDTResonator *x, unsigned int pickup, unsigned int mode, double f)
Sets the pickup gain for a given mode and pickup.
void SDTResonator_setWeight(SDTResonator *x, unsigned int mode, double f)
Sets the weight for a given mode.
void SDTResonator_setFrequency(SDTResonator *x, unsigned int mode, double f)
Sets the resonant frequency for a given mode.
SDTResonator * SDTResonator_new(unsigned int nModes, unsigned int nPickups)
Object constructor.
void SDTResonator_setActiveModes(SDTResonator *x, unsigned int i)
Sets the number of active (actually computed) modes.
void SDTResonator_free(SDTResonator *x)
Object destructor.
void SDTResonator_setDecay(SDTResonator *x, unsigned int mode, double f)
Sets the decay for a given mode.
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...
void SDTResonator_setPosition(SDTResonator *x, unsigned int pickup, double f)
Sets a modal displacement at a given pickup point.
double SDTResonator_getPosition(SDTResonator *x, unsigned int pickup)
Gets the displacement of the object at a given pickup point.
void SDTResonator_setFragmentSize(SDTResonator *x, double f)
Reduces the object into a smaller fragment. This paramenter influences various aspects of the object:...
int SDTResonator_getNPickups(SDTResonator *x)
Gets the number of pickup points.
struct SDTResonator SDTResonator
Opaque data structure representing a solid resonator object.
Definition: SDTResonators.h:22
void SDTResonator_setVelocity(SDTResonator *x, unsigned int pickup, double f)
Sets a modal velocity at a given pickup point.
double SDTResonator_computeEnergy(SDTResonator *x, unsigned int pickup, double f)
Computes the total energy of the object, after applying all acting forces.