Loading...
Logo
Processing Forum
Hi,
I'm trying to send to ableton live via liveOSC and oscp5 library. I'm able to play song with this command: OscMessage myMessage = new OscMessage("/live/play"); but i don't understand how should look the command for playing clip's. On   http://monome.q3f.org/browser/trunk/LiveOSC/OSCAPI.txt page is whole list of osc commands. I would appreciate if anyone could explain me how to use  /live/play/clip (int track, int clip) with OscMessage.
Thx.

Replies(4)

import oscP5.*;
import netP5.*;

OscP5 oscP5;
NetAddress myRemoteLocation;

void setup() {
  size(400,400);
  oscP5 = new OscP5(this,9001);
  myRemoteLocation = new NetAddress("localhost",9000);
}

void draw() {
  background(0);
}

void oscEvent(OscMessage theOscMessage) {
  println("received an osc message. ");
  println("addrpattern: "+theOscMessage.addrPattern());
}

void mousePressed() {
  /* in the following different ways of creating osc messages are shown by example */
  OscMessage myMessage = new OscMessage("/live/play/clip");
  myMessage.add(4);
  myMessage.add(1);
  println("I sent a message.");
  /* send the message */
  oscP5.send(myMessage, myRemoteLocation);
}

I've added an example above which will play Clip 2 from Track 5.
See myMessage.add(4) and (1);

Also take note that the first number starts from '0' instead of '1' and that's why its written as 4 and 1.
Thx a lot it's working :)
I post here because I´m wondering how to communicate other way around: Ableton sending messages to Processing. 

I have no idea of Ableton (but working with someone who uses it and has no idea of OSC) , so I'm just asking to see if someone has experience making this bridge.

1. Tried first the code from this thread to see if and it isn't working...so I thought I should ask at least: how you configured Ableton to communicate via OSC? Done the basics, by finding liveOSC and installing the two folders in live, that's straightforward. I went to preferences and activated liveOSC and liveOSC2  in the Midi setup. But how to know if it's working?