If you have a Bachmann loco that features the 8 pin DCC Ready socket this is how to do it with a SoundTraxx sound decoder...
http://www.soundtraxx.com/documents/appnotes/bachmann280.pdfThe example shows a 2-8-0 consolidation. The same info would apply to other Bachmann steam locos that feature the 8 pin socket.