Playback Lag When Recording Due to USB Latency Compensation

Status
Not open for further replies.

GlennO

Axe-Master
[ Update on June 3, 2022: As of AxeFX III DSP firmware version 20, you can now reliably change the USB buffer size in the I/O -> Audio page on the Axe-FX. Setting this value to 16 will give most people good audio alignment when recording. There are some new latency problems when using DSP firmware version 20 that hopefully will be fixed soon, but simply setting that parameter to 16 is a good fix for the recording alignment problem in many cases. See post #31 for details: https://forum.fractalaudio.com/thre...tency-compensation.181686/page-2#post-2272399 ]



If you've tried to use your Axe-FX (or FM3/9) as an audio interface for recording, you've probably noticed there is an issue that causes recorded audio to play back late. You might record your guitar perfectly in time, but when you play it back, your guitar will lag behind other tracks in your song.

I believe I've found the source of the problem, but first here's a description of this issue:


The Problem
-----------

There is an inevitable latency that comes with computer audio. This latency will be present when you record your guitar into your DAW. However, all DAWs are smart enough to deal with this and apply a latency compensation so your guitar audio is aligned properly with tracks you are listening to, for example drums, while recording. Unfortunately, the amount of compensation that is applied when recording an Axe-FX is incorrect. The result is your recorded guitar audio will be delayed in relation to other tracks in your project. This lag is substantial, often in the 10-20 millisecond range (far greater than the internal processing latency). That is enough of a lag to make any recording sound sloppy. This problem does not occur with other audio interfaces, only the Axe-FX.


The Cause
---------

I believe I've found the cause of the problem. The Axe-FX has an internal usb buffer (actually 4) with a selectable size. The size of this buffer affects the latency. However, the latency reported to the DAW does not match the size of this buffer. This will introduce an error in the compensation applied by the DAW, resulting in misaligned tracks. In my experiments, it is only correct if the buffer size is set to 16. (Strictly speaking, the latency reporting is probably delegated to the driver, but that doesn't matter. As long as it doesn't match the actual latency, there will be a problem.)

This means there's a straightforward solution. The buffer size just needs to be set, preferably automatically, to a value that matches the reported latency, the DAW will compensate correctly, and your recorded tracks will be aligned properly.


The Workaround
--------------

I sent details about this last week to Fractal Audio. Unfortunately, there is nobody available to work on this at the moment, so there won't be a fix soon.

What can you do in the meantime? The details above suggest that if you could adjust the buffer size to match the reported latency, that would fix the problem. Alas, it's not so simple. The problem is there's a bug with the usb buffer size parameter that makes it exceedingly difficult to set it to 16 (or whatever value will match the reported latency).

Whenever you reboot your Axe-FX, the buffer size will reset to 128. Do not believe the size that is displayed on the I/O Audio page. It will show the value you most recently set, but it will actually be 128.

Ok, that's simple. All you need to do is set that to 16 whenever you reboot your Axe-FX, right? Well, unfortunately there's another problem that makes it difficult to set the size to 16. If you set the size within 5 minutes of a reboot, it will not adjust correctly and the latency will be off by as much as 100 samples.

Ok, that's simple. All you need to do is wait 5 minutes after a reboot before adjusting the buffer size, right? Well, unfortunately, it's not just a reboot that will require you readjust the size. You'll also need to do this after doing a number of other things, including unplugging/plugging your usb cable or quitting your DAW app, or importing a preset.

If that sounds like a hassle, you're right. Fortunately, there is another workaround. You can use manual compensation in your DAW. You'll find instructions for this workaround here: https://forum.fractalaudio.com/threads/latency-compensation-measurement.177851/ This is probably the best workaround for most people.




A final note on expectations. If you make this change to the buffer size, a recorded DI track will be aligned very nicely. For wet tracks, this will eliminate most of the error, taking it down from over 11 ms, where it's a significant problem, to about 2 ms, where it is virtually imperceptible. In other words, it's an effective fix for most people. If you want a wet track to align more precisely however, you'll need to do a manual compensation in your DAW for that remaining 2ms.

Note: AlbertA reported some of these same findings 4 years ago.
 
Last edited:
Well this is amazing. While it's disappointing to hear that it won't be fixed soon, the fact that you figured out the cause makes it a pretty straightforward fix once the right person can put their hands on it.

Thanks for your detective work, must have been a real hassle.
 
I sent details about this last week to Fractal Audio and I believe they understand the problem now. Unfortunately, there is nobody available to work on this at the moment, so there won't be a fix soon.
Thank you for your perseverance in pursuing this but I must say I’m at a bit of a loss here with the issue not receiving FAS’s immediate attention. I believe this issue has been outstanding for over a year now. I would have thought it merited the greatest urgency.
 
I appreciate the insights from the OP --- however I don't have the patience to try to fix all the sources of lag in recording (not limited to the FM3). Lining up the waveforms of the various wet tracks with the DI track generally works fine and fits my luddite tendencies. When re-amping with current iterations of FM3 and Reaper, I find that nudging left by 17 milliseconds does the trick.
 
Cool debugging and analysis!

I always record the analog outputs, so I haven't encountered this. That works better with my DANTE setup and allows me to run at any sample rate.
 
Usually, I also just record the analog outputs, but sometimes, I like to have the DI signal as well - either for re-amping or editing purposes - and in those cases, I prefer to record using the Axe as an interface.
 
If you've tried to use your Axe-FX (or FM3/9) as an audio interface for recording, you've probably noticed there is an issue that causes recorded audio to play back late. You might record your guitar perfectly in time, but when you play it back, your guitar will lag behind other tracks in your song.

I believe I've found the source of the problem, but first here's a description of this issue:


The Problem
-----------

There is an inevitable latency that comes with computer audio. This latency will be present when you record your guitar into your DAW. However, all DAWs are smart enough to deal with this and apply a latency compensation so your guitar audio is aligned properly with tracks you are listening to, for example drums, while recording. Unfortunately, the amount of compensation that is applied when recording an Axe-FX is incorrect. The result is your recorded guitar audio will be delayed in relation to other tracks in your project. This lag is substantial, often in the 10-20 millisecond range (far greater than the internal processing latency). That is enough of a lag to make any recording sound sloppy. This problem does not occur with other audio interfaces, only the Axe-FX.


The Cause
---------

I believe I've found the cause of the problem. The Axe-FX has an internal usb buffer (actually 4) with a selectable size. The size of this buffer affects the latency. However, the latency reported to the DAW does not match the size of this buffer. This will introduce an error in the compensation applied by the DAW, resulting in misaligned tracks. In my experiments, it is only correct if the buffer size is set to 16. (Strictly speaking, the latency reporting is probably delegated to the driver, but that doesn't matter. As long as it doesn't match the actual latency, there will be a problem.)

This means there's a straightforward solution. The buffer size just needs to be set, preferably automatically, to a value that matches the reported latency, the DAW will compensate correctly, and your recorded tracks will be aligned properly.


The Workaround
--------------

I sent details about this last week to Fractal Audio and I believe they understand the problem now. Unfortunately, there is nobody available to work on this at the moment, so there won't be a fix soon.

What can you do in the meantime? The details above suggest that if you could adjust the buffer size to match the reported latency, that would fix the problem. Alas, it's not so simple. The problem is there's a bug with the usb buffer size parameter that makes it exceedingly difficult to set it to 16 (or whatever value will match the reported latency).

Whenever you reboot your Axe-FX, the buffer size will reset to 128. Do not believe the size that is displayed on the I/O Audio page. It will show the value you most recently set, but it will actually be 128.

Ok, that's simple. All you need to do is set that to 16 whenever you reboot your Axe-FX, right? Well, unfortunately there's another problem that makes it difficult to set the size to 16. If you set the size within 5 minutes of a reboot, it will not adjust correctly and the latency will be off by as much as 100 samples.

Ok, that's simple. All you need to do is wait 5 minutes after a reboot before adjusting the buffer size, right? Well, unfortunately, it's not just a reboot that will require you readjust the size. You'll also need to do this after doing a number of other things, including unplugging/plugging your usb cable or quitting your DAW app, or importing a preset.

If that sounds like a hassle, you're right. Fortunately, there is another workaround. You can use manual compensation in your DAW. You'll find instructions for this workaround here: https://forum.fractalaudio.com/threads/latency-compensation-measurement.177851/ This is probably the best workaround for most people.




A final note on expectations. If you make this change to the buffer size, a recorded DI track will be aligned very nicely. For wet tracks, this will eliminate most of the error, taking it down from over 11 ms, where it's a significant problem, to about 2 ms, where it is virtually imperceptible. In other words, it's an effective fix for most people. If you want a wet track to align more precisely however, you'll need to do a manual compensation in your DAW for that remaining 2ms.
A few years late? :)
https://forum.fractalaudio.com/thre...-latency-issues-with-usb.137958/#post-1636630
 
Oh dear... I tend to not use software monitoring, so I keep the buffers rather large... and just ran into the issue of my recorded wet track being rather late with the FM3.

What I don't understand though, is that the values I can select on the device itself for the USB Buffer Size” parameter don't match the ones I set for ASIO in the FM3 USB Audio Device Control Panel on Windows. For example, the menu on the devices offers me a value of 192, however such a value is not available in the driver settings. How are these related? Perhaps @FractalAudio can tell us? I checked the manual, but that device parameter is still absent there. Found some information on the wiki and in the release notes for Verions 4.0, but there's no explaination how that value is related to the buffer size I can configure on my computer.
 
Status
Not open for further replies.
Back
Top Bottom