Revisiting latency

Discussion in 'General Discussion' started by DogsoverLava, Jan 6, 2018.

Tags:
  1. DogsoverLava

    DogsoverLava Well-Known Member

    Joined:
    Jun 21, 2014
    Location:
    Vancouver
    Home Page:
    I've been having all kinds of issues with timing as I record that I've basically realized are latency issues.
    (Using Reaper and an M-Audio Profire 610)

    So I measured my latency as follows:

    1. Inserted a click source in my DAW
    2. Sent that signal through the output of my interface looped back into my input and recorded it
    3. I then measured the distance between the click source and my recorded click source (in sample units) and determined what my round trip latency was/is.
    4. In my DAW I override the internally reported latency from my interface to set it manually the number of samples I measured as my latency.

    Now if I'm right about this, it captures and accounts for roundtrip latency - that is to my ears from inside the DAW then through my interface, and the latency involved in my guitar signal going through my interface and being recorded by the DAW.

    If I wanted to more specifically account for any specific latency caused by plugins etc I could do that same loopback test but run the click through those plugins as well to see what they might be adding to the issue.

    I also guess that if I'm listening to my instrument through live record monitoring, my brain would be dealing with an additional bit of difference between the click source in my ear and the recorded monitored output of my guitar and could account for some performance issues....

    Where I get less clear is with things like midi-tracks etc... Does latency on midi also get compensated for by my DAW ? Is midi latency different than my other audio interface latency measurements.
    With respect to midi -- (like a sequence or a drum beat) - should I always send it to a bus to be rendered/recorded as an audio track. If so -- wont this audio only have half the latency of the tracks (given they are not dealing with the return leg of the latency equation)?

    Thanks guys -- just really trying to get my head around this and really tighten up my workflow so I can get better recordings in the can.
     
  2. bouldersound

    bouldersound Real guitars are for old people. Well-Known Member

    Joined:
    Jan 23, 2010
    Location:
    Boulder, Colorado
    Home Page:
    That test procedure measures record latency, the offset on the timeline between earlier tracks and a new track played to them. That should be compensated automatically by the DAW if it senses the round trip time correctly. In that case it simply places the new recording on the timeline where it belongs. If the measurement is wrong then each new track is a little later on the timeline, and things get bad real fast. There's generally a manual setting in the DAW for record latency correction.

    Input monitoring latency is a different thing. That's the delay between the time you play something (while tracking) and the time you hear it. If you go through AD and DA conversion there is some latency, though it can be quite low if done right. If the input monitoring path is all analog then there is no latency. If you use your interface's DSP input monitoring facility then latency should be very low. I know there are people successfully monitoring live through their DAW, but that's going to be the highest latency of all. It can still be low enough, but the more processing you do the more time it adds to the delay.
     
  3. Makzimia

    Makzimia The Minstrel Well-Known Member

    Joined:
    Aug 20, 2014
    Location:
    Hyde, England
    Midi has only limitations based on available channels. Latency is a purely audio issue for your purposes:).
     
  4. DonnyThompson

    DonnyThompson Distinguished Member

    Joined:
    Nov 25, 2012
    Location:
    Akron/Cleveland, OH
    Home Page:
    Well, yes and no. ;)
    If you are sending a midi signal direct to a track without it triggering anything internally, then yes, it should be virtually immediate ( other than the microsecond delay that some people can sense, like Donald Fagan for example, who claims he can hear the delay with midi...)
    But if you're triggering internal samples (VSTI'S), You can get latency on the audio playback of a certain sample, depending on your audio interface's limitations and the buffers you have set in your DAW.
    And, some softsynths can have their own internal buffer settings as well, although that's not quite as common as it used to be on older systems and versions, but it's still possible to see them. NI's B4, and Garritan collections do have internal buffer settings within the sample player itself that you can adjust along with your DAW buffer settings, though these days I'm fairly certain that the DAW settings over ride the softsynth settings.
    FWIW :)
    -d
     
  5. Makzimia

    Makzimia The Minstrel Well-Known Member

    Joined:
    Aug 20, 2014
    Location:
    Hyde, England
    @DonnyThompson you’re still in audio :). The actual transmission of midi signal has little to no latency compared to audio.
     
  6. DonnyThompson

    DonnyThompson Distinguished Member

    Joined:
    Nov 25, 2012
    Location:
    Akron/Cleveland, OH
    Home Page:
    ;)
     
    Makzimia likes this.
  7. Makzimia

    Makzimia The Minstrel Well-Known Member

    Joined:
    Aug 20, 2014
    Location:
    Hyde, England
    Ok ok... my bad. But still, for MOST purposes, midi itself is not an issue for mere mortals :). Lol.
     
  8. pcrecord

    pcrecord Quality recording seeker ! Distinguished Member

    Joined:
    Feb 21, 2013
    Location:
    Quebec, Canada
    Home Page:
    Interesting.
    But setting up latency manually is dangerous... Many daws will exhibit more latency when the mix is more busy (more things to compute).
    For exemple if I play guitar through a real time amp sim on a blank project, with sonar at least, I'll get no latency that I can hear. But then if I'm on my 3rd amp sim and try to play again, the delay makes it impossible to play in time.

    The same will acure with a VSTi.. if you play a piano with thousands of samples. It will run fine when not much is going on in the project but make lag if the project is very busy.

    That's why I rely on the real time mixer of my interface so much. I'd rather hear the clean sound of the guit while recording and then put the distortion afterward.. Of course nowaday, I record my Vox AV60 and a DI signal at the same time .. So it's not a problem.
     
  9. bouldersound

    bouldersound Real guitars are for old people. Well-Known Member

    Joined:
    Jan 23, 2010
    Location:
    Boulder, Colorado
    Home Page:
    I was talking about manually adjusting record latency, not input monitoring latency. If you're using amp sims in real time then you're talking about input monitoring latency, or input to output time.

    Record latency is purely a matter of output to input round trip time. The DAW is in control of the playback buffer so it can account for that, but from the DAW through the interface is out of its control so if it doesn't measure it accurately you have to do it manually.
     
  10. pcrecord

    pcrecord Quality recording seeker ! Distinguished Member

    Joined:
    Feb 21, 2013
    Location:
    Quebec, Canada
    Home Page:
    I get what you are saying.. but my point was that maybe (this is to be tested) maybe the latency varies due to how many operations the DAW has to make.
    I might be wrong of course...
     
  11. DogsoverLava

    DogsoverLava Well-Known Member

    Joined:
    Jun 21, 2014
    Location:
    Vancouver
    Home Page:
    I'm going to revisit this thread after doing a few experiments and getting some screenshots to show results because I really want to nail/own this.

    What I know and want to test:
    1. My DAW plays a click source (self generated midi?) --- it goes out using my interface to my headphones. This chain would have an element of Output Latency -- similarly if that signal chain was a speaker and I was in a chair listening there's be an additional latency there before my ear heard and reacted to the sound.
    2. If I take that same signal from the OUTPUT of my DAW and loop it into an input and record it I can measure that signal and that signal captures both the OUTPUT latency but also the INPUT latency for something we'll call ROUNDTRIP latency. I can measure this by comparing my click source to the recorded loop in my DAW
    3. If I run this same loopback click source through my guitar amp sim (guitarRig) in my DAW and record it I can see how the plugin might affect latency of the signal by doing the same comparative measure of the wave file.
    4. If is also send a WET signal of #3 to a bus and record it, I might also capture an approximation of any additional recording monitor delay as part of my latency equation?
    5. If I take that same Wet Signal from #3 into a bus and route that bus to the output of my interface and back in to a new bus (INPUT) might I also capture an element of recording monitor latency?
    Assumptions:
    • When you adjust latency inside your DAW - you want to account for roundtrip latency (if you are playing to a click or other tracks) because these factor in the latency equation. It's not just INPUT latency at play - OUTPUT is at play as well.
    Although my DAW has a manual adjustment field for both INPUT & OUTPUT latency -- Output latency is impossible to quantifiabley measure so you adjust for Input using the above methods as captured in #2

    Currently my DAW reports my latency to be 4.6ms ----- before making some settings adjustments to my computer it used to report latency at 7.5ms --------- My manual measured latency ROUNDTRIP was 644 samples or approx 15 miliseconds. I will redo all the tests and check my methodology and report back.
     
    pcrecord likes this.
  12. pcrecord

    pcrecord Quality recording seeker ! Distinguished Member

    Joined:
    Feb 21, 2013
    Location:
    Quebec, Canada
    Home Page:
    I'll follow that with attention ! Thanks for doing this
     
  13. Boswell

    Boswell Moderator Distinguished Member

    Joined:
    Apr 19, 2006
    Location:
    UK
    Home Page:
    My feeling is that, provided your DAW knows what type of audio interface your are using, you should be setting the output latency to auto, at least for these tests. In that way, the DAW will pre-advance the output play so that the timing at the interface connectors will be exact. This means that you do not have to worry about or adjust any latency for overdubbing, and it will compensate for using plug-ins and other time-consuming digital processes on the input and output routes.

    If your DAW does not know about individual interfaces, you will need to find out what the delay figures for input and output are (e.g. from USB to XLR and v.v.) and add those manually to the DAW compensation times, still keeping the setting at auto (if possible).

    What any DAW is not going to be able to help with is real-time processing effects. So, for example, if you are hoping to use your GuitarRig ampsim while tracking, you are always going to have latency between the rig input and the monitoring output, simply because the effect generation process takes time. In the few occasions that I've had to record a player who insisted on having digital effects present while tracking, I've wheeled up a second DAW to run a minimal version of his amp sim and whose output is fed into a mixer along with the main replay tracks to go to his phones. The input was T-ed off the guitar lead. The real effects were then applied at mixdown.
     
  14. DogsoverLava

    DogsoverLava Well-Known Member

    Joined:
    Jun 21, 2014
    Location:
    Vancouver
    Home Page:
    I've blown my own mind here doing tests....

    What I've learned so far:
    1. My Interface has latency -- when I measure Roundtrip latency (comparing a recorded waveform to the internal click-source inside the DAW) it appears to be 390 samples latent (via roundtrip routing click-source to a hardware output, looped back into a hardware input and recorded in the DAW).
    2. My Interface reports and adjusts latency slightly greater than the actual latency (it adjusts in by 410 samples) so anything I record is slightly rushed when adjusted (which is what I've been feeling this whole time and confirms some of my frustrations) Interface reports around 4.6/4.6ms (which I think is assigning 4.6 to both input and output for a total of 9.2?) --- not sure what it actually adjusts though but it puts the waveform slightly before the beat (about 20 samples) which is almost exactly the difference between the reported latency and my actual measured latency. (I measure 390 it adjusts 410 on auto).
    3. By manually adjusting the latency inside the DAW using my measured number I'm still slighting before the beat -- ie - to be on the beat I'd need to adjust less than I measure. That means to be on the beat I need to adjust both less than reported latency but also less than my measured latency --- this tells me that the adjustment calculations going on inside the DAW are more complex than I am aware.
    4. The use of an amp sim does not in and of itself add latency to the chain as far as I can tell in terms of capturing the dry signal.
    5. When taking into account real-time monitoring/recording using amp sims, there does appear to be a tiny bit of additional latency in my chain -- I routed and rendered to a new track (through the interface) a signal that was dry (with FX off) the again wet (with Fx on) The wet signal out the interface and back into a 3rd track --- I get the smallest change in wave form timing (like 53 samples). This means my ears are hearing a 50 sample delay when I track...
    I wont post screen shots yet because I need to replicate these tests and results now and look for any flaws in my process that I might be overlooking. I probably did 40 different tests....

    My head hursts
     
    pcrecord likes this.
  15. bouldersound

    bouldersound Real guitars are for old people. Well-Known Member

    Joined:
    Jan 23, 2010
    Location:
    Boulder, Colorado
    Home Page:
    I once had a glitch that messed with the automatic latency detection. I went through much of what you describe, then the problem vanished after a reboot or two and I just reset it to auto.
     
  16. pcrecord

    pcrecord Quality recording seeker ! Distinguished Member

    Joined:
    Feb 21, 2013
    Location:
    Quebec, Canada
    Home Page:
    I would like to know if the latency is the same on a full blown mix as of a project with just a few tracks.
    If you ever get the energy to test this that would be very informative !
     
  17. Smashh

    Smashh Active Member

    Joined:
    Oct 12, 2012
    Location:
    Australia
    Does output latency really matter? . As long as you monitor yourself before you go in to your daw you will be fine.
    If your daw had a huge output latency , then you would play your lines with that latency as you hear it anyway which nullifies that prob.
    Am I missing something here ?
     
  18. pcrecord

    pcrecord Quality recording seeker ! Distinguished Member

    Joined:
    Feb 21, 2013
    Location:
    Quebec, Canada
    Home Page:
    It mathers when doing roundtrip, like reamping a track through external hardware... ;)
     
  19. Smashh

    Smashh Active Member

    Joined:
    Oct 12, 2012
    Location:
    Australia
    ooh , thanks Marco(y)

    I have come up against that and shifted the tracks after they were recorded which is a pain in the butt ,
    Now I don't reamp ...lol ( try to get it good first time in :whistle: )
     
    pcrecord likes this.
  20. pcrecord

    pcrecord Quality recording seeker ! Distinguished Member

    Joined:
    Feb 21, 2013
    Location:
    Quebec, Canada
    Home Page:
    I'm right with you on that ! ;)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice