The whistle's sound is one of the many utilitarian aspects of railroading that has taken on cultural significance far beyond its original intended functions. It can be both mournful and spirited, the voice of the train and in many ways of its engineer.
But the whistle wasn't designed to be the subject of songs of course. For the engineer, it is both a warning device and a communications tool. Before the era of two-way radio, this latter function was of even greater importance.
Train crews used a Morse code-like pattern of long and short "toots" to convey different messages. From setting brakes to calling flagmen, the whistle signals did far more than just warn people at crossings.
Knowing these signals can add a lot to your model railroad operations as well. With more and more models now equipped with sounds - in some cases including whistles matched to the specific prototype - it's nice to do more than just sound off for the thrill of it. You can learn most of the common calls in this new link.