Many types exist, from small police and sports whistles (also called pea whistles), to much larger train whistles, which are steam whistles specifically designed for use on locomotives and ships. Although whistles have a musical characteristic (for example train whistles sound a minor-seventh musical chord) whistles are not usually considered 'musical' in the sense of being able to play a chosen melody, but mainly the small whistles can also be used as a - very shrill and loud - noise and rhythm instrument. However, musical whistles exist, including any of several 2-octave musical instruments known as tin whistles (sometimes known as pennywhistles or low whistles), as well as the calliope (an array of separately actuable steam whistles), organ pipes and the recorder. Pea whistles are used in jazz and Latin music as a percussion instrument.
The whistle works by causing the smooth flow of air to be split by a narrow blade, sometimes called a fipple, creating a turbulent vortex which causes the air to vibrate. By attaching a resonant chamber to the basic whistle, it may be tuned to a particular note and made louder. The length of the chamber typically defines the resonant frequency. A whistle may also contain a small light ball, usually called the pea, which rattles around inside, creating a chaotic vibrato effect that intensifies the sound. Japanese bird whistles use several small balls and are half filled with water in order to reproduce the sound of a bird song.
A steam whistle works the same way, but using steam as a source of pressure: such whistles can produce extremely high sound intensities.
Sometimes, unintentional whistles can be set up. A common one is the opened sunroof of a car: air passing over the top of the vehicle can, at certain speeds, strike the back edge of the sunroof, creating a very low frequency whistle which is resonated by the closed interior of the car. Since the sound frequency is infrasonic, around 4 Hz, the effect is very uncomfortable for occupants, who feel the vibration rather than hear it. Such low frequencies can induce nausea, headache, disorientation and dizziness. The effect can be prevented by opening a side window a few inches. Subsonic whistles have also been developed for use as weapons, or to deliberately create a sense of uneasiness in an enemy.
Industrial whistles are used for signalling and timekeeping both on railroad and ships, and in factories. Most of these whistles were steam powered and not standardized. Individual locomotives could be identified by their whistles. At noontime in industrial areas up into the 1950s whistles of every pitch could be heard, as each factory had a boiler and a whistle, if not full steam power.
Railroads in particular used elaborate whistle codes for communication both within the train and with other trains. These methods are maintained today with motor-powered air horns. Trucks also use air horns, especially since they often have air brakes and so there is already a source of compressed air on board.
warning Whistles are often used as warning devices or as safety devices serving to attract attention to the user. Some cyclists use a whistle as a substitute for a bell or horn. It should be noted, however, that many jurisdictions require that the warning device be permanently attached to the bicycle.
Rescue or Survival whistles are often packed in survival kits and attached to Personal flotation devices to allow a victim to signal for help. The whistle is audible at much greater distances than the human voice, and is less likely to cause exhaustion if used repeatedly. Survival whistles differ from pea whistles in that they are usually flat, so that water cannot collect inside if the user is immersed, for example after falling overboard from a boat.