I've been trying to think of a way to determine real audio latency using a pd patch. This is for my brother's and my project to control 5 computers from 1 workstation using pd. I'm kind of at a loss as to how one might do this, or if its even possible. If any of you have any suggestions as to how this might be done, I'd really appriciate it.
thanks again,
Josh
Josh .. Yoshi .. Joschi .. xiphoidprocess.com .. eds.org/~joschi
hi to understand you right, are you talking about realtime audio processing or Real Audio-playback of a RealPlayer? to test latency of Pd you probably will want to know also the latency of the soundcard, which is "before and behind" pd. you can use a stereo signal (of a dat-player or minidisc...) from outside the computer and split one channel directly to the datŽs inlet and send the other through your computer. the time difference of the two signals gives you the latency. "synchronisation" would be another problem ... sme.
----- Original Message ----- From: "Josh Steiner" joschi@eds.org To: "Pure Data" pd-list@iem.kug.ac.at Sent: Thursday, March 21, 2002 3:57 AM Subject: [PD] dynamically determind real latency?
I've been trying to think of a way to determine real audio latency using a pd patch. This is for my brother's and my project to control 5 computers from 1 workstation using pd. I'm kind of at a loss as to how one might do this, or if its even possible. If any of you have any suggestions as to how this might be done, I'd really appriciate it.
thanks again,
Josh
Josh .. Yoshi .. Joschi .. xiphoidprocess.com .. eds.org/~joschi
sorry for the "real audio latency" mixup, i meant "actual audio latency", as you gathered. :)
What I was thinking of was a patch that would be able to auto sense the latency of the soundcard and report that back to my control workstation so i could compensate for the latency (I'm trying to make this system as machine agnostic, and easy to setup as possible). I was wondering if there is some consistant formula that you can apply to determine a cards latency mathematically. Something to do with number of buffers or something? I guess if anyone knows any document describing the flow of data from pd to the psysical dsp and what latencies are in between, I'd love to read it. If its a chapter in that massive "Everything You Ever Wanted to Know about Compuer Music" bible (I forget the actual title), let me know where, since my roommate has a copy that he tries to hide from me. :)
Thanks again.
Josh
On Thu, 21 Mar 2002, sme wrote:
hi to understand you right, are you talking about realtime audio processing or Real Audio-playback of a RealPlayer? to test latency of Pd you probably will want to know also the latency of the soundcard, which is "before and behind" pd. you can use a stereo signal (of a dat-player or minidisc...) from outside the computer and split one channel directly to the dat´s inlet and send the other through your computer. the time difference of the two signals gives you the latency. "synchronisation" would be another problem ... sme.
----- Original Message ----- From: "Josh Steiner" joschi@eds.org To: "Pure Data" pd-list@iem.kug.ac.at Sent: Thursday, March 21, 2002 3:57 AM Subject: [PD] dynamically determind real latency?
I've been trying to think of a way to determine real audio latency using a pd patch. This is for my brother's and my project to control 5 computers from 1 workstation using pd. I'm kind of at a loss as to how one might do this, or if its even possible. If any of you have any suggestions as to how this might be done, I'd really appriciate it.
thanks again,
Josh
Josh .. Yoshi .. Joschi .. xiphoidprocess.com .. eds.org/~joschi
Josh .. Yoshi .. Joschi .. xiphoidprocess.com .. eds.org/~joschi
another idea. maybe you cannot measure it dynamically but you can determine the latency exactly with -audiobuf or similar startup-messages. once set the latency stays the same. sme.
----- Original Message ----- From: "Josh Steiner" joschi@eds.org To: "sme" marius.schebella@chello.at Cc: "Pure Data" pd-list@iem.kug.ac.at Sent: Thursday, March 21, 2002 9:20 AM Subject: Re: [PD] dynamically determind real latency?
sorry for the "real audio latency" mixup, i meant "actual audio latency", as you gathered. :)
What I was thinking of was a patch that would be able to auto sense the latency of the soundcard and report that back to my control workstation so i could compensate for the latency (I'm trying to make this system as machine agnostic, and easy to setup as possible). I was wondering if there is some consistant formula that you can apply to determine a cards latency mathematically. Something to do with number of buffers or something? I guess if anyone knows any document describing the flow of data from pd to the psysical dsp and what latencies are in between, I'd love to read it. If its a chapter in that massive "Everything You Ever Wanted to Know about Compuer Music" bible (I forget the actual title), let me know where, since my roommate has a copy that he tries to hide from me. :)
Thanks again.
Josh
On Thu, 21 Mar 2002, sme wrote:
hi to understand you right, are you talking about realtime audio processing
or
Real Audio-playback of a RealPlayer? to test latency of Pd you probably will want to know also the latency of
the
soundcard, which is "before and behind" pd. you can use a stereo signal
(of
a dat-player or minidisc...) from outside the computer and split one
channel
directly to the datŽs inlet and send the other through your computer. the time difference of the two signals gives you the latency. "synchronisation" would be another problem ... sme.
----- Original Message ----- From: "Josh Steiner" joschi@eds.org To: "Pure Data" pd-list@iem.kug.ac.at Sent: Thursday, March 21, 2002 3:57 AM Subject: [PD] dynamically determind real latency?
I've been trying to think of a way to determine real audio latency using
a
pd patch. This is for my brother's and my project to control 5
computers
from 1 workstation using pd. I'm kind of at a loss as to how one might
do
this, or if its even possible. If any of you have any suggestions as to how this might be done, I'd really appriciate it.
thanks again,
Josh
Josh .. Yoshi .. Joschi .. xiphoidprocess.com .. eds.org/~joschi
Josh .. Yoshi .. Joschi .. xiphoidprocess.com .. eds.org/~joschi
I think it depends how precise you want it to know. The latency implied by the i/o buffers mostly is the predominant part but when going to low latencies the hardware design of the audio interface plays an equal role. This can (portably for all possible interfaces) only be determined by using a cable loop from output to input, sending a step or dirac signal out, and measuring the delay time from the input.
the included patcher does the measurement (you need zexy)
greetings, Thomas
#N canvas 170 66 521 401 12; #X obj 23 59 dirac~; #X obj 163 170 dfreq~; #X obj 23 14 bng 25 250 50 0 empty empty empty 20 8 0 8 -258699 -1 -1; #X obj 163 219 snapshot~; #X obj 163 135 +~; #X text 53 16 trigger spike; #X text 304 93 2nd spike; #X text 74 133 1st spike; #X obj 238 181 metro 50; #X obj 239 153 loadbang; #X obj 196 296 /; #X floatatom 155 348 5 0 0; #X obj 163 265 t b f; #X obj 23 87 -~ 0.1; #X obj 23 132 dac~ 1; #X obj 249 57 adc~ 1; #X obj 248 92 dac~ 2; #X text 209 348 effective i/o latency (ms); #X msg 152 296 1000; #X text 75 86 20dB above noise; #X connect 0 0 13 0; #X connect 1 0 3 0; #X connect 2 0 0 0; #X connect 3 0 12 0; #X connect 4 0 1 0; #X connect 8 0 3 0; #X connect 9 0 8 0; #X connect 10 0 11 0; #X connect 12 0 18 0; #X connect 12 1 10 1; #X connect 13 0 4 0; #X connect 13 0 14 0; #X connect 15 0 4 1; #X connect 15 0 16 0; #X connect 18 0 10 0;