Ableton Live 9 Lite and openFrameworks

Hello, I want to send OSC messages to Ableton from my OF app, in order to trig sounds in ableton.

I have looked into this addon but the instructions are not up-to-date (when downloading the LiveOSC .zip, there is no folder containing the scripts, but a .dmg file).

Which is the preferred way to achieve this? are there any other addons out there?

I recently used
Notice, as suggested in the comments here that you’ll need to modify by commenting the following lines

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

I tried to use gene’s addon but at the end it was easier for me to directly send the osc messages I needed. The “api” is quite straightforwards. I used it on Macos Sierra, OF 0.10 and Live 9.7.5
hope this helps.

I can not find any file named in that repository. Is is somewhere else?

sorry, this is the repo I used

For some reason LiveOSC2 didnt worked while LiveOSC did

Hello @roymacdonald , I have downloaded the repository and edit the file.
I’m trying to figure out with address to use, do you have some code around that I can test on my machine?

Hi, you send osc to 9005 and receive in 9006.
Just tested the following code and it works for me.
An important thing. in Live, got to Preferences and in Midi select LiveOSC in the Control Surface dropdown. otherwise it will not work.

#pragma once

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

class ofApp : public ofBaseApp{

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

#include "ofApp.h"

void ofApp::setup(){
	sender.setup("localhost", 9005);
void ofApp::mouseMoved(int x, int y ){
	ofxOscMessage m;
	m.addFloatArg(ofMap(x, 0, ofGetWidth(), 0, 1, true));
	sender.sendMessage(m, false);


I can not hear any sound out of it. I have dragged a sound effect in one of the midi columns, but still no sound. And I have pressed play. Maybe I did not get something, it is the first time that I use Ableton.

is the track volume moving via OSC?
you need to press the play button in the track slot. or you canuse the more conventional timeline view by pressing the tab key.

Now I get the track playing, but the volume is not changing while changing the mouse pos in the OF app. I have selected Prefereces -> Midi -> LiveOSC in the Control Surface dropdown, I have also tried to close and reopen ableton, same result

which version of live are you using?
I remember that at first it didn’r work and it only did after I restarted the computer and reopened Live a few times. Sounds like black magic but I don’t have a better answer than that.
(notice that the int argument you send in the osc message is the track number, where the first track is 1, not zero)

Thank you for your support @roymacdonald. After a restart, it is working. This thing behave weirdly. My ableton version is 9.7.6.

By the way, I have discovered sonic PI in the meantime, it has a nice documentation and it works without magic

Of course, it is totally a different software.

@edapx Why is it behaving weirdly?

Yeah, Sonic Pi seems to be really nice.

I mean, it is weird that it worked just after a restart. I have tried both Ableton and Sonic PI, but for what I want to do (sending some notes depending on some variables) Sonic PI looks more easy and straightforward to me.
Thanks :wink:

I see. right, Ableton can be a bit of an overkill in some cases.

This is a super simple exercise that uses Sonic PI and OpenFrameworks

Ofcourse I’m not sure what notes you’re playing or what your sound requirements are, but Maximilian is my go-to for doing audio stuff and it runs right inside oF and not having to use OSC or other things in the middle is very helpful.

1 Like

@ayruos , Right, there are several libs and addos for sound generation from within OF, but you can’t live code those (at least as easily as using SonicPi). Both options are equally valid and each has its pro and cos.

Yes of course :slight_smile: