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.
Signal processing routine. Call this function at sample rate to synthesize wind through a cavity.
- Returns
- Computed audio sample
Object destructor.
- Parameters
-
| [in] | x | Pointer to the instance to destroy |
Object constructor.
- Parameters
-
| [in] | maxDelay | Size of the comb filter buffer, in samples. |
- Returns
- Pointer to the new instance
Sets the diameter of the cavity.
- Parameters
-
| [in] | f | Diameter of the cavity, in m |
Sets the lenght of the cavity.
- Parameters
-
| [in] | f | Length of the cavity, in m |
Sets the wind speed.
- Parameters
-