Magazine Archive

Home -> Magazines -> Issues -> Articles in this issue -> View

The Art of Looping (Part 2)

In the second part in our series on successful sample looping Chris Meyer concentrates on the mysteries and subtleties of crossfade looping.

The story so far: your sampler is loaded, loop points poised for action; crossfade looping could be the only thing left between you and a seamless sound.

AS YOU'LL HAVE gathered, the gentle art of looping is not an easy art to master. It requires lots of patience and a good deal of cunning. And despite all that, there are some samples that simply refuse to have a glitch-free loop imposed upon them.

Remember, a loop is all about repeating a sound over and over again. The sound at the loop splice points must be identical for the loop to be undetectable. In the case of unidirectional ("forwards only") loops, the sound must flow cleanly from the loop end to the loop start. In the case of bidirectional ("backwards/forwards") loops, the sound must flow cleanly from forwards to backwards at the loop points.

To recap on why a loop may have a glitch, there are two possible culprits. First, there may be uneven amplitudes (instantaneous levels of the sample) at the splice point where the loops are supposed to join. Most samplers, fortunately, have built-in software tools in the form of zero-crossing detectors to help overcome this (because zero level always matches up with zero level, for instance).

The second cause of glitching is harder to deal with. Even if zero-crossings are found, the sample may still be different at the two loop points - modulation in the looped signal also needs to have continuity if the loop is to be smooth. The autocorrelation software routines in some samplers help a bit, but some loops simply can't be tamed. Where the loop cannot be perfected the sound itself may be modified to make it work. I often find myself using crossfade looping to make a good loop that much better.

This involves making the sound on the two sides of the loop splice as compatible as possible. The sound should evolve into an "optimum" waveform at the loop seam and then fade back to its natural form, thus reducing discontinuities while retaining as much of the sound's character as possible. This "optimum" waveform is created by cross-feeding information from both sides of the loop splice - hence the name "crossfade looping".

Unidirectional Crossfading

FORWARDS ONLY LOOPS are most common, because they are easier to make work in their own right (for the inherent problems with backwards/forwards loops, see last month's Art of Looping). We'll deal with these first.

The classic unidirectional crossfade waveform involves the information at both loop points being an even mix of what was originally at the two loop points. To create the new sample, the waveform starts fading in over the original sample somewhere before the loop start point, whilst the original sample fades back in at an equal point ahead of the loop end point. The result is a new sample which starts and ends as the original, but is altered in and around the loop portion.

To illustrate this, take a look at Figure 1. The diagram shows a sample where the sound is consistent for the first half, and silent for the second half. The loop points are placed quarter of the way into the sound from both ends - in other words, in the exact middle of the two different portions of the sound.

Figure 2 shows what the sound looks like after it has been crossfaded. With this particular sample, it's very easy to see how the crossfade is progressing before and after the loop points, with the sound being exactly the same at the loop points.

Crossfading obviously needs portions of the sound before and after the loop points to "fold back" into the body of the sound. If the loop points are too close to the ends of the sound (or to each other), there is less material to fold back in and so the crossfade has to be shorter (see Figure 3). If the sound is radically different at the two loop points (as in the example), the shorter crossfade is much more abrupt and ultimately less successful as far as the ear is concerned. The point is that loop point spacing is more critical with crossfade looping, since it limits how long the crossfade can be.

Figure 4 illustrates a second form of unidirectional crossfade looping that is a little less democratic but perhaps more successful. Instead the loop point being a compromise of both loop points, one loop point has to end up sounding exactly like the other one did originally. In other words, the original sound starts to fade out before the loop point until it is replaced entirely by the sound from the other loop point. Afterwards, things fade back to normal - the second loop point is left untouched.

The advantage is that loop point placement is far less critical, particularly if the sound never has to progress beyond the loop end point ("release" loops is what we called them last month). You only need enough sound in front of the first loop and enough distance between the loops (though half of what is needed for the classical method). The disadvantage is that far more radical changes are being made to the sound. The Emulator III will be the first commercial sampler that I know of to implement this technique.

Bidirectional Crossfading

BACKWARDS/FORWARDS LOOPS are a whole different cannelloni. Instead of the sound continuing onward (as if there was no loop at all) or jumping from one loop point to another (a la unidirectional looping), it turns back on itself and goes back the other way. The mix at the loop point should be even between the sound going forward and the sound going backward.

In Figure 5 there's another example of a radical sound - one that's silence before and after the loop points, but has full amplitude in between. Figure 6 shows it after crossfading - notice that the sound at the loop point is the same, reflecting back as if it had continued beyond the loop point. The problem is that the sound before and after the loop is different to inside the loop; it doesn't mix well. In most cases this isn't nearly as bad a problem as shown here (I'll discuss more serious problems later), but samples that are unusual outside the loop points are yet another thing to watch out for before hitting the magic "execute" button.

Another vagary of bidirectional looping is that there are two loop points to deal with - you have a turnaround point at both ends of the loop. Unfortunately, many systems treat them as if they are the same and crossfade them both over the same distance and at the same time - sometimes when only one of them needs crossfading. The Sequential Studio 440 is the only commercial sampler I know of that treats both sides as separate entities; no doubt, others will do the same in the future.

Linear and Equal Power

HOPEFULLY THIS CROSSFADING business is starting to sound a lot more straightforward, but there's still a trick or two left to deal with. One is deciding exactly how you crossfade the sound information together. Crossfades don't just sort themselves out - you have to decide how they're going to be structured.

Sometimes simple, linear, addition of the levels of the loops results in the sound dipping in loudness at the crossfade point.

If the sounds being faded together are significantly different, they won't reinforce each other very well either on paper or as soundwaves. In Figure 7, we've made a linear unidirectional crossfade of white noise. Although it may always sound the same, you can't actually get a more different waveform from point to point than random noise. Result: you can see slight dips in amplitude at the loop points.

The solution to this is an equal power crossfade. "Power" - or perceived loudness - follows a "squared", as opposed to a linear, law. Without getting too deeply into the maths, this means that at the loop points we want both sounds being mixed together to be equal to 1 divided by the square root of 2 (roughly 71%) in loudness - not 1 over 2 (50%), as you might suspect. In other words 71%+71% appears to equal 100%. I told you we weren't going to get involved in the maths...

So, whenever the sounds at your loop points are rather different - because of a lot of reverb, chorusing or whatever - you'd be best advised to use equal power crossfading. Here's where visual editors, like those from Digidesign and Steinberg, come in handy - you can actually see that they're different.

What happens if the sounds are very similar? Well, an equal power crossfade results in an amplitude peak instead of dip at the loop points (see Figure 8). If a sound is constant in tone throughout, with no beating or the like (such as single horns, and so on), opt for linear crossfading.

Other Problems

THERE IS ONE more warning that needs to be given about crossfade looping: this one applies solely to bidirectional crossfading.

You may remember last month's warning that some sounds, such as those shaped like a sawtooth wave, cannot be turned around. Try to turn around a sawtooth, and suddenly you have a triangle wave for an instant. The problem you encounter when trying to crossfade a sawtooth-like wave is even worse. Imagine taking two sawtooths - one an upward ramp, the other a downward ramp. Now imagine adding them together in equal amounts, like crossfading will try to do. If they're lined up exactly, they cancel each other out. Don't you believe it? Look at Figure 9. Another undesirable result is a square wave which occurs with a different loop point.

Any tips? Yep, keep a backup of any bidirectionally looped sound you try to crossfade - yes, I know you're supposed to do that all the time, but we all know how cocky we become - it may still click, or even end up worse, by the time the microprocessor's finished chewing it up, but anything that looks even vaguely like a sawtooth (slowly goes down, then suddenly goes back up) is a candidate for disaster.

Other Tricks

CROSSFADE LOOPING IS quite often cited as an instant cure-all - just press that execute button, friend, and all of your looping troubles will be spirited away. This is true most of the time; at least the glitch goes away. But there are still a few precautions that can be taken to ensure aesthetic, as well as simple mathematic, success.

- Number one, and this is perhaps the most important, get a good loop (ignoring glitches) first. Be happy with the way it fits in with the natural progression of the sound (modulations, resonances and so on) - all the things we suggested you do with a normal loop last month. Then use any autolooping facilities your sampler may have once to get the nicest crossings in the locality of your loop. Then crossfade it. Little is certain in this world, but GI/GO (garbage in/garbage out) is as sure as a Stock, Aitken and Waterman hit here.

- In general, the longer the crossfade, the better. This takes some strategic placement of loop points to get the most out of the sound. In the case of classic even-mix crossfading, the maximum crossfade possible (without creating other problems) is the shortest of the following three lengths: the distance between the start of the sound and the loop start point, the distance between the loop end point and the end of the sound, and half the distance between the loop points. In the case of the 100% method (unidirectional), it is the shorter of either the distance between the loop points or the distance between the start of the sound and the loop start point.

- Exception to every rule time: some people claim that, if the sound is very similar around the loop points and the problem is a glitch and not discontinuity of sound, then you should make the smallest surgical incision possible: crossfade only about one wave's worth of the sound. How do you calculate the length of one wave if you don't have a visual editor? Take the sampling rate and divide it by the pitch of the sound (eg. 31,250kHz divided by 440Hz). The result is the number of individual samples ("words" of data, or whatever) in one wave.

- Remember that parts of the sample before and after the loop points will be needed to fold back in during the crossfade. So, to avoid problems, you should make your raw sample longer than you would normally, and place the loop end marker away from the end of the sound to give yourself room to work. (If you use a release-type loop, you can throw away the excess later). The same goes for the start of the sound - if the loop start point is right after the attack portion of the sound, part of the attack will be folded in around the loop end. I usually do one of two things to avoid fold-in problems whilst trying for the longest possible crossfade. The first involves roughly dividing the sound into fifths, placing the loop start two-fifths of the way into the sound, and then placing the loop end four-fifths of the way into the sound. This leaves a fifth of the sample length untouched for the attack and best places the loop points for maximum folding. The second is to temporarily move the start point of the sound after the attack (audition and edit the sound until none of it remains), loop the sound, and then put the start of the sound back at the start of the sample. Since most looping routines aren't allowed to touch anything before the start or after the end, the attack is kept safe.

- Do not try crossfading to cure an inherent problem in the sound, such as a large amplitude (loud at the start, quiet at the end) or timbral change (bassy at one end, thin and out of phase at the other). I've tried this many a time in hopes of smoothing out bumps or washes in the sound, and it usually just ends up worse. I cannot emphasise enough trying to match the natural ebb and flow of the sound when you try to get a loop in the first place, and then using crossfading to smooth it out.

- A basic rule of sampling is to turn all effects (such as chorusing, LFO's, reverb) off and record the sound as dry as possible. This is because all of those little variables wreak havoc on the process of trying to find a pair of correlated zero crossings. But with crossfading, you'll quite often end up better off if you throw these things in - a complex sound is easier to crossfade convincingly and tends to be a more musically pleasing sound in the first place.

And it's the ear that's the deciding factor in the final count - isn't it?


Read the next part in this series:
The Art of Looping (Part 3)

Previous Article in this issue

The Odd One

Next article in this issue

Simmons Silicon Mallet

Music Technology - Copyright: Music Maker Publications (UK), Future Publishing.


Music Technology - Jan 1988

Donated & scanned by: Mike Gorman




The Art of Looping

Part 1 | Part 2 (Viewing) | Part 3

Feature by Chris Meyer

Previous article in this issue:

> The Odd One

Next article in this issue:

> Simmons Silicon Mallet

Help Support The Things You Love

mu:zines is the result of thousands of hours of effort, and will require many thousands more going forward to reach our goals of getting all this content online.

If you value this resource, you can support this project - it really helps!

Donations for February 2021
Issues donated this month: 12

New issues that have been donated or scanned for us this month.

Funds donated this month: £108.00

All donations and support are gratefully appreciated - thank you.

Please Contribute to mu:zines by supplying magazines, scanning or donating funds. Thanks!

Monetary donations go towards site running costs, and the occasional coffee for me if there's anything left over!

Small Print

Terms of usePrivacy