[PD] sending midi notes as a string

carmen ix at replic.net
Thu May 6 04:46:03 CEST 2004


> I'm playing around with TCL/Wish connected via tcp socket to PD.
> Is it possible to send a command that will allow PD to play
> I'de like to use TCL to generate midi music and have PD play it

the "tot" extra has some functionality in regards to printing the output of tcl, if you want a more direct approach you could roll own external, a very simple one, with someting like
notemaker_new(....
char buf[50];
sprintf(buf, "d%x", (int)x);
x->x_s = gensym(buf);
pd_bind(&x->x_obj.ob_pd, x->x_s);
notemaker_playnote(...
outlet_symbol(x->x_obj.ob_outlet, s);

--once its 'bound', you can then do from tcl:

pd "x[list ${self}] playnote [ pdtk_enquote $notetoplay ]"

to send stuff to its outlet...theres simlar techniques for floats, lists etc but i'm pasting...







More information about the Pd-list mailing list