Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

Sign up now

Audio loop creation question

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 Panphobia   Members   


Posted 17 November 2013 - 01:01 PM

Hello, I am pretty new to game audio, and I am trying to make an ambient loop. 


I am wondering, to make a seemless loop from a stereo file, is it standard to: have 3 files (intro, middle , and end loops?) or to have just one file which begins without a zero crossing with the understanding that whoever implements the file will start and stop the thing with fades?


I am using midi, and a method where you basically repeat the sequence 3 times and use just the middle for a seamless loop.  However since the piece has a drone-like sound, making a short fade at the beginning and end of the loop causes a drastic volume change and a pop/click (even with a really short fade, like 20 samples).  It is a stereo file so there is no chance to get a zero crossing in both channels.  It has a continuous volume sound, so a long fade makes the loop point very obvious.


I can get it to sound great if I don't worry about making a zero crossing.  But is this a problem for people who will end up using the file?


BTW, I am planning to sell the track on licencing sites such as audiomicro or wherever.  Not sure if that matters, but if I was working with a developer directly then I would just ask them what they wanted.


Thanks for any help!

#2 Samith   Members   


Posted 17 November 2013 - 01:54 PM

I can't remember ever seeing anyone use three different files for an intro, loop and end. Typically I see single audio file with loop points set. For example, a 5 second audio file could have a loop point set at 0.4s and 4.6s, and when you start playing the file it starts from 0.0s, then once it gets to 4.6s it loops back to 0.4s and continues that way. 


Some other types of sounds don't really need an intro/ending and are fine just as standalone looping samples that the audio engineer knows to fade in and out appropriately. I wouldn't bother with adding intro/outro sections to an audio file if all those sections are doing is fading the volume in/out. In that case, I think the standalone looping sample will be sufficient for the developer.

#3 Panphobia   Members   


Posted 17 November 2013 - 06:18 PM

Ok, thanks Samith!

#4 IK-Sound   Members   


Posted 18 November 2013 - 02:44 AM

Panphobia, or you can make long fade-out at the end of the track (approx. 1,5 sec) and short fade-in at the beginning (approx 0,5-0,6 sec). Then cut the fading end and mix it into the beginning. You can vary the fade length due to your taste smile.png

Edited by IK-Sound, 18 November 2013 - 02:45 AM.

Arthur Baryshev

Music composer, sound designer, producer





#5 bschmidt1962   Members   


Posted 18 November 2013 - 10:36 AM

One other hugely important thing is what format they want you to deliver the sound in.  Is it straight PCM, or does it need to be compressed?  Getting smooth loops in a compressed sound is a whole 'nother ball of wax.


If straight PCM, does their system support loop points of the type Samith described?  If not, they'll need to write some code to do it.


Yea, getting smooth loops, whether for music or ambiance is quite tricky, and one of the interesting challenges of game audio.


One other trick is to create two semi-long loops that aren't the same length and tell the programmer to start playing them at the same time.  If (for example) one is 11 seconds and the other is 13 seconds, the resulting loop will be 143 seconds long (11x13)*.  An advantage of that method is that the sounds cover up each other's loop points...


Regardless of what technique you use (IK-Sound or Samith), first check with the programmer to make sure that they are able to play back the sound as you intend


*If you remember your middle-school math, you want the lengths of your loops to be "relative primes" with each other.

Brian Schmidt

Executive Director, GameSoundCon:

GameSoundCon 2016:September  27-28, Los Angeles, CA



Founder, Brian Schmidt Studios, LLC

Music Composition & Sound Design

Audio Technology Consultant

#6 Panphobia   Members   


Posted 18 November 2013 - 12:48 PM

Thanks for the tips guys, this is really helpful.


The loop is being uploaded as .wav, and will be uploaded to various websites in the future to be licensed by whoever wants the track.  This kinda makes it difficult to know what people will want.


Getting the loop to sound good is not really the problem, but as Samith said having a non-zero crossing at the beginning shouldn't be a problem as any editor would know to fade in.


The method I use to loop for this particular piece is to just copy the entire midi sequence (all tracks) 3 times, put markers at the loop points, then trim to the markers after I have rendered the audio file.  The reverb tails etc. all blend quite nicely with this method, but since the track has a constant drone sound, making a loop with a short fade in is not so easy to do and have the loop point sound seamless.


But from what you folks are saying, most people will know how to implement the track and it is not necessary to have a zero crossing.  I just don't want to upload a track that isn't up to snuff.


Thanks so much again for helping a noob out!

#7 jms bc   Members   


Posted 21 November 2013 - 01:42 PM

Remarking as a recent shopper -- I couldn't find anything that looped properly as-sold, but I've had no problems editing the sounds so that beginning and end mesh well provided the volume is close to constant (yeah there is often a low freq envelope to deal with but tinkering/normalization/filtering seems to work in most cases)


If a game object has a constant droning sound then the game engine will fade in/out the sound as a function of distance between camera and object.


If there are distinct stages, like a start, stop, and a steady drone in between (like an engine--starting, running for awhile, then stopping), I handle that with code, detecting the change in state and switching the sound being played.


Some of the game engines out there might handle some of these details, I don't know.


I'm not aware of a format that has these loop-points as described above but I would like to learn more about it if it exists.


Most important to me is the waveform. If it is the sound I want, I'm happy to make a drone out of it, or add attack/decay to suit my purpose.

The Four Horsemen of Happiness have left.

#8 Panphobia   Members   


Posted 22 November 2013 - 10:13 AM

Thanks jms.  Yeah, to get a perfect loop I will need the file to not have a zero crossing, or in other words if it it played raw it will have a click at the beginning because the file is telling the speaker cones to jump to a non-zero position.  However, if faded in and looped with itself, it will sound normal.  I just didn't know what the expectation was.  But it seems from your response that most users will know to fade in, or this will be done automatically.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.