Ableton with Openframeworks using LiveOSC

Goal: Using OSC to send messages from (Master) OF scene to (slave) Abelton device.

As a first round prototype, I’d like to be able to hit play in Ableton using OF.

The main goal is to integrate OF code that is controlling a kinect-to-OF generated projection into the sound design process so that the finished, generative audio is musical. In order to do that I need to have a thorough understanding of the relationships between OF, OSC, and Ableton Live. (I have a colleague writing the code in OF for the projection component, but he is unfamiliar with Ableton so I am helping with this part of the build and getting to know OF a bit).

I have downloaded LIve0SC, I’m working with Ableton 9.7.7. I am a 100% beginner with OF, have some experience with MaxMSP but am not used to writing linear code. Could someone walk me through step by step what I need to do?

did you try https://github.com/genekogan/ofxAbletonLive ?

also look at openFrameworks’ osc examples in order to understand how to use it. find these in examples/communication/

I did- actually used some of your comments in previous forums to discover the link the the original LiveOSC script that contains the .asd file for Ableton, but I have no clue what kind of infrastructure I need to get the two to interact. I need a more infant, personal explanation of what needs to occur.

I have thus far downloaded: Live OSC, Live OSC 2, TouchBridge, LiveController, Touch Bridge, TouchOSC Editor, and have Touch OSC app on my iphone already. No idea what the relationships between each are.

you might want to have a look at ofxMidi’s output example. I quite often use virtual midi ports to communicate with live.

If you are running the osc sender and receiver in the same computer you need nothing. It just uses a local port. If you want to use the sender and the receiver in different devices you need these to be in the same local network (same wifi for example).

I am successfully able to control live via osc using liveOSC. You just need to follow the instructions here. The one important thing you need to do is to comment out (put a # in the begining of each line) the following lines of socket_live8.py other wise it will not work.

if _have_ssl:
    _realssl = ssl
    def ssl(sock, keyfile=None, certfile=None):
        if hasattr(sock, "_sock"):
            sock = sock._sock
        return _realssl(sock, keyfile, certfile)

On the openFrameworks side, make a new project with the Project Generator and add ofxOsc as an addon. Then copy/paste the following into the corresponding file

ofApp.h

#pragma once

#include "ofMain.h"
#include "ofxOsc.h"

class ofApp : public ofBaseApp{

	public:
	void setup();
	void mouseMoved(int x, int y );
	
	ofxOscSender sender;
		
};

ofApp.cpp

#include "ofApp.h"

//--------------------------------------------------------------
void ofApp::setup(){
	sender.setup("localhost", 9005);
}
//--------------------------------------------------------------
void ofApp::mouseMoved(int x, int y ){
	ofxOscMessage m;
	m.setAddress("/live/volume");
	m.addIntArg(1); // this value is the track number of which you want to control the volume
	m.addFloatArg(ofMap(x, 0, ofGetWidth(), 0, 1, true)); // here you pass the volume, which has to be in a 0 to 1 range
	sender.sendMessage(m, false);
}

this simple script will make the mouse x position in your OF app to control the volume of track 1 in live. (Notice that tracks numbers start in zero)

Hope this helps.
cheers