Created
April 21, 2012 20:55
-
-
Save stuntgoat/2439549 to your computer and use it in GitHub Desktop.
OSC receive dot ChucK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// (launch with OSC_send.ck) | |
// the patch | |
// create our OSC receiver | |
OscRecv recv; | |
// use port 6449 | |
6449 => recv.port; | |
// start listening (launch thread) | |
recv.listen(); | |
// create an address in the receiver, store in new variable | |
recv.event( "/hello, ii" ) @=> 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 ) | |
{ | |
<<< "got (via OSC):", oe.getInt(), oe.getInt() >>>; | |
// set play pointer to beginning | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment