[PD] Latency compensation

Roman Haefeli reduzent at gmail.com
Sun Oct 9 21:33:41 CEST 2016


Hi all, 

I'm currently investigating audio latency compensation in Pd. The goal
is for recorded audio to align well with generated sounds timing-wise.
I'm wondering now what methods people already have employed in order to
achieve that goal.

So far, I was able to find the formulas to calculate the correct
latency when using ALSA and JACK audio back-ends as long as the
paramaters 'Delay(msec)' and 'Block size' for ALSA, respectively
'Frames/period' and 'Periods/buffer' for JACK are known. Currently,
this approach works, but requires me to tell the latency compensation
calculator what driver I'm using and what the current settings are.
Also, it yet only works on Linux, but not with any other drivers like
CoreAudio, ASIO, etc.

How can I achieve correct latency compensation reliably on any
platform? Is there some more generic way?

I'm also looking at IEM's mediasettings library, hoping it would
deliver the required information to calculate latency. The README.txt
says 'get/set Audio and MIDI settings within Pd', but I wasn't able to
find a way to _get_ current settings other than 'advance 100', which
probably refers to 'Delay(msec)' set to '100'. But still, if it would
give all Pd audio settings, how would it know about current jackd
settings?

Roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20161009/d3f5faf5/attachment.sig>


More information about the Pd-list mailing list