10.4 Mouse To Lang

download 10.4 Mouse To Lang

If you can't read please download the document

description

sc tutorial

Transcript of 10.4 Mouse To Lang

//The mystery of getting mouse values back in the language solved using OSCresponder and SendTrig

(SynthDef(\mousedemo, {var mx,my, impulse;

mx= MouseX.kr(0.0,1.0);my= MouseY.kr(0.0,1.0);

impulse= Impulse.kr(15); //update at 15Hz = haptic rate

SendTrig.kr(impulse, 100, mx);SendTrig.kr(impulse, 101, my);

}).play;)

(var mx, my;

OSCresponder(s.addr,'/tr',{ arg time,responder,msg;var value;

//Post