开云体育

Locked Making VSD Files and Config - Volume question #vsdecoder


 

Howdy all. In my latest rabbit hole, I am putting a mini wifi camera (SQ23) on a train and plan to have an Engineer in another room run the train with the help of local Switchmen and Conductor (on the ground at the train; no radios, just hand signals like 1950). My friend said it would be cool if there was audio of the train too, so I embarked on a VSD trail.

The train will be using an Alco S-1, and while I have gotten the examples to work, I wanted an Alco, so I am making a vsd file for that.? I have the sounds and steps for Idle, Notch 1 and Notch 2 and for notching up and down, and I also have the Bell (F1), the Horn (F2), added a Shorthorn (F3).

The problem I am having is the volume.? I can edit the sound files and manually change any I need (they are all normalized at -1db), but I thought (apparently incorrectly) that the "gain" in the config file would adjust the volume of the various pieces.?

I have posted my project in the ProblemsBeingWorkedOn/Phil Abernathy files section if someone wants to look. It sounds really cool, but the prime mover is far too loud, while the horn is too soft, and I don't have many notches (although it will be used for Yard switching, and may not use many notches).

Phil in gorgeous Young Harris, Georgia, USA


 

Phil,

Am 28.11.2019 um 18:45 schrieb Phil in gorgeous Young Harris via Groups.Io:
Howdy all. In my latest rabbit hole, I am putting a mini wifi camera (SQ23) on a train and plan to have an Engineer in another room run the train with the help of local Switchmen and Conductor (on the ground at the train; no radios, just hand signals like 1950). My friend said it would be cool if there was audio of the train too, so I embarked on a VSD trail.
The train will be using an Alco S-1, and while I have gotten the examples to work, I wanted an Alco, so I am making a vsd file for that.? I have the sounds and steps for Idle, Notch 1 and Notch 2 and for notching up and down, and I also have the Bell (F1), the Horn (F2), added a Shorthorn (F3).
It's a good decision to make a try with VSD! Sound enriches our hobby.
I think you're very close to a good VSD file. I'm just gonna make a few recommendations.


The problem I am having is the volume.? I can edit the sound files and manually change any I need (they are all normalized at -1db), but I thought (apparently incorrectly) that the "gain" in the config file would adjust the volume of the various pieces.
Right, the "gain" parameter is used to adjust the volume of the different sound files like the Bell, Horn, and so on. For engine sound however "engine-gain" is used instead of "gain". Engine sound covers the start and the stop sound, the idle sound and all the notch sounds. Default engine-gain is 0.8 (from a range of 0.0 to 1.0). Engine-gain = 0.0 would mute the engine sound.


I have posted my project in the ProblemsBeingWorkedOn/Phil Abernathy files section if someone wants to look. It sounds really cool, but the prime mover is far too loud, while the horn is too soft, and I don't have many notches (although it will be used for Yard switching, and may not use many notches).
Thanks for the upload! That was very helpful.

I recommend to reduce the volume of the prime mover sound with your audio editor. Yes, the horn is too soft. You could try to increase the volume in config.xml, e.g. gain = 1.2 (or reduce the engine sounds, e.g. engine-gain = 0.6).

You mentioned that "16 bit, 47khz" is not working for you. JMRI supports 16 bit, 44100Hz. Please check your rate value of 47khz! Class64.vsd is working with 16 bit, 44100Hz chuff sounds.

Klaus


 

Thanks Klaus.? I worked with my audio files (as you thought, the original was 44100, not 47k like I said, and they were stereo which may have been the real problem), added some more notches (I guessed at what it would sound like), made Accel and Deccel sounds, added those new notches to my config and tried again.? A new file is uploaded to ProblemsBeingWorkedOn/Phil Abernathy with a small write-up of the loco.?

I am still working on how to make the prime mover stop/start when I send an F8 (mute) function (I have it auto start now).? In fact, when I review my config file, I don't see what Starts or Stops the engine (I use the button on the VSD Manager Pop-up, but do not see that button mentioned in the file).

I would love for someone familiar with the prototype to weigh in on the sounds though: I just guessed.

I am hoping to try this at the Club within the next 2 weeks, along with my new SQ23 camera.

Phil in gorgeous Young Harris, Georgia, USA


 

Am 30.11.2019 um 01:07 schrieb Phil in gorgeous Young Harris via Groups.Io:
Thanks Klaus.? I worked with my audio files (as you thought, the original was 44100, not 47k like I said, and they were stereo which may have been the real problem), added some more notches (I guessed at what it would sound like), made Accel and Deccel sounds, added those new notches to my config and tried again.? A new file is uploaded to ProblemsBeingWorkedOn/Phil Abernathy with a small write-up of the loco.
You're welcome, Phil.

Sorry, I forgot to mention that the files have to be mono. You can use stereo files, but not for the engine sound. All of these sounds (start and stop, notches, accel, decel sounds) must be mono and must have the same frequence. That's all correct in your uploaded VSD files.

The file size should not prevent you from using 16 bit files (it is an advantage of a computer to handle large files). Try e.g. EMD_645_Turbo.vsd to hear the difference. But it's harder to get good 16 bit sounds on the web! And you're right, in the end the typical sound character is important.


I am still working on how to make the prime mover stop/start when I send an F8 (mute) function (I have it auto start now).? In fact, when I review my config file, I don't see what Starts or Stops the engine (I use the button on the VSD Manager Pop-up, but do not see that button mentioned in the file).
If I understand this right, you want to be able to start/stop the engine by a throttle function key, e.g. F8. You can do this in config.xml:
<trigger name="ENGINE_STARTSTOP" type="THROTTLE">
<event-name>F8</event-name>
<target-name>ENGINE</target-name>
<action>NOTHING</action>
</trigger>
This must be declared in the tag sound-event name="ENGINE".


I would love for someone familiar with the prototype to weigh in on the sounds though: I just guessed.
Unfortunately, I don't know the prototype. Maybe somebody else will respond. Maybe you can find some examples on YouTube.

I am hoping to try this at the Club within the next 2 weeks, along with my new SQ23 camera.
That sounds good. There may still be time for fine tuning.

Klaus


 

For Phil:

The diesel sounds good to me. One small comment on the idle file. As you said, I do hear the “pop-off” and right after a non-voiced tick. Is the tick an artifact of the file? It’s not really a problem but it is there.

On notching, I think on previous VSD post someone pointed out that a loco will move (depending on train load) with the diesel at idle. That is the diesel remains at idle (notch 0) and the field windings of the generator are energized thus powering the traction motors. This being said, I modified your notch settings to 0-33, 33-67 and 67-100.

For engine gain, a check of several config files shows :

<sound name="ENGINE" type="diesel3">

<fade-in-time>0</fade-in-time>

<fade-out-time>0</fade-out-time>

<gain>0.8</gain>

<start-sound>

So this is why I could never change the level of the engine sounds, interesting. Need to mod config for <engine-gain>0.8</engine-gain>.

Finally, you have found the VSD guru – Klaus Killinger!

For Klaus: My apologies for not responding to your PM of 11/13. Your RDC mod worked very well. I just got frustrated as I could not replicate your fix. I tried and tried with no success so I took a break from VSD and just ran the trains. My apologies again.

Conrad


 

Hey, Conrad. Thanks for chiming in.? If, on my layout, I even got to speed step 30, I would be violating the speed limit.? I set this up for switching, and it's unlikely to get above 15. That's why I had the settings that I had.? When starting off from 0, the loco would notch up when it hit speed step 2 (or 3, I don't remember now), similar to what you suggested.? But I want to notch the prime mover up sooner than 30, otherwise I would always be in Notch 1.?
I am working on an Alco RS-3 VSD now, and am having some issues.? Next week I'll be able to spend more time and see what's wrong with my work.

Phil in gorgeous Young Harris, Georgia, USA


 

Phil

For lots of VSD info search for VSD on this site.? Klaus is really the goto VSD guy and is very, very helpful.? I think he is in Germany so there is a time delay.

For notching I use speed tables to try and match the speed to the notch sounds.? Thus for switchers I'm going real slow at a speed step of say 50.? The 0,33,67,100 was just a first guess.? One thing to understand is that the accel/decel notch transitions in VSD have a fixed momentum value built in.? So a quick drop of the throttle will "slowly" step the notches down from say notch 5 to idle.? Therefore I try to match this with the loco's decoder momentum settings.?

For your S-1 I have initially set the engine volume to 0.2 and it seems to be a reasonable setting vs. the bell and horn volumes.

I'm an NTraker and don't have an S-1 but I love the sounds of the ALCO 539 in your S-1, and the 539T (turbo) in my S-2 and the 12-251C (also turbo) in my RS-11.? The RS-11 prototype uses a V12 251B turbocharged diesel while mine uses the 12-251C from a C420 loco.? I'm not sure of the difference.

Conrad


 

Conrad,

Am 30.11.2019 um 15:50 schrieb conrad:
For Klaus: My apologies for not responding to your PM of 11/13. Your RDC mod worked very well. I just got frustrated as I could not replicate your fix. I tried and tried with no success so I took a break from VSD and just ran the trains. My apologies again.
Sorry for the confusion.

Yes, I modified the RDC sounds. I did that as usual by cutting the sound files at a zero crossing. Then I sent you the files.

But later I noticed the real reason for the clicks. For short: the RDC files had a wrong length value, which cause the click. Audacity can correct this very easily: open the file, save the file. This doesn't change the file length, but it does correct the data length. Then I sent you this simpler recipe. This background might explain why you can't replicate it.

On the wrong-length-error (not an JMRI error): Matt Harris, author of SoundPro and much more, fixed the error in 2016. Now we have found an example produced by the old error.

Klaus


 

On Sat, Nov 30, 2019 at 05:17 AM, Klaus Killinger wrote:
If I understand this right, you want to be able to start/stop the engine by a throttle function key, e.g. F8. You can do this in config.xml:
<trigger name="ENGINE_STARTSTOP" type="THROTTLE">
<event-name>F8</event-name>
<target-name>ENGINE</target-name>
<action>NOTHING</action>
</trigger>
This must be declared in the tag sound-event name="ENGINE".
Klaus, thanks for this snippet-it works.? I have no idea how the program links this to the Start/Stop action though, and if there is any way to preclude the action if the speed is not zero.

However, the gain parameter is not doing what I think it should do.? I sampled some other sounds to get a better bell, and cannot lower the relative volume without changing the level in the sound file (which in frustration, I finally did).? In my Config file, I have this snippet (notice the 0.1 gain that I thought would make it very soft):
??? <sound name="BELL" type="configurable">
????? <start-file>sounds/Common/Bell-Start.wav</start-file>
????? <mid-file>sounds/Common/Bell-Middle.wav</mid-file>
????? <end-file>sounds/Common/Bell-End.wav</end-file>
????? <start-sound-duration>136</start-sound-duration>
????? <gain>0.1</gain>
??? </sound>
I had wondered: Can there be a negative gain?? Maybe that is my problem: could the gain be 0.0 for no change, positive for louder, and negative for quieter?? As a test, I tried a gain of -2.0, but no change, so I tried -6.0, no change.? So I must be doing something wrong in my code.

Klaus, thanks for your help and Conrad, thanks for your thoughts.

Phil in gorgeous Young Harris, Georgia, USA


 

Am 01.12.2019 um 14:24 schrieb Phil in gorgeous Young Harris via Groups.Io:
If I understand this right, you want to be able to start/stop the engine
by a throttle function key, e.g. F8. You can do this in config.xml:
<trigger name="ENGINE_STARTSTOP" type="THROTTLE">
<event-name>F8</event-name>
<target-name>ENGINE</target-name>
<action>NOTHING</action>
</trigger>
This must be declared in the tag sound-event name="ENGINE".
Klaus, thanks for this snippet-it works.? I have no idea how the program links this to the Start/Stop action though, and if there is any way to preclude the action if the speed is not zero.
There is no link. When I implemented ENGINE_STARTSTOP, I didn't see a simple solution with config.xml. So I programmed a mechanism for function keys.

I have to think about a solution precluding the STOP action at speed > 0. I tend towards a yes-no-option. So there's no solution at the moment.


However, the gain parameter is not doing what I think it should do.? I sampled some other sounds to get a better bell, and cannot lower the relative volume without changing the level in the sound file (which in frustration, I finally did).? In my Config file, I have this snippet (notice the 0.1 gain that I thought would make it very soft):
<sound name="BELL" type="configurable">
<start-file>sounds/Common/Bell-Start.wav</start-file>
<mid-file>sounds/Common/Bell-Middle.wav</mid-file>
<end-file>sounds/Common/Bell-End.wav</end-file>
<start-sound-duration>136</start-sound-duration>
<gain>0.1</gain>
</sound>
I had wondered: Can there be a negative gain?? Maybe that is my problem: could the gain be 0.0 for no change, positive for louder, and negative for quieter?? As a test, I tried a gain of -2.0, but no change, so I tried -6.0, no change.? So I must be doing something wrong in my code.
"gain" can take values from 0.0 to 1.0. If the sound file has a medium volume, this should be sufficient. The Bell sound is e.g. recorded very loudly. I changed the file with Audacity to a medium volume (Effect > Amplify > Amplification (DB): -8). That made it work well.

I understand that such an adaptation can be frustrating. But the experience is growing very fast. For tests I leave the VSD file as a ZIP file. VSD can also read that and it saves a few clicks.

Klaus


 

Phil,

This is slightly off topic of the volume thread but I have to tell you that I have taken your ALCO 539 sounds (w/ bell & horn) and modified my ALCO S2 VSD folder to a new ALCO S1.? ?Although I don't believe there is a S1 switcher made for n scale, running my S2 with you non-turbo 539 diesel sounds good to me.

A couple of points:

1) I don't believe you horn tags for the short horn are correct.? I think you have to have a separate listing for the short horn.
Also the target name for F3 must be different than "Wabco-E2" so as not to conflict with F2, the regular horn.
And, I have not seen a "<short-file>sounds/ ... </short-file>" tag.? Maybe "?<mid-file>sounds/ ... </mid-file>" is correct

<sound name="Wabco-E2" type="configurable">
? ? ? <start-file>sounds/Common/HornStart.wav</start-file>
? ? ? ?<short-file>sounds/Common/HornMiddle.wav</short-file>
? ? ? <end-file>sounds/Common/HornEnd.wav</end-file>

? ? ? <short-file>sounds/Common/HornMiddle.wav</short-file>? Don't think this is correct, either in location or name.

? ? ? <start-sound-duration>136</start-sound-duration>
? ? ? <gain>0.9</gain>
? ? </sound>?

2) After your discussion with Klaus, I went back and modded all my diesel VSD folder diesel3 tags to?<engine-gain>0.2</engine-gain> from <gain>0.8</gain>.
I did not change any function gains (bell, horn, etc.).? This made a big difference in pushing the engine noise somewhat into the background and bringing the functions to the forefront.

Conrad


 

Phil,

JMRI now includes a solution that is intended for JMRI Test Release 4.19.2.

A daily build package is available here:
(package 3584 or higher).

If you want to preclude the STOP at a speed > 0, please declare <action>STOP_AT_ZERO</action>.

Klaus


Am 01.12.2019 um 19:30 schrieb Klaus Killinger:

Am 01.12.2019 um 14:24 schrieb Phil in gorgeous Young Harris via Groups.Io:
If I understand this right, you want to be able to start/stop the engine
by a throttle function key, e.g. F8. You can do this in config.xml:
<trigger name="ENGINE_STARTSTOP" type="THROTTLE">
<event-name>F8</event-name>
<target-name>ENGINE</target-name>
<action>NOTHING</action>
</trigger>
This must be declared in the tag sound-event name="ENGINE".
Klaus, thanks for this snippet-it works.? I have no idea how the program links this to the Start/Stop action though, and if there is any way to preclude the action if the speed is not zero.
There is no link. When I implemented ENGINE_STARTSTOP, I didn't see a simple solution with config.xml. So I programmed a mechanism for function keys.
I have to think about a solution precluding the STOP action at speed > 0. I tend towards a yes-no-option. So there's no solution at the moment.


 

Thanks guys!? A New Year, and I will be back on to this project soon.? Sadly, I am so far detached from the process at this moment that I thought I was reading Greek.? I hope to get back into this next week.

Phil


 

Howdy Klaus. By the way, Happy New Year!

I tried to add the stop at zero line, but I believe I am doing it wrong.? I installed (on Win 10 PC) 4.19.2ish and now get a pop up something like "Must be 0 to start", but the enbgine only starts when auto-started, or clicked on screen, not by my throttle.

In my file, I have this code:
????? <trigger name="ENGINE_STOP" type="FLOAT" valtype="FLOAT">
??????? <event-name>SpeedSetting</event-name>
??????? <target-name>ENGINE</target-name>
??????? <match>0.0</match>
??????? <compare-type>LT</compare-type>??
??? ??? <action>STOP_AT_ZERO</action>
??????? <action>STOP</action>
????? </trigger>

So, maybe I need to replace the STOP action with the STOP_AT_ZERO??

Well, I'll see if I can try after lunch.

Thanks for your amazing contributions!

Phil in gorgeous Young Harris, Georgia, USA


 

Ok, I'm getting closer, but have something simple mixed up somewhere.? I have modified my code and the new code looks like this:
"...
??? <sound-event name="ENGINE" label="Throttle" buttontype="ENGINE">
????? <trigger name="ENGINE_STARTSTOP" type="THROTTLE">
??????? <event-name>F8</event-name>
??????? <target-name>ENGINE</target-name>
??????? <action>NOTHING</action>
????? </trigger>
????? <trigger name="ENGINE_NOTCH" type="THROTTLE">
??????? <event-name>SpeedSetting</event-name>
??????? <target-name>ENGINE</target-name>
??????? <action>CHANGE</action>
????? </trigger>
????? <trigger name="ENGINE_STOP" type="FLOAT" valtype="FLOAT">
??????? <event-name>SpeedSetting</event-name>
??????? <target-name>ENGINE</target-name>
??????? <match>0.0</match>
??????? <compare-type>LT</compare-type>??
??? ??? <action>STOP_AT_ZERO</action>
??????? <!--action>STOP</action-->
????? </trigger>
??? </sound-event>
..."

The F8 key does indeed stop and start my prime mover but it only starts when the speed is 0 but will shutdown anytime I press F8.? I commented out the action>STOP< line and I added the STOP_AT_ZERO.

I am also having to rebuild my Roster every time I start JMRI because I find no engines in the Roster until I do that.? I don't know if that is related to the VSD and when I saved to the Roster, because when I wanted to test a different vsd file, I went into the Roster/Media and deleted the values for the VSD file location and profile so that I could attach a new file and profile to that loco. That is, after making changes to the config file then attempting to test it, I could not find any way to modify what file it looked at (once I saved it to the Roster) other than editing the Roster VSD info.? Even though it said delete the name, it was not easy to do and I deleted the value instead.

Phil


 

Thanks, Phil, and a Happy New Year for you!


Sorry, I wasn't clear enough on the "STOP_AT_ZERO".

This new Action may replace the Action "NOTHING" within the "ENGINE_STARTSTOP" trigger.

Example:
<trigger name="ENGINE_STARTSTOP" type="THROTTLE">
<event-name>F4</event-name>
<target-name>ENGINE</target-name>
<action>STOP_AT_ZERO</action>
</trigger>

You are right, the Engine can only be started when the speed is 0. I haven't changed that. Please make sure to set your throttle to zero. It should not matter whether the engine is started manually or by Auto-Start.

New is the behaviour at Engine Stop. The Action "NOTHING" allows to stop the engine at any speed. The Action "STOP_AT_ZERO" allows stopping only when the speed is zero.

Many thanks for the tests!

Klaus


Am 10.01.2020 um 18:00 schrieb Phil in gorgeous Young Harris via Groups.Io:

Howdy Klaus. By the way, Happy New Year!
I tried to add the stop at zero line, but I believe I am doing it wrong.? I installed (on Win 10 PC) 4.19.2ish and now get a pop up something like "Must be 0 to start", but the enbgine only starts when auto-started, or clicked on screen, not by my throttle.
In my file, I have this code:
<trigger name="ENGINE_STOP" type="FLOAT" valtype="FLOAT">
<event-name>SpeedSetting</event-name>
<target-name>ENGINE</target-name>
<match>0.0</match>
<compare-type>LT</compare-type>
<action>STOP_AT_ZERO</action>
<action>STOP</action>
</trigger>
So, maybe I need to replace the STOP action with the STOP_AT_ZERO?
Well, I'll see if I can try after lunch.
Thanks for your amazing contributions!
Phil in gorgeous Young Harris, Georgia, USA


 

Hi Phil,

Am 11.01.2020 um 04:38 schrieb Phil in gorgeous Young Harris via Groups.Io:
Ok, I'm getting closer, but have something simple mixed up somewhere.? I have modified my code and the new code looks like this:
<snip> ... please see my comments in the previous post


I am also having to rebuild my Roster every time I start JMRI because I find no engines in the Roster until I do that.? I don't know if that is related to the VSD and when I saved to the Roster, because when I wanted to test a different vsd file, I went into the Roster/Media and deleted the values for the VSD file location and profile so that I could attach a new file and profile to that loco. That is, after making changes to the config file then attempting to test it, I could not find any way to modify what file it looked at (once I saved it to the Roster) other than editing the Roster VSD info.? Even though it said delete the name, it was not easy to do and I deleted the value instead.
I've seen it too, but only once in a while. This makes an analysis very difficult. It's possible to add an option ("Perform Action") in JMRI Preferences to rebuild the roster automatically at Start UP. But I haven't done that. Recently I switched from Windows 7 to Windows 10 and I haven't seen it so far. Do you use multiple JMRI profiles?

I have a couple of roster entries for testing. But I also changed VSD values in the Roster/Media, like you described. I also changed VSD values with the help of a Jython script. There are news on the roster interaction by the VSD Auto-Load (an option in VSD Preferences).

So, yes, the need of rebuilding the Roster may be related to VSD. I'll be watching, of course.


Klaus


Phil


 

Klaus, I'm doing OK with volume, now I'm going to start a new topic for the Roster issue (so others may see our journey).

Phil in gorgeous Young Harris, Georgia, USA


 

I posted my VSD file for the Alco 244 (used in the RS3) in my Problems Being Worked On folder.? That is supposed to be a temporary storage, so if you or someone wants to review and comment, I will leave it there for a while.? I also uploaded it to my Google Drive folders and am sharing it using this link:


I have spent hours fixing the audio, only to have it incompatible with the Also 539 that I posted earlier (dissimilar file formats, I presume).? But I can use it as is, and it has pretty smooth transitions between "Notches" both up and down.?

Klaus, thanks again for your contribution to this suite of programs called JMRI.? I had seen the VSD stuff before but did not know I would ever need it.? However, as I said, the remote running of a train using a loco-mounted camera using VSD locally will be my goal.? I now have tested and verified that I can run a remote PC using a TCP/IP connection to the PC running WiThrottle on the layout, and simultaneously run VSD which will receive the commands sent to the (remote) loco on the tracks. Using a wireless throttle connected through JMRI WiThrottle while watching the screen should be awesome (with the sound from VSD).

Phil in gorgeous Young Harris, Georgia, USA


 

Phil,

Am 13.01.2020 um 01:34 schrieb Phil in gorgeous Young Harris via Groups.Io:
I posted my VSD file for the Alco 244 (used in the RS3) in my Problems Being Worked On folder.? That is supposed to be a temporary storage, so if you or someone wants to review and comment, I will leave it there for a while.? I also uploaded it to my Google Drive folders and am sharing it using this link:
Thanks for sharing your VSD file!

I have made two small changes for me that I would like to recommend: the one 9MB large WAV file is not referenced in config.xml, so I removed it from the sounds folder. Second, there is a "umlaut" character in the TXT file, which I changed to "ue" (this is just a precaution).

On the license.txt: Not all sound clips are mentioned in the file. The author of VSD has commented on this topic here:

The protected file area might be the better place for now.


I have spent hours fixing the audio, only to have it incompatible with the Also 539 that I posted earlier (dissimilar file formats, I presume).? But I can use it as is, and it has pretty smooth transitions between "Notches" both up and down.
I like that very much! I think you got the volume and transitions just fine.


Klaus, thanks again for your contribution to this suite of programs called JMRI.? I had seen the VSD stuff before but did not know I would ever need it.? However, as I said, the remote running of a train using a loco-mounted camera using VSD locally will be my goal.? I now have tested and verified that I can run a remote PC using a TCP/IP connection to the PC running WiThrottle on the layout, and simultaneously run VSD which will receive the commands sent to the (remote) loco on the tracks. Using a wireless throttle connected through JMRI WiThrottle while watching the screen should be awesome (with the sound from VSD).
You're welcome, Phil. It looks like you found your use for sound and VSD.

Phil in gorgeous Young Harris, Georgia, USA
Klaus