Digital Media Audio Blogs > Audio

Loopy Tunes (part 1)


Looping! looping audio, looping midi, loop the loop, i'm tellin' ya, it's makin' me loopy! looping is one of those little industry tricks that seems so elegant and simple and useful, and yet has the almost overwhelming tendency to jump up and bite you in the ass! looping, in some regards, has been the freakin' bane of my existence!

there's this jazz musician's joke: charlie parker dies and goes to hell, and the devil greets him at the gate saying, 'hey, man, hell's been getting a bad rap, it ain't so bad, check this out!" he gives bird a solid gold sax, and brings him to a session where all the best players who ever lived are burning through a smokin' chart ... and the first chair is empty. bird sits down to play, thinkin' "hmm, ya know, this shit ain't so bad after all!" they read through the chart, go back to the top, read through the chart again, go back to the top, bird turns to the guy sitting next to him and says "hey man, where's the coda?"

and the guy says mournfully "no coda, man" ...

certainly there have been nights on stage i felt like that, but this old joke aptly describes my relationship with loops in the multimedia world. they seem really great until you realize you're in hell!

What's The (loop) Point?

you really only need two things to loop any file, a loopstart point and a loopend point (and btw, can we just call them "loopstart" and "loopend", and be done with it, please!?). these two points divide any sequential audio or MIDI file into three neat sections - intro, loop, and coda. the algorithm for playing any looped file is quite straight-forward (pun intended):

loop2.jpg
1. start. play intro
2. play loop non-zero number of times
3. play coda. stop
(length of intro and/or coda can = 0, if loopstart = start of file, or loopend = EOF)

so can someone explain to me why this is SO FREAKIN' HARD TO DO!? you'd think this is exactly the kind of thing computers are supposed to be really really good at, but no! i literally cannot tell you the number of fucked-up loops i've had to listen to over the years, but as my dog would say "grrrrrrrrrr!" i've been producing looped audio files of one sort or another for 15 years now, and i've heard loops that were so seamless and perfect, they made a grown man cry (over and over again) ... but MORE often, i've heard pops and clicks and hiccups and dropouts at the loop points, seen loop points get completely ignored (or erased!), and watched data get trapped in unplayable codas.

Geek Pride

One of my early triumphs in the land of loopiness was the time i got mentioned in the documentation for Infinity, the greatest (OS9) looping program _ever_ ... i had been building an itsy bitsy teeny weeny General MIDI library for the WebTV platform, and was using Infinity to take really short loops after really short intros. well, the program was designed for big fat movie ambiences and high-end synthesizers, so it was a little like trying to pick a needle up off the floor with a pair of pliers ... easy if it's stuck in the wood, not so much if it's laying down flat.

Even so, there was this one certain setting that kept giving me a nasty click, so i filed a bug on the company website. later, i spoke with the developer Dr. Andy himself, who not only identified the problem, but fixed it in the next version. buried deep in the release notes was the line "thanks to peter drescher of twittering machine for finding this bug" ... i was filled with geek pride!

But NONE of the audio editors or looping software i've ever used let you play the coda! play the entire file once through, start to finish - sure. play the intro, then loop the loop until stopping on a dime - no problemo. play the intro, play the loop 3 times, play the coda ... NO! play the intro, play the loop until [space bar], then finish the loop and play the coda? Never!

And yet, that's exactly how you want the looped sample to play in actual use! the classic example is a harpsichord patch: Note On, play the intro attack; loop the vibrating string until Note Off; finish the loop and play the characteristic plink of the plectrum damping the string on release.
harpsichord_Db4.jpg

i've never used an audio editor that let you audition samples like that; you always have to load them into a synth patch or game engine to try them out. And even then! lots of times, synths will just freakin' ignore the coda, like it wasn't even there, dead data, never played. i mean really! what's the point of having a loopend point at all if it's *always* EOF!?

granted, most of the time, you don't care. "fade the loop on Note Off" works just fine for most instruments, and it ain't even an issue for one-shot percussion. plus, when you're working in lo-rez environments, you got bigger fish to fry than that final plink, anyway. of course, these days, with massive giga-samples as cheap as yesterday's newspaper, many instruments don't even use loops anymore - except for effect, and then it's almost always "loop first to last" ...

General MIDI vs Major Pain

But it's not just audio looping that chaps my ass, it's MIDI looping too!! how many windows boxes have i heard come to the end of the file -- stop, think about it, load the file from disk again, and start playing from the top -- causing a hook-hock-hiccup right @ the loop point ... which of course is the exact place in your song you're trying to hide, the transition you want to be as seamless as possible, the one spot you specifically designed to pass by without notice. Fucking up the loop point is like getting caught in a spotlight when you just spilled beer on your crotch, or worse, coming to the end of a bombastic Beethoven piano sonata and missing the last note.

And yet, i've heard that kind of thing SO many times, on SO many different systems, it's almost as if the engineers thought there was no difference between "LOOP" (load up and play one file continuously until release) and "REPEAT" (play one file [or set of files] from start to finish, again and again). well, lemme tell ya, loud and clear, there IS a difference, and it's IMPORTANT!!! i'll even write it down as a Rule:

"A Loop Must Be Seamless, A Repeat Should Not Be"

there! i said it, and i'm sticking to it! really, think about it - if you're playing a MIDI file in "loop" mode, either using loopstart and loopend markers, or even just playing first to last [intro + coda = 0], you know you're gonna hit the loopend (or EOF) eventually, and if your software is not prepared, if that last audio buffer isn't quite full enough, if your program hits endloop and goes, "uh, gee, der, guess i should read something off the disk now, hoy hoy hoy, everybody just wait a few milliseconds while i go do this thing, i'll be right back" -- well, that's what i call a bug, please fix it...[pop]...please fix it...[pop]...please fix it...[pop]...

And ya know what? i ain't done yet!! next up:

Loopy Tunes (part 2)
Can Someone Please Explain To Me Again Why I Can't Loop An MP3 File!?

Loopy Tunes (part 3)
Mobile Looping (or "light the fuse, stand back, and listen to my head explode, over and over and over again!")

   - pdx

wanna write to the annoying audio guy?

Categories





AddThis Social Bookmark Button



Comments (1)
Read More Entries by Peter Drescher.

1 Comments

Thanks, Peter. I agree: so many annoying loop examples come to mind, like the time I wrote some music for a kiosk at the San Diego Zoo and the programmer set the loop point at the end of the reverb tail instead of the end of the bar.

On a happier note, I found a loop bug on the Roland V-Synth that actually improved the sound. (Love that “palindrome” loop mode, too!)

Leave a comment


Type the characters you see in the picture above.

Topics of Interest

Related Books

Archives


 
 


Or, visit our complete archive.  

Stay Connected