Latency

Ed note Feb 2011: This is being republished from ePiano for upkeep here. We’ll integrate comments, tips etc.

Latency (for computer music making) is the delay between pressing a key and hearing its sound. If this difference is greater than 20 milliseconds – it creates problems for “live” performance. All systems (Mac, PC etc) have some latency.

Latency comes from:

  • MIDI processing (small, but there). This is the time to get the MIDI OUT (what you play) from your keyboard to the software that will then do something with it.
  • Soundsource. How the software/system processes the MIDI OUT before you hear sound.
    • If back to MIDI out – fast. Not highly system dependent.
    • If Soundcard with soundfont – minimal system dependence.
    • If Software-based synthesizer – dependent on the design of the synthesizer and lots of system variables (see below).

With Software synthesizers – the hugely predominant trend – latency becomes a function of your computer specs and how the softsynth is written and some techie settings/options that are usually configured by the user on a per-system basis. Thus, latency will vary widely – so we can’t make any sweeping statements or claims regarding soft synths without detailing hardware, OS, etc. The challenge is that software synthesizers are not available to all programs on your system – only the programs installing/using it. – They vary widely in quality and cost. Also, in an attempt to get low-latency out of a software-synth – you may “push” the settings too far and end up having problems when recording multiple instruments effects etc.

Low latency is the goal. How to get there?

Latency in current “Live Playback” options:

Live sound playback Latency from best to worst Notes
PC with ASIO Drivers using a software synthesizer

or

Mac Core Audio using a software synthesizer

from 1ms to 50ms (practical experience – see notes) With ASIO drivers the latency is dependent upon the system’s performance (CPU/RAM/Motherboard). For more on ASIO see this wikipedia article.

ASIO drivers are provided by many musical hardware devices (Audio Interfaces, Soundcards, keyboards.

There is free to use ASIO driver called ASIO4ALL that works with many systems.

Usage limited to the software using/creating the software synthesizer (not available to all MIDI enabled programs).

Latency will also depend upon soft synthesizer design.

Windows Desktop PC with Creative Labs Soundcards and Soundfonts <=20ms The Creative Lab’s Soundcards offer low latency sound AND the ability easily to upgrade the sound via the Soundfont technology. Note, not all Creative Labs soundcards feature Soundfont playback as of Windows 7 – it seems to be limited to the X-Fi Xtreme Gamer and higher..

In Windows XP – all internal cards feature Soundfont playback.

Create labs external/usb solutions do not support low latency Soundfont playback. Thus, PC laptops are not included in this category.

Mac using Quicktime Musical Instruments <=20ms The Mac’s Core Audio feature set delivers a low latency solution out of the box. Processing the soundplayback by the Quicktime musical instruments is where the (to many – acceptable) delay comes from.
Stock Windows PC using GM Wavetable Synth around 200 ms With a “stock” Windows-based computer using the built-in GM Wavetable Synth – the latency will be around 200 milliseconds.

This is the problem with using a stock PC for sound playback.

Recommended solutions are using an internal sound module (Desktops only) or external sound module (laptop).

Further Study:

The Whippinpost.UK has a nice explanation of the details of the latency mechanics. Go there.

Leave a Reply