Skip to main content

Handling Latency While Recording

Author cognitone

When you play a phrase on your master keyboard, it takes some time for the MIDI message to arrive at the virtual instrument plug-in, and then for the sound to be rendered and played back to you through your speakers or headphones. With a default sample rate of 44 kHz and a buffer size of 512 samples, this is 11.6 x 2 = 23.2 ms. If there's a limiter, maximizer or other mastering tool in the MASTER module of your global rack, that accounts for another 10 - 50 ms.

What's more, weighted piano keys already feel slow because it takes a moment for the hammer to hit the string. You may be accustomed to this, but when combined with technical latency, it exacerbates the perceived delay.

Playing in time with so much delay is a challenge. The audio engine sends all input immediately to the instrument (like any DAW), even before Synfire processes the input. There is not much it can do to further reduce the lag, but you can. Here are a few things you can do to minimize latency and lag.

Set Block Size to 128 Samples

You can even go lower if your instruments can deal with that. A smaller block size means that MIDI input is handed over to the instrument more frequently, which reduces the time it has to wait for the next packet of notes. This setting is found in Playback >> Audio/MIDI Setup on the Audio tab.

Use Audio Engine For MIDI Input

Enable this option to make sure MIDI input is received and processed directly by the program that hosts your instruments. Otherwise it will have to run through the local network first. Also enable input latency compensation. If you are playing consistently late or early, Synfire will shift your take accordingly. This setting is found on the parameter inspector for the Take parameter. 

Remove Mastering Plug-ins

Limiters, maximizers, compressors, delays, and other effects can significantly increase the time it takes for rendered audio to reach you through speakers or headphones. This is easy to overlook when you are struggling with latency. Temporarily remove these effects from your AUX or MASTER modules on the global rack and all INSERT slots of the other rack modules. 

When you are done recording, you should restore your previous buffer size and mastering effects.