Here’s a little software project I’ve been working on, alongside of my more “hard” modeling work. I made a video demo, as it can be hard to express how this is all supposed to work in words.
This is the result of a confluence of several factors.
I have long wanted to have sound on my layout, but I was balking at the expense and the lack of sound quality from N scale sound decoders (this has more to do with physics and tiny speakers than the quality of the available products). SoundTraxx had been pre-announcing their SurroundTraxx product for a while, and a couple of online friends of mine have been toying with under-the-table sound systems being driven by hardware sound decoders and larger speakers. And I had been playing with the JMRI Java Model Railroad Interface project.
It occurred to me that I could write a software program that would emulate (or simulate, if you prefer) the function of a hardware sound decoder, listening to the layout interface for throttle commands and responding to them just as a hardware decoder installed in a locomotive would. And most PCs these days come with surround sound audio systems! JMRI already provided much of the foundation for this, including the layout interface, a nice abstraction of the throttle, and integration with the OpenAL 3D audio system, so it seemed a good match.
I’ve been working on this for a few months. The basic idea follows very roughly the scheme of an add-on sound decoder. For each engine you want to have sound, you launch a “Virtual Sound Decoder” (or “VSDecoder”) on the PC, select a “sound profile” from a “VSD File” and assign it a DCC address. The virtual decoder then sits in the background and generates sounds in response to the throttle inputs. Thanks to the way JMRI handles throttles, it will respond to any throttle on the system, whether a hardware or software throttle, or a wireless-attached throttle on a PDA or smart phone. Buttons on the VSDecoder allow the user to directly trigger sounds, bypassing the throttle if desired.
The “VSD File is somewhat like a Digitrax SPJ file, though the two are completely incompatible. The VSD file is a Zip archive containing all of the source audio files, plus a configuration file (written in XML) that tells the Virtual Sound Decoder when and how to use the sound files. Each VSD File can contain one or more “Profiles”, each of which describes a specific configuration of a locomotive. This could be multiple variants of a particular type of locomotive, or several completely different types of locomotives. For example, a VSD FIle might contain profiles for several different EMD engines based on the 567 Diesel prime mover, or an eclectic collection of engines belonging to the Pennsylvania Railroad. VSD Files can be easily constructed by and shared among folks who are interested in doing so.
Work progresses steadily, and I hope to have a version of this included in the 2.13 development release of JMRI at some point. In the meantime, if you are interested in developing or providing sound files, let me know!




I love your vsd project! I watched the video, and eagerly wait to see it available. I wish I knew anything about coding so I could help, but sadly my skills are only good enough to use such software, not write it.
I use Engine Driver to run Z Scale trains with the BAZ BoyZ at shows and at the TCSME N Scale layout, and would love to run sound using your VSD files through decoder pro.
If you are looking for a windows Alpha tester, I would be overjoyed to help, alternately, if you want to trade skillsets, I would be happy to do custom laser cutting to help populate your layout in trade.
-Robert Ray
By: Robert Ray on August 18, 2011
at 10:54 pm
Thanks, Robert!! I appreciate the compliments.
We do have plans to port some portion of this function to EngineDriver, and possibly to the iPhone as well. Most likely you’ll be able to choose a VSD file that you’ve synced to your phone, and it’ll auto-key to the EngineDriver throttle (only) and play through the headphones. I suppose eventually we could stream the audio back to the phone over WiFi (so you get *all* the locos!) but that would be very bandwidth intensive for both the phone and the host PC.
For the time being, the VSD tool should work just fine with EngineDriver as long as you are happy with the sound coming from your PC speakers.
The basic code is now checked into JMRI, so it should be available in the next development release (2.13.2, most likely).
As for supporting the project, I appreciate the offer. The best way to support it would be to donate directly to JMRI, either through testing, documenting, or financially.
By: bgtwindad on August 18, 2011
at 11:57 pm
[...] It’s a new development in JMRI, being coded by an N-scale modeller calling himself TwinDad. The Virtual Sound Decoder (or VSDecoder) runs on a PC and emulates (or simulates) the function of an actual sound decoder. It [...]
By: Just a bit of noise … | Koala Creek on September 13, 2011
at 4:47 pm
Hello,
I am very interested in the vsd project. I haven’t tried it on my layout yet but I have been playing with it virtually. I am working on making my own sound package and I am getting an error about the file not containing config.xml even though it does. Is there a way I can contact you to ask about it? I am running 2.13.2 on Windows 7.
By: chris douglas on October 7, 2011
at 9:20 am
Just a short note to say “thank you” for the time and effort you and others have put into the VSD project. It adds another dimension to my Z scale modeling. I have it running on both my iMac and a Dell lap top. I had a few false starts but was able it get them both running with just a couple of hours work (fun?). I understand it will NOT work with hard wired NCE throttles but it works successfully for me with the JMRI and WiThrottle using a dedicated router. I wish I were able to do some programming so that I could independently mute the sounds. I find the diesel sound a bit annoying after a few minutes but really love to play with the bell and horns. It is my plan to take the system to the December GTE show in Del Mar, CA.
By: Lindley Ruddick on November 22, 2011
at 12:18 am
Thanks for the compliment! I’m glad it is (mostly) working for you. I’ll see what I can do about the engine mute in a future release. That should be fairly easy to implement.
By: bgtwindad on November 22, 2011
at 8:00 am
I had a Ralph Simpson moment. All you have to do is NOT start the engine. The bell and horn work just fine. DUH!!!!
By: Lindley Ruddick on November 22, 2011
at 11:43 am
I have successfully modified a profile to include a crossing gate sound using F4. I changed a copy of the example.vsd file to a new name of elr.zip. I used WinZip to unzip the file, modified the config.xml file, saved it, used WinZip to compress the files and saved as elr1.zip. I then changed the file extension from .zip to .vsd. The file worked fine.
I used an evaluation copy of WinZip as I am too cheap to buy the software. I found a free Mac utility called iZip. iZip unzips elr.zip just fine but when I compress the modified files using iZip and change the extension from .zip to .vsd, the file will not load.
Any thoughts?
I think you used iZip based on the icon in your demo.
I have an iMac running OS X 10.6.8
Thanks for the help.
Lindley Ruddick
By: Lindley Ruddick on November 26, 2011
at 11:11 pm