finnendahl at folkwang-hochschule.de
Wed Feb 27 16:22:48 CET 2002
I think this discussion should get posted to the list also. It refers
to Larry's pd-scheme extern and the possibility to access the embedded
scheme through an external console.
Am Mittwoch, den 27. Februar 2002 um 09:30:44 Uhr (-0500) schrieb Larry Troxler:
> On Wed, 27 Feb 2002, Orm Finnendahl wrote:
> > Concerning the reloading of objects: I thought of adding two "plugs"
> > to the object (via pipes) which make it possible to communicate with
> > it through emacs. You just replace the inferior scheme program to call
> > from emacs with some program which accesses those pipes and start up
> > pd and pd-scheme before you connect to it from emacs. That way you have
> > access to all bindings in scheme through emacs and can skip the whole
> > reloading process in pd altogether.
> I think that's an excellent idea - it would be nice to have a real
> interpreter console!
> I'm not sure how the extern would read and write the pipes, however. I'm
> away from my PD computer at the moment so can't look at the sources to see
> how it would be done. I imagine it must be possible for the extern to
> register a function that gets periodically called to poll the pipe?
> Spawning a task could be another possibility, but probably SIOD is not
> re-entrant. Have you thought about this yet?
I imagined the following: You schedule clock events within pd to call
the polling function. This functions sets a new clock event each time
it is called. The polling could be done at something like once every
100 ms or so and there should be the possibility to send a message to
the object telling it to turn polling on/off in order ot avoid
unnecessary system load (which isn't all that big anyway).
I don't relly know the way to access siod with c strings from within
pd. I guess, a newline is interpreted as string terminator so this has
to get filtered out if you want to evaluate a whole buffer (or does
emacs filter out the newlines already when you issue M-x eval-buffer?)
In addition the input buffersize for processing in pd has to be
sufficiently big and I'm not sure how to do that dynamically.
More information about the Pd-list