Offsetting latency: Real vs. Virtual Instruments

Discuss hardware/software tools and techniques involved in capturing sound, in the studio, live or on location.
Post Reply

Offsetting latency: Real vs. Virtual Instruments

Post by claz »

I currently have Reaper set up to compensate for the round trip latency of my MOTU M4 interface.

(For reference: Reaper > Settings > Audio > Recording > Uncheck "use driver reported latency" > Enter number of samples into "input manual offset" box.)

Latency was determined via loopback test (cable from interface output to input) to equal 303 samples.

This is all well and good, but it occurred to me that this is *round trip* latency, i.e. the latency that I'd experience if monitoring my own vocals or DI guitar from the DAW, not direct monitoring.

But, let's say my primary use case is layering in virtual instruments via midi, and the goal is for the subsequent recorded tracks should to be time aligned.

(Finally to my question.) In this case, would I halve Reaper's latency offset from 303 to 151 samples, since the "input" is not coming through the audio interface's input?
claz
Regular
Posts: 114 Joined: Mon Sep 10, 2018 3:35 am

Re: Offsetting latency: Real vs. Virtual Instruments

Post by Wonks »

Yes, for the offset you just want the input latency figure. But note that input and output latency can be different values, so halving the round trip value might leave you slightly out from optimal.
User avatar
Wonks
Jedi Poster
Posts: 19208 Joined: Thu May 29, 2003 12:00 am Location: Freethorpe, Norfolk, UK
Reliably fallible.

Re: Offsetting latency: Real vs. Virtual Instruments

Post by James Perrett »

I've never felt the need to change Reaper's default settings for this. It seems to automatically handle latency compensation well with my RME and Zoom interfaces.
User avatar
James Perrett
Moderator
Posts: 16991 Joined: Mon Sep 10, 2001 12:00 am Location: The wilds of Hampshire
JRP Music - Audio Mastering and Restoration. JRP Music Facebook Page

Re: Offsetting latency: Real vs. Virtual Instruments

Post by Wonks »

But MIDI latency is also different to audio latency, and changing the audio buffer size doesn’t change the MIDI latency value (at least when I tested it). Hardware MIDI latency is probably greater than software (USB) MIDI latency, though I have no idea by how much.
User avatar
Wonks
Jedi Poster
Posts: 19208 Joined: Thu May 29, 2003 12:00 am Location: Freethorpe, Norfolk, UK
Reliably fallible.

Re: Offsetting latency: Real vs. Virtual Instruments

Post by claz »

@James,
in my experience, using the default "driver reported latency" in Reaper gets pretty close, but it's not perfect -- it's easy to check how far off by outputting a click (Reaper > action menu > add click source), recording that same click, and then zooming in to see the offset.

@Wonks,
I'm not sure how to measure the input and output latency independently, hence halving. Otherwise, I agree that it make sense to use only the input value. For now, I'm using half the round trip as a close-if-not-perfect number.

Also, good point about the potential for latency from the MIDI input itself. I'm also not sure how to measure that... I suppose you'd need to record a single MIDI note and then set up Reaper to trigger your MIDI device to play that note, which you'd record to a different track, and compare? Presumably the USB communication happens so fast that any latency would be attributable to the MIDI controller's internal RTL. That might actually be worth doing!
claz
Regular
Posts: 114 Joined: Mon Sep 10, 2018 3:35 am

Re: Offsetting latency: Real vs. Virtual Instruments

Post by Tomás Mulcahy »

claz wrote: Wed May 15, 2024 5:33 pm @James,
in my experience, using the default "driver reported latency" in Reaper gets pretty close, but it's not perfect

Reaper does not get it right because an awful lot of audio interfaces do not report it correctly, and I don't know of any that include the delay within the ADC and DAC. I would imagine RME do since they don't farm out any of the driver coding and are brutally honest about their noise specs :) DAWbench might help? Not sure, I only recently discovered it was a thing. So you could just do some measurements yourself?
User avatar
Tomás Mulcahy
Frequent Poster
Posts: 3007 Joined: Wed Apr 25, 2001 12:00 am Location: Cork, Ireland.

Re: Offsetting latency: Real vs. Virtual Instruments

Post by Wonks »

Remember that in this instance the audio latency is different to the MIDI latency. And it’s the MIDI latency that’s important here for recording the events correctly. For listening, there will be a processing delay for the DAW and the software instrument, then the output buffer latency.

Certainly in Windows, MIDI is nothing to do with the ASIO driver and its associated sample buffer. It’s normally done by the standard Windows MIDI driver. I know some dedicated MIDI interface hardware has its own drivers for improving timing between multiple channels but that’s normally older kit.
User avatar
Wonks
Jedi Poster
Posts: 19208 Joined: Thu May 29, 2003 12:00 am Location: Freethorpe, Norfolk, UK
Reliably fallible.

Re: Offsetting latency: Real vs. Virtual Instruments

Post by Tudder »

Given the context of offsetting latency in Reaper, particularly with the new features in Cockos Reaper 7, how would you adjust latency compensation when layering virtual instruments via MIDI? Specifically, should the input manual offset still be halved (from 303 to 151 samples) considering the input isn't coming through the audio interface? Are there any Reaper 7 updates or features that might affect this calculation?
Tudder
New here
Posts: 7 Joined: Mon May 06, 2024 6:27 pm
Post Reply