Of all the military bugle calls, none is so easily recognized or more apt to render emotion than the call Taps. The melody is both eloquent and haunting and the history of its origin is interesting and somewhat clouded in controversy. Taps began as a revision to the signal for Extinguish Lights (Lights Out) bugle call that was used as the final call of the day and as the name implies, it was a signal to extinguish all fires and lights. Up until the Civil War, the infantry cal for Extinguish Lights was the one set down in Silas Casey's (1801-1882) Tactics, which had been borrowed from the French. The music for Taps was adapted by Union General Daniel Butterfield for his brigade in July, 1862.
As the story goes, General Butterfield was not pleased with the call for Extinguish Lights, feeling that the Call was too formal to signal the day’s end, and with the help of the brigade bugler, Oliver Willcox Norton, wrote Taps to honor his men while in camp at Harrison's Landing, Virginia, following the Seven Days battle. These battles took place during the Peninsular Campaign of 1862. The new call sounded that night in July, 1862, soon spread to other units of the Union Army and was reportedly also used by the Confederates. Taps was made an official bugle call after the war.
Why the name Taps? The most likely explanation is that the name was borrowed from a drummer's beat. The beating of a bedtime roll-call called Tattoo by the drum corps would be followed by the Drummer of the Guard beating three distinct drum taps at four count intervals for the military evolution Extinguish Lights. Following the call, three single drum strokes were beat at four-count intervals. This was known as the "Drum Taps" or in common usage of soldiers "The Taps" or "Taps."
It is not clear how or why Taps became associated with funerals. However, it's earliest official reference for use at military funeral ceremonies is found in the U.S. Army Infantry Drill Regulations for 1891.