Sound Design Toolkit  078
Physically informed sound synthesis for everyday sounds
Turbulence through hollow cavities

Typedefs

typedef struct SDTWindCavity SDTWindCavity
 Opaque data structure for a hollow cavity object.
 
typedef struct SDTWindCavity SDTWindCavity
 Opaque data structure for a hollow cavity object.
 

Functions

SDTWindCavitySDTWindCavity_new (int maxDelay)
 Object constructor. More...
 
void SDTWindCavity_free (SDTWindCavity *x)
 Object destructor. More...
 
void SDTWindCavity_setLength (SDTWindCavity *x, double f)
 Sets the lenght of the cavity. More...
 
void SDTWindCavity_setDiameter (SDTWindCavity *x, double f)
 Sets the diameter of the cavity. More...
 
void SDTWindCavity_setWindSpeed (SDTWindCavity *x, double f)
 Sets the wind speed. More...
 
double SDTWindCavity_dsp (SDTWindCavity *x)
 Signal processing routine. Call this function at sample rate to synthesize wind through a cavity. More...
 

Detailed Description

Hollow objects such as pipes, valves, tunnels and doorways force the air moving inside them to oscillate at their resonant frequencies, which depend on the size and shape of the cavity itself. Different modes of resonance can be excited, in a more or less noticeable way, depending on the speed of the air flowing inside the tube. For each mode of resonance there is an optimal speed, which makes the air inside the tube resonate the most. As the speed increases, resonance gets weaker and weaker until it breaks up into the next harmonic. Sound waves trapped in a cylindrical cavity can be effectively simulated using a simple comb filter, namely a delay line with feedback. The different excitation of the various harmonics is modeled by a resonant bandpass filter with a high Q factor, therefore with a narrow band and a high resonance.

Function Documentation

double SDTWindCavity_dsp ( SDTWindCavity x)

Signal processing routine. Call this function at sample rate to synthesize wind through a cavity.

Returns
Computed audio sample
void SDTWindCavity_free ( SDTWindCavity x)

Object destructor.

Parameters
[in]xPointer to the instance to destroy
SDTWindCavity * SDTWindCavity_new ( int  maxDelay)

Object constructor.

Parameters
[in]maxDelaySize of the comb filter buffer, in samples.
Returns
Pointer to the new instance
void SDTWindCavity_setDiameter ( SDTWindCavity x,
double  f 
)

Sets the diameter of the cavity.

Parameters
[in]fDiameter of the cavity, in m
void SDTWindCavity_setLength ( SDTWindCavity x,
double  f 
)

Sets the lenght of the cavity.

Parameters
[in]fLength of the cavity, in m
void SDTWindCavity_setWindSpeed ( SDTWindCavity x,
double  f 
)

Sets the wind speed.

Parameters
[in]fWind speed, [0,1]