great ;) no problem. i help you and somebody else helps me somewhere else. enrike karl petermichl wrote:
OK, I just could not wait!
Although in a hurry, I had to try out the suggestions from enrike..---)) And Yes, SUCCESS!!! ChucK finally does receive OSC commands!!
The only small change I had to make in enrikes code was my initial fault (which he spotted but copied over into his example). The type declaration for the OSC data must read "i" for integer, not "int": recv.event( "/slider1, i" ) @=> OscEvent oe;
Proudly presenting (with a lot of help from enrike) my first shred which actually creates sound controlled by a python-fader sending an OSC-command:
SinOsc sinus =>dac; OscRecv recv; 9000 => recv.port; recv.listen(); recv.event( "/slider1, i" ) @=> OscEvent oe; while( true ) { oe => now; while( oe.nextMsg() ){ oe.getInt() => int i; <<< "got (via OSC):", i>>>; i*5+50=>sinus.freq; 1::ms=>now; } }
This is the python code:
from Tkinter import * import osc osc.init() def sendValue(value) : osc.sendMsg('/slider1', [int(value)], "127.0.0.1", 9000) window = Tk() h = Scale(window, from_=0, to=200, orient=HORIZONTAL, command=sendValue) h.pack() mainloop()
Thank you enrike, without you this would not have been possible!!! Karl.
------------------------------------------------------------------------
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users