Sound Design Toolkit  075
Physically informed sound synthesis for everyday sounds
SDTDCMotor.h
1 
22 #ifndef SDT_DCMOTOR_H
23 #define SDT_DCMOTOR_H
24 
26 typedef struct SDTDCMotor SDTDCMotor;
27 
31 extern SDTDCMotor *SDTDCMotor_new(long maxSize);
32 
35 extern void SDTDCMotor_free(SDTDCMotor *x);
36 
39 extern void SDTDCMotor_setFilters(SDTDCMotor *x);
40 
43 extern void SDTDCMotor_setRpm(SDTDCMotor *x, double f);
44 
47 extern void SDTDCMotor_setLoad(SDTDCMotor *x, double f);
48 
51 extern void SDTDCMotor_setCoils(SDTDCMotor *x, long l);
52 
57 extern void SDTDCMotor_setSize(SDTDCMotor *x, double f);
58 
61 extern void SDTDCMotor_setReson(SDTDCMotor *x, double f);
62 
65 extern void SDTDCMotor_setGearRatio(SDTDCMotor *x, double f);
66 
69 extern void SDTDCMotor_setHarshness(SDTDCMotor *x, double f);
70 
73 extern void SDTDCMotor_setRotorGain(SDTDCMotor *x, double f);
74 
77 extern void SDTDCMotor_setGearGain(SDTDCMotor *x, double f);
78 
81 extern void SDTDCMotor_setBrushGain(SDTDCMotor *x, double f);
82 
85 extern void SDTDCMotor_setAirGain(SDTDCMotor *x, double f);
86 
90 extern double SDTDCMotor_dsp(SDTDCMotor *x);
91 
92 #endif
93 
void SDTDCMotor_setCoils(SDTDCMotor *x, long l)
Sets the number of coils on the rotor.
void SDTDCMotor_free(SDTDCMotor *x)
Object destructor.
void SDTDCMotor_setReson(SDTDCMotor *x, double f)
Sets the amount of resonance caused by the chassis.
void SDTDCMotor_setLoad(SDTDCMotor *x, double f)
Sets the mechanical stress on the rotor.
void SDTDCMotor_setSize(SDTDCMotor *x, double f)
Sets the size of the chassis. The maximum chassis size depends on the buffer length defined at constr...
void SDTDCMotor_setRotorGain(SDTDCMotor *x, double f)
Sets the sound volume coming from the rotor.
void SDTDCMotor_setRpm(SDTDCMotor *x, double f)
Sets the Revolutions Per Minute (RPM) of the engine rotor.
struct SDTDCMotor SDTDCMotor
Opaque data structure for the electric motor synthesis model.
Definition: SDTDCMotor.h:26
double SDTDCMotor_dsp(SDTDCMotor *x)
Signal processing routine. Call this function at sample rate to synthesize an electric motor sound...
void SDTDCMotor_setGearGain(SDTDCMotor *x, double f)
Sets the sound volume coming from the gears.
void SDTDCMotor_setHarshness(SDTDCMotor *x, double f)
Sets the harshness of the engine sound.
void SDTDCMotor_setBrushGain(SDTDCMotor *x, double f)
Sets the sound volume coming from the commutator ring and brushes.
SDTDCMotor * SDTDCMotor_new(long maxSize)
Object constructor.
void SDTDCMotor_setAirGain(SDTDCMotor *x, double f)
Sets the sound volume of the air turbulence caused by rotation.
void SDTDCMotor_setGearRatio(SDTDCMotor *x, double f)
Sets the gear ratio of the engine.
void SDTDCMotor_setFilters(SDTDCMotor *x)
Sets the filter coefficients. Call this function whenever the sample rate changes.