An air horn consists of a flaring metal or plastic horn or trumpet (called the "bell") attached to a small air chamber containing a metal reed or diaphragm in the throat of the horn. Compressed air flows from an inlet line through a narrow opening past the reed or diaphragm, causing it to vibrate, which creates sound waves. The flaring horn serves as an acoustic "transformer" to improve the transfer of sound energy from the diaphragm to the open air, making the sound louder. In most horns it also determines the pitch of the sound. When vibrated by the diaphragm, the column of air in the horn vibrates in standing waves. The length of the horn determines the wavelength of the sound waves generated, and thus the fundamental frequency (pitch) of the note produced by the horn. The longer the horn, the lower the pitch.
Larger air horns used on ships and foghorns function similarly to a whistle; instead of a diaphragm the air escapes from a closed cylindrical resonator chamber through a precisely-shaped slit directed against a knife edge (fipple). The air blowing past the knife edge oscillates, creating sound waves. The oscillations excite standing waves in the resonator chamber, so the length of the chamber determines the pitch of the note produced.