Hi guys-I just have another fairly simple question. I'm running PD on a macbook pro with a 2.26 Intel Core 2 duo processor, 2 gig of memory 1067 MHz DDR3, and I'm using a terratec Phase 24FW external sound card. On my other computer (which was far inferior) using this soundcard with Cubase I had a latency of around 6ms (I couldn't get PD to run on it so I have no basis for comparison there), but running PD on this new setup I can't get the latency down below 20ms with it turning to mush. What do I need to change to get the latency down below 10ms-the soundcard, more ram, or is the processor just too slow?
Thanks so much.Babsyco.
_________________________________________________________________
Need a place to rent, buy or share? Let us find your next place for you!
http://clk.atdmt.com/NMN/go/157631292/direct/01/
babsyco babsyco wrote:
Hi guys-I just have another fairly simple question. I'm running PD on a macbook pro with a 2.26 Intel Core 2 duo processor, 2 gig of memory 1067 MHz DDR3, and I'm using a terratec Phase 24FW external sound card. On my other computer (which was far inferior) using this soundcard with Cubase I had a latency of around 6ms (I couldn't get PD to run on it so I have no basis for comparison there), but running PD on this new setup I can't get the latency down below 20ms with it turning to mush. What do I need to change to get the latency down below 10ms-the soundcard, more ram, or is the processor just too slow?
it seems like i missed the linebreaks and your OS.
fgmasdr IOhannes
My experience is that Pd runs better with JACK on OSX. D.
babsyco babsyco wrote:
Hi guys-I just have another fairly simple question. I'm running PD on a macbook pro with a 2.26 Intel Core 2 duo processor, 2 gig of memory 1067 MHz DDR3, and I'm using a terratec Phase 24FW external sound card. On my other computer (which was far inferior) using this soundcard with Cubase I had a latency of around 6ms (I couldn't get PD to run on it so I have no basis for comparison there), but running PD on this new setup I can't get the latency down below 20ms with it turning to mush. What do I need to change to get the latency down below 10ms-the soundcard, more ram, or is the processor just too slow?
SNAP.
Maybe try using Jack?
(if you're not already)
It should save you a little CPU overhead, which might allow lower
latency.
Nick
On Oct 16, 2009, at 7:22 AM, babsyco babsyco wrote:
Hi guys-I just have another fairly simple question. I'm running PD
on a macbook pro with a 2.26 Intel Core 2 duo processor, 2 gig of
memory 1067 MHz DDR3, and I'm using a terratec Phase 24FW external
sound card. On my other computer (which was far inferior) using this
soundcard with Cubase I had a latency of around 6ms (I couldn't get
PD to run on it so I have no basis for comparison there), but
running PD on this new setup I can't get the latency down below 20ms
with it turning to mush. What do I need to change to get the latency
down below 10ms-the soundcard, more ram, or is the processor just
too slow?Thanks so much. Babsyco.
Let us find your next place for you! Need a place to rent, buy or
share? _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Thanks guys, but the latency is still around 20ms when I don't use the soundcard (I just tried it with the built in mic-that's the same as jack for all intensive purposes, right?). Any other suggestions as to how I can get it lower? I really wanna use it for live performance. From: babsyco@hotmail.com To: pd-list@iem.at Date: Fri, 16 Oct 2009 05:22:50 +0000 Subject: [PD] latency issue
Hi guys-I just have another fairly simple question. I'm running PD on a macbook pro with a 2.26 Intel Core 2 duo processor, 2 gig of memory 1067 MHz DDR3, and I'm using a terratec Phase 24FW external sound card. On my other computer (which was far inferior) using this soundcard with Cubase I had a latency of around 6ms (I couldn't get PD to run on it so I have no basis for comparison there), but running PD on this new setup I can't get the latency down below 20ms with it turning to mush. What do I need to change to get the latency down below 10ms-the soundcard, more ram, or is the processor just too slow?
Thanks so much.Babsyco.
Let us find your next place for you! Need a place to rent, buy or share?
_________________________________________________________________
View photos of singles in your area Click Here
http://clk.atdmt.com/NMN/go/150855801/direct/01/
On Sun, 2009-10-18 at 10:22 +0000, babsyco babsyco wrote:
Thanks guys, but the latency is still around 20ms when I don't use the soundcard (I just tried it with the built in mic-that's the same as jack for all intensive purposes, right?). Any other suggestions as to how I can get it lower? I really wanna use it for live performance.
well, we still don't know about your OS. are you really on OS X? is this problem directly related to pd or do you have the same latency with other software as well? if it's a general issue, i would ask in other - probably more dedicated - channels as well. it's an annoying proposal to make, but if your only goal really is only getting the audio latency low, i'd suggest considering another OS as well. it's a very general advice, i know, but probably you can be a bit more specific about what your're trying to do. there are many reasons not to change the OS frivolously, but if that is the main goal, i'd probably change to one that gives you enough control to change settings as you need them.
if there are, try different drivers (or use jack, as others already suggested, assuming your not on windows). then try to give the pd audio process higher priority.
roman
From: babsyco@hotmail.com To: pd-list@iem.at Date: Fri, 16 Oct 2009 05:22:50 +0000 Subject: [PD] latency issue
Hi guys-I just have another fairly simple question. I'm running PD on a macbook pro with a 2.26 Intel Core 2 duo processor, 2 gig of memory 1067 MHz DDR3, and I'm using a terratec Phase 24FW external sound card. On my other computer (which was far inferior) using this soundcard with Cubase I had a latency of around 6ms (I couldn't get PD to run on it so I have no basis for comparison there), but running PD on this new setup I can't get the latency down below 20ms with it turning to mush. What do I need to change to get the latency down below 10ms-the soundcard, more ram, or is the processor just too slow?
Thanks so much. Babsyco.
Let us find your next place for you! Need a place to rent, buy or share?
Click Here View photos of singles in your area _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
Jack is software that allows routing audio between applications.
http://www.jackosx.com/about.html
On Sun, Oct 18, 2009 at 6:22 AM, babsyco babsyco babsyco@hotmail.comwrote:
Thanks guys, but the latency is still around 20ms when I don't use the soundcard (I just tried it with the built in mic-that's the same as jack for all intensive purposes, right?). Any other suggestions as to how I can get it lower? I really wanna use it for live performance.
From: babsyco@hotmail.com To: pd-list@iem.at Date: Fri, 16 Oct 2009 05:22:50 +0000 Subject: [PD] latency issue
Hi guys-I just have another fairly simple question. I'm running PD on a macbook pro with a 2.26 Intel Core 2 duo processor, 2 gig of memory 1067 MHz DDR3, and I'm using a terratec Phase 24FW external sound card. On my other computer (which was far inferior) using this soundcard with Cubase I had a latency of around 6ms (I couldn't get PD to run on it so I have no basis for comparison there), but running PD on this new setup I can't get the latency down below 20ms with it turning to mush. What do I need to change to get the latency down below 10ms-the soundcard, more ram, or is the processor just too slow? Thanks so much. Babsyco.
Let us find your next place for you! Need a place to rent, buy or share?http://clk.atdmt.com/NMN/go/157631292/direct/01/
Click Here View photos of singles in your areahttp://clk.atdmt.com/NMN/go/150855801/direct/01/
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
babsyco babsyco wrote:
Thanks guys, but the latency is still around 20ms when I don't use the soundcard (I just tried it with the built in mic-that's the same as jack for all intensive purposes, right?). Any other suggestions as to how I can get it lower? I really wanna use it for live performance.
No. That is not the same as using it with jack, at least it would not be on a Linux system, I could be wrong about mac, but from what I know nothing compares to using jack, performance wise. Another issue could be externals, try measuring the performance without any externals loaded and see if one of the ones you are using is causing latency.
Also, many commercial audio apps misreport latency; for example a large number, if not most of them, report only the latency introduced by the app itself, which is in their case actually cumulative with the latency introduced with the OS drivers and the latency inherant in the DAC / ADC of the card itself. With jack, at least, you are getting a much more accurate picture of the latency.
This is based on reports of users who have measured their latency and compared it with latencies reported by jack and by mainstream nonfree software; there are actually applications to help you measure the latency you are getting by looping back a coded signal between the DAC/ADC and measuring the phase difference, this could actually be coded in PD and would be an interesting exercise come to think of it.
On Sun, 18 Oct 2009, Justin Glenn Smith wrote:
Also, many commercial audio apps misreport latency; for example a large number, if not most of them, report only the latency introduced by the app itself, which is in their case actually cumulative with the latency introduced with the OS drivers and the latency inherant in the DAC / ADC of the card itself. With jack, at least, you are getting a much more accurate picture of the latency.
Yet Jack still expects you to be responsible for adding 1 ms of latency per foot of air that the sound has to go through, in and out.
And then, there are all sorts of brain latencies.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
I have quite the same setup and goal for pd. I play my guitar through a pd patch and would also like the latency to be as low as possible. I've come as low as 11ms in the pd settings, with my Macbook (white 2007) OS X 10.5, Jackpilot and through my Digidesign Mbox 2 or MAudio Fast Track Pro soundcards. (I must also add that I have no latency in any other music software I use: pro tools, digital performer, audacity, garageband etc.) That is also the best performance with only 6-7% cpu use (measured from within pd). Without jackpilot the cpu use is around 20% and with the internal soundcard in the macbook more like 30%.
Still the latency is far to much for playing in time with a band. (Adding AD/DA conversion the latency is at least 17ms). So I only use the pd patch as an effect and mixing it with the direct signal without latency.
Wiser people than me out there, correct me if I'm wrong, but it is my impression that the graphical language of PD makes it process slower, than fx supercollider or other compiled music programming languages. So maybe the below 10ms latency is an unreachable goal?
Please let me (us) know if you find out how to decrease the latency.
regards, Bjørn
@Justin Glenn Smith: Do you have links or names of some of that measuring software you referered to? That, I really like to try out.
On Fri, Oct 16, 2009 at 07:22, babsyco babsyco babsyco@hotmail.com wrote:
Hi guys-I just have another fairly simple question. I'm running PD on a macbook pro with a 2.26 Intel Core 2 duo processor, 2 gig of memory 1067 MHz DDR3, and I'm using a terratec Phase 24FW external sound card. On my other computer (which was far inferior) using this soundcard with Cubase I had a latency of around 6ms (I couldn't get PD to run on it so I have no basis for comparison there), but running PD on this new setup I can't get the latency down below 20ms with it turning to mush. What do I need to change to get the latency down below 10ms-the soundcard, more ram, or is the processor just too slow? Thanks so much. Babsyco. ________________________________ Let us find your next place for you! Need a place to rent, buy or share? _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Bjørn Nielsen wrote: ...
Fast Track Pro soundcards. (I must also add that I have no latency in any other music software I use: pro tools, digital performer, audacity, garageband etc.)
I find this very hard to believe, is this just because you are auditioning your realtime input directly through the sound card? Because no software can process audio input and output a modified version without latency. Try playing through a plugin in realtime in protools or dp, I suspect you will notice a latency. If not, maybe you should be translating your pd patches into audio unit plugins, but I strongly suspect you will notice a latency.
...
@Justin Glenn Smith: Do you have links or names of some of that measuring software you referered to? That, I really like to try out.
jack_delay, AKA jdelay: author's homepage is http://www.kokkinizita.net/linuxaudio/
On Oct 18, 2009, at 8:47 PM, Justin Glenn Smith wrote:
Bjørn Nielsen wrote: ...
Fast Track Pro soundcards. (I must also add that I have no latency in any other music software I use: pro tools, digital performer, audacity, garageband etc.)
I find this very hard to believe, is this just because you are
auditioning your realtime input directly through the sound card? Because no
software can process audio input and output a modified version without
latency. Try playing through a plugin in realtime in protools or dp, I suspect
you will notice a latency. If not, maybe you should be translating your pd
patches into audio unit plugins, but I strongly suspect you will notice a
latency.
There is no audio software without latency. The lowest that is
feasible on Mac OS X is probably 4ms. Once you factor in distance
and speed of sound, then you might see that 20ms of latency isn't
really all that much.
20ms * 343m/s = 7.546m
So if you are 7.5m away from one of your band mates, there will 20ms
of latency just from the sound travelling thru the air.
.hc
...
@Justin Glenn Smith: Do you have links or names of some of that measuring software you referered to? That, I really like to try out.
jack_delay, AKA jdelay: author's homepage is http://www.kokkinizita.net/linuxaudio/
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
I hate it when they say, "He gave his life for his country." Nobody
gives their life for anything. We steal the lives of these kids. -
Admiral Gene LeRocque
On Oct 18, 2009, at 11:19 PM, Hans-Christoph Steiner wrote:
On Oct 18, 2009, at 8:47 PM, Justin Glenn Smith wrote:
Bjørn Nielsen wrote: ...
Fast Track Pro soundcards. (I must also add that I have no latency
in any other music software I use: pro tools, digital performer, audacity, garageband etc.)I find this very hard to believe, is this just because you are
auditioning your realtime input directly through the sound card? Because no
software can process audio input and output a modified version without
latency. Try playing through a plugin in realtime in protools or dp, I suspect
you will notice a latency. If not, maybe you should be translating your pd
patches into audio unit plugins, but I strongly suspect you will notice a
latency.There is no audio software without latency. The lowest that is
feasible on Mac OS X is probably 4ms. Once you factor in distance
and speed of sound, then you might see that 20ms of latency isn't
really all that much.20ms * 343m/s = 7.546m
So if you are 7.5m away from one of your band mates, there will 20ms
of latency just from the sound travelling thru the air..hc
Also, I forgot to mention, there was a thorough discussion on latency
a few years ago:
http://lists.puredata.info/pipermail/pd-ot/2006-12/001629.html
.hc
Terrorism is not an enemy. It cannot be defeated. It's a tactic.
It's about as sensible to say we declare war on night attacks and
expect we're going to win that war. We're not going to win the war on
terrorism. - retired U.S. Army general, William Odom
Hans-Christoph Steiner wrote: ...
Also, I forgot to mention, there was a thorough discussion on latency a few years ago:
http://lists.puredata.info/pipermail/pd-ot/2006-12/001629.html
Of particular interest from that thread is a simple way to measure latency: http://lists.puredata.info/pipermail/pd-ot/2006-12/001642.html
On Sun, 18 Oct 2009, Justin Glenn Smith wrote:
Hans-Christoph Steiner wrote:
Also, I forgot to mention, there was a thorough discussion on latency a few years ago: http://lists.puredata.info/pipermail/pd-ot/2006-12/001629.html
Of particular interest from that thread is a simple way to measure latency: http://lists.puredata.info/pipermail/pd-ot/2006-12/001642.html
Again, this experiment measures the difference between two latencies.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
There is no audio software without latency. The lowest that is feasible on Mac OS X is probably 4ms. Once you factor in distance and speed of sound, then you might see that 20ms of latency isn't really all that much.
Yeah, sorry that I said there was no latency, I do know that every software needs to process. What I meant to say was that the latency while recording was so low in fx Pro Tools, that I don't hear it. That is not the case with PD.
20ms * 343m/s = 7.546m
So if you are 7.5m away from one of your band mates, there will 20ms of latency just from the sound travelling thru the air.
This is of couse a correct calculation, but never the reality. I never stand more than maximum a couple of meters from my own amplifier, or else I will lose the timing if I hear my own sound with latency. And if you play at stages so large, that you are 7-8 meters from the drummer or other musicians, then you will almost always have their sound in your personal monitors, just a few meters from you. I actually had a problem some few times, when I tried to play together with the band, while making sound from the mixingdesk 10 meters from the stage. That is not recommendable (though you can do it with headphones).
So my point is here, that a realtime latency (including processing, ad/da conversion and traveling time thru air) above ca. 15-20ms is a real problem for the timing while playing together with a band. It can seems like in some of the comments on this list, that is neglected that the ultralow latency is making a difference and that you are on the wrong track if you wan't to use PD for that purpose. But I see very big potential and fun in doing this. I have skipped must of my analog effects, and instead use some real messy and funny delayeffects in pd.
I would still find it very interesting if anybody on list knows if it you can lower pd latency with better hardware to the unhearable or if 11ms (in the pd settings) is the lower barrier?
On Mon, Oct 19, 2009 at 7:47 AM, Bjørn Nielsen bjoarn@gmail.com wrote:
Yeah, sorry that I said there was no latency, I do know that every software needs to process. What I meant to say was that the latency while recording was so low in fx Pro Tools, that I don't hear it. That is not the case with PD.
You don't specify which type of PT, but Pro Tools HD has only 5 samples (not ms) of latency. The LE systems have very high latency compared to what Logic and other apps can do though.
And this is possible because ProTools only allow you the use of very specific hardware for which they have created closed, proprietary drivers. Expecting *any* other app to behave in a similar way to ProTools is very unrealistic unless the same kind of software/hardware lock-in relationship exists.
D.
chris clepper wrote:
On Mon, Oct 19, 2009 at 7:47 AM, Bjørn Nielsen <bjoarn@gmail.com mailto:bjoarn@gmail.com> wrote:
Yeah, sorry that I said there was no latency, I do know that every software needs to process. What I meant to say was that the latency while recording was so low in fx Pro Tools, that I don't hear it. That is not the case with PD.
You don't specify which type of PT, but Pro Tools HD has only 5 samples (not ms) of latency. The LE systems have very high latency compared to what Logic and other apps can do though.
Derek Holzer wrote:
And this is possible because ProTools only allow you the use of very specific hardware for which they have created closed, proprietary drivers. Expecting *any* other app to behave in a similar way to ProTools is very unrealistic unless the same kind of software/hardware lock-in relationship exists.
Good point. At least on a Linux platform, jack does actually start to approach this with certain firewire hardware (thanks to a well understood standard that has enough speed and bandwidth for good performance, some well done userspace drivers that avoid the legacy issues of oss and alsa, and some co-operative hardware vendors). I am not sure if this applies to platforms other than Linux though.
Sadly the industry seems to be moving away from firewire and toward usb2, and usb2 has no implemented standard and very little vendor co-operation with open source developers.
Yeah, sorry that I said there was no latency, I do know that every software needs to process. What I meant to say was that the latency while recording was so low in fx Pro Tools, that I don't hear it. That is not the case with PD.
You don't specify which type of PT, but Pro Tools HD has only 5 samples (not ms) of latency. The LE systems have very high latency compared to what Logic and other apps can do though.
I use both Pro Tools LE and M-powered. You probably right, I have never made a comparison. I really didn't meant the discussion to be about latency in pro tools or any other software besides PD (though spinoffs of couse also can be very interesting). It was just that Roman Haefeli asked whether Babsycos experienced a similar latency in other software, and thereby indirectly saying that it could simply be a hardware setup problem and that PD not nessecarily has more latency than other software.
In my experience (and don't claim to be that experienced at all) I've been troubled with the latency in PD and not in any other software. But I would be very pleased if I'm wrong in the underlying assumption here and that is just a question of the right hardware/software setup, to decrease the PD latency to the unhearable.
So Babsycos original question still goes unanswered (besides the really good advice about jack): can you decrease the latency with improving you hardware?
So if you are 7.5m away from one of your band mates, there will 20ms of latency just from the sound travelling thru the air.<<
if you are big enough to be playing on a stage that has 7.5m distance between band mates, then you don't need to worry anyway, as someone else is paid to sort out your technical issues while you do lines of coke with groupies backstage.
Take 3.25m and 10ms, then its more scale, I was just going with the
20ms number. Then you can look at the latency in many physical,
traditional instruments like the violin and there is probably more
than 20ms between action and sound.
.hc
On Oct 20, 2009, at 4:12 AM, hard off wrote:
So if you are 7.5m away from one of your band mates, there will 20ms
of latency just from the sound travelling thru the air.<<if you are big enough to be playing on a stage that has 7.5m
distance between band mates, then you don't need to worry anyway, as
someone else is paid to sort out your technical issues while you do
lines of coke with groupies backstage.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Looking at things from a more basic level, you can come up with a more
direct solution... It may sound small in theory, but it in practice,
it can change entire economies. - Amy Smith
On Mon, 2009-10-19 at 19:30 +0200, BjÞrn Nielsen wrote:
So Babsycos original question still goes unanswered (besides the really good advice about jack): can you decrease the latency with improving you hardware?
considering, that i am running pd 0.42 on jackd on ubuntu on a t61 with a rme rpm soundcard attached and i can run pd with 7ms (real) latency - i measured the roundtrip - this question can be answered with yes. the bad thing is, that i cannot tell anything about why this is. i can only assume, that probably rme soundcards perform well, linux performs well, jack performs well (?).
this latency i can get when setting the jackd buffer to 2x64 samples, which introduces 2.9ms (@44100Hz) only for jackd. the rest seems to go on the account of pd, which makes me think, that with current implementation of pd, it's unlikely to reach values lower than 4ms (again, i mean 'roundtrip' here, not the displayed value in whatsoever software), no matter what hardware you use.
even if it is possible to run pd at this low latency, i almost never do it. this is mainly because you need to be so damn careful in order to avoid drop outs. every little action, that might block pd only for a few ms causes a drop out. and there are so many "don't"s when caring about drop outs: no dynamic patching, no networking, no redrawing of arrays (no moving of arrays), avoid too much logic in 0 logical time (or distribute it over time), avoid any peaks in cpu load, etc. but yeah, if you have a straight-forward fx patch and you don't touch it too much, pd runs well also at low latencies.
coming back to the original question of babsycos: i'd really try another OS. this has the advantage of trying a quite different setup without having to spend more money on more hardware. if the mentioned soundcard is supported by linux, i'd burn a copy of the pure:dyne live distro. it has pd already installed and you don't need to alter the existing installation - just boot from cd - and it is free (as in beer and as in freedom). last time i tried it (which is quite a while ago) i was impressed how well everything works.
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
On Mon, 19 Oct 2009, Bjørn Nielsen wrote:
Yeah, sorry that I said there was no latency, I do know that every software needs to process. What I meant to say was that the latency while recording was so low in fx Pro Tools, that I don't hear it. That is not the case with PD.
Btw, in the audio preferences, what do you choose as "Delay (msec)" ? How low can you get this to be?
(This is also known as -audiobuf.)
Probably this is a really silly question and is the first setting you played with, but I don't know.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
Mathieu Bouchard matju@artengine.ca wrote:
Yeah, sorry that I said there was no latency, I do know that every software needs to process. What I meant to say was that the latency while recording was so low in fx Pro Tools, that I don't hear it. That is not the case with PD.
Btw, in the audio preferences, what do you choose as "Delay (msec)" ? How low can you get this to be?
(This is also known as -audiobuf.)
The lowest delay in ms I have reached before the sound gets quicky is 11ms, but it depends on whether I use Jackpilot and what audiointerface I use (the macbook internal soundcard can't do 11ms, but my mbox2 can).
It was my impression that this delay is all the latency PD have, but maybe I'm wrong? Is it even possible to measure where in the system the latency occur?
On Tue, 20 Oct 2009, Bjørn Nielsen wrote:
The lowest delay in ms I have reached before the sound gets quicky is 11ms, but it depends on whether I use Jackpilot and what audiointerface I use (the macbook internal soundcard can't do 11ms, but my mbox2 can). It was my impression that this delay is all the latency PD have,
I don't know, I'd risk saying that the delay in question is simply added to the base delay of the in/out system, but I wouldn't risk guaranteeing it without rereading all of the s_audio*.c code again... I forgot a fair bit of it.
In theory, the soundcard needs to fill a block before it can pass it to pd, then pd needs to process a whole block before a block of output is ready, and then the time it takes to play a block is a block duration, but if you look at the minimum time difference between in and out, you don't need to count the normal duration of the output block in there. So you only count blocksize once, and then, if the processing time is really smooth, then your minimum audiobuf size is the blocksize delay times the % of CPU that pd is using.
So if your patch takes 75% CPU and has 64-byte blocks at 48000 kHz, then you compute (1+75/100)*64/48000 = 0.002333... s = 2.333... ms; and you could set pd's audiobuf to (75/100)*64/48000 = 0.001 s = 1 ms exactly.
Obviously, this is not what you are getting, because the processing isn't that much smooth. This may depend on the speed of the multitasker in the OS itself, the quality of the realtime priority system, and various little hiccups that happen in Pd itself. Many Pd internals and externals make it hard, by expecting a file-open to take 0 ms of logical time, thus if it really takes 50 ms, then you need at least 50 ms - 0 ms = 50 ms of audiobuf on top of the minimum required audiobuf.
but maybe I'm wrong? Is it even possible to measure where in the system the latency occur?
The best you can do is make a laundry list of things be checking for, but Pd can't possibly have all the information.
Btw, can you get doc/7.stuff/tools/latency.pd to work? and how would one interpret that figure?
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801