2 // launch with opensound_demo_send.ck
5 //create our OSC receiver
7 6449 => orec.port; //use port 6449
8 orec.listen(); //start listening ( launches thread )
10 function void receiver() {
11 //create an address in the receiver
12 //and store it in a new variable.\
13 orec.event("/bang/me,if") @=> OSC_Addr rate_addr;
16 rate_addr => now; //wait for Events to arrive.
18 //grab the next message from the queue.
19 while ( rate_addr.nextMesg() != 0 ) {
20 rate_addr.getInt() => int hi;
21 rate_addr.getFloat() => float span;
24 if ( std.rand2f(0.0, 1.0) < 0.07 ) {
32 function void sender( float span ) {
34 xmit.setHost( "localhost", 6449 );
37 xmit.startMesg( "/bang/me", ",if" );
47 // start our listening shred