Menu

Virtual_Sound_Decoder

TwinDad

JMRI Virtual Sound Decoder

The Virtual Sound Decoder (or "VSDecoder" or "VSD") is a new module that I am creating to add to the JMRI project. In brief, it's a module that provides sounds in response to throttle inputs, just like an actual hardware throttle does, except the sounds are played through your computer's speaker system instead of through a tiny speaker on the locomotive.

The sound models themselves are stored in a "VSD File", which is conceptually similar to a Digitrax SPJ file in that respect. The user can select one of several different sets of sounds, play sounds for multiple locomotives, and so on.

The VSD product is still very much "Alpha" code. It's buggy, junky, and generally doesn't work very well. But it does work, and I hope it will grow into something very useful.

Sneak Peak

Good news! Virtual Sound Decoder has been included as a "Debug" feature in JMRI 2.14 and JMRI 3.0 and future release! No need for an "at your own risk" test version. Just go to the JMRI website and download whichever version you prefer.

Note that the 2.x version of JMRI is now "old" and I won't be doing any future development in it, so all the new goodies (when I get around to creating them) will be in version 3.1 and future.

Running the Sneak Peek

  1. Launch DecoderPro or PanelPro
    • Do all the usual things you do to run it with your layout hardware, or use LocoNet Simulator
  2. Choose the "Debug->Virtual Sound Decoder" menu item.
  3. From the Virtual Sound Decoder window, choose "File->Load VSD File"
    • Navigate to and select the example_vsd.zip file.
  4. Setup the sounds
    1. Choose the sound profile you prefer from the Profile combo-box.
    2. Assign an address or choose a Roster entry to assign a locomotive to the decoder.
    3. Click on the "sounds" tab and press the "Engine Start" button to start the engine.
  5. Start up a JMRI throttle, or ensure your hardware or WiThrottle are connected.
  6. Run your train...

You can either play the bell and horn from the "sounds" tab, or by pressing "F1" or "F2" on your throttle. Hardware throttle buttons will not work on NCE cabs, unfortunately. They should work for Digitrax throttles, or for WiThrottle and EngineDriver smart-phone throttles.

Use the "Mute" button to temporarily silence the sound, or close the VSD window to kill the decoder entirely.

Bugs and Feature Requests

Please note that this is very early-development code. It will crash, it will do odd things, it will not do things you think it should, and it will do things that it shouldn't. The transitions between sound elements (say, from notch to notch on the engine) will be very, very rough. Many of the example sounds are simply placeholders waiting for more appropriate noises.

Still, I think/hope there is enough here for you to get the general idea.

To log a Bug or a Feature Request, you can either use my Tracker Page or the official JMRI Tracker pages:

My Tracker:

JMRI Tracker:

The VSD File

The VSD file is simply a ZIP archive. You can examine its contents by un-archiving it. There is a config.xml file that describes how the sounds are to be used, plus a sounds directory that holds the actual WAV file clips. All of the sounds included in the example have been released under the GNU GPL2 license.

The Definition of the VSD file is described on the [VSD_File_Definition] page.


MongoDB Logo MongoDB