[PD] timing question
czhenry at gmail.com
Mon Dec 17 06:03:23 CET 2007
On Dec 15, 2007 6:24 PM, Yvan Vander Sanden <yvan at youngmusic.org> wrote:
> I am currently working on an external that generates rhythmic pulses in
> a certain way. But I was wondering if I could run into problems with
> calling usleep in an external. Alternatively, I suppose i could use a pd
> timer as an input and let it give a bang each milli-second, but that
> doesn't seem like a good idea to me.
[metro 1] creates a bang each millisecond, approximately. The message
rate is constrained by the block size, so you would want to put [metro
1] inside of a subpatch with [block~ 1] for best time resolution.
You can't get your messages to resolve at *exactly* each millisecond
in pd, no matter how you do it-but [metro 1] gives you 1-ms bangs with
an error of at most 1/44.1 ms, using [block~ 1] and sampling freq 44.1
--I guess if you use a sample rate that is a multiple of 1,000 you can
get exactly milliseconds between bangs.
> I suppose externals are all separate threads, or am I wrong about that?
> yvan vander sanden
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
More information about the Pd-list