jdn

… purveyor of funky beats and assorted electric treats …

Ableton Live, The Machinedrum and The Monomachine (Part 2): Minimizing Latency

Posted on | June 6, 2010 | 3 Comments

In Part one of this series, I posted tips for get­ting the Mono­ma­chine and Machine­drum synced and record­ing prop­erly with your Live ses­sions. The other half of the equa­tion is which oper­a­tions to avoid that might intro­duce latency and tim­ing errors dur­ing your sessions.

Able­ton Prints Record­ings Where It Thinks You Heard Them

I guess this design must be intu­itive for many users, but it con­fused me for a while.  If you have a setup with any­thing but a minis­cule audio buffer, mon­i­tor­ing through a vir­tual instru­ment witha few latency-inducing plu­g­ins in the mon­i­tor­ing chain, you will hear a fair amount of mon­i­tor­ing latency when you play a note.  The same goes for record­ing audio.

When record­ing a MIDI clip, I expected that Live puts the actual MIDI events when I played them — which it doesn’t.  It shifts the MIDI notes later in time to match when you actu­ally heard the out­put sound — try­ing to account for your audio buffer delay, the latency of your vir­tual instru­ment, and any audio pro­cess­ing delay from plu­g­ins in the down­stream sig­nal path.  There’s one excep­tion to this — it doesn’t worry about delays you might hear due to any “Sends” your track is using.

So your MIDI notes (and CC’s) are recorded with “baked-in” delays the size of your mon­i­tor­ing chain latency. I’m going to call this baked latency.

To be fair, Live’s man­ual goes into the rea­son­ing behind this in some detail, and offers some sug­ges­tions for work­ing with opti­mal MIDI tim­ing. I wanted to find out what this entails.

I’m guess­ing most artists work­ing with MIDI will also quan­tize the crap out of these notes any­ways, effec­tively gridding-away the baked latency. How­ever, if you actu­ally want to hear Live try to play back the notes when you hit them – say if you are try­ing to record some pre­cise rhyth­mic pas­sages by hand — you have to min­i­mize (or elim­i­nate) any of this record latency com­pen­sa­tion that Live is doing for you.

Whether the Options menu “Delay Com­pen­sa­tion” fea­ture is enabled or not, any devices that are mon­i­tored through Live — MIDI tracks, Audio Tracks, or Audio Instru­ment MIDI tracks — have a delay the size of your audio input buffer baked in.

In addi­tion, if “Delay Com­pen­sa­tion” is enabled while record­ing, the addi­tional latency due to any audio devices in your mon­i­tor­ing sig­nal path will be baked in.

Thwart­ing Ableton’s Kind Efforts To Bake Your Latency

I’ve found a few gen­eral meth­ods for this.

1) Don’t Soft­ware Monitor

In my expe­ri­ence, this is always the best option, if it’s pos­si­ble.  All of the fol­low­ing work:

  • Record an out­board MIDI synth to a nor­mal MIDI track. Mon­i­tor mode should be set to “Off” (yes Able­ton will still bake latency for MIDI tracks with mon­i­tor­ing enabled!).  Use local con­trol on your MIDI device, and mon­i­tor it directly through some­thing like a mixer or a sound­card mon­i­tor­ing fea­ture. Edit and tweak the clips to your lik­ing. Then record your synth’s out­puts via nor­mal Audio tracks with mon­i­tor­ing disabled.
  • Record a hardware-monitored out­board MIDI synth to an Exter­nal Instru­ment track with Live’s Mon­i­tor mode set to “Off”.  Freez­ing the result­ing clip(s), and option-dragging them to an audio track will give you a nice tight record­ing with well-chosen loop position.
  • Record audio tracks with Mon­i­tor set to “off”.  Use direct mon­i­tor­ing facil­i­ties on your audio inter­face, or a mixer.
or 2) Tem­porar­ily Turn off Delay Compensation

If you have to record using soft­ware mon­i­tor­ing (eg. your sound­card doesn’t sup­port direct mon­i­tor­ing, you’re using a vir­tual instru­ment, and/or you need to mon­i­tor through some plu­g­ins), you can min­i­mize latency by reduc­ing your audio buffer size.  If you have latency-inducing devices in your mon­i­tor­ing chain, turn­ing off Delay Com­pen­sa­tion under the Options menu will help keep your recorded clips rougly where Able­ton actu­ally received then — not shifted late for you.  They will still be delayed by your audio buffer size in an effort to min­i­mize jit­ter (as explained in the manual’s chap­ter “MIDI Fact Sheet”), but at least the “device” Delay Com­pen­sa­tion shift won’t be added.

This method may not work if you have a com­pli­cated sig­nal chain on other parts of your track that will now sound cacoph­o­nous with latency com­pen­sa­tion dis­abled dur­ing your track­ing session.

or 3) Bite The Bul­let, But Min­i­mize Latency Dur­ing Recording

If you have to have delay com­pen­sa­tion enabled, and you have to soft­ware mon­i­tor, then the gen­eral rule of thumb is to min­i­mize latency.  Keep your audio buffer size tiny.  Don’t put any plu­g­ins on the mas­ter.  Don’t put any plu­g­ins on tracks you’re record­ing on.  Hav­ing plu­g­ins or audio devices dis­abled often isn’t enough — you have to actu­ally delete them for Live to com­pletely take them out of the latency com­pen­sa­tion chain. Live will still bake in your audio input buffer latency, but at least it will be minimal.

Able­ton Doesn’t Latency-Compensate MIDI Clock Out

No mat­ter what it’s doing to your record­ings, it doesn’t bother to delay com­pen­sate MIDI clock sig­nals at all.  So if you have much latency in your sys­tem, and you’re mon­i­tor­ing an out­board sequencer that’s slaved to Live, and you’re mon­i­tor­ing that sequencer audio via a bunch of plu­g­ins, you have to put in large neg­a­tive delay adjust­ments for Live’s MIDI Clock Delay or things won’t line up.

And if you change your sig­nal path at all, you’ll most likely have to hand-tune that delay para­me­ter again — for all out­puts that care about MIDI Clock.

What Ableton’s Doing Behind The Scenes On Playback

This behav­ior all kind of makes sense in Ableton’s world-view of latency com­pen­sa­tion: on play­back, shift pre-recorded clips early to antic­i­pate for play­back delays. I’ll call this early play­back. It has the great­est effect when “Delay Com­pen­sa­tion” is on, adjust­ing for high-latency plu­g­ins in the sig­nal path.

Exter­nal Instru­ments MIDI, internally-routed MIDI, and audio tracks clips are all shifted early on play­back. MIDI clips on tracks routed to an exter­nal MIDI inter­face aren’t played back early, prob­a­bly because it’s not obvi­ous how they’re being monitored.

MIDI clock out­put is kind of an unknown, exter­nal thing, and it’s not clear how much you’d want to off­set if by.  As I men­tioned above, it’s not shifted early.

Strangely, the metronome in Live seems to be added post-Master fx, so whether device delay com­pen­sa­tion is active or not, it will always be play­ing “on time”.

Try this — cre­ate a set with a sin­gle beat loop in an audio track.  Put a ton of latency-inducing plu­g­ins on your mas­ter chan­nel.  Turn on the metronome.  Make sure delay com­pen­sa­tion is active.  Your beat and the metronome should sound in-time.  Now dis­able delay com­pen­sa­tion.  Your beat should sound late, but the metronome is still “on-time”.  With delay com­pen­sa­tion active, your beat’s audio was being shifted early to account for the pro­cess­ing delay from the plugs.

This device delay com­pen­sa­tion on play­back is usu­ally your friend — it can keep a set with tons of real­time audio pro­cess­ing in near-perfect sync.

So What About The Machine­drum or Monomachine?

When record­ing the Machine­drum and the Mono­ma­chine, I’ve cur­rently opted to soft­ware mon­i­tor since I like record­ing a bunch of dis­crete out­puts from them, and my audio inter­face doesn’t sup­port mix­ing mul­ti­ple inputs for direct monitoring.

How­ever, I have a tem­plate set that basi­cally has no plu­g­ins in those devices’ mon­i­tor­ing path, and I start com­pos­ing songs with my audio buffer set to 32 sam­ples.  The latency is con­stant and known, so I’ve com­pen­sated for what lit­tle there is using the MIDI Clock Delay para­me­ter.  And I don’t mess with it unless I have to change my audio buffer size. Basi­cally, I’m using Option 3 from the sec­tion above.

I don’t put plu­g­ins on the Mas­ter until well after I’ve recorded the MD and MNM to audio, and I don’t mon­i­tor the MD or MNM through plu­g­ins.  If I’m record­ing their MIDI out­put, I don’t record mon­i­tor the input track (sug­gested in the Live manual).

If I’m going to use the MNM as a synth respond­ing to MIDI notes from Live, I either use the audio + midi track setup, or an Exter­nal Instru­ment track.  

With these pre­cau­tions, I think I’ve come pretty close to an opti­mal setup for work­ing with these machines in Live.

Comments

3 Responses to “Ableton Live, The Machinedrum and The Monomachine (Part 2): Minimizing Latency”

  1. balache
    June 28th, 2010 @ 7:21 pm

    able­ton prob­lem with latency and jit­ter is really seri­ous, it is sur­pris­ing they have not already solved, is there a midi plu­gin or some­thing that can “move” auto­mat­i­cally recorded midi events to a defined offset?

  2. jdn
    July 13th, 2010 @ 4:11 am

    Bal­ache, I could imag­ine using Max For Live to shift notes back by a user-defined off­set, but for now I’m just try­ing to keep my latency low, and under­stand what’s actu­ally hap­pen­ing in the sys­tem. That way, when I play, things are tight, and the recorded per­for­mance is pretty darn close to what I want in the first place. Cheers, –j

  3. Ambrose Holmes
    September 16th, 2010 @ 12:21 am

    Bal­ache, I could imag­ine using Max For Live to shift notes back by a user-defined off­set, but for now I’m just try­ing to keep my latency low, and under­stand what’s actu­ally hap­pen­ing in the sys­tem. That way, when I play, things are tight, and the recorded per­for­mance is pretty darn close to what I want in the first place. Cheers, –j
    +1

Leave a Reply