[PD] [almost OT] need suggestions for an implementation

Frank Barknecht fbar at footils.org
Wed Mar 12 08:45:56 CET 2008


Hallo,
Matteo Sisti Sette hat gesagt: // Matteo Sisti Sette wrote:

> I need to implement an object that I will call a "scheduler" (suggestions 
> for a better name are welcome too) which would be very similar to a [qlist] 
> (without the need for the capability of changing the tempo), with two 
> differences:
> - the leading number in a message represents absolute time (since some 
> initial instant) rather than relative to the previous message

I think, this could be as simple as a combination of [textfile] and
[pipe], where you dump the whole content of the textfile to [pipe] in
one go using [until].

> - you can [add( messages with a scheduled time that is not greater than all 
> previously added messages.

I don't understand what you mean with this one. Could you give an
example?

> I thought I'd dive into pdlua and use lua to implement such an object (I am 
> completely new to lua though)... would you suggest that or pyext and 
> implement it in python?

pdlua has clock support which might be helpful for this. I don't know
ATM, if pyext also supports clocks, but I think it doesn't.

> It seems python has standard heap functions in its library; does lua have 
> something equivalent or will I have to write the code for the priority 
> queue?

Lua has only one data structure, the table, which you use to build
other structures. As tables are very flexible, this generally isn't
very complicated. 

Ciao
-- 
 Frank Barknecht                                     _ ______footils.org__




More information about the Pd-list mailing list