r/GameAudio • u/Eat-the-rich33 • 25d ago
Help: Music Looping Tips
I hace recently gotten into composing for games and am participating in my second game jam. I need some advice on how to loop music effectively. I dont know any middleware yet so I am relying on the programmers to input it into our small game for the game jam where time is already limited. How can I bounce my track so that it loops effectively? Do I bounce it with the audio tail at the end or have it cut off right at the end? Any tips on how to go about this and how it works?
2
u/paul_sb76 25d ago
Here's another option: export your loop dry and don't worry about tails. Add the time based effects (reverb / delay) in the game engine. This has the added benefit that you can make the reverb depend on the environment. Downside is that you lose some control (the game engine reverb doesn't sound exactly like your favorite plugin), and that reverb is applied to everything equally (also to e.g. bass), unless you export two parallel loops (wet and dry).
1
u/GuntherHogmoney 25d ago
The down and dirtiest way is to copy it three times and take the middle loop. This won’t work if you need to branch into branching tracks, but if it’s a game jam, you’re probably doing it quick. Fade it in and out too.
1
u/Eat-the-rich33 25d ago
Genius! You don’t think it would sound weird if the track starts with the ending’s audio tail?
2
1
u/The-Jasmine-Dragon 25d ago
Depends what engine you’re using, but most of the modern ones will let you specify loop points! You can tell the programmer where in the track the loop should begin and end.
1
u/Eat-the-rich33 25d ago
So like bounce with the audio tail and they decide where it loops? Like for instance I have a track that ends in a build so I feel like it would sound weird if everything just cuts off when the loop restarts. Will an engine play the tail but restart the loop simultaneously?
2
u/The-Jasmine-Dragon 25d ago
Depends on the engine, tbh! Some can do that, some can't (as easily). You may want to think about how you're going to do an outro as well!
1
u/BeneficialContract16 24d ago
It depends on the track. For example if it starts and ends with the beat, as long as the measures are exact when you end at the end of the measure the beat should loop seamlessly.
Another option is if the melody ends and starts again at the beginning of the track then a very small moment of silence at the end will make it loop nicely.
1
u/benk86 24d ago
Depends on track, but often I use two separate files for looping - Intro and Loop.
Intro is well, intro, which plays only once and after that loop starts. With that you can mask tails when the loop plays for the first time.
Also starting and finishing loop with the same instrument or note or anything else (again, depends on your track) helps a lot.
1
1
u/WrittenWaveform 20d ago
Make sure the start and the end of the track is cut at zero crossing. Cheers :)
1
u/impulsenine 20d ago
One of the things I love about Reaper DAW: Second Pass Rendering. I use it for all my looping.
1
u/composingkeys 19d ago
Bounce it with the tail, but don't leave the tail at the end. Cut it off the end and mix it into the very start of the file instead. That way the loop carries its own ring-out and your programmers only have to tick loop on the audio source, no code, which for a jam is exactly what you want.
How I do it: pick your loop point on a downbeat and make sure the music actually leads back to the top. Render past the loop end so the last notes and the reverb ring out completely. Then in your DAW, take everything after the loop point, drag it to the start of the track, and tuck it under the opening. Trim the file so it ends exactly at the loop point. One file, loops forever, the tail survives the jump.
Two things to watch. Trim exactly on the grid, if the length is even slightly off it drifts or clicks. And don't fade the end, the fade is the gap people hear.
To test it, put two copies back to back in your DAW and listen across the join. If that sounds seamless it will loop seamlessly in the game.
Only real tradeoff: the very first playthrough opens with a bit of ring-out from a pass that never happened. In a dense mix nobody notices. If your intro is sparse, just lower that baked tail under the opening until it disappears.
6
u/LoooseyGooose 25d ago
Every composer should be able to deliver seamlessly looping stand-alone WAV files, so you're asking a good question.
The most basic approach is to use the "tail to front" method:
This is guaranteed to give you a seamless loop....
However, the first time it plays will probably sound awkward when it starts.
This awkward first-time start may not be an issue or be seen as intrusive. Especially for a game jam, this is probably "fine."
Additionally, thinking "big" picture about the audio... Whatever happened that triggered the music to start playing is rather likely to have also triggered playback of a sound effect. This will "mask" the start of the loop this first time.
To solve this without relying on SFX, there are additional editing techniques... but those would be little tedious to describe here and rely a lot on context, experience, and practice.
You can make things "easier" by composing the loop in such a way that the musical material at the start is the same as at the end, such as using a "vamp" to bookend the piece.