¿ªÔÆÌåÓý

Locked Virtual Sound Decoder - Clicks on looped sound files


 

Hello all,? I have had much success with the virtual sound decoder except in one area.? I have created my own decoder config and sound files and am having issues with the Looped throttle notch sounds having a very bad click as each loop restarts.? ?When creating my audio files, I was extremely careful to set my loop points at zero crossing points in the sound waves.? I checked the loop in my sound editor and everything was smooth. I have installed OpenAL as the directions state.? All functions work fine except the click in the output of the looped files.?

Is there a setting that may be causing the sound file to not start exactly at the beginning?
Is this a limitation to the OpenAL or the sound management system?

I noticed in the XML config file, there is a Fade in and Fade out setting.? I assume it is milliseconds.? The example scripts are set to 5.? I tried 0 and 10 with not noticeable changes.?

I also have looked for a reference to the XML commands for the sound decoder and found none.? I learned what I needed by studying the example config files.? ?

Any help here would be greatly appreciated.??
Tim




Timothy Miller


 

Hey Timothy,

It may indeed be something else, something like you hypothesized... but, it might be the nature of the waveform on either side of the zero crossing. ?For example, if the signal is throttling downward towards negativity, and then jumps upward from zero, that ¡®could¡¯ appear to be a digital brick wall.

Or not:),
jim

PS sometimes digitalization doesn¡¯t like a given ¡®clean¡¯ zero crossing... have you tried a different crossing nearby?


 

Hi Timothy,?
While my experience with jmri is very limited (so far), my professional expertise is in the audio realm. It is probably something like the decoder creating an endpoint in the waveform that didn't correspond to your zero crossing. Just chopping it randomly would very likely create a pop.

?If you'd like to email or post the file in question, I'd be happy to examine it for irregularities (if you feel it may be something in your original file).?

Another trick might be creating a cross fade at the suspected end/start point. ?

On Sat, Dec 22, 2018 at 4:19 PM Timothy Miller <tmiller@...> wrote:
Hello all,? I have had much success with the virtual sound decoder except in one area.? I have created my own decoder config and sound files and am having issues with the Looped throttle notch sounds having a very bad click as each loop restarts.? ?When creating my audio files, I was extremely careful to set my loop points at zero crossing points in the sound waves.? I checked the loop in my sound editor and everything was smooth. I have installed OpenAL as the directions state.? All functions work fine except the click in the output of the looped files.?

Is there a setting that may be causing the sound file to not start exactly at the beginning?
Is this a limitation to the OpenAL or the sound management system?

I noticed in the XML config file, there is a Fade in and Fade out setting.? I assume it is milliseconds.? The example scripts are set to 5.? I tried 0 and 10 with not noticeable changes.?

I also have looked for a reference to the XML commands for the sound decoder and found none.? I learned what I needed by studying the example config files.? ?

Any help here would be greatly appreciated.??
Tim




Timothy Miller

--
Andrew Roberts Potomac Sound LLC PO Box 223 Monrovia, MD 21770-0223 (301) 332-6111 Andrew@...


 

Hello Tim,

Creating a clean loop sound could be challenge. I also have the experience that taking a zero crossing point may be insufficient.

Another cause for a "bad click" could be a bug in a JMRI audio library. That issue was resolved in JMRI 4.3.2. So, please update, if you have installed an older version.

On the XML config file.

Right, the fade-in-time and fade-out-time is set in milliseconds. But it's not yet implemented in Diesel sounds.

As a reference to the XML commands may be helpful:
-
-

Have you already tried the EMD_645_Turbo.vsd (for a download see )? There is a slight click on notch 2, but other notches are fine.

Klaus


Am 22.12.2018 um 21:35 schrieb Timothy Miller:

Hello all,? I have had much success with the virtual sound decoder except in one area.? I have created my own decoder config and sound files and am having issues with the Looped throttle notch sounds having a very bad click as each loop restarts.? ?When creating my audio files, I was extremely careful to set my loop points at zero crossing points in the sound waves.? I checked the loop in my sound editor and everything was smooth. I have installed OpenAL as the directions state.? All functions work fine except the click in the output of the looped files.
Is there a setting that may be causing the sound file to not start exactly at the beginning?Is this a limitation to the OpenAL or the sound management system?
I noticed in the XML config file, there is a Fade in and Fade out setting.? I assume it is milliseconds.? The example scripts are set to 5.? I tried 0 and 10 with not noticeable changes.
I also have looked for a reference to the XML commands for the sound decoder and found none.? I learned what I needed by studying the example config files.
Any help here would be greatly appreciated.??Tim
Timothy Miller


 

Klaus,? I am pretty confident that my loops are working.? You are correct that it is not just the zero crossing that is important.? I analyzed the whole wave form and created my loops by matching the wave patterns also.? KInd of like matching wall paper seams.??

I did try to just simply make the loops longer, figuring that with a 6 second loop the click would not be so bothersome.? However the .vsd file is now about 12 MB and will not load.? Is there a size limit to the sound files that the VSD can handle?? Or, does the system simply run off the hardware specs of the computer?

Tim


 

Tim,

Beside the diesel notch loops there are also loops for horn or whistles sounds in existing VSD files, and they are working fine. So, it's doable. Maybe the experts Jim and Andrew could give an advice.

My largest VSD file was about 6 MB. No issue with loading. I don't see a limitation in the file size. The computer also shouldn't be a limitation. The number of buffers (255) could be a limitation. In steam sound each "Add Decoder" increases the number of allocated buffers and I already had errors on loading time.

Diesel sound reuses buffers. Each engine notch sound is divided in sound bites of 250 milliseconds. You can see it in the log file when DEBUG is enabled (add the line "log4j.category.jmri.jmrit.vsdecoder.Diesel3Sound=DEBUG" in the file default.lcf).

I recommend in any case to have a look at the log file (main menu "Help", then click on "System console").

Klaus


Am 26.12.2018 um 17:15 schrieb Timothy Miller:

Klaus,? I am pretty confident that my loops are working.? You are correct that it is not just the zero crossing that is important.? I analyzed the whole wave form and created my loops by matching the wave patterns also.? KInd of like matching wall paper seams.
I did try to just simply make the loops longer, figuring that with a 6 second loop the click would not be so bothersome.? However the .vsd file is now about 12 MB and will not load.? Is there a size limit to the sound files that the VSD can handle?? Or, does the system simply run off the hardware specs of the computer?
Tim


 

Tim,

One more point.

Engine sounds (start-sound, shutdown-sound and notch-sounds) _must_ have the same audio format. The format should be either 8-bit-mono or 16-bit-mono, but not a mixture.

Klaus


 

I just found this site.? I was working? on VSD last year and made great progress and am getting ready to go at it again this fall and winter.? I have some 20 files, diesel, electric and steam; all based on the framework of the original vsd files.? AND I also have clicking on looped sound files.? Not with bells, whistles, etc. - only with the "idle" and the notch sounds.? ?I circumvented this problem on the electric locos by not using the motor file(s) but instead using a blower sound relabeled as motor.? As I understand it, electrics don't notch.??For diesel and steam I stuck with the original vsd files, adjusted the notch points and added different bells, horns, pumps, etc.? If interested, I can hopefully find my computer notes and give a detailed report on my method.? I use SPJHelper, WavePad Sound Editor and XML Copy Editor to obtain the wav files and manipulate the vsd files.? All wave files are PCM, uncompressed, 11025 Hz ?sampled?, 8 bit, mono.?

Looking at this thread I don't think the problem was solved.? However, VSD is very good (sans clicking).? It's a really great way to fill the room with sound for my "hollow core door", n scale layout.? It works seamlessly with JMRI and Engine Driver.? ?

Conrad


 

looping sounds can be somewhat problematic. As already stated, wave files mst be the same format to avoid problems. Another thing that may help is to establish the? cut in/ cut out points in the wave file when the wave line (in the waveform chart) crosses the zero. This not always guarantees a click free looped sound if the cut point is not positioned at the right spot. Sounds usually have recurring patterns which should be graphically detected in the waveform and the cuts should be strictly made at the beginnings/ ends of these patterns. Sais that, it'snot exact science and results may vary depeidning onthe chosen sound. I already had great success AND big failures at this.
Fiddling is your best ally.

Roberto


 

Roberto,

Thanks for the reply.? Looks like i will have to delve deeper into my WavePad Sound Editor program.? As of now I only use it to verify the wav format and listen to the sound.

That's the excitement of this hobby.? I've learned a little about HTML editing and now on to sound editing.? ?Of course, as is said, a little knowledge is a dangerous thing!

Conrad


 

Hey Conrad,

Roberto gave you good advice, the right advice, I¡¯ll just add a couple things since you¡¯re so excited:).

First, even a perfect loop point will change after conversion to another file format, or the same file format at different sampling and/or bit rates! ?You must do your editing at the destination format to ever have a chance of avoiding pops or clicks.

Second, digital (especially wave) formats operate at very quick sampling rates. ?So even if both ends are at zero crossing, when one end is heading down to zero, if the other end abruptly heads back upward you can create a brick wall effect, an abrupt change, a pop or click. ?This is less likely if both ends are at zero (or even just at the exact same point and direction of swing), but it¡¯s always good editing etiquette to make an edit or loop point graceful:).

But no matter how beautiful the transition, don¡¯t convert after the fact. ?I think the VSD player allows you to load multiple bit/sampling rate files, but it¡¯s alway best to use the best rates when editing AND loading... and best to keep all files at the same rates throughout. ?Even if your original source files are at a lower rate, convert them up first. ?They won¡¯t sound any better than their original rates, but they will work and play well together:).
Hope this helps, and holler if it doesn¡¯t,
jim:)


 

Conrad,

Welcome to VSD!

Thanks for your report and for your offer. Yes, I'm interested in your method and some details. But I use Audacity instead of WavePad.

Roberto and Jim, many thanks for the good advice. Very helpful to repair the root cause for the "pops or clicks".

Just to give an example of a click: lets take EMD_645_Turbo.vsd - notch1 (idle sound) sounds pretty good for me, but there is a click in notch2.
Conrad, do you have clicks in all notch or idle sounds?

Another cause might be restarts of the VSD player. They sound different, because there is a short sound gap associated. Easy to hear on Diesel sounds, more difficult in Steam sounds. For example, I noticed such restarts the first time I run VSD on a "Raspberry Pi 3 B+". But it turns out that it was a configuration issue concerning my sound card. Restarts are reported in JMRI session.log.

VSD right now doesn't support Electric engine sound. I have no experience here. Should VSD support Electric engines?

Regards,
Klaus


 

Thanks for the inputs.? ?My wife and I are off to watch the grandkids so I will be working on a response maybe this weekend or next week.? I'm old (75) and it's been a few months since I modified the VSD files, so I need to refresh my memory (what's left of it).? I have been using and enjoying the sounds all summer with my layout.

One question - how do I send files to this site?? or where are the instructions to do it?

conrad

PS I have electrics - ACELA HHP8, Alpine Express, AEM7, DB401, GG1 and Shinkansen? (all made by me without any notching)


 

Conrad,

You can upload to the VSD section in files at:

/g/jmriusers/files/VSD

Hope that helps.

Oh, and I'll come back with some thoughts surrounding the 'clicking' etc. a bit later.

Best regards,

Matt H


 

Klaus,

You are correct, I do have a click in notch 2.? my mod consisted of making a separate EMD645 file by removing all the other locos and changing the notch setting points to 10, 20, 30 & 100.? My note says it "works perfectly" but it does have the click at notch 2.? I also now see that the original notched at different points when accelerating and decelerating.? I don't know if what I did is prototypical.

Per Matt H's instruction, I've sent the vsd file to?/g/jmriusers/files/VSD

Conrad


 

Tried to upload but it failed twice.? First try was through the "browse" window, second with a "drag" move.? Program (not computer) locked up.

Conrad


 

Am 02.09.2019 um 16:13 schrieb conradandrose:
Tried to upload but it failed twice.? First try was through the "browse" window, second with a "drag" move.? Program (not computer) locked up.
Conrad,

Please try it again. I could upload (and "Add") a VSD file. The upload takes a minute or so, VSD files can get large.

Regards,
Klaus


 

I looked at the EMD645 file again. ( By the way this file can be downloaded at ).

I left the setting points unchanged, due to lack of experience.

When I loop the notch2 file (D1.wav) with Audacity, there is no click. So, where does the click come from? VSD cuts each notch file into small pieces, which allows a faster reaction to throttle changes. The last piece of D1.wav is conspicuously short and, I think, causes the click.

Then I shortened the notch2 file a bit, created the VSD file EMD_645_Turbo2.vsd and uploaded it to /g/jmriusers/files/VSD . Now I can hear to two different noises, but they are also in the original D1.wav.

Regards,
Klaus


Am 02.09.2019 um 16:02 schrieb conradandrose:

You are correct, I do have a click in notch 2.? my mod consisted of making a separate EMD645 file by removing all the other locos and changing the notch setting points to 10, 20, 30 & 100.? My note says it "works perfectly" but it does have the click at notch 2.? I also now see that the original notched at different points when accelerating and decelerating.? I don't know if what I did is prototypical.
Per Matt H's instruction, I've sent the vsd file to/g/jmriusers/files/VSD (/g/jmriusers/files/VSD )


 

Klaus,

I downloaded your 645 file and it played perfectly.? Thank you.? However, when i installed the D1 wav file into my 645 program i got nowhere.? Even after i corrected several of my typo error the sound went dead at notch 2.? So i ran your wav file thru my WavePad Sound Editor (played ok and is correct format) and tried again. same problem.? if i quickly run the throttle past notch 2 the rest of the notches play but i can't got back or cross notch 2 without a lockup.

I'll take a break from this to clear my mind.??

And, still no luck in uploading. i get, via browse, the file.? it appears in the "drag & paste" window (5.19 mb) with "loading file 1 of 1" and ..............? nothing.? just looks like a lockup.? ?oh well. my next attempt will be on another computer.

conrad


 

Klaus,

Upload worked on second computer.? Of course it is on my 645 dropbox file. not the latest, no notes and maybe a funny thing with click-clack.? It does have the 5 notches though.

Finally,

Conrad