Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Processing and OSC
import netP5.*;
import oscP5.*;
OscP5 oscP5;
NetAddress remoteIP;
void setup() {
size(400, 400);
/* Start our sender on the Default Isadora port (1234)*/
oscP5 = new OscP5(this, 1234);
/* Set our remoteIP */
remoteIP = new NetAddress("", 1234);
void draw() {
void mousePressed() {
/* Create a new bundle that we can fill up */
OscBundle myBundle = new OscBundle();
/* Create a new message object in our bundle with the correct path */
OscMessage myMessage = new OscMessage("/test");
myMessage.add(random(1, 10));
/* Add it back to our bundle */
/* Send it away ! */
oscP5.send(myBundle, remoteIP);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment