Lesson 4 of 15
Speed of Sound in Air
Temperature Dependence
Sound speed in air depends on temperature. The linear approximation:
where is the temperature in Celsius.
Physics Behind It
Sound travels by compressing adjacent air molecules. Warmer air has faster-moving molecules, so disturbances propagate more quickly. The exact formula uses the adiabatic index and molar mass, but the linear form is accurate to within 0.5% for typical temperatures.
Effect on Tuning
An orchestra tunes at 20 °C (343 m/s). If the stage warms to 30 °C (349 m/s), instruments that haven't warmed up play sharp — wavelengths shorten at higher speeds.
| T (°C) | v (m/s) |
|---|---|
| -20 | 319.0 |
| 0 | 331.0 |
| 20 | 343.0 |
| 100 | 391.0 |
Your Task
Implement speedOfSound(celsius) using the linear approximation.
Web Audio API loading...
Loading...
Click "Run" to execute your code.