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 a midi note out on a given midi port? - like "notein 60 1 120" etc I'de like to use TCL to generate midi music and have PD play it out on midi.
Any help appreciated.
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...
hi Gary,
if running your tcl code from within the pd-gui process, the easiest tcl command would be "pd mytarget 60 120 1 ;", while having a [r mytarget] -> [noteout] in a Pd patch. Tot might prove handy for quickly checking things out -- prototyping the real thing by sending "tot pd mytarget 60 120 1 .`.:" or similar messages, to a [tot .] object.
Otherwise (e.g. when running a remote tcl process), one option would be talking to [netreceive].
Krzysztof
Gary Newby wrote:
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 a midi note out on a given midi port? - like "notein 60 1 120" etc I'de like to use TCL to generate midi music and have PD play it out on midi.