Sound loop points for on/repeat/off sounds - like horns

General discussion about Train Simulator, your thoughts, questions, news and views!

Moderator: Moderators

Locked
User avatar
chrisell
Well Established Forum Member
Posts: 533
Joined: Mon May 06, 2002 12:00 am
Location: England, Holland and America
Contact:

Sound loop points for on/repeat/off sounds - like horns

Post by chrisell »

I might be a bit late to the party on this one, but I discovered something today that solves a problem I've had for years.
For sounds like horns, where they normally have very distinct attack (start) and decay (end) sounds, but loop in the middle, I've never found a good solution. Hacky solutions included not looping at all, or making three sounds with an instance group in the blueprint editor that tried to let the start sound play, then the middle, then the end - that never worked at all.
Skip forwards 5 years and today I discovered almost by accident that TS20xx supports loop points inside the WAV audio files.
Loop points are exactly what they sound like - they're start- end end-points inside the main waveform that create a continous loop between them.

So to make a horn that has attack, loop and delay sounds, that allows the player to have the horn sound for as long as they want, you get a single sample of the complete horn - on, long blast, off. Edit it in your favourite sound editor (I use Audacity, mostly) and when you're ready, open it in Wavosaur (another free audio editor - I use this for loop points because audacity doesn't support them). In there you can drag a selection and start playing the sound looped, so you can drag the start and end points of the selection until you get a decent loop without clicks, pops or other odd artifacts. Once you're happy, select Tools -> Loop -> Create Loop points. Then save the file.
looppoints.jpg
In the blueprint editor, in the sound proxy where the horn is (or whatever sound you're making) create a sound that is flagged as "looped" and in the sound definition, and then create a controlled loop and an instance group. Make the controlled loop use the instance group, and make the instance group have a single instance and "stop newest":
looppoints2.jpg
When you use this in-game, the first part of the sound plays when the sound is activated, then it loops for as long as the sound is playing, then it plays the end part of the sound when the sound is stopped.

Yeah - like I said - might be late to the party but if nothing else, this topic is here for future googlers.
jstange
Very Active Forum Member
Posts: 1847
Joined: Wed Apr 04, 2012 5:46 pm

Re: Sound loop points for on/repeat/off sounds - like horns

Post by jstange »

Hello Chris,

this is quite known I guess - many models use it. HRQ Taurus is one of them; I know it because I was once improving its cooling sound and it was using these loop points.

But it's still a great post for those not aware of this.
User avatar
TrabantDeLuxe
Been on the forums for a while
Posts: 190
Joined: Fri Feb 20, 2015 6:10 pm

Re: Sound loop points for on/repeat/off sounds - like horns

Post by TrabantDeLuxe »

Did hear about loop points, but it's good to see some reference. Thanks! Might be a good idea to document this stuff on your website ;).
Locked

Return to “[TS] General Discussion”