Re: synchronise the start of [writesf~] to (network) clock time?

IOhannes m zmoelnig via Pd-list <[email protected]>
Newsgroups gmane.comp.multimedia.puredata.general
Message-ID <[email protected]>
On 10/16/25 10:18, Peter P. wrote:
> Do I understand correctly that one sample from my ADCs will arrive at a
> random moment within the lengh of one buffer in Pd?

depending on the API you are using, more or less: yes.
(with callbacks, you might get a less arbitrary time - but i haven't 
actually verified this).

of course the logical time (within Pd) takes care of this fluctuation.
it's just that the system time (as reported by [time]) might have 
different ideas about "now".
> In my case I want to go for the best possible resolution without a
> dedicated radio clock and with standard laptop hardware. Is banging
> [time] at every microsecond still the best way maxing my cpu?
there's really no point in querying the time every microsecond.
you can only start recording with [writesf~] on block boundaries, so you 
could as well use [bang~].


a somewhat better approach might be to use OSC timestamps to start the 
recording synchronously.

recent versions of [packOSC] and [unpackOSC] (v0.3, available on deken) 
allow you¹ to use Pd's internal notion of time (rather than the system 
time).
the time is synched to the system time (which should by synchronized 
with NTP) at startup (or manually via the "usepdtime" message).

gfmasdr
IOhannes

¹ it's actually the default, but you can turn it off and use the system 
time.

-- 
please do not CC me for list-emails

---
[email protected] - the Pure Data mailinglist
https://lists.iem.at/hyperkitty/list/[email protected]/message/YVISVJLDEEPTQHYDGQMC243YUCRVPOEX/

To unsubscribe send an email to [email protected] mailing list
UNSUBSCRIBE and account-management -> https://lists.iem.at/
OpenPGP_signature.asc (application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE-----

wsF5BAABCAAjFiEEdAXnRVdICXNIABVttlAZxH96NvgFAmjwsJkFAwAAAAAACgkQtlAZxH96Nvix
3A//ZXxF5q4+tKc2ysSiRMbCmbXxO8clxlcxjiuOm7BM414P2bzADvJMmC4LjEAvsOG+RT354Bdh
00jBmPAyVBsGbzgt8AZdPL2+P4BLzl4hynBzYe0ZLn91u4qFpKaD8uerpxlxQ6fMjHgcIG7Bo8mw
fSSFvsakfZioOtCmAQw8fbbCNFTjliZPl+mlk2oubEbl1H8wXLB/hU6Hairjgiz5jkfbR0e02VMR
V7+DUzuujzJNrj1XWpIHTrSIPj2wSuxvN4QekyEXSnZxt4TOW7dgAeE3l6wM/RRj6qGvSur3HoyC
WiVRpKhn8EPRPVG7lBB4g9/HmuRAfNf1G+nhXoA2OEhiz7DMA2qk9u9odpXBkZhBNWStjSZ1GPvC
n9txN559/1wiFnu+m/84XSrYUlOLlKjOCNDvIj2+VgZ1TkDSnvDGUp+XI66+gQnvirVcUg4jUpZo
VLFOwApmOIy3IFaU19bre0DWmxiiZT/ecs6sSM6XsXxZUJF5+zsMgOrtqbCQT2Fvtf9wGWvNZ0B+
ssS3KMbjdI5L5FwDg08mfkleUznweLmuiIsakywNVP4iXcjTRTILa+7w7tYtkzekEeIyQH/0PK0w
bOMsPtfcKQizzW5TrGvuWnj6MZCNJRNFFPPm5+V+8WdSoExMEEuEPv/ZrfMqKylw6ebg2UJJgs31
VfM=
=EATg
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.