Return to home page

MLA - MIDI Latency Analyser V2

Download the Windows version | Download the Mac version | Show your appreciation

Version-2 of this software is vastly more capable than version-1. It still fulfils its original function of computing the average round-trip latency of synth audio when dubbing a MIDI'd synth to an audio track, but now it can also isolate timing problems to reveal the various causes, whether they be:

software screenshot

Using the software

Features numbered in the above screen-shot

  1. This is the Show Help button. Click on this followed immediately by an on-screen control to bring up the help text for that control.

  2. This button appears after MIDI bytes have been decoded from the loaded recording. Click on this to save a new wave-file containing blips that highlight the clocks, active-sensing and note data. You can then import the file into your DAW for viewing alongside the source MIDI track that produced it, and any other analysis waves you are interested in. Figures 1, 2 & 3 illustrate an example. Figure 1 shows how to prepare the MIDI track that will provide the notes for testing your system. Figure 2 labels the various parts of a blip-wave and includes a legend to explain the meanings of the blips. Figure 3 details the exact positioning of the blips relative to the recorded signals.

  3. Up to four histograms will appear after the loaded recording has been analysed. The Synth's Own Jitter Distribution will appear only if both MIDI note data and synth audio tracks are analysed. The numbers indicate the dividing boundary between the outlier columns and the main columns.

  4. Up to four Save As Wave buttons will appear after the loaded recording has been analysed, one for each Jitter Distribution histogram and its associated milli-seconds RMS text-box. The waves reveal whether the latency variation that resulted in the RMS value and the histogram shape was a high-frequency random jitter or whether it was a cyclic drifting of tempo. When the wave is above centre the notes or clocks are rushing earlier than average, and when the wave is below centre they are dragging later than average.

  5. You can choose the horizontal scale of the histograms from this pull-down menu. It has no effect on the amplitude of the jitter waves produced when the buttons labelled "4" are clicked. When set to "Normalised individually" as shown in the screenshot, the outlier boundary numbers on the histogram scales reveal the size of the worst errors.

  6. When you do a round-trip analysis to determine the number of samples offset to enter into your DAW's latency compensation setting, you should record synth attacks to a mono wave-file at the same sample-rate as your music session.

  7. This is the status bar, and it will occasionally show information about what the software is currently doing.

Capturing the MIDI signal

If all you want is to compensate for Synth Round-trip Latency, or to measure tempo, then you do not need to capture the MIDI signal. (You can simply record mono files of synth attacks just as you did with version-1, but now at any tempo.) However, in order to analyse extra information besides tempo and Synth Round-trip Latency, it will be necessary to record the MIDI signal's waveform as audio. A special adaptor is required to do this. Here is the schematic so that you may build the adaptor.

Getting started

First, it is important to understand where the MLA software fits within the scheme of things. To help illustrate this, here is a concept diagram, which essentially is a map. Your studio may not have all the physical and abstract things illustrated in the diagram, but don't worry: just as a road-map shows you places that you could visit if you chose to, this concept diagram reveals what options are available to you as you plan your "analysis journey."

It is recommended that you record synth audio and MIDI signals at a peak level of between -1 dBFS and -5 dBFS. The best synth sound is a single oscillator high frequency square wave with fully open filter and instant attacks on filter and amplitude envelopes.

Any time that the MIDI waveform is recorded, it is vital that the recording be done at 96,000 samples per second.

The cause of latency and jitter

A computer has to share its time among many tasks such as processing its mouse and keyboard data, updating the screen, performing DSP, sending MIDI, writing audio to its hard-drive, etc. Synths and samplers also have computer processes being executed inside them. Moving between the various software processes takes a tiny bit of time, so sometimes the MIDI ports are left waiting to be emptied and filled.

Two main sources of latency

Referring to the illustration above, we cannot do much about processes at B. Unless a synth manufacturer provides a firmware update for your instrument that changes how its internal computer talks to its MIDI ports, you are stuck with whatever latency and jitter it has. The news is better concerning software processes at A, though. You can try different drivers, different interfaces, and you can disable unnecessary software that could be running in the background.