On Wed, Dec 10, 2008 at 09:05:16AM +0100, IOhannes m zmoelnig wrote:
Zach Dwiel wrote:
Hello
first of all, there is no official API.
It would be so nice if there were an easy way to invoke Pd as a library from within other code. I know it's possible to do this (Spore, pd~, RjDj, Pd browser plugin), it's just that it requires writing a bunch of non-trivial support code that must be re-written every time. It shouldn't have to. Pd -nogui could and should be as easily invokeable as any other library.
For example, I just wish it was possible to go:
#include <pd.h>
*PDInstance pd = make_pd_instance(); pd->init(/* ..args.. */);
while (1) { /* Do stuff here */ pd->schedloop(); /* Do other stuff here */ pd->sendMessage(";my-receiver bang;"); }
Ok maybe not quite as easy as that, but I reckon you'd see Pd used as the audio engine for loads of other apps and games if this was simple. There has already been interest from e.g. the Blender project and the several other apps that already embed Pd.
If this is already easy and I have just missed something obvious, please let me know. (Sorry for not contributing code.)
Best,
Chris.