From af35d7034b7252503d7bbfd549e248318266a902 Mon Sep 17 00:00:00 2001 From: Pete Shadbolt Date: Sat, 27 Dec 2014 21:44:13 +0000 Subject: [PATCH] Got chuck to compile, added OSC --- chuck.ck | 26 +++++++++++++++++++++++++- run.sh | 2 +- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/chuck.ck b/chuck.ck index 269845f..36aa7a3 100644 --- a/chuck.ck +++ b/chuck.ck @@ -11,5 +11,29 @@ g => Gain feedback => DelayL delay => g; .75 => delay.gain; // infinite time loop -while( true ) 1::second => now; +<<< "hello from chuck (waiting for OSC)" >>>; + +// create our OSC receiver +OscRecv recv; + +// use port 9000 +9000 => recv.port; +// start listening (launch thread) +recv.listen(); + +// create an address in the receiver, store in new variable +recv.event( "/test, f" ) @=> OscEvent oe; + +// infinite event loop +while ( true ) +{ + // wait for event to arrive + oe => now; + + // grab the next message from the queue. + while ( oe.nextMsg() != 0 ) + { + <<< oe.getFloat() >>>; + } +} diff --git a/run.sh b/run.sh index 24bd9f5..a802c28 100755 --- a/run.sh +++ b/run.sh @@ -1,2 +1,2 @@ #!/bin/bash -chuck.alsa --bufsize64 chuck.ck +./chuck --bufsize64 chuck.ck