Audio Insider
Online Monthly Pass

Register for an Account Forgot your Password?

Most Popular


The EM Poll


This is not a scientific poll but a tabulation of readers responses and is purely just for fun!

See Past Poll Results

pop_quiz_button

browse back issues

Newsletters

emusicianXtra icon
EMSoftware update icon
MET Extra icon
eDeals Newsletter icon


Subscribe to newsletters here...

By the Slice

Oct 1, 2003 12:00 PM, By Len Sasso



         Subscribe in NewsGator Online   Subscribe in Bloglines

CURRENT NEWSSTAND ISSUE

Read the full Table of Contents for the issue on sale now! Click here

Subscribe for only $1.84 an issue!

Please tell us about yourself so we can better serve you. Click here to take our user survey.

Personal Studio Series

Mastering Steinberg's Cubase™

This special issue is not only a must-read for users of Cubase™ software, but it also delivers essential information for anyone recording/producing music in a personal-studio.

Click for more
EM Podcasts

Listen to these latest podcasts and more:
Film and TV composer Ramin Djawadi on scoring Iron Man. Go

What's New: New versions of NI Guitar Rig, a synth and more. Go

eDeals Newsletter for Discounts on Gear

Get First Dibs on Hot Gear Discounts, Manufacturer Close-Outs and Job Opportunities when you sign up to receive eDeals E-newsletter, sent twice a month. Check out an issue get advertising info or subscribe

You rummage around in your sample library and find a fantastic drum loop to go with that tasty bass groove your buddy laid down just before he moved to Australia. Trouble is, the drum loop is at 112 bpm and the bass is at 96. You've got a problem.

You could try speeding up the bass recording or slowing down the drum loop, but neither is going to do the job, because the pitch and tonal characteristics of the sound change as you change the playback speed. You can hear this effect demonstrated in the first two audio examples accompanying this article (see the sidebar “Hearing Is Believing”).

A number of methods are available to desktop musicians for matching the tempo of two files, all made possible by the increased processing power of modern personal computers. The options include a variety of time-stretching, pitch-shifting, and formant-shifting algorithms that use granular resynthesis and FFT-analysis and -resynthesis techniques. In this article, however, I'll concentrate on one of the most popular and easily understood solutions, beat slicing.

WHAT'S THE TRICK?

FIG. 1: A one-measure drum loop (top) is manually cut into eighth-note slices. At a slower tempo (middle), the loop occupies less than a measure and gaps appear between the slices. At a faster tempo (bottom), the loop occupies more than a measure and the slices overlap. In all cases, the individual slices are always at eighth-note positions.

Beat slicing can be accomplished in several ways, but they all amount to breaking an audio file into a number of small segments (often called slices). You can do that manually using the scissors tool in your digital audio sequencing software (see Fig. 1), or you can rely on software such as Sonic Foundry's Acid, Ableton's Live, Propellerhead's ReCycle, or Bitshift Audio's Phatmatik Pro to automate the process. Once you have the audio file cut into slices, the trick is to change the time between slices rather than alter the speed at which each slice is played. That preserves each slice's pitch and timbre while changing the tempo.

If the slicing is done accurately — for example, corresponding to individual hits of a drum loop — you can also make timing modifications such as removing or adding shuffle. You can go even farther afield by changing the order of the slices or by replacing some slices; for instance, you can replace one kick-drum sample with another. Finally, you can apply different DSP effects — pitch shifting, EQ, compression, and so forth — to individual slices.

One obvious shortcoming of beat slicing is that if the slices are played too close together they will overlap, and if they are played farther apart, there will be gaps (see Fig. 1). That may or may not create a musical problem, depending on the material you are using. If you're slicing a basic kick-drum part, for example, the individual kicks die out fast, and the latter part of each slice will be silence. With more complex material, however, it's likely that some adjustment will be necessary. If the slices overlap, the obvious choice is to quickly fade each slice at the crossover point. When the slices are farther apart, some sort of padding is needed at the end of each slice. High-quality beat-slicing software will do both for you automatically, but when you make radical changes to the tempo, you always run into some limitations on how much fix-up the software can do.

TO BEAT OR NOT TO BEAT

There are two ways to approach slicing up an audio file. The simplest is to base the slices on the tempo of the file and make them all the same size. I'll call that method time slicing. If you know the tempo in beats per minute, simply divide it into 60 to calculate the time of a single beat in seconds. (Because the time for one beat is usually a fraction of a second, it is often more convenient to measure it in milliseconds [ms]. To do that, divide the tempo into 60,000.) For instance, if you have a clip at 120 bpm, then one beat is 500 ms (60,000/120). From that you can calculate the time for any beat division you want — for example, 16th-note slices would be 125 ms each.

FIG. 2: Here, Live's Clip editor displays a 16th-note polysynth part. Live automatically slices the part into 16th-note segments and plays them back at the song tempo. That method, called time stretching, is fast and produces good results in many cases.

Slicing a file into equal parts based on its tempo is the method used by loop-based software such as Ableton's Live and Sonic Foundry's Acid for tempo matching of loops. Fig. 2 shows a beat loop automatically time sliced in Live. Time slicing has the advantage of being fast and automatic, but it has the disadvantage of completely disregarding the musical content of the audio file. If the playing is not perfectly quantized, slices will be made in the middle of musical events. For instance, if the kick drum is a little ahead of the beat or the ride cymbal has some shuffle, the slices will cut through the kick and cymbal hits.

That also happens if the audio file is not perfectly trimmed to an exact number of beats. To avoid those problems, beat-slicing software that is more sophisticated, like Propellerhead's ReCycle and Bitshift Audio's Phatmatik Pro, attempts to detect musical events and place the slices there. I'll call that event slicing in order to distinguish it from the time-slicing method.

FIG. 3: The dashed lines in Phatmatik Pro's beat-slicing window (top) indicate the slice markers. An automatically generated MIDI file (bottom) plays the slices with their orignial timing while following the song tempo.

The top half of Fig. 3 shows the result of event slicing a percussion loop in Phatmatik Pro. The vertical dashed lines indicate the slice points found by looking for rapid changes (called transients) in the sound file. The lighter-blue border just below the slice area indicates strict time divisions, and you can see that the slices do not exactly line up and that they are not equally spaced.

All event-slicing software offers some form of sensitivity adjustment to control how events are detected. Whether you choose event or time slicing (and some programs offer both), your software will likely allow you to add, delete, and move the slice points before finalizing the results. The trick is to choose the method and sensitivity setting that most accurately captures the events, then make whatever manual adjustments are necessary to get usable slices. If the audio is perfectly trimmed and in fairly strict time, time slicing will be the fastest and easiest.

Time slicing is also appropriate for material such as ambient effects and pads that you want to stretch without affecting pitch. On the other hand, if the beat is all over the place or the material is not rhythm based (speech clips, for example), you're better off starting with the automatic event detection that event slicing offers, then refining from there.

TIE THAT BINDS

Slicing is only half the battle. Once your file is sliced up, you need a way to play, and possibly manipulate, the slices. Again, there are several approaches that you can take. A loop-based program whose primary purpose is tempo matching takes the slices it has found (as possibly adjusted by you) and sequences them more quickly or slowly to match the song tempo. In the process, it attempts the padding or fading necessary to avoid the gaps and overlaps mentioned previously.

Beat-slicing software usually offers options to export individual slices (generally padded or faded as necessary) or to export a single file, in a proprietary format, that can be imported and played in other programs. The most common such format is ReCycle's Rex file format, which can be used directly in a number of digital audio sequencers and software samplers. Phatmatik Pro, which is a plug-in instrument, functions as both a slicer and player.

If you are using a sampler or other type of MIDI-based player to play the individual slices, you need a MIDI file to trigger the slices with the appropriate timing and order. (Alternatively, you could manually arrange the slices directly on an audio track.) Beat-slicing software generally meets that need by generating a standard MIDI file with notes on consecutive pitches for triggering consecutive slices. The timing of the MIDI notes matches the original slice spacing. The bottom of Fig. 3 shows the MIDI events matching the slices shown above it. The tempo at which you play back the MIDI file controls the rate at which the slices are triggered but doesn't change the sound of the slices or their relative timing. In short, you can, within limits, alter the tempo of the original audio file independent of pitch, timbre, and rhythm.

BEYOND TIME

Tempo matching is only the tip of the iceberg. Once you have sliced up an audio file into individual events, you can replace any or all events with other audio clips. You can use that technique to swap one snare sample for another, fix a few bad notes in a solo or bass line, rearrange the words in a dialog track, or process one or more clips with a DSP effect such as compression. In fact, slice players often incorporate DSP effects for individual slice processing.

Now that you have slices triggered by individual MIDI notes, you are no longer locked in to the original timing. In the extreme, you could quantize the MIDI file to get rid of shuffle or timing errors (and with them, any human feel). Conversely, you can add shuffle or introduce slight random changes in the timing. Of course, the maxim “Garbage in, garbage out” still applies — the changes you choose to make need to be appropriate to the material you started with.

You can also change the order of slice playback by moving the MIDI notes in two ways: vertically or horizontally. Moving the MIDI notes vertically changes the slice being played. That's fine if all the slices are of equal length (as they would be with time slicing), but it's not a good idea otherwise, because the MIDI note length will probably not match the length of the new slice. Moving MIDI notes horizontally changes the playback position of a slice. That is a little more time-consuming because you need to move the other slices around in order to avoid overlaps, but it is the best method with event-sliced material. Of course, either method will allow you to play any slice at any time position.

Keep in mind that you can use the same MIDI file to play other MIDI instruments, such as hardware or soft synths. This would allow you to apply the timing or “groove” of your slices to another instrument. Typically all notes in the automatically generated MIDI file are at maximum Velocity. That's usually adequate because the slices contain their own amplitude information. However, some beat slicers (notably Phatmatik Pro) will convert the slice amplitudes to Velocity values in the MIDI file, which allows you to retain even more of the feel (including accents) of the original audio file. Note that when you're using the MIDI file to trigger another device, the original pitches have no intrinsic meaning, and you will probably need to change them to match the device being triggered.

As we've seen, beat slicing is a conceptually simple process with applications ranging from tempo matching to complete reorganization of an audio file. Loop-oriented audio software often takes care of the details without the need for your intervention, but a basic knowledge of what's going on can open up a broad range of creative possibilities.


Len Sasso can be contacted through his Web site at www.swiftkick.com.

HEARING IS BELIEVING

electronic musician webclips additional contentYou might be wondering how different the various beat-slicing techniques really are. In this month's EM WebClips, you'll find five audio examples illustrating the techniques described in this article. Here's a quick rundown of how they were produced.

As source material I started with five four-measure audio tracks that had been recorded at different tempos: a 16th-note polysynth track at 120 bpm, a four-on-the-floor kick-drum at 130 bpm, a 16th-note hi-hat shuffle at 126 bpm, electric piano chords at 135 bpm, and a bass line at 114 bpm. All of these tracks were clearly not meant to go together, as is illustrated by the first audio example, called Original.mp3. The tracks are played together at their original tempos, and as you might imagine, the end result is a horrible mess.

The second audio example, Stretch.mp3, applies classic time stretching to each track to bring them all to 126 bpm. Classic time stretching amounts to just changing the pitch (like slowing down or speeding up a tape) to reach the desired tempo. You probably thought things couldn't get worse, but they just did.

The third example, called TimeSlice16.mp3, uses automatic time slicing to bring all the tracks to 126 bpm. In this case, all the tracks were imported into Live, and its default 16th-note time slicing was used to sync the tracks. Two things are apparent here: the hi-hat shuffle still conflicts with the straight 16ths of the polysynth, and 16th-note time slicing is hard on the sustained chords of the electric piano.

TimeSliceVar.mp3, the fourth example, again uses Live, but the time slicing for the electric piano, kick drum, and bass was changed to quarter-note slices. The time slicing of the chords is no longer as obvious. Notice that there is still no improvement in the shuffle conflict.

The last example, BeatSlice.mp3, uses event slicing on all tracks. Phatmatik Pro was used for all but the electric-piano part, which was sliced in ReCycle to take advantage of its excellent padding algorithm. The MIDI file used to play the hi-hat shuffle was then quantized to straight 16th notes. It should be obvious that event slicing produces superior results. Of course, it also takes considerably longer — you get what you pay for.

Get Copyright ClearanceWant to use this article? Click here for options!
© 2008 Penton Media, Inc.

Back to Top