Menu

Virtual_Sound_Decoder

TwinDad
There is a newer version of this page. You can find it here.

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 project isn't even far enough along to call it "Alpha" code yet, and hasn't been included in a JMRI release, though it's in the SVN repository, if you like.

Sneak Peak

If you'd like to take an AT YOUR RISK sneak peak of the function, I've taken a semi-random snapshot of the jmri.jar file and posted it here. There's likely to be all kinds of bugs and problems, and it may crash. Nevertheless, you may have some fun, and I'd appreciate constructive feedback.

Sneak Peek Installation

  1. Download and install the JMRI 2.12 release on your computer.
    • Note that you can "install" it into a separate directory from your "usual" install if you like.
  2. Rename the "jmri.jar" file in your JMRI 2.12 installation to something else (e.g. jmri.jar.bak).
  3. Click on the "Files" link at the top of this page.
  4. Click on the "VSD" folder, then download vsd_peek.zip (or the most recent version there).
  5. Unpack the ZIP file.
  6. Put the jmri.jar from the vsd_peek.zip archive into your JMRI 2.12 install directory.
  7. Put the example_vsd.zip file somewhere convenient.
    • JMRI by default will look in the resources/vsdecoder folder under your JMRI install folder. You can put it anywhere you like.

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.

There is no "off" button yet. To kill the sounds, you'll have to stop DecoderPro entirely.

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.


MongoDB Logo MongoDB