Magazine Archive

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

The Art of Looping (Part 1)

Contrary to popular belief, glitching isn't a social embarrassment it's simply the sign of a bad loop; Chris Meyer and Bill Aspromonte suggest ways of improving your sampling techniques.


As if getting a good sample wasn't hard enough work, you want to loop it too? Technology and the discerning ear clash once again.

NEW TIMES BRING with them new music - new music made with the help of new instruments. And new instruments demand new skills. When programmable synthesisers first appeared back in the '70s, some of us chose to roll up our sleeves and learn how to program them whilst others were content to rely on their presets.

Today, we are dealing with samplers. And certain of us still rely on presets - in the form of commercially available disks or sampling tapes, CDs and so on. There are those, however, who have found it advantageous to learn how to program these beasts from scratch. Some of the skills are already familiar - similar to the analogue synthesis skills. Others are brand new, and it is some of those that we're going to take a look at here.

The strangest concept samplers have forced on us is the gentle art of looping. We'll describe the "whys" and "hows" of simple looping, giving some (hopefully) helpful hints along the way. Next month, we'll talk about a piece of magic called "crossfade looping", including how to exploit it. Finally, and ironically, we will try sampling some of the synths of yesteryear in order to give them some sort of "preset" memory in the form of disks for our samplers.

What is a Loop?



SYNTHESISERS HAVE A wonderful ability to sustain a note for as long as we hold down a key. They pull this sly trick off by having a sound source - an oscillator - that puts out a continuous sound for as long as the instrument's plugged in. To cut the note off the synth uses a filter and/or amplifier to fade the oscillator out once the note has been released.

Where samplers differ from synthesisers is that in place of oscillators, they are playing back a digital recording of a sound. Unless the sample of the sound is infinitely long (digital memory isn't that cheap... yet), it has to end sometime - sometimes before the musician is ready to release the note. A good analogy is a reel of audio tape playing back: eventually the reel is going to run out of tape although the motors would be quite happy to keep going until they were unplugged (just like our oscillator).

In sampling we get around the problem with looping. This enables us to repeat part of the digital recording over and over again, thus giving the impression the sample is infinite (think of a tape loop instead of a length of tape).

There are different types of loops: some play back in one direction over and over, some play the repeated section alternately forwards and then backwards, some stay looping only while a note is being held, some repeat until told to start the sound from the beginning again and some repeat only for a specified period of time. There are also (subjectively) good loops and bad loops. And there are many "tools" to assist us in this theft of time - many of which are built into our sampling instruments.

Forwards Only Loops


Also known as "unidirectional loops", these are the most common type of loop. With these, a sampler working its way forward through a sound runs until it reaches a marker that signals the end of the loop (which, on many samplers, also happens to be the end of the sound). At this point, it will jump back to a marker that signals the start of the loop (though not necessarily the start of the sample), and then work its way forward until it hits the end marker again. Think of (or if you have a sampler around, sample) the phrase "one two three four". Imagine again that the loop start point is between the words "two" and "three", and the loop end point is just after the word "four". In this case, as long as nothing else got in our way (such as the cat pulling out the plug, or the musician releasing the note), we would hear the phrase played back, "one two three four, three four, three four, three four", ad infinitum.

This is very similar to what our synthesiser's oscillator was doing - playing back something like a sawtooth over and over again. In a sampling instrument, we will quite often use this type of loop to turn a sample into an oscillator, by repeating one wave or section of the sound.

Backwards/Forwards Loops


Not as common as unidirectional loops, these are logically known as "bidirectional loops" and are a feature of the Emulator II, Prophet 2000 and S900, to name but three. Here, a sound happily progresses until it hits the loop end, but instead of jumping immediately back to the loop start, it turns around and progresses backwards until it hits the loop's starting point. Then it turns around again and moves forward until it hits the loop end again. Taking our example of the phrase "one two three four" again, we would hear "one two three four ruof eerht three four rouf eerht three four".

A backwards/forwards loop more closely imitates the effect of a sound moving back and forth (like a violinist bowing a string). It also has the advantage of making a loop twice as long as it really is - we hear the looped section forwards and then backwards before it is back to the beginning of the cycle. This can be used to make the loop seem less repetitive, but we're starting to cross into the artistic realm, which we'll deal with more fully later. We still have some more terms and software mysticism to explain first...

Release Loops


Most samplers have only one loop. The sampler's output channel plays back the sound from its start, plays back the loop over and over again, remains there - even if the note is turned off - until the channel is required by another note. This type of loop is (in the case of there being only one loop as with Akai, Roland and Korg samplers) either known simply as the "loop", or on samplers with two loops (such as the Emax and Prophet 2000) as the "release loop". Once a sound is through its attack period it continues to play its loop over and over - like a note produced by an organ. Going back to our '70s synthesiser we would probably liken this looping phase more to the "sustain" period of the ADSR envelope although it may also be permitted to continue through the release phase.

Sustain Loops


Where a sampler has two loops to command they are divided into the "sustain" and "release" varieties. Sustain loops play only while a note is being held and when the note is released, the sound progresses into its release loop. Picking up our example of the phrase "one two three four" yet again, imagine a release loop being where we've already placed it (starting between "two" and "three" and ending after "four"), and a sustain loop starting between "one" and "two", and ending between "three" and "four". For simplicity, we will assume forwards only loops. We would then get "one two three two three two three" until the note was released, at which point we would hear "two three four three four three four" until something shut the thing off - probably a filter or amplifier, in the same way a synthesiser's oscillator is muted.

Sustain loops are useful for special effects, or for where there is no release loop, and the remainder of the sample is some additional inflection of the sound shutting off (say, the muting of a guitar string). The drawback of using sustain loops for this is when you release a key, you may have no idea where the sound is in the loop. Using a guitar sample as an example; if the loop is one second long, when we release the note we want to hear the sound beyond the loop end - the finger muting sound - immediately. However, if the sound is at the very start of the loop (or, anywhere except the very end of the loop), there will be some delay while the sound plays back to the end point. Therefore, this effect works best with short loops, or notes where timing is not critical.

Timed Loops


A new type of loop has just appeared over the sampling horizon courtesy of the Casio FZ1 - one that plays back for a specified number of repeats or length of time. The FZ1 has eight loops in all, which can be set up in various ways, including using a timing scheme. Aside from special effect value, slick programmers will be able to use these to further the illusion that there really isn't a loop at all by repeating a little section a couple of times, and just before the listener gets wise, moving on to repeat a different section a couple of times. All of these are ways to pretend that we actually do have infinite sample memory available to us.

Looping Aids



THERE ARE WAYS that the software built into our samplers can help us get better loops. Looping isn't simply a matter of slapping down a couple of loop points and calling it "art" (if it only was that simple). We get all sorts of nasty clicks and warbles, not unlike a jump in a record or a bad splice on magnetic tape. These are called "glitches". With samplers, we need some electronic help to place our razor blade/loop marker in the best spot.

Before looking at what kind of help is on offer, let's examine where those clicks and pops are coming from. The jumping record is an excellent analogy for one kind of glitch - any discontinuity in the flow of our sampled sound will end up sounding like a pop. Some sounds don't like to be suddenly reversed - imagine the sonic equivalent to slamming your car abruptly from forward to reverse gear. Other side effects, such as warbling, an "out of tune" loop, and the like, need to be cured by a blend of technology, patience and our ears.

Zero Crossings


Let's go back to our forwards only loop, and a case where the two loop points have been haphazardly chosen. As we mentioned, at the point where the loop hits the end point and decides to jump back to the start point, we are going to have a discontinuity in the sound (see Figure 1) and therefore a click. What we need is to find two points that have the same amplitude (level), and use them as loop points. If we have a visual editing package lying around, we can try to identify two loop points that have the same level visually (see Figure 2). One way to guarantee that the two levels are the same, is to pick them where they are both silent - namely, 0 volts DC (earth level). This is also known as a zero crossing (see Figure 3).

Figure 1. Bad 'forwards only' loop.


Figure 2. 'Forwards only' loop with matched levels.


Figure 3. 'Forwards only' loop with zero crossings.


Several samplers (like the Korg DSS1 and Prophet 2000) have built-in zero crossing detectors. They identify where the signal is making a transition from a negative voltage (excursion) to a positive voltage, or vice versa, which would also cause a click. By using zero crossings, a sampler can help a user get electrically correct loop points, if not always musically useful ones. The only trick is that the same set of rules has to apply for both loop points, or there will be a sudden jump from a sound waveform going up to a waveform going down, as in Figure 4.

Figure 4. 'Forwards only' loop with zero crossings, but phase mismatched.


Zero Slopes


This is a different criterion for picking a loop point, namely, for backwards/forwards loops. Since these loops instantly reverse direction at a loop point, and a quiet transition occurs only when there is no sudden discontinuity in the direction of the waveform, the best loop points are where the waveform's level is not changing. Picking any old loop point results in a spike in the waveform (see Figure 5), and picking a zero crossing isn't necessarily any better (see Figure 6) because with backwards/forwards loops, level isn't the problem - the change in direction is. Points at which the level is not changing are called "zero-slope" points. Therefore, a zero-slope detector tries to pick where a sound's waveform is "rounding the bend" (see Figure 7), and has no slope (change in level). Again, an electrically correct loop point, is not always a musically pleasing one.

Figure 5. Bad 'backwards/forwards' loop.


Figure 6. 'Backwards/forwards' and zero crossings - bad again.


Figure 7. 'Backwards/forwards' loop with zero slope.


Autolooping


While these simple looping aids are definitely useful, neither they nor visual editing are the ideal solution to all our looping problems. Fortunately, there are other aids to consider.

A common problem with very short loops is that they end up playing at a different pitch to the rest of the sound. This annoying shift is caused by a technical brawl between the sampling rate and the pitch of the instrument being sampled.

For example, let's suppose you have used a sample rate of 44kHz to sample a flute playing an A440 note (that's the tuning reference A above middle C, when C is 256Hz). Applying a little maths shows that one cycle of this sound will be 100 "samples" (however many bits wide that may be) long. If the loop is a little shorter or a little longer, the cycle length is altered, and the resultant pitch is different from the rest of the sample. To get the loop "in tune", you will need a loop length of either 100, 200, 300 (and so on) sample words. This is great on paper, but who wants to have to resort to an oscilloscope and a calculator to get a good loop? Why not let the machine do the work?

One technique intended for eliminating pitch shifts is called "magnitude differencing" and appears on the Emax and Emulator II. This technique searches out matching portions of the waveform around the start and end points, and then adjusts the end point so that its position in the cycle corresponds to the start point's position. This gives a loop length that is an integer multiple of the cycle length (so the loop is in tune), and also minimises glitching by keeping the waveform running in the same direction when it jumps from the end point to the start point.

Backwards/forwards loops don't have this problem with amplitude or pitch discontinuity at the loop points, but work best when the sample is symmetrical around the loop points. This is so that there are no phase problems. Turning around is all very well, but turning around abruptly can still cause a click (original waveform in Figure 8, result in Figure 9). One way around this is to compare data around the loop points for symmetry and adjust both loop points accordingly.

Figure 8. Temporary zero slope.


Figure 9. Result of using temporary zero slope for 'backwards/forwards' loop.


Correlation


Correlation is just a convenient way of saying "this is a lot like that". The backwards/forwards autolooping routine mentioned above is an example of correlation - trying to pick loop points that will result in the sound continuing just as it should. Software can do a little of this for us; for the rest, we have to depend on our eyes and ears (and continue to wait for more sophisticated software).

Look at the forwards only loop point in Figure 10. This is certainly a nice match of zero crossings, but what the waveform was doing at the left has nothing to do with how it "continues" at the right. First, the slope of the waveform before and after the zero crossing is different; second, the undulating pattern that the waveform was naturally following has been disturbed. Figure 11 shows a much better "correlation" of what the sound was doing before and after the loop point (even though it isn't a zero crossing), and is the type of match to look for if using a visual editing package to trim samples.

Figure 10. 'Forwards only' loop with zero crossings, but no correlation.


Figure 11. A correlated pair of zero crossings.


Correlation can - and should - be extended beyond the immediate couple of wave cycles around the loop points. If a sound has a particular vibrato pattern (such as an inflected violin or flute note) or "rolling" (such as a pipe organ in a big space), similar points in these longer "cycles" of the sound should be matched up to give a better splice.

For example, a good loop is one that doesn't have a sudden pitch shift at the end loop point. This will happen if your sample has a pitch shift or vibrato somewhere between the loop points - or during the whole sample for that matter. There are two ways round this; the easiest solution is to pick loop points of similar pitch, and match the length of the loop with the rate of the vibrato so that the loop points correlate. The alternative is to keep your loop as short as possible, even as short as one cycle of the wave. The problem here is that this destroys the natural character of many acoustic instruments. Of course, you can always cheat by re-sampling the sound with no pitch change and use the sampler's modulation to replace the missing effect.

Sundry Other Tricks



FINALLY, WE CROSS the line to where software, visual editing, and religion can help no more. Now you must rely on your ears and a great deal of patience. Just as there is no definitive great guitar sound, there are no hard-and-fast rules concerning good loops. However, here is a list of suggestions that may be of use to you:

- Start by picking a musically pleasing place for the loop to be, clicks be damned. Then start worrying about eliminating the glitch while trying to stay close to the original loop points.

- Large loops are nice, in that they give the impression of a longer sound. The ear quickly recognises something that is being repeated. Having a long, repeating wash is preferable to having a short, repeating warble.

- Make sure that the attack portion of the sound is not included in the loop (except, of course, for special effects). Plectrum noise and horn attacks do not naturally reappear when a guitar chord or horn note is being sustained, so keep them out of your loops.

- Sounds that do not have a steady state need short loops. For example, a piano cannot have a long forwards only loop because the change in overall volume from beginning to end is too great. And giving it a bowing effect with a backwards/forwards loop is also unnatural. Either compress sounds like this heavily to even them out, or put a very small loop towards the end of the sound. In this way, the sound can be given the illusion of continuing to decay even after it has hit a loop point. This can be maximised by timing the filter and amplifier envelopes to continue the dynamic of the sample.

- If using zero crossing or zero slope detectors on a short loop, try moving the points around as pairs - call up the next zero crossing for the loop end point, and then the next for the start point. This is a quick way to move a loop of the correct length around to find the right place in the sound for it.

- If forced to use very short loops, detuning and/or modulation can be extremely useful. Ensoniq get a very believable piano sound from the Mirage with extremely short samples. These are detuned slightly from each other so that a phasing/beating pattern occurs that distracts the ear from the repetition of the wave. This technique should be exploited on multi-oscillator-per-voice instruments such as the Mirage and Emax. Vibrato or tremolo induced by a sampler's onboard LFOs can also help animate a short loop very nicely.

- Backwards/forwards loops sometimes simply don't work. Let's take the example of a sawtooth wave; turning it around suddenly produces a triangle wave for one cycle, not a continuation of a sawtooth. You will be lucky to get a glitch-free backwards/forwards loop on most pure tones. However, a sample with a lot of motion going on is more likely to be successfully backwards/forwards looped.

- Remember that with backwards/forwards loops, you are dealing with two loop points, not one. The "start" and the "end" are two different turn-around points to perfect - it is very easy to forget this and start adjusting one loop point when it is actually the other that is clicking (this is not a problem with forwards only loops, since the two loop points join to form one). A good thing to try is tracing the playback direction of the sound as it is playing to isolate which point is clicking.

- Sounds combining noisy and pitched elements will often refuse to be looped - particularly with forwards only loops. Examples of these are snare drums and cymbals. It is extremely rare to find two suitable points in the mixture of pitch, noise and odd harmonics that correlate.

- Play back a looped sound at several pitches. Some clicks will disappear on certain notes and reappear on others. In other words, don't celebrate a "good" loop too soon. Loops also tend to become more noticeable as you transpose a sample upwards. This is because the loop plays back more quickly and effectively becomes shorter, consequently the ear recognises the loop more easily.

- Patience. Neither of us could get a good loop during our first encounters with a sampler so we don't see why you should expect to either. But stick with it, move the loop points around, learning, as you go, all the subtle clues to where a good loop can be found. It's just like learning good intonation on a violin or fretless bass - an "impossible" task becomes possible only through practice and not allowing yourself to become frustrated.

Next month, we will learn a new set of rules - and techniques - as we explore the wonders of crossfade looping.


Series

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



Previous Article in this issue

A Sense Of Scale

Next article in this issue

Breaking The Code


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

 

Music Technology - Dec 1987

Donated & scanned by: Mike Gorman

Topic:

Sampling


Series:

The Art of Looping

Part 1 (Viewing) | Part 2 | Part 3


Previous article in this issue:

> A Sense Of Scale

Next article in this issue:

> Breaking The Code


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 October 2020
Issues donated this month: 0

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

Funds donated this month: £59.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!
muzines_logo_02

Small Print

Terms of usePrivacy