ProSoundWeb Community

Please login or register.

Login with username, password and session length
Advanced search  

Pages: 1 [2] 3   Go Down

Author Topic: Realtime latency measurement  (Read 5737 times)

Frank Koenig

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1329
  • Palo Alto, CA USA
Re: Realtime latency measurement
« Reply #10 on: December 13, 2020, 02:03:30 PM »

Any links to the formulas or programming needed to do this sort of calculation? I think if it gets it right more often than not, it might be workable.

There must be a huge literature on this subject going back at least as far as the development of radar during WW2. After all, this is essentially what radar does when estimating the range of a target. It would be a big undertaking for me even to figure out where to begin. Having said that, to gain a basic understanding, I'd start with my old friend "Digital Signal Processing" by Oppenheim and Schafer that I've plugged a few times on this forum. References on digital communications might be fertile ground, too. I took a quick look at "Digital Communications, Fundamentals and Applications" by Bernard Sklar which discusses signal synchronization. And there's Wikipedia.

But I'm guessing you've got a practical problem to solve so I'd first look for an off-the-shelf solution, as has been suggested. If you want to code something yourself I'd look for a software environment that allows pseudo real-time computations on streams and has drivers that work with off-the-shelf audio interfaces. That's the hard part. The actual DSP is often pretty straight forward. In any case, I'm all for trying to have a feel for the math behind it even if you're using some else's system. One question is what do you want to do with the output? Is it for a human to interpret or automatically to apply some compensation, or something else?

My signal-related computing projects of late have all been off-line for which I've been using R, which doesn't help you. (I did once design a hardware cross-correlator to be used on images in a semiconductor-wafer inspection machine. It was a huge steaming board of TTL logic.) Sorry not to be of more help. I do look forward to learning where this all leads.

--Frank
Logged
"Nature abhors a vacuum tube." -- John Pierce, Bell Labs

Mike Caldwell

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 3110
  • Covington, Ohio
    • Mike Caldwell Audio Productions
Re: Realtime latency measurement
« Reply #11 on: December 13, 2020, 04:23:24 PM »

Can timecode be imbedded inaudibly? Think audio going to and coming from a source that you have no control over, and it only accepts regular aac audio.

Does this has video content?  Back in the "day" you would use what was called "vertical interval timecode" VITC for short.
With an under scan video monitor you could see the data on the single line of video in the vertical blanking.

Do you have an extra audio track available?

Riley Casey

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 2082
  • Wash DC
Re: Realtime latency measurement
« Reply #12 on: December 13, 2020, 05:09:35 PM »

This runs far ahead of my digital data skills but I am curious as to how you would utilize the time data gained? As noted Smaart could give you a real time continually changing read out but what. do you do with that? How do you turn it into something actionable ?  Without time code how would you be able to say " at X time the delay offset was Z milliseconds" ? Next step is even if you have that data how or what do you plan to do with it?

Scott Holtzman

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 7569
  • Ghost AV - Avon Lake, OH
    • Ghost Audio Visual Systems, LLC
Re: Realtime latency measurement
« Reply #13 on: December 14, 2020, 08:28:28 PM »

This runs far ahead of my digital data skills but I am curious as to how you would utilize the time data gained? As noted Smaart could give you a real time continually changing read out but what. do you do with that? How do you turn it into something actionable ?  Without time code how would you be able to say " at X time the delay offset was Z milliseconds" ? Next step is even if you have that data how or what do you plan to do with it?


That is how the stratum clock works.  You have a local clock bound to the same stratum such as a GPS, maybe with a local holdover HCXO.  Then the delta between the embedded timecode (could be above or below the audio passband all the digital formats have bearer channels for control data) is your delay. 
Logged
Scott AKA "Skyking" Holtzman

Ghost Audio Visual Solutions, LLC
Cleveland OH
www.ghostav.rocks

Riley Casey

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 2082
  • Wash DC
Re: Realtime latency measurement
« Reply #14 on: December 15, 2020, 12:26:23 PM »

I just love it when you talk dirty Scott  ::)


That is how the stratum clock works.  You have a local clock bound to the same stratum such as a GPS, maybe with a local holdover HCXO.  Then the delta between the embedded timecode (could be above or below the audio passband all the digital formats have bearer channels for control data) is your delay.

Michael Lawrence

  • Full Member
  • ***
  • Offline Offline
  • Posts: 172
Re: Realtime latency measurement
« Reply #15 on: December 15, 2020, 02:03:42 PM »

Yes, it can run continuously and will show the changing delay. However, it does need signal to work, so it may go wild with no signal...like in between songs...I haven’t tested this though. There is a free demo if you wanted to try it out.  There is also an API available on request, so if you wanted to write some code to repackage just this portion you could.

In the demo, the measurement delay value is limited to a maximum of 50ms, so this may or may not be enough for the specific application. But yes, with delay tracker enabled, the measurement engine will constantly track the amount of delay needed to keep locked onto the IR peak. If you're trying to do something interesting with the API, send an email to support and they'll get you the resources you need.
Logged
Lead Instructor / Smaart SPL Product Manager - Rational Acoustics
Technical Editor - ProSoundWeb.com
Freelance Systems Engineer

Scott Holtzman

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 7569
  • Ghost AV - Avon Lake, OH
    • Ghost Audio Visual Systems, LLC
Re: Realtime latency measurement
« Reply #16 on: December 15, 2020, 06:54:18 PM »

I just love it when you talk dirty Scott  ::)


Ok, that was a bit incoherent.  So basically you have a clock source that you agree to as the constant, GPS is great for this, once you agree on the constant measuring the delay is just subtracting the arrival time from the actual time.



Logged
Scott AKA "Skyking" Holtzman

Ghost Audio Visual Solutions, LLC
Cleveland OH
www.ghostav.rocks

Andrew Broughton

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 2322
    • Check Check One Two
Re: Realtime latency measurement
« Reply #17 on: December 15, 2020, 07:18:30 PM »

Does this has video content?  Back in the "day" you would use what was called "vertical interval timecode" VITC for short.
With an under scan video monitor you could see the data on the single line of video in the vertical blanking.

Do you have an extra audio track available?

No video, and no extra tracks. Just a stereo source, and the stereo coming back after a trip around the internet, with changing latency, quality, compression and all fun we know all to well from our zoom and Skype calls...
Logged
-Andy

"Well, my days of not taking you seriously are certainly coming to a middle..."

http://www.checkcheckonetwo.com
Saving lives through Digital Audio, Programming and Electronics.

Andrew Broughton

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 2322
    • Check Check One Two
Re: Realtime latency measurement
« Reply #18 on: December 15, 2020, 07:19:06 PM »

There is also an API available on request, so if you wanted to write some code to repackage just this portion you could.
Interesting! I didn't know that. I'll have to look into that further.
Logged
-Andy

"Well, my days of not taking you seriously are certainly coming to a middle..."

http://www.checkcheckonetwo.com
Saving lives through Digital Audio, Programming and Electronics.

Andrew Broughton

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 2322
    • Check Check One Two
Re: Realtime latency measurement
« Reply #19 on: December 15, 2020, 07:19:52 PM »

In the demo, the measurement delay value is limited to a maximum of 50ms, so this may or may not be enough for the specific application. But yes, with delay tracker enabled, the measurement engine will constantly track the amount of delay needed to keep locked onto the IR peak. If you're trying to do something interesting with the API, send an email to support and they'll get you the resources you need.
I'll need 0ms up to like 50 SECONDS...
Logged
-Andy

"Well, my days of not taking you seriously are certainly coming to a middle..."

http://www.checkcheckonetwo.com
Saving lives through Digital Audio, Programming and Electronics.

ProSoundWeb Community

Re: Realtime latency measurement
« Reply #19 on: December 15, 2020, 07:19:52 PM »


Pages: 1 [2] 3   Go Up
 



Site Hosted By Ashdown Technologies, Inc.

Page created in 0.035 seconds with 25 queries.