Page 1 of 1

How to edit .wav file to loop correctly?

Unread postPosted: Sun Mar 12, 2017 7:42 am
by ChrisOnline
Can anyone help me here?

This is a (UK) loco with a SINGLE horn sound, NOT a set of three with start, loop, and end.

But the original .dav file loops smoothly, no breaks or wavering, when holding down the spacebar.

1. I convert the .dav to a .wav, and point the proxyxmal file to the .wav. The looping still performs fine, so converting to .wav is not the problem.

2. I edit the .wav file (changing the pitch), and re-export it. The changed pitch is fine, so the edit worked, and TS sees it and uses it fine.

3. BUT the looping now doesn't work right. It does loop as before, but now there are gaps between each loop (presumably because it is looping the whole file, not a specific part of it)

4. I tried converting the edited .wav back to .dav, but same result

So the question is, how to I get the EDITED .wav file to loop correctly with a smooth seamless sound? I assume it is in the settings in the second part of the proxyxml file, but I can't make any sense of them, and I cannot find any guidance anywhere

Can someone help please?

Re: How to edit .wav file to loop correctly?

Unread postPosted: Sun Mar 12, 2017 8:06 am
by ET44C4
What program do you use? When using Audacity, I put my sound into the program. After creating a "loop" sound I will go over to the "Effect" tap and choose the "Repeat" option. I will let it repeat 10 times (which you can change) and see if there is any problems. I have had this problem multiple times where the sound has a gap between loops. What you can do is locate a gap in the program and fix it buy removing the silence. Now repeat the two sounds without a gap and delete the rest (if you chose to repeat more than once). Now repeat the two sounds with the fixed loop and now it should be fixed.

I would like to ask you a question also. How did you convert a .dav to .wav? What program can do that?

Hope everything gets figured out.

Re: How to edit .wav file to loop correctly?

Unread postPosted: Sun Mar 12, 2017 8:10 am
by buzz456
DavDecoder is the simplest one to use.

https://www.railsimulator.net/wsif/inde ... avdecoder/

Re: How to edit .wav file to loop correctly?

Unread postPosted: Sun Mar 12, 2017 8:12 am
by ET44C4
buzz456 wrote:DavDecoder is the simplest one to use.

Ah okay thanks for letting me know.

Re: How to edit .wav file to loop correctly?

Unread postPosted: Sun Mar 12, 2017 8:41 am
by ChrisOnline
ET44C4 wrote:What program do you use? When using Audacity, I put my sound into the program. After creating a "loop" sound I will go over to the "Effect" tap and choose the "Repeat" option. I will let it repeat 10 times (which you can change) and see if there is any problems. I have had this problem multiple times where the sound has a gap between loops. What you can do is locate a gap in the program and fix it buy removing the silence. Now repeat the two sounds without a gap and delete the rest (if you chose to repeat more than once). Now repeat the two sounds with the fixed loop and now it should be fixed.

I would like to ask you a question also. How did you convert a .dav to .wav?


Yes, I also use DavDecoder (which also will convert back, you just have to overrule the default formats it offers as it assumes it is converting the other way)

Unfortunately your solution for looping doesn't work here, as this is a single sound file which includes a split second of "silence onto rising volume" at the beginning and "fading volume into silence" at the end (i.e. instead of a set of three files: start, loop, and end). Hence the looping being stilted as it passes the short "silent" part each time. If I edit it to remove those silences, then a "short blast" on the horn sounds really bad.

I believe the original .dav file contains "marks" that tell it the start and end points of the "loop", but they must get lost in editing. They clearly do NOT get lost on converting from .dav to .wav, as the UNEDITED .wav file still loops perfectly. The problem is once it has been edited.

So THAT is the mystery . . .

Re: How to edit .wav file to loop correctly?

Unread postPosted: Sun Mar 12, 2017 9:02 am
by ET44C4
ChrisOnline wrote:
ET44C4 wrote:What program do you use? When using Audacity, I put my sound into the program. After creating a "loop" sound I will go over to the "Effect" tap and choose the "Repeat" option. I will let it repeat 10 times (which you can change) and see if there is any problems. I have had this problem multiple times where the sound has a gap between loops. What you can do is locate a gap in the program and fix it buy removing the silence. Now repeat the two sounds without a gap and delete the rest (if you chose to repeat more than once). Now repeat the two sounds with the fixed loop and now it should be fixed.

I would like to ask you a question also. How did you convert a .dav to .wav?


Yes, I also use DavDecoder (which also will convert back, you just have to overrule the default formats it offers as it assumes it is converting the other way)

Unfortunately your solution for looping doesn't work here, as this is a single sound file which includes a split second of "silence onto rising volume" at the beginning and "fading volume into silence" at the end (i.e. instead of a set of three files: start, loop, and end). Hence the looping being stilted as it passes the short "silent" part each time. If I edit it to remove those silences, then a "short blast" on the horn sounds really bad.

I believe the original .dav file contains "marks" that tell it the start and end points of the "loop", but they must get lost in editing. They clearly do NOT get lost on converting from .dav to .wav, as the UNEDITED .wav file still loops perfectly. The problem is once it has been edited.

So THAT is the mystery . . .

Hum... Quite an interesting predicament. I wish I could further help, but I don't think I can. I apologize. !!**sorry**!!

Re: How to edit .wav file to loop correctly?

Unread postPosted: Sun Mar 12, 2017 9:14 am
by ChrisOnline
ET44C4 wrote:[Hum... Quite an interesting predicament. I wish I could further help, but I don't thing I can. I apologize. !!**sorry**!!

No problem, thanks for trying! I hope someone else is familiar with the process