It's a great and moving story, but apparently it isn't true.
Go here:
http://www.snopes.com/music/songs/taps.htm
I do notice that the explanation is filled with terms like, "it is likely", "if anyone", etc. So maybe the orgins are still not clear...perhaps this Captain was in the General's unit and the General was the one who made it SOP.