latency delay ping timer

DSP related issues, mathematics, processing and techniques
Post Reply
kinicho
Posts: 5
Joined: Thu Jul 22, 2010 12:41 pm

latency delay ping timer

Post by kinicho »

Hi,

this is my first post.. please be kind..

I am trying to build a latency delay ping timer akin to the one found in cubase and nuendo to measure the latency caused by the audio card.

I hacked a little timer but my guess is that ruby Time is not accurate enough
-
ideally i would like to send a dirac spike and get a delay value in samples

any help and hints would be greatly appreciated.

greets kinicho
Attachments
_delay_ping_timer_001.fsm
(53.97 KiB) Downloaded 1474 times
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: latency delay ping timer

Post by MyCo »

Since you need sample accurate measurements there is only really one option: Measure the time in stream. I've attached a sample schematic that does exactly that. It counts the samples between two stream events.

You can hook up the 2 inputs to the code module to your detector (eg. the envelope followers). But since the envelope follower output is a continous up/down counting value you have to implement a hysteris converter, something like if value greater x output 1, else output 0.
Attachments
counter (MyCo).fsm
(1.76 KiB) Downloaded 1523 times
kinicho
Posts: 5
Joined: Thu Jul 22, 2010 12:41 pm

Re: latency delay ping timer

Post by kinicho »

Wow! Amazing - thank you very much. :D
this makes a lot of sense.. I should be able to finish this now -
:)
kinicho
Posts: 5
Joined: Thu Jul 22, 2010 12:41 pm

Re: latency delay ping timer

Post by kinicho »

I had a go, but did not get very far.
the ping back works I can trigger the start and stop but i get varying results:
I then tried a trigger delay to see if it would give me the same result - but it doesn't

could you explain?
Attachments
counter_MyCo_02.fsm
(2.13 KiB) Downloaded 1492 times
kinicho
Posts: 5
Joined: Thu Jul 22, 2010 12:41 pm

Re: latency delay ping timer

Post by kinicho »

here's what i got so far:
using exo's sample player
Attachments
_delay_ping_timer_008.fsm
(106.73 KiB) Downloaded 1477 times
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: latency delay ping timer

Post by MyCo »

You can't have any green stuff in the measurement path, because green is not realtime. You can only measure as low as one buffersize when you use green. I've attached an example of how to use the measurement in stream only. It uses just the envelope followers and a converter code, that changes it output when the envelope follower crosses a threshold level.
Attachments
feedback measurement (MyCo).fsm
(136.28 KiB) Downloaded 1554 times
kinicho
Posts: 5
Joined: Thu Jul 22, 2010 12:41 pm

Re: latency delay ping timer

Post by kinicho »

Ah I see - thanks very much MyCo!
I need to get into the DSP code module by the looks..
now i also understand your last post.
Post Reply