How to Create Loopable OGG Files using Ableton Live and foobar2000 (+ Free Video Game Music)

During the task of making loopable OGG versions of the songs from my recently-released album, A Fresh Day, for my son to use in his RPGMaker game project, i figured i’d relate the process here, since it doesn’t seem like there’s a whole lot of good info on the topic available on the web. The process outlined below is probably not the most efficient possible, but it’s been working consistently for me.

Isolating the Loop

I enjoy using Ableton Live for this due to the ease of moving around, zooming in and out, and editing the loop edges. Most of the available online tutorials feature Audacity, whose interface is terrible.

Open up a blank project and drop your track into the arrangement view.
Find the section you want to loop roughly by ear, using Live’s loop brace.

Zoom in to the start and end points of the loop, adjusting it and zooming closer and closer until you see individual sample dots. Place the start and end points exactly on sample points for the most predictable precision, and try to find a spot where both L and R channels land exactly on a zero-crossing (or as closely as possible). After you find what seem like perfect start and end boundaries, always test the loop transition by ear to make sure it sounds good. If you hear a click on the transition, try again!

A loop start set to a sample point on a zero crossing.

⚠️Note that Live has a bug where sets with many tracks placed into arrangement view may not show the sample points when you zoom in closely (something to do with memory limitations?), so if that happens, load fewer tracks.

⚠️TIP: If you are unable to find a sample point that lands exactly on a zero point around the area where you want a loop to start or end, find the closest one you can, then try to match the amount it is “off by” with the opposite boundary. For example, if the start point is a bit above zero, try to find an end point that is a similar amount above zero. This will also help minimize pops by preventing speaker cones from trying to instantly jump from one position to another. You could alternately ignore the sample points and just focus on hitting zero-crossings, but that may lead to an offset playback (and therefore a pop, depending on the waveform) when the OGG completes loops as cued by quantized sample timing.

Rendering Loop Length References

Create an appropriate temporary folder to store the files we’ll need to reference.

Select the loop brace you just created and hit CMD/CTRL-E to slice the intro, loop, and outro into distinct clips.

Select the Intro clip and render it, naming it as such: [songname] – loopstart.

Select the Loop clip and render it, naming it likewise: [songname] – looplength.


OGG files can be used in certain programs (notably the RPGMaker series iterations) to allow a BGM song to loop indefinitely, playing the intro the first time around only (a classic example of this technique being the Final Fantasy battle music). I can’t seem to find a robust list of applications that support OGG looping, but apparently Roblox is one them, at least.

You’ll want to convert your existing mastered WAV or AIF files to OGG. You’ll most likely want them at 44.1kHz and 16bit for maximum compatibility (as rendered out of your DAW, before conversion). I recommend foobar2000 for converting to OGG. You can get the OGG encoder for foobar here.

⚠️New to foobar? Check out the PerforModule article about foobar, with free theme.

To convert files in foobar, select them, right click, and choose Convert. The first time, choose the “…” menu option to create a new go-to preset for Max Quality Ogg Vorbis files; thereafter you’ll be able to quick-select that preset anytime you want to convert.

⚠️Note: some of the most recent batch of tracks i OGGified kept failing to loop properly. I eventually figured out that the tracks had to be re-converted at a lower “Quality” setting, and thereafter they looped properly. So if it happens to you that a track which should loop properly isn’t, try a lower quality setting!

Once you’ve gotten your songs converted to OGG, all you need to do is add tags to them. I recommend foobar once again.

Finding Out Sample Lengths

We need to find out the number of samples (aka sample length — not to be confused with sample rate) of the intro and loop clips we rendered. You can view this info for tracks loaded into foobar by enabling a custom field. To do so,

1. Right-click on the header area in foobar and select Columns > More.

2. Under Custom Columns, click “Add New”.
3. Give it the name “Samples” (or whatever).
4. Under Pattern, type “%length_samples%”

5. Hit OK and you now have a column showing sample length info for any track. Nifty!

⚠️If anyone knows of a way to see the sample lengths of clips directly inside Ableton Live, please let me know! Maybe a Max device can do it? It’s not a huge deal since we’re using foobar anyways, but would streamline the workflow a bit.

Adding Metadata Tags

Drop your sample length reference clips as well as the converted OGG(s) you want to add loop tags to. Select the OGG(s) and hit ALT-ENTER (or right-click and use the context menu) to open up track preferences. You can do this for a single track, or for a batch at once.

Double-click an empty field (or use CTRL-N, or the tools menu) to add a new field, name it as LOOPSTART, and fill in the samples value for the intro clip.

Repeat this process to create another field named LOOPLENGTH and insert for it the value of the loop clip’s number of samples.

Your OGG file now is tagged with the proper metadata of when to loop. Import the track into RPGMaker or whatever application you are using that supports OGG looping and test it out to make sure it works properly.

All done!


Oh, and Here’s Some Free Loopable OGGs

Download loopable OGG versions of all the songs from the album A Fresh Day by Animus Invidious. These i think would be most appropriate for a fantasy setting RPG in the vein of Dragon Quest or Final Fantasy. But you can use them for whatever you want. Just make sure to attach proper credits if you end up using any of them in a released project. Users of RPGMaker2000 (rm2k) back in the day may recognize track 23, a cover of Yohta Kitagami’s Dungeon4.
You can also grab / listen to hi-res uncompressed wav files from bandcamp for free, if you prefer. Individual songs have descriptions on there where you can learn about their background history.

Some ideas for how to use tracks according to various fantasy roleplaying settings:

Overworld: Antares.
Battle: Souldance.
Mystic Library: Land of Dreams.
Dungeon: Mordgrim’s Lament.
Creepy Place: The Sleepers.
Tavern: Frizzid Hymtch.
Poison Swamp: Pensive Acquisition.
Orc Fortress: aushafc.


☮ Peace!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s