38 lines · 919 B · Text
RawDownload
//----------------------------------------------------------------------------// name: s.ck ('s' is "sender")// desc: OpenSoundControl (OSC) sender example// note: launch with r.ck (that's the receiver)//---------------------------------------------------------------------------- // destination host name"localhost" => string hostname;// destination port number6449 => int port; // check command lineif( me.args() ) me.arg(0) => hostname;if( me.args() > 1 ) me.arg(1) => Std.atoi => port; // sender objectOscOut xmit; // aim the transmitter at destinationxmit.dest( hostname, port ); // infinite time loopwhile( true ){    // start the message...    xmit.start( "/foo/notes" );        // add int argument    Math.random2( 30, 80 ) => xmit.add;    // add float argument    Math.random2f( .1, .5 ) => xmit.add;        // send it    xmit.send();     // advance time    0.2::second => now;}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t