Metric Halo

Technote: Latency Compensation in MIO Console

Every signal that passes through a digital audio system takes a little time to get where it is going. Metric Halo systems are no exception to this rule, and different routes take different amounts of time.

Latency compensation measures every route in your system and delays the faster ones so that signals that belong together arrive together, to the sample.

It then tells your recording software exactly how late its recordings arrive, so they land on the timeline where they were played.

This note explains what the console aligns, how it does it, what it cannot do, and what each message in the Latency Compensation window means.

  1. Why signals arrive at different times
  2. What latency compensation does
  3. What is aligned with what
  4. How the console delays a path
  5. Audio device latency compensation in your DAW
  6. Monitor Controller and cues
  7. Loopbacks through the computer
  8. Mixing older and mkIV converters
  9. What you need
  10. Turning it on and using it
  11. Reading the Latency Compensation window
  12. What latency compensation does not do
  13. Appendix: converter latency figures

Why signals arrive at different times

Latency is counted in samples of the running sample rate. At 48 kHz one sample is about 21 microseconds, so 48 samples is one millisecond. A path’s latency is the sum of everything it passes through:

So two microphones on the same source can reach your recording software at different times simply because one is plugged into an older unit and the other into a mkIV, or because one goes through a strip with a look-ahead compressor.

A difference of a single sample is inaudible on its own. But when two such signals are mixed together, even a few samples of difference changes the tone by comb filtering, and a millisecond smears a transient.

Overdubs recorded against playback land early or late on the timeline by the round trip your software does not know about.

Before ULN-8 In 1 ADC 64.5 routing → computer mkIV In 1 ADC arrives about 57 samples (1.2 ms) early After ULN-8 In 1 mkIV In 1 compensation delay 57 both arrive together
Two inputs recorded together at 48 kHz, one on an older ULN-8 and one on a mkIV in its default filter mode. Latency compensation delays the faster path by the difference, so both reach the computer on the same sample. Figures are measured converter latencies; the routing terms are the same for both and are left out.

What latency compensation does

MIO Console knows every route in your system and how long each step of it takes: every converter at every sample rate and filter mode, every router step and MHLink hop, the DSP, and the latency each plug-in reports.

Whenever anything that could change a path’s latency changes (routing, a plug-in, the sample rate, a filter mode, the clock source, tunnel routing, a unit joining or leaving), the console:

  1. Traces every path from its source to its destination and adds up its latency.
  2. Groups the paths whose signals belong together, such as all your analog inputs recorded into the computer (see What is aligned with what).
  3. Plans the delays. Within each group the slowest path sets the target, and every faster path is delayed by exactly its difference, in whole samples.
  4. Applies the plan, automatically or when you click Apply Now, as you choose in Preferences.
  5. Tells the computer the resulting input and output latency through the MHLink driver, so your recording software places what it records correctly.

Latency compensation only ever adds delay to the faster paths. It never shortens a path, so the slowest path in a group sets how long the whole group takes.

That is why it pays to know where the latency comes from: switching off an unused slow unit, or choosing a lower-latency filter mode, lowers everyone’s latency.

What is aligned with what

Not every signal should be aligned with every other. Delaying your playback to meet the analog inputs, for example, would only add latency to what you hear for no benefit, because the two were never time-related to begin with.

The console aligns paths in groups whose signals belong together, and computes and reports the latency between groups without changing it. The Latency Compensation window names each group:

GroupWhat it aligns
Analog inputs to computerEvery analog input you record, whether straight to the computer or through a strip, its inserts and the mixer, so a pre-insert record and a post-insert record of the same source line up.
Computer to analog outputsEvery channel the computer plays out of an analog output, on any unit.
Analog inputs to monitor, Computer to monitorWhat the Monitor Controller’s outputs play, as two groups: the analog inputs, and the computer’s playback.
Analog inputs to cue, Computer to cueThe same for each cue, so each performer’s mix is aligned in itself.
Computer to computerLoopbacks that leave the computer and come straight back through a unit (see Loopbacks).

Mixes are aligned where signals are summed. When several sources are mixed, the console aligns them at the point they are summed, so a stereo pair or a multi-mic drum kit sums without comb filtering.

It does this separately for each family of signals that are related in time: all the analog inputs (on every unit) together, all the computer’s channels together, and each type of digital input (AES/SPDIF, ADAT, MADI) on its own.

The analog inputs and the computer’s playback meet in a mix as they are, never one delayed to wait for the other.

The monitor and the cues are aligned separately. Each cue keeps its own latency, so a performer’s headphones never wait for the control room.

Delays you set are yours. A MIO Delay you insert, or a speaker delay you set on a monitor output, is there to move one signal against its neighbors on purpose. The console neither counts it nor compensates for it.

Where MIO Console lines up latency, both ways: per channel at the converters, at the mixer’s sums and at the host, with the driver holding a loop from the host to the round trip
How it fits together. Box A’s converters are faster than box B’s, so each of box A’s channels is delayed to meet box B’s; paths summed in the mixer line up at the sum, in both directions; everything recorded lines up at the computer; and a loop from the computer that would come back early is held by the driver until the round trip.

How the console delays a path

The console uses whichever of these fits where the path runs, and owns every delay it adds; you will not see them among your own plug-ins.

Changes are made live. Changing a delay while audio runs through it moves that signal by the difference, a few samples at a time.

In our listening tests at 48, 96 and 192 kHz on program material no change could be heard, so the console does not mute anything while it applies a plan.

A recording in progress through an affected path does carry the shift, though, so stop recording through it before you apply a change. Under Ask before applying, nothing changes until you do.

Boot States and Snapshots include the delays. A Boot State or Snapshot saves the alignment delays. A unit that boots from one, or recalls one, is aligned as before, even without the console.

While the console runs, it works out the delays again after every change. Under Ask before applying, it asks first, except at startup or when opening a document, when it applies them at once.

Audio device latency compensation in your DAW

A recording application places what it records using the latency Core Audio reports for the device’s input and output. Without latency compensation the MHLink driver reports only its own buffering.

With it, the console gives the driver an aligned input latency and output latency for every sample rate. The driver reports them to Core Audio.

A take recorded against playback then lands on the timeline exactly where it was played. MIO Console’s own Session recorder places its takes the same way.

The input and output latency are reported separately. Placing a recording needs only the round trip, the input and output latency added together.

An application that plays MIDI with audio also uses the output latency alone, to keep the MIDI in time with the audio. So the split between input and output matters as much as the total.

The console reports each of them accurately, so a host that uses them can keep MIDI and audio in time.

Telling Core Audio interrupts the audio briefly. Core Audio passes a new latency to applications only by stopping and restarting the audio of every application using the device, and most applications read the latency only when their audio starts.

So you choose when it happens, in Preferences, under Report Latency to Hosts:

Changes that leave the reported figures where they were, such as switching the Monitor Controller (below), report nothing and interrupt nothing.

Monitor Controller and cues

Switching the Monitor Controller or a cue between sources or outputs would normally change which path is slowest, and so the latency reported to the computer, interrupting every application each time.

Instead, the console delays whichever source or output is selected to match the slowest one the controller can switch to. Switching then changes only the delays, inaudibly, and never the reported latency.

A cue that follows the Monitor Controller’s source switches with it.

The cost is that the monitor path always carries the latency of the slowest choice it could switch to, even when a faster one is selected.

Loopbacks through the computer

A loopback is a signal that leaves the computer and comes straight back into it through a unit, with or without a strip or the mixer in between: printing a hardware-processed stem, for example.

Your recording software expects the return one full round trip after it played it, as if it went out through a cable and back. The console delays every loopback to arrive exactly then, so it lines up with its source.

With MHLink driver 3.0.55 or later the driver itself holds the returning channel back, which costs the unit nothing. With an older driver the unit delays it, using its delay slots.

A loopback that already takes longer than the round trip arrives late, and the window says by how much. A loopback over USB cannot be aligned and is left as it is.

A loop through outboard gear on a cable is different: the console cannot see the cable, so it treats the send and the return as an ordinary output and input.

Mixing older and mkIV converters

An older ULN-8, LIO-8, ULN-2 or 2882 has converters whose delay is the same at every frequency. A mkIV in its default Low Latency Minimum Phase mode is much faster, but its delay varies slightly with frequency.

Latency compensation can align the two only on a single figure, so the high and low frequencies of a mkIV in minimum-phase mode still differ slightly from an older unit’s.

When a group mixes the two, the Latency Compensation window proposes setting the mkIV units to Linear Phase (Normal FIR in the window). They then align with the older units exactly.

Linear Phase is slower than the default, and it changes the sound of the converter, so the console only offers it, with Use Normal FIR. It never changes the filter mode on its own.

Older ULN-8 and LIO-8 units need calibrating first. Over the years the older ULN-8 and LIO-8 were built with one of two DACs, whose latency differs by about 15 samples, and nothing in the unit says which it has.

The analog calibration identifies the DAC as it runs and stores it in the unit (see Calibrating ULN-8/LIO-8 Analog Levels).

Until a unit is calibrated, the console assumes the faster DAC and says “DAC not identified: run analog calibration for accurate latency compensation”. If the unit has the slower DAC, its outputs arrive about 15 samples late.

What you need

ItemNeeded for
MIO Console 6.4.02 or laterLatency compensation.
Firmware 6.0.226 or later on each unitCompensating any path through that unit. A unit with older firmware is still traced and its latency still counted, but nothing on it is delayed, and the window says “Update its firmware to 6.0.226 or later to compensate its latency.”
MHLink driver 3.0.54 or laterReporting the aligned latency to Core Audio. If you turn latency compensation on with an older driver, the console offers Update Driver or Disable Latency Compensation.
MHLink driver 3.0.55 or laterAligning loopbacks in the driver rather than in the unit.
Analog calibration (older ULN-8 and LIO-8)Accurate figures for that unit’s DAC (see above).

Turning it on and using it

  1. Choose how changes are applied. In MIO Console’s Preferences, on the Interaction page, set Latency Compensation to Apply automatically (the default) or Ask before applying. Off removes every compensation delay and reports only the driver’s own buffering.
  2. Choose when Core Audio is told. On the same page, set Report Latency to Hosts to Automatically when updated or Ask.
  3. Set up your routing as usual. Whenever the routing changes the alignment, a Latency Not Aligned notice appears.

    Under Ask before applying, click Apply Now on it, or in the Latency Compensation window, when you are not recording. Under Apply automatically the change is made at once.

  4. Restart your recording software’s audio, or let it restart, if it was running when the latency was reported. Most applications pick up the new latency the next time they start their audio.
  5. Check the status at any time with Show Latency Compensation Status in the domain’s menu, or by double-clicking a unit’s Latency Compensation column in the domain configuration window, which shows whether each unit can be compensated.

Opening a console document applies its plan at once under either setting, since loading has already interrupted the audio.

Latency compensation is one setting for the whole installation.

Nothing is stored in your console document, and undo does not record the delays: they are always recomputed from the routing you have, so undoing a routing change re-plans the delays for the routing it restores.

Reading the Latency Compensation window

The window’s headline says where things stand:

HeadlineMeaning
Aligned.Every path that can be aligned is, and nothing was left out.
Not aligned: the routing has changed since compensation was applied.A plan is waiting. The lines below say which groups are out by how much, and whose delays Apply Now will change.
Applied, but not every path could be aligned.The plan is in force, and the lines below list each path it could not align and why.
No paths to compensate.Nothing routed belongs to a group.
Latency compensation is off.Set in Preferences.

The lines below the headline, and what to do about each:

LineWhat it means, and what to do
… N paths arrive up to X samples earlyThe console ran out of a way to delay them: no delay slot fits, the unit’s slots ran out, or the difference is longer than two slots. Reducing the slowest path’s latency (a faster filter mode, fewer plug-ins with look-ahead) shrinks the gap.
… N paths arrive up to X samples lateA loopback already takes longer than the round trip the computer expects.
… N paths not compensatedThey run through a unit that cannot be compensated; a line naming the unit says why.
… of unknown latency, not compensatedThe console cannot tell how long some step of the path takes. It is left as it is and sets no target.
… carry nothing: unit’s converters do not run at 192 kHzThe path is routed, but that unit’s converters are off at this rate, so there is nothing to align.
Update its firmware to 6.0.226 or later to compensate its latency.That unit’s firmware has no delay support. Update it.
DAC not identified: run analog calibration for accurate latency compensationAn older ULN-8 or LIO-8 whose DAC has not been identified (see above).
Latency compensation was refused: …Applying the plan would overload a unit’s router at this sample rate (at 192 kHz a large routing table has little room left). Nothing was changed.
Core Audio still has the latency from before the last change.Under Ask, a report is waiting. Report to Core Audio sends it.

The window also offers Use Normal FIR when it proposes a filter mode change (see above).

The same conditions appear as notices in the console’s notification window while they hold: Latency Not Aligned, Latency Partly Aligned, Latency Not Reported, and Normal FIR Proposed.

What latency compensation does not do

Appendix: converter latency figures

Measured on our bench, in samples, at 48 kHz, through each converter alone; the console uses these figures. A mkIV’s DAC latency grows slightly at higher rates.

ConverterADCDAC
ULN-8 mkIV, LIO-8 mkIV, Ultra Low Latency Minimum Phase7.85.4
ULN-8 mkIV, LIO-8 mkIV, Low Latency Minimum Phase (default)7.85.1
ULN-8 mkIV, LIO-8 mkIV, Linear Phase17.223.2
ULN-8 mkIV, LIO-8 mkIV, High Attenuation Linear Phase17.249.2
ULN-8, LIO-8 (older), later DAC64.529.3
ULN-8, LIO-8 (older), earlier DAC64.543.9
ULN-2, 288241.028.5

At 176.4 and 192 kHz a mkIV’s ADC takes 12.2 samples in every mode; the ULN-2 and 2882 converters do not run at those rates.