Receiving OSC messages from SooperlooperAU

Discuss using the OSC interface to control SL

Moderator: jesse

Post Reply
ZEF
Posts: 13
Joined: Sat Nov 22, 2008 5:59 am
Contact:

Receiving OSC messages from SooperlooperAU

Post by ZEF »

Hello

I'm running SooperLooper as an AU plugin in Ableton Live 9 on Mac OS 10.8.5
I'm also running VJ software (VDMX) on the same machine which can send and receive OSC messages.

I'd like to listen to OSC messages being sent out of SooperLooper and map them to controls in VDMX.
(Using something like loop_pos or out_peak_meter would be great as visual control parameters)

Is listening to SooperLooper's AU OSC messages this way even possible? Is communication locked between Ableton and SL, they currently connect on port 10051 which is then unavailable to VDMX since it's being used. I'm not even sure what port I should be listening to for incoming OSC messages from SL AU into VDMX.

I'm trying to make this work with the build-in OSC capabilities of SL AU and VDMX, I'm not at a level of being able to code any custom intermediary translators/software at this point.
The SL OSC documentation on pings and such are beyond my current level of understanding.

Any help, tips, hints would be very helpful
Thanks,
Zef
Last edited by ZEF on Tue Apr 08, 2014 12:25 am, edited 1 time in total.

ZEF
Posts: 13
Joined: Sat Nov 22, 2008 5:59 am
Contact:

Re: Receiveing OSC messages from SooperlooperAU

Post by ZEF »

So I tried testing using the SooperLooper standalone.
I'm able to send OSC commands, such as record, etc...

But still can't figure out how to 'listen' to SooperLoopers outgoing OSC messages.
I tried using Processing, just to test OSC communication. It worked sending messages like /sl/0/hit record but I just can't get anything from /ping

Any help would be greatly appreciated,
Thanks

Code: Select all

/**
 * oscP5sendreceive by andreas schlegel
 * example shows how to send and receive osc messages.
 * oscP5 website at http://www.sojamo.de/oscP5
 */
 
import oscP5.*;
import netP5.*;
  
OscP5 oscP5;
NetAddress myRemoteLocation;

void setup() {
  size(400,400);
  frameRate(25);
  /* start oscP5, listening for incoming messages at port 12000 */
  oscP5 = new OscP5(this,9960);
  
  /* myRemoteLocation is a NetAddress. a NetAddress takes 2 parameters,
   * an ip address and a port number. myRemoteLocation is used as parameter in
   * oscP5.send() when sending osc packets to another computer, device, 
   * application. usage see below. for testing purposes the listening port
   * and the port of the remote location address are the same, hence you will
   * send messages back to this sketch.
   */
  myRemoteLocation = new NetAddress("127.0.0.1",9951);
}


void draw() {
  background(0);  
}

void mousePressed() {
  /* in the following different ways of creating osc messages are shown by example */
  OscMessage myMessage = new OscMessage("/ping");
  
  myMessage.add("osc.udp://localhost:9960"); /* add an int to the osc message */

  /* send the message */
  oscP5.send(myMessage, myRemoteLocation); 
}


/* incoming osc message are forwarded to the oscEvent method. */
void oscEvent(OscMessage theOscMessage) {
  /* print the address pattern and the typetag of the received OscMessage */
  print("### received an osc message.");
  print(" addrpattern: "+theOscMessage.addrPattern());
  println(" typetag: "+theOscMessage.typetag());
  println(" message: "+theOscMessage);
}

jesse
Posts: 527
Joined: Sat Sep 06, 2008 9:46 am
Contact:

Re: Receiveing OSC messages from SooperlooperAU

Post by jesse »

If you look in the SL installation DMG, you'll see a little program called slregister in there. Copy that into your main user home directory. Then open a Terminal, then run:

./slregister localhost YOURPORT 10051

Where you substitute YOURPORT for the port number of your listener, which from your source code appears to be 9960. The 10051 is the default port for the first loaded AU plugin, as you already discovered. That will register everything to be sent to your listener and you should start seeing updates immediately.

Incidentally, if you want to see the /ping command respond to you, you need to send two parameters, the second being an osc path, eg: '/ping osc.udp://localhost:9960 /pingack'

ZEF
Posts: 13
Joined: Sat Nov 22, 2008 5:59 am
Contact:

Re: Receiveing OSC messages from SooperlooperAU

Post by ZEF »

Thank you!
I am now successfully sending and receiving OSC messages from SooperLooper.

I used "./slregister localhost 9960 9951" with the slregister application.
9960 being the port my processing sketch is using and 9951 being the port SooperLooper is using while in standalone (I'll switch it to 10051 when I start testing the AU version)

Using this Processing sketch, I'm able to see the OSC messages SooperLooper is sending.

Code: Select all

//using oscP5 library - http://www.sojamo.de/libraries/oscP5/
import oscP5.*;
import netP5.*;
OscP5 oscP5;

void setup() {
  size(1, 1);
  frameRate(25);
  oscP5 = new OscP5(this, 9960);
}

void draw() {
}

/* incoming osc message are forwarded to the oscEvent method. */
void oscEvent(OscMessage theOscMessage) {

  //from SooperLooper
  if (theOscMessage.checkTypetag("isf")) {
    int     loopNumber  = theOscMessage.get(0).intValue();
    String  controlName = theOscMessage.get(1).stringValue();
    float   controlValue  = theOscMessage.get(2).floatValue(); 
    println(" message: loopNumber= "+loopNumber+ " controlName= "
      +controlName+" controlValue "+controlValue);
  }
}

Thanks for your help!

Post Reply