[PD-dev] scheduling: clocks & audio
geiger at xdv.org
Thu Aug 21 10:30:27 CEST 2003
On Wed, 20 Aug 2003, Brian Sheehan wrote:
> I want to ask a general question in relation
> scheduling in pd. I've tried looking at the docs and
> source code, but I'm still confused.
> >From the docs, audio is computed every 64 samples, so
> with a sample rate of 44100 this means that 64 samples
> of output must be computed every 1.45 ms.
> So my question is, if I have a clock object that calls
> a function say every 20ms, and this function takes
> 10ms to complete, how is audio interleaved with the
> execution of this function? Another way of phrasing
> this would be: are functions that are called by clocks
> executed atomically? Doesn't seem that they can be,
> unless they execute in less than 1.45 ms.
> any thoughts/explanations are appreciated (i've a
> feeling they might radically change my understanding
> of how pd works!!)
Well, yes. you better write functions that take less that
1.45 ms to finish, .. .much less. PD is not multithreaded or
asynchron, thats what makes messages deterministic wrt to the
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> PD-dev mailing list
> PD-dev at iem.at
More information about the Pd-dev