Page 1 of 9 12345 ... LastLast
Results 1 to 20 of 168

Thread: JMRI Virtual Sound Decoder

  1. #1
    Join Date
    Dec 2009
    Location
    Lexington, KY
    Posts
    17,077
    Blog Entries
    16
    Thanks
    4,770
    Thanked 13,755 Times in 5,608 Posts
    Mentioned
    269 Post(s)
    Tagged
    0 Thread(s)

    Default JMRI Virtual Sound Decoder

    OK, so I'm working on this Virtual Sound Decoder thing, and I'm getting far enough along I need to bounce some ideas on a user interface off some actual users. Where better to start than among my friends.

    Here's the first cut:

    VSD_1.png

    OK, so you start JMRI and somewhere in the menus is "Virtual Sound Decoder". You choose that, and you get this box. Only neater (I'm still learning Swing). Now, you either choose a loco from the roster, or you enter a loco address in the Address box (and click "Set").

    If you have a sound profile assigned to the rostered loco, it will be set in the "Sound Pofile" box. Otherwise, you can choose a different profile.

    Once you've done that, the VSD will listen for any throttle attached to that loco, and will provide the sounds from the sound profile when you do things to the throttle.

    That's the simple version. Now, pretend the button marked "Sounds" is really one of those little "drop down" buttons. When you click that, the window grows to include another set of buttons below, to allow you to directly trigger sounds in the window. This is for optional sounds that might not be mapped to throttle function keys. Or if you just prefer to click the buttons directly on the decoder.

    Now, I'm not sure how you'll access it, whether it'll be yet another button on the simple panel, or a button on the expanded panel, or a menu item, but there'll be another panel with sliders (an audio mixer, basically) to allow you to tweak the relative volume settings of the different sounds. Would like to know what folks preferences would be here.

    BIG QUESTION: I assume folks would like to have multiple sound decoders tied to multiple locomotives running. Would you prefer having a separate "simple panel" (above) floating around for each decoder, or would you prefer a single "VSD Manager" window, with all of the active decoders managed within that big window?
    Never mistake a guy who talks a lot for a guy who has something to say...

    CH&FR Site and Blog: http://www.chfrrailroad.net and http://blog.chfrrailroad.net
    Appalachian Railroad Technology: http://www.apprailtech.com


  2. The Following 2 Users Say Thank You to TwinDad For This Useful Post:


  3. #2
    Join Date
    Jan 2005
    Location
    Antelope, Calif USA
    Posts
    4,722
    Blog Entries
    6
    Thanks
    1,841
    Thanked 2,483 Times in 1,264 Posts
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Default

    TD.. Looking good!

    I can see advantages to both a big and small window. I do lot lie to clutter my screen up with a bunch of small windows. I would prefer one larger one where I could make all settings and minimize..... but that is just me. It would be nice to have both if possible.

    So, this may put my sound box out of business!

    Once you assign a decoder to an address, will it fire on that address no matter what throttle on the system sends commands to that address?
    Sean McC

    "No man is a failure ...

    who has friends." -- Clarence

  4. #3
    Join Date
    Dec 2009
    Location
    Lexington, KY
    Posts
    17,077
    Blog Entries
    16
    Thanks
    4,770
    Thanked 13,755 Times in 5,608 Posts
    Mentioned
    269 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by seanm View Post
    TD.. Looking good!



    Once you assign a decoder to an address, will it fire on that address no matter what throttle on the system sends commands to that address?
    Yes, that's the idea, though I'm still figuring out how to make listening to all the interfaces seamless.

    I'm also planning to integrate the sound capabilities into a smatphone app. The idea of having the sounds on the headphones is just too appealing to me. But I have to get the SDKs and all of that first, so that will be a while. That version will (at first) only respond to the throttle on the phone.

    But first I want to get the simple basic version out there. Baby steps.
    Never mistake a guy who talks a lot for a guy who has something to say...

    CH&FR Site and Blog: http://www.chfrrailroad.net and http://blog.chfrrailroad.net
    Appalachian Railroad Technology: http://www.apprailtech.com


  5. The Following 2 Users Say Thank You to TwinDad For This Useful Post:


  6. #4
    Join Date
    Dec 2009
    Location
    Lexington, KY
    Posts
    17,077
    Blog Entries
    16
    Thanks
    4,770
    Thanked 13,755 Times in 5,608 Posts
    Mentioned
    269 Post(s)
    Tagged
    0 Thread(s)

    Default

    OK, here's version 2 of the GUI.

    It's a tabbed pane, with a configuration pane and a "sound buttons" pane...

    vsd1b.png

    vsd1c.png

    I had a bit of trouble with the screen capture so you'll have to imagine the colors... standard OS X blue scheme.

    Better?
    Never mistake a guy who talks a lot for a guy who has something to say...

    CH&FR Site and Blog: http://www.chfrrailroad.net and http://blog.chfrrailroad.net
    Appalachian Railroad Technology: http://www.apprailtech.com


  7. The Following 3 Users Say Thank You to TwinDad For This Useful Post:


  8. #5
    Join Date
    Jan 2005
    Location
    Antelope, Calif USA
    Posts
    4,722
    Blog Entries
    6
    Thanks
    1,841
    Thanked 2,483 Times in 1,264 Posts
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Default

    Yep, better!

    What is the difference between Address and Roster? Are both needed? I take is Address is the loco address that the VSD responds to and is likely equal to a loco on the layout.... so then what is Roster used for? I am probably missing something obvious here, but I have had a pain pill.
    Sean McC

    "No man is a failure ...

    who has friends." -- Clarence

  9. #6
    Join Date
    Dec 2009
    Location
    Lexington, KY
    Posts
    17,077
    Blog Entries
    16
    Thanks
    4,770
    Thanked 13,755 Times in 5,608 Posts
    Mentioned
    269 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by seanm View Post
    Yep, better!

    What is the difference between Address and Roster? Are both needed? I take is Address is the loco address that the VSD responds to and is likely equal to a loco on the layout.... so then what is Roster used for? I am probably missing something obvious here, but I have had a pain pill.
    JMRI keeps a roster of all the locos you have used with DecoderPro. When you instantiate a software throttle, instead of typing in an address, you can pick a loco from the roster. So I figured you might want to do the same with the VSD - pick a loco from your roster instead of typing in the address.

    Plus, if I can get an entry added into the stored Roster data, a Roster-ed loco might have a predefined (user selected) sound profile set to it, so when you set the VSD to a roster loco it automatically updates the sound profile to the preferred profile for that loco.
    Never mistake a guy who talks a lot for a guy who has something to say...

    CH&FR Site and Blog: http://www.chfrrailroad.net and http://blog.chfrrailroad.net
    Appalachian Railroad Technology: http://www.apprailtech.com


  10. The Following 2 Users Say Thank You to TwinDad For This Useful Post:


  11. #7
    Join Date
    Aug 2007
    Location
    Barnegat Light NJ
    Posts
    14,019
    Blog Entries
    15
    Thanks
    18,074
    Thanked 8,123 Times in 4,856 Posts
    Mentioned
    169 Post(s)
    Tagged
    2 Thread(s)

    Default

    I'm not JMRI savvy yet (never?) but would this be used when you are using the virtual throttle on the JMRI control panel? Or could this be used with the controller from your DCC command station?
    Yours,

    Gene

    Turtle Creek Industrial RR

    Link to my Flickr account: https://www.flickr.com/photos/epumph/

  12. #8
    Join Date
    Dec 2009
    Location
    Lexington, KY
    Posts
    17,077
    Blog Entries
    16
    Thanks
    4,770
    Thanked 13,755 Times in 5,608 Posts
    Mentioned
    269 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by epumph View Post
    I'm not JMRI savvy yet (never?) but would this be used when you are using the virtual throttle on the JMRI control panel? Or could this be used with the controller from your DCC command station?
    When I get it done it will work with any throttle that reports status back to JMRI. This should include Digitrax for sure, and I believe NCE and most of the other major players. It should also work with the smart-phone throttles, though the sound will be on the PC.

    Once I get the basic form done, I'm going to educate myself on EngineDriver and try to integrate sound so that you can listen via headphones on your Android phone. And then if I can't convince the WiThrottle guys to pick it up, I'll see what it takes to port EngineDriver to the iPhone.

    I wouldn't hold your breath on that latter part, but it is a goal.
    Never mistake a guy who talks a lot for a guy who has something to say...

    CH&FR Site and Blog: http://www.chfrrailroad.net and http://blog.chfrrailroad.net
    Appalachian Railroad Technology: http://www.apprailtech.com


  13. #9
    Join Date
    Aug 2007
    Location
    Barnegat Light NJ
    Posts
    14,019
    Blog Entries
    15
    Thanks
    18,074
    Thanked 8,123 Times in 4,856 Posts
    Mentioned
    169 Post(s)
    Tagged
    2 Thread(s)

    Default

    So you will stilll need to interface with the computer running JMRI. Yes?
    Yours,

    Gene

    Turtle Creek Industrial RR

    Link to my Flickr account: https://www.flickr.com/photos/epumph/

  14. #10
    Join Date
    Dec 2009
    Location
    Lexington, KY
    Posts
    17,077
    Blog Entries
    16
    Thanks
    4,770
    Thanked 13,755 Times in 5,608 Posts
    Mentioned
    269 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by epumph View Post
    So you will stilll need to interface with the computer running JMRI. Yes?
    Yes. This is a JMRI component, not a stand-alone sound box. For that you'd need something like what Seanm has cooked up.

    It's possible somebody could take this, add some stuff and embed it in some kind of box but that's not what I'm planning to do. I don't know that it would be very cost effective anyway.
    Never mistake a guy who talks a lot for a guy who has something to say...

    CH&FR Site and Blog: http://www.chfrrailroad.net and http://blog.chfrrailroad.net
    Appalachian Railroad Technology: http://www.apprailtech.com


  15. #11
    Join Date
    Jan 2005
    Location
    Antelope, Calif USA
    Posts
    4,722
    Blog Entries
    6
    Thanks
    1,841
    Thanked 2,483 Times in 1,264 Posts
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Default

    I get the roster/address difference now. If you pick a roster entry, it will populate the address box, correct? Makes good sense now.

    I like this! I will keep following and asking questions.
    Sean McC

    "No man is a failure ...

    who has friends." -- Clarence

  16. #12
    Join Date
    Dec 2009
    Location
    Lexington, KY
    Posts
    17,077
    Blog Entries
    16
    Thanks
    4,770
    Thanked 13,755 Times in 5,608 Posts
    Mentioned
    269 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by seanm View Post
    I get the roster/address difference now. If you pick a roster entry, it will populate the address box, correct? Makes good sense now.

    I like this! I will keep following and asking questions.
    Yep. You've got the idea.

    Be careful. I will need beta testers...
    Never mistake a guy who talks a lot for a guy who has something to say...

    CH&FR Site and Blog: http://www.chfrrailroad.net and http://blog.chfrrailroad.net
    Appalachian Railroad Technology: http://www.apprailtech.com


  17. #13
    Join Date
    Dec 2009
    Location
    Lexington, KY
    Posts
    17,077
    Blog Entries
    16
    Thanks
    4,770
    Thanked 13,755 Times in 5,608 Posts
    Mentioned
    269 Post(s)
    Tagged
    0 Thread(s)

    Default Need Input on File Construction

    OK, so I've made a bunch of progress, will hope to have it added to JMRI (debug builds) in a few weeks.

    Have a question about the construction of the "VSD File", though. I have a "tight" version and a "loose" version, would like to know which you prefer.

    The "tight" version is this:

    Each VSD file contains a profile the describes the sounds that go with exactly one locomotive. One horn, one bell, one engine, etc. Unless of course the prototype has two or three. The VSD file also contains exactly one set of sound files that exactly corresponds to that one profile. If you want to have your loco with a Nathan horn instead of a Leslie, that's a different VSD file (or you edit the one you have and *replace* the horn sound).

    This version provides a nice, "clean" 1:1 relation between a locomotive and a VSD file, but you could end up with a lot of VSD files with a lot of duplication. For example, the VSD file with the Nathan horn has a duplicate copy of the same EMD567 engine as the Leslie-horned loco.

    The "loose" version is this:

    The VSD is more of a library. It contains:

    • A set of "sound events" ("horn", "bell1", "bell2", "engine", "air hose",...) that loosely correspond to throttle button presses or other "triggering events". These become the buttons on the "sounds" tab of the GUI and get mapped directly to Throttle events.
    • A set of "sound options" that can be mapped (indirectly) to the "sound events" ... maybe a half dozen different horns, different engines, etc.
    • A set of "triggers" that map the "sound events" to the "sounds" in various ways.

    The VSDecoder GUI then has a page that allows you to choose which of the "horn sounds" is used when a "horn sound trigger" is activated, as well as exactly which throttle button is mapped to the "horn sound event".

    This mapping, from ThrottleButton to SoundEvent and from SoundEvent (trigger) to SoundOption) is stored separately from the VSD file, in the JMRI user preferences.

    So put another way, the "loose" VSD file defines precisely under what Trigger conditions a Horn SoundOption is triggered when a Horn SoundEvent happens, but it does NOT define WHICH Horn SoundOption is used, nor which throttle button causes the SoundEvent in the first palce. The definition of which Throttle button causes the SoundEvent and the choice of which Horn SoundOption to use is stored outside the VSD file in the user preferences (or possibly in the locomotive roster).

    This "loose" version provides more flexibility... someone could create PennsyDiesel.VSD which would have a variety of Pennsy horns and engines that could be custom-selected to match a particular engine (that one oddball GP38 with the "wrong" horn installed), at the expense of having a separate mechanism outside the VSD file to do this mapping.

    OK, that was maybe very confusing. It's a bit hard to describe. Hopefully you can make sense of it (or ask questions).

    Please let me know which concept you prefer...
    Never mistake a guy who talks a lot for a guy who has something to say...

    CH&FR Site and Blog: http://www.chfrrailroad.net and http://blog.chfrrailroad.net
    Appalachian Railroad Technology: http://www.apprailtech.com


  18. #14
    Join Date
    Jan 2005
    Location
    Antelope, Calif USA
    Posts
    4,722
    Blog Entries
    6
    Thanks
    1,841
    Thanked 2,483 Times in 1,264 Posts
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Default

    Not sure I fully get it, but some sort of hybrid approach seem like the best way to go. A series of default profiles that could be also be edited to make new profiles to give different engines of the same type subtle differences. Sort of like profiles on a blackberry.
    Sean McC

    "No man is a failure ...

    who has friends." -- Clarence

  19. #15
    Join Date
    Dec 2009
    Location
    Lexington, KY
    Posts
    17,077
    Blog Entries
    16
    Thanks
    4,770
    Thanked 13,755 Times in 5,608 Posts
    Mentioned
    269 Post(s)
    Tagged
    0 Thread(s)

    Default

    Well, let me take a different tack at a description...

    My basic thought right now (somewhat refined from the previous post) is that a single VSD file represents a single locomotive or type of locomotive. Each VSDecoder that you launch in JMRI represents exactly one locomotive on your layout, and so you would load a VSD file for that locomotive.

    Let's say you bought a new EMD GP40. You'd go to some sharing site and download GP40.VSD or EMD_Gen2_Diesel.VSD or some such (or of course you could create your own).

    Within that VSD file you would have a certain set of "sound events":
    * Engine
    * Horn
    * Bell
    * Air Brake Release
    * Couple
    * Decouple

    For each of those events, there might (or might not) be 2 or 3 (or more) choices for the specific sound. Maybe 3- or 5-chime Leslie or Nathan horns, to match your railroad, and maybe turbo vs. non-turbo engine. Maybe a few different air brake noises to suit your preference.

    The VSD file creator may have created a set of profiles - at least one default profile - that ties together specific combinations of the available sounds. Maybe the "SP 1967 Nathan" profile has a non-turbo engine and a 3-chime Nathan horn, and air brake #3, while "Chessie 1987 Leslie 5-chime" has a turbocharged engine, a 5-chime Leslie horn and a particular Chessie-specific bell sound. These are like "Combo Meals" on the menu, so to speak. But all of the options are restricted to the intent of the whole VSD file - in this case a GP40. Someone might make a different VSD file for a GE U-boat, or a bigger VSD file for all EMD 567-based Diesels (with a lot more profiles and sound bites in it).

    Further, there would be an additional tab on the VSDecoder where you could customize the selected profile... so you could use the "Chessie 1987 Leslie 5-Chime" profile, but change the air brake release to one of the other options, say.

    This is the "loose" version. In theory, you could have one gigantic VSD file with profiles for every possible steam or diesel locomotive ever made, but in practice you probably wouldn't because each profile ends up being made of a whole bunch of sounds and gets pretty complex.



    Now, the "tight" version could be seen as a "loose" VSD file with exactly one profile and only the files required for that profile. So you'd download the "NandW675_GP9.VSD" and you would have EXACTLY and ONLY the sounds associated with the GP9 owned by the Bluegrass Railroad Museum. Want different sounds? Load a different VSD file.

    Actually, merely trying to explain this has somewhat solidified my thoughts on the matter. Though I'd greatly appreciate some confirmation. I believe the "loose" version (as explained in THIS post, not the other) is the right thing, since the "tight" version becomes merely a degenerate case of the loose one.

    Does this make any sense?
    Never mistake a guy who talks a lot for a guy who has something to say...

    CH&FR Site and Blog: http://www.chfrrailroad.net and http://blog.chfrrailroad.net
    Appalachian Railroad Technology: http://www.apprailtech.com


  20. #16
    Join Date
    Jan 2010
    Location
    Xenia, Ohio
    Posts
    3,898
    Blog Entries
    1
    Thanks
    1,584
    Thanked 1,941 Times in 1,041 Posts
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)

    Default

    Speaking as a "non geeky" person, the loose fine would be fine as long as the options are easy to find and set.
    My favorite computer game is "Stump The Spellchecker"...
    https://www.nscale.net/forums/images/Flags/USA/Ohio.png

  21. #17
    Join Date
    Dec 2009
    Location
    Lexington, KY
    Posts
    17,077
    Blog Entries
    16
    Thanks
    4,770
    Thanked 13,755 Times in 5,608 Posts
    Mentioned
    269 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by Jazzbass01 View Post
    Speaking as a "non geeky" person, the loose fine would be fine as long as the options are easy to find and set.
    Can you handle a "combo box"?

    Seriously... it is a rather complex issue creating the VSD file in the first place. This is because it's actually pretty complex figuring out how you want things triggered... and then specifying the triggering logic for all of those transitions.

    However, I expect the interface to USE a VSD file that someone has created to be as simple as loading the file, and then choosing one of several available options from a drop-down list. And if you like the default settings, you don't even have to do that.
    Never mistake a guy who talks a lot for a guy who has something to say...

    CH&FR Site and Blog: http://www.chfrrailroad.net and http://blog.chfrrailroad.net
    Appalachian Railroad Technology: http://www.apprailtech.com


  22. #18
    Join Date
    Jan 2010
    Location
    Xenia, Ohio
    Posts
    3,898
    Blog Entries
    1
    Thanks
    1,584
    Thanked 1,941 Times in 1,041 Posts
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)

    Default

    Yes, as long as I understand the terminology.
    My favorite computer game is "Stump The Spellchecker"...
    https://www.nscale.net/forums/images/Flags/USA/Ohio.png

  23. #19
    Join Date
    Dec 2009
    Location
    Lexington, KY
    Posts
    17,077
    Blog Entries
    16
    Thanks
    4,770
    Thanked 13,755 Times in 5,608 Posts
    Mentioned
    269 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by Jazzbass01 View Post
    Yes, as long as I understand the terminology.
    Something like this...

    optionPane.png

    I wasn't able to get a shot with the "drop-down" opened up, due to the way OS X handles screen focus. But if you click the little arrows to the right of the Engine Options box, you can choose from "Non-Turbo" or "Turbo", and likewise with the Horn Option you can choose "3-Chime Leslie", "5-Chime Leslie", or "4-Chime Nathan".

    What your options are would be defined by the contents of the VSD file, whether the author decided to include more than one horn sound.
    Never mistake a guy who talks a lot for a guy who has something to say...

    CH&FR Site and Blog: http://www.chfrrailroad.net and http://blog.chfrrailroad.net
    Appalachian Railroad Technology: http://www.apprailtech.com


  24. The Following 3 Users Say Thank You to TwinDad For This Useful Post:


  25. #20
    Join Date
    Aug 2007
    Location
    Barnegat Light NJ
    Posts
    14,019
    Blog Entries
    15
    Thanks
    18,074
    Thanked 8,123 Times in 4,856 Posts
    Mentioned
    169 Post(s)
    Tagged
    2 Thread(s)

    Default

    Thanks TD. I am still a bit confused but it is getting clearer in my foggy brain. So, this will work without a decoder (virtual) or will you still need a decoder? I haven't interfaced with JMRI yet but I am suposed to get a refurbed laptop exclusively for my trains. When it arrives I will then have to get the interface for my Power Cab and see what this is all about.
    Yours,

    Gene

    Turtle Creek Industrial RR

    Link to my Flickr account: https://www.flickr.com/photos/epumph/

Similar Threads

  1. Sound Decoder Help
    By Scrooge in forum DCC
    Replies: 3
    Last Post: 4th Jun 2011, 03:28 PM
  2. 2-8-0 Decoder and Sound
    By RDakota in forum DCC
    Replies: 16
    Last Post: 23rd Apr 2011, 10:39 AM
  3. GG-1 Sound Decoder
    By Bigsparky65 in forum DCC
    Replies: 5
    Last Post: 24th Mar 2011, 01:49 PM
  4. mrc sound decoder
    By localdriver in forum DCC
    Replies: 4
    Last Post: 18th Mar 2010, 06:42 PM
  5. JMRI Decoder Pro and Digitrax PR-3
    By mavrick0 in forum DCC
    Replies: 3
    Last Post: 28th Oct 2008, 07:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •