Exporting seamless loops

I’m working on sound effects for video games.

A great thing in Ardour is I can export multiple files at once defined by CD ranges (maybe they should be renamed to export ranges at some point BTW?).

What I miss however is the ability to export seamless loops.

I usually have to coerect the exported files in Audacity to achieve gapless playback in the game.

I think this could work as follows:

CD ranges could have a “Seamless” option. If it’s activated - Ardour renders out a bit of the audio after the range is over, and then mix this tail back to the front of the sound effect, optionally performing a crossfade. This is what I’d have to do manually in Audacity to ensure seamless looping of my sounds.

User shuold be able to define if there’s going to be a crossfade or not.

No crossfade:
Tail is just mixed to the start without any attenuation.

With crossfade:
Tail is being cross-faded with the head of the export over a pre-defined duration.

User should be able to define how long the tail is, - possibly with an additional visual marker connected to the CD range. Crossfading should also be denoted.

An obvious problem that may occur here is that after this operaton is performed, there might be clipping or other volume spikes not accounted for by the master bus processing.

I am not sure how to avoid this without breaking the seam, other than with normalisation (like Ardour already does).

I am thiking if it’d be possible for me to use soemthing like Sox to post-proces the sounds to loop them, but an in-Ardour implementation would be very nice, as the user could easily tune the looping to each individual export range.

This would not only be useful for sound effects, but also for looped game music and stems for use in live loopers.

Here’s a little mockup:

What do you think abotu this?

Is it possible to do this with a Lua script?

I think I would disagree with the premise sadly.

Generally I would consider a true seemless loop one that does not need mixing or crossfading. I use this often in theater for instance to vamp as needed. This usually requires a few things from the loop, watching effects like reverb in particular can be needed. But generally a I would consider a true loop one that could have an independent tail and head, or loop into itself. I am not sure your suggestion addresses this as much as masks this.

For instance if I have your ‘looped with mixing’ or ‘looped with crossfade’ (To a lesser extent) then I can’t just add the head that was before the loop, or even just start the loop raw without feeling like I missed something at the top.

To give an example, if I go to premiumbeat.com and look at most of the loops of songs there, those loops require nothing but duplication to loop correctly in most cases. If I grab a loop out of a full track and vamp it in QLab, it requires no mixing like you are describing for a truly good loop, it just works and flows smoothly into the next section when I stop the vamp. If I have issues that would require mixing like you describe I feel like it means I need a different section or piece of music to loop then.

If we did your solution I am not sure that would solve the issue, as much as mask the issue, and I feel like the issue is the way the music is composed. Note that I am not saying that it is bad, but rather that it wasn’t written with that in mind.

By the way, I would agree that for special cases a lua script might be an answer, or even a post export script with ranges and a basic script that automatically does what you are looking for.


I understand where you’re coming from, but in practice I’ve been using the exact functionality @unfa described in another DAW for years with great success. It’s a really well working basic solution for seamless looping.

Let me ask though, was this to take the loop into another piece of software and assemble it dynamically there (Audio engine for game or theatrical playback engine for instance, or even live looping solution) to be preceeded or followed by something that is not the loop? Or was it to create a seemless loop to assemble in a DAW? I would consider those two different needs, I am focused more on the first in my response.


Seamless loops for either listening, or for in-game music.

Ok Fair enough on the latter one. I personally do not find this approach suitable for dynamic assembly needed for game audio (Which admittedly it has been a long time since I have done that/virtual worlds audio) or theatrical audio, but to each their own.


This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.