Hi everybody,
I've been mostly lurking here until now, so let me just briefly introduce myself as the guy from the computer music department at the University of Mainz (Germany) who wrote the functional scripting language Q (http://q-lang.sf.net/), as well as the interfaces between Pd and Q and Yann Orlarey's functional DSP programming language Faust (http://faust.grame.fr/). The LAC regulars among you might already know me. ;-)
I have some questions I need to answer in order to further improve the Faust and Q externals. After googling around and searching pd-dev for quite a while I still haven't figured out how to do these things, so any advice will be deeply appreciated.
1. Dynamic reloading of externals
I ran into this while teaching a Faust programming course last semester, where we used Pd as a convenient environment to test and run Faust programs.
Right now, when we recompile a (Faust-generated) external, we need to restart Pd so that it picks up the new dll (.pd_linux file). It would be *very* convenient if there was a menu command to quickly reload all loaded externals and reconfigure the affected objects. I can imagine that this is not easy to implement, but it would certainly make the edit/compile/run cycle for externals much much easier. :)
Even with the current Pd it might be possible to reload a dll through a "wrapper" external, but that still leaves the problem of reconfiguring the inlets and outlets of affected objects on the fly (which would be quite useful for scripting externals as well). I've seen that this has been discussed on the ml before, but I couldn't figure out whether this already works in the current Pd, and how.
2. Patch environment
A problem I have with the Pd/Q external is that the embedded Q interpreter can only load a single main script per process. So I would like to be able to specify the name of that script somewhere in the hosting patch, as it would be rather clumsy if the user had to specify the same script name over and over in each [q] object. I see that the [declare] object provides that kind of functionality, but AFAICT only for Pd's search path and lib environment. It would be great if externals (loaded beforehand with -lib) could hook into that mechanism in some way, so that one could write something like, e.g., [declare -script foobar.q] and have this information available when the external starts creating objects. Is it possible to do this?
Many thanks in advance, Albert