FIG.1: A one-measure drum loop (top) is manually cut into eighth-noteslices. At a slower tempo (middle), the loop occupies less than ameasure and gaps appear between the slices. At a faster tempo (bottom),the loop occupies more than a measure and the slices overlap. In allcases, the individual slices are always at eighth-notepositions.FIG.2: Here, Live's Clip editor displays a 16th-note polysynth part. Liveautomatically slices the part into 16th-note segments and plays themback at the song tempo. That method, called time stretching, is fastand produces good results in many cases.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 followingthe song tempo.
You rummage around in your sample library and find a fantastic drumloop to go with that tasty bass groove your buddy laid down just beforehe moved to Australia. Trouble is, the drum loop is at 112 bpm and thebass is at 96. You've got a problem.
You could try speeding up the bass recording or slowing down thedrum loop, but neither is going to do the job, because the pitch andtonal characteristics of the sound change as you change the playbackspeed. You can hear this effect demonstrated in the first two audioexamples accompanying this article (see the sidebar “Hearing IsBelieving”).
A number of methods are available to desktop musicians for matchingthe tempo of two files, all made possible by the increased processingpower of modern personal computers. The options include a variety oftime-stretching, pitch-shifting, and formant-shifting algorithms thatuse granular resynthesis and FFT-analysis and -resynthesis techniques.In this article, however, I'll concentrate on one of the most popularand easily understood solutions, beat slicing.
WHAT'S THE TRICK?
Beat slicing can be accomplished in several ways, but they allamount to breaking an audio file into a number of small segments (oftencalled slices). You can do that manually using the scissors toolin your digital audio sequencing software (see Fig. 1), or youcan rely on software such as Sonic Foundry's Acid, Ableton's Live,Propellerhead's ReCycle, or Bitshift Audio's Phatmatik Pro to automatethe process. Once you have the audio file cut into slices, the trick isto change the time between slices rather than alter the speed at whicheach slice is played. That preserves each slice's pitch and timbrewhile changing the tempo.
If the slicing is done accurately — for example, correspondingto individual hits of a drum loop — you can also make timingmodifications such as removing or adding shuffle. You can go evenfarther afield by changing the order of the slices or by replacing someslices; for instance, you can replace one kick-drum sample withanother. Finally, you can apply different DSP effects — pitchshifting, EQ, compression, and so forth — to individualslices.
One obvious shortcoming of beat slicing is that if the slices areplayed too close together they will overlap, and if they are playedfarther apart, there will be gaps (see Fig. 1). That may or maynot create a musical problem, depending on the material you are using.If you're slicing a basic kick-drum part, for example, the individualkicks die out fast, and the latter part of each slice will be silence.With more complex material, however, it's likely that some adjustmentwill be necessary. If the slices overlap, the obvious choice is toquickly fade each slice at the crossover point. When the slices arefarther 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 intosome 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. Thesimplest is to base the slices on the tempo of the file and make themall the same size. I'll call that method time slicing. If youknow the tempo in beats per minute, simply divide it into 60 tocalculate the time of a single beat in seconds. (Because the time forone beat is usually a fraction of a second, it is often more convenientto measure it in milliseconds [ms]. To do that, divide the tempo into60,000.) For instance, if you have a clip at 120 bpm, then one beat is500 ms (60,000/120). From that you can calculate the time for any beatdivision you want — for example, 16th-note slices would be 125 mseach.
Slicing a file into equal parts based on its tempo is the methodused by loop-based software such as Ableton's Live and Sonic Foundry'sAcid for tempo matching of loops. Fig. 2 shows a beat loopautomatically time sliced in Live. Time slicing has the advantage ofbeing fast and automatic, but it has the disadvantage of completelydisregarding the musical content of the audio file. If the playing isnot perfectly quantized, slices will be made in the middle of musicalevents. For instance, if the kick drum is a little ahead of the beat orthe ride cymbal has some shuffle, the slices will cut through the kickand cymbal hits.
That also happens if the audio file is not perfectly trimmed to anexact number of beats. To avoid those problems, beat-slicing softwarethat is more sophisticated, like Propellerhead's ReCycle and BitshiftAudio's Phatmatik Pro, attempts to detect musical events and place theslices there. I'll call that event slicing in order todistinguish it from the time-slicing method.
The top half of Fig. 3 shows the result of event slicing apercussion loop in Phatmatik Pro. The vertical dashed lines indicatethe slice points found by looking for rapid changes (calledtransients) in the sound file. The lighter-blue border justbelow the slice area indicates strict time divisions, and you can seethat the slices do not exactly line up and that they are not equallyspaced.
All event-slicing software offers some form of sensitivityadjustment to control how events are detected. Whether you choose eventor time slicing (and some programs offer both), your software willlikely allow you to add, delete, and move the slice points beforefinalizing the results. The trick is to choose the method andsensitivity setting that most accurately captures the events, then makewhatever manual adjustments are necessary to get usable slices. If theaudio is perfectly trimmed and in fairly strict time, time slicing willbe the fastest and easiest.
Time slicing is also appropriate for material such as ambienteffects and pads that you want to stretch without affecting pitch. Onthe other hand, if the beat is all over the place or the material isnot rhythm based (speech clips, for example), you're better offstarting 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, youneed a way to play, and possibly manipulate, the slices. Again, thereare several approaches that you can take. A loop-based program whoseprimary purpose is tempo matching takes the slices it has found (aspossibly adjusted by you) and sequences them more quickly or slowly tomatch the song tempo. In the process, it attempts the padding or fadingnecessary to avoid the gaps and overlaps mentioned previously.
Beat-slicing software usually offers options to export individualslices (generally padded or faded as necessary) or to export a singlefile, in a proprietary format, that can be imported and played in otherprograms. The most common such format is ReCycle's Rex file format,which can be used directly in a number of digital audio sequencers andsoftware 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 toplay the individual slices, you need a MIDI file to trigger the sliceswith the appropriate timing and order. (Alternatively, you couldmanually arrange the slices directly on an audio track.) Beat-slicingsoftware generally meets that need by generating a standard MIDI filewith notes on consecutive pitches for triggering consecutive slices.The timing of the MIDI notes matches the original slice spacing. Thebottom of Fig. 3 shows the MIDI events matching the slices shown aboveit. The tempo at which you play back the MIDI file controls the rate atwhich the slices are triggered but doesn't change the sound of theslices or their relative timing. In short, you can, within limits,alter the tempo of the original audio file independent of pitch,timbre, and rhythm.
Tempo matching is only the tip of the iceberg. Once you have slicedup an audio file into individual events, you can replace any or allevents with other audio clips. You can use that technique to swap onesnare 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 clipswith a DSP effect such as compression. In fact, slice players oftenincorporate DSP effects for individual slice processing.
Now that you have slices triggered by individual MIDI notes, you areno longer locked in to the original timing. In the extreme, you couldquantize the MIDI file to get rid of shuffle or timing errors (and withthem, any human feel). Conversely, you can add shuffle or introduceslight random changes in the timing. Of course, the maxim“Garbage in, garbage out” still applies — the changesyou choose to make need to be appropriate to the material you startedwith.
You can also change the order of slice playback by moving the MIDInotes in two ways: vertically or horizontally. Moving the MIDI notesvertically changes the slice being played. That's fine if all theslices are of equal length (as they would be with time slicing), butit's not a good idea otherwise, because the MIDI note length willprobably not match the length of the new slice. Moving MIDI noteshorizontally changes the playback position of a slice. That is a littlemore time-consuming because you need to move the other slices around inorder to avoid overlaps, but it is the best method with event-slicedmaterial. Of course, either method will allow you to play any slice atany time position.
Keep in mind that you can use the same MIDI file to play other MIDIinstruments, such as hardware or soft synths. This would allow you toapply the timing or “groove” of your slices to anotherinstrument. Typically all notes in the automatically generated MIDIfile are at maximum Velocity. That's usually adequate because theslices contain their own amplitude information. However, some beatslicers (notably Phatmatik Pro) will convert the slice amplitudes toVelocity values in the MIDI file, which allows you to retain even moreof the feel (including accents) of the original audio file. Note thatwhen you're using the MIDI file to trigger another device, the originalpitches have no intrinsic meaning, and you will probably need to changethem to match the device being triggered.
As we've seen, beat slicing is a conceptually simple process withapplications ranging from tempo matching to complete reorganization ofan audio file. Loop-oriented audio software often takes care of thedetails without the need for your intervention, but a basic knowledgeof what's going on can open up a broad range of creativepossibilities.
Len Sassocan be contacted through his Web site atwww.swiftkick.com.
HEARING IS BELIEVING
Youmight be wondering how different the various beat-slicing techniquesreally are. In this month's EM WebClips, you'll find five audioexamples illustrating the techniques described in this article. Here'sa quick rundown of how they were produced.
As source material I started with five four-measure audio tracksthat had been recorded at different tempos: a 16th-note polysynth trackat 120 bpm, a four-on-the-floor kick-drum at 130 bpm, a 16th-notehi-hat shuffle at 126 bpm, electric piano chords at 135 bpm, and a bassline at 114 bpm. All of these tracks were clearly not meant to gotogether, as is illustrated by the first audio example, called Original.mp3. The tracks are played together attheir original tempos, and as you might imagine, the end result is ahorrible mess.
The second audio example, Stretch.mp3, applies classic time stretching toeach track to bring them all to 126 bpm. Classic time stretchingamounts to just changing the pitch (like slowing down or speeding up atape) to reach the desired tempo. You probably thought things couldn'tget worse, but they just did.
The third example, called TimeSlice16.mp3, uses automatic time slicing tobring all the tracks to 126 bpm. In this case, all the tracks wereimported into Live, and its default 16th-note time slicing was used tosync the tracks. Two things are apparent here: the hi-hat shuffle stillconflicts with the straight 16ths of the polysynth, and 16th-note timeslicing is hard on the sustained chords of the electric piano.
TimeSliceVar.mp3, the fourth example, again usesLive, but the time slicing for the electric piano, kick drum, and basswas changed to quarter-note slices. The time slicing of the chords isno longer as obvious. Notice that there is still no improvement in theshuffle conflict.
The last example, BeatSlice.mp3, uses event slicing on all tracks.Phatmatik Pro was used for all but the electric-piano part, which wassliced in ReCycle to take advantage of its excellent padding algorithm.The MIDI file used to play the hi-hat shuffle was then quantized tostraight 16th notes. It should be obvious that event slicing producessuperior results. Of course, it also takes considerably longer —you get what you pay for.