For well over half of my wasted life, I have lived within earshot of trainyards, and my family involvement with the railroads is deep and wide.
But until recently, at which point I was finally goaded to attention by a three-year old train enthusiast and my transportation engineer of a wife, I have never given a thought to the code of the train whistles. But now I pay attention.
A brief introduction to Train Whistle Code is below, via Wikipedia. And a note from this room that the locomotive engineers have a broad range of tempos and intonations when playing these notes.
http://en.wikipedia.org/wiki/%22Train_whistle%22Whistle code
Train whistles are used to communicate to other railroad workers on a train or to railroad workers in the yard. Different combinations of long and short whistles each have their own meaning. They are used to pass instructions, as a safety signal, and to warn of impending movements of a train. Despite the advent of modern radio communication, most of these whistle signals are still used today:
One short: Stop or stopping; apply the brakes
One long: Approaching railroad station or junction (if moving), or apply air brakes and equalize pressure (if standing)
Two short: A general answer signal or acknowledgement; identical to the "roger" or "10-4" radio terms
One short, one long: Inspect the train
One long, one short: Visibility obscured
Two long: Train is about to proceed forward; release the brakes
One long, two short: Additional section follows signaling train
Two long, one short or two short, one long: Train is approaching a meeting or waiting point
Two long, one short, one long: Train is approaching a grade level crossing (i.e. a road crossing). This is a widely used safety signal used to warn motorists and is blown at every grade level crossing, except where local noise ordinances prohibit it. Known in railroad rulebooks as rule '14L'
Three short: Train is about to proceed in reverse (if standing), or train is about to stop at the next station (if moving)
Three long: Train cars have come unhooked; train has come apart
One long, three short: Flagman, go protect the rear of the train
One short, three long: Flagman, go protect the front of the train
Four short: Request for signals
Four long: Flagman, return to the train from the west or north
Five long: Flagman, return to the train from the east or south
Four short, one long: Fire alarm; fire on the train
Multiple short: Danger, get off the tracks! Used to warn pedestrians or livestock who are on the tracks in front of the approaching train.
. . . more