Tutorial: Creating Seamless Ambient Loops
Last Revision: 19 Aug 2010
This tutorial will show you how easy it is to create a perfectly seamless loop for use as an ambient in your mission. The tutorial uses Audacity, which is a free audio editor, recorder and multitracking program available here from SourceForge. Basic familiarity with Audacity is helpful but not required.

Note that all screenshots below have been reduced in size and quality to fit into the tutorial.
Clicking on any image will open a larger version of the image in a new tab or window.
The initial step is to import the source into Audacity. I usually do that by right-clicking on the MP3 or WAV file, choosing Open with... and then Audacity.

Next, browse the song to find the portion you want to use for the loop. You should use the selection tool to place the cursor, and the space bar to play and pause. Once you've identified where the excerpt should end, click and drag to highlight everything to the right of that point, all the way to the end of the track.

Then, delete it using Delete under the Edit menu (also Ctrl-K or the Delete key).

Now, you need to highlight the area of your excerpt carefully - the beginning will be heard when the ambient first triggers (although it will smoothly transition upon looping), so choose it carefully, at a logical point without a jarring entry.

Cut that section out using Cut under the Edit menu (also Ctrl-X).

Click in the dark grey area below the track to deselect it, then paste in your main loop as a new track using Paste under the Edit menu (also Ctrl-V).

Your loop may be on the bottom; if so, just select it by clicking on the left end (where it says 'Stereo') and then dragging it to the top, as shown above.
Now, you need to highlight the bottom track (what's left of the original imported track), from the very beginning all the way to a point some distance short of the end. I can't tell you how much to leave, as it will vary from project to project. I generally go for 10-15 seconds if I have that much.

Delete the highlighted section as you deleted the end before: Edit > Delete, Ctrl-K or the Delete key.

Change to the Time Shift tool, which looks like a double-ended arrow. Grab the little piece left over from your delete operation, and drag it to match the right end of your excerpt. It will snap in place aligned to that point and a yellow line will appear as shown below.

Change back to the Selection tool and select the entire second track. This is done most easily by simply clicking on the left end of it by 'Stereo' etc. Make this bit fade in by choosing Fade In under the Effects menu.

Remember where this bit came from? It came from immediately before the beginning of your excerpt. What you're creating is a fade-in for the beginning and placing it at the end, which helps create the smooth transition from the end back to the beginning of the loop.

Now, you need to highlight a portion at the end of the first track (your excerpt) which corresponds exactly to the start and end of the second track, which is the short fadeout you just made. Audacity helps you by showing you yellow lines where they line up and snapping the selection, as shown below.

Make this bit fade out by choosing Fade Out under the Effects menu.

You just created, basically, a cross fade at the end of the loop - fading out what was playing and fading in the bit that leads right into the beginning of your loop, at the same time. As a general rule, the longer the crossfade, the smoother the transition and loop will be, but you have to balance that with what sounds good. If the two parts being crossfaded are quite different, then a longer crossfade may sound odd as you're extending the time shared by incongruous selections.

You can now export this to a WAV or MP3 by choosing File > Export. You should also save your Audacity project (which is not an audio file format) in case you want to edit it again later.

You're done! Now just write a schema and listen to your creation in Thief.

You can listen to a sample loop I created using this process here. To appreciate the seamlessness of the loop, listen to it in Audacity (using loop play), iTunes or in game; in my version of Winamp, it stutters so that's not recommended. This track was created using the free MP3 download "Captive" by Scott M2 and Jamie Todd, found at dreamSTATE's website.
(c) 2010 Russ Robbins