← Back

ofxAbletonLive

github.com/genekogan/ofxAbletonLive · @genekogan
OF 0.10 Releases Bridges Sound

addon for openFrameworks for controlling Ableton Live

85 13 Last commit 8y ago Created 11y ago

Forks

Forks pushed to more recently than genekogan/ofxAbletonLive itself, plus any admin-confirmed fork with commits of its own — worth checking if you're hitting issues with the original.

jeffcrouse/ofxAbletonLive by @jeffcrouse · ★ 0 · pushed 5y ago

README

ofxAbletonLive is an addon for openFrameworks which controls Ableton Live from an OF app, allowing remote control without MaxForLive. Communication is handled over OSC using the LiveOSC plugin and thus can be done across a network. Communication is 2-way and thus parameters remain in sync whether modified from the app or from Ableton.

Most of Ableton's main features are implemented, but not all. A list of the OSC commands available can be found here. Most have been wrapped.

Installation



Download LiveOSC from the releases page.

Place the "LiveOSC" folder (inside "trunk") into the Midi Remote Scripts folder in your Live App. On OSX, go to your applications folder, right click Ableton and select "show package contents", then navigate to Contents/App-Resources/MIDI Remote Scripts and paste there. On Windows, paste into \path\to\ableton\Live x.x.x\Resources\MIDI\Remote Scripts

Restart Ableton. Go to preferences -> MIDI. LiveOSC should show up in the drop-down menu under "Control Surface". Select it.

Try the examples. Live communicates with your app over ports 9000 and 9001, so make sure those are not occupied (including by another instance of ofxAbletonLive)

Fix for Ableton 9.6+



If LiveOSC fails to work in most recent version of Ableton, this apparently fixes it -- find the file socket_live8.py and comment out the following block of code (lines 74-79):

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

Usage



The main class is ofxAbletonLive. An instance of ofxAbletonLive contains a collection of ofxAbletonLiveTrack. An ofxAbletonLiveTrack instance contains a collection of ofxAbletonLiveClip and ofxAbletonLiveDevice. ofxAbletonDevice contains a collection of ofxAbletonLiveParameter. All classes have various properties that can be set remotely.

Connect to Ableton:

ofxAbletonLive live; live.setup();

By default, the app connects to Live over localhost. You can also connect over the network to a machine running Live by including its IP address, e.g.

live.setup("192.168.1.2")

Optionally you can pass a callback method to be called once ofxAbletonLive is finished parsing the current live set (after setup has been called). The callback method has no arguments.

//void ofApp::myCallback() {}

live.setup(this, &ofApp::myCallback); live.setup("192.168.1.2", this, &ofApp::myCallback);

Note also that ofxAbletonLive handles communication with Ableton through ports 9000 and 9001. Make sure these ports are not occupied if you are getting no results (including through another instance of ofxAbletonLive).

There are getters and setters for global variables in Live.

live.setTempo(120); float tempo = live.getTempo(); live.setTime(8.0); float time = live.getTime(); live.setOverdub(true); bool overdub = live.getOverdub(); live.setVolume(1.0); // master volume, 0->1 float volume = live.getVolume(); live.setPan(0.0); // master pan, -1->1 float pan = live.getPan(); live.setQuantization(0); // 0 = 8 bars, 1 = 4 bars ... 13 = 1/32nd bar live.setCrossFader(0.5); float crossfade = live.getCrossFader(); int numTracks = live.getNumTracks(); int numScenes = live.getNumScenes();

Playback commands

live.play(); // play from beginning live.playContinue(); // play from current time live.playSelection(); // play selection live.stop(); live.prevCue(); // jump to previous cue point (global, not track) live.nextCue(); // jump to previous cue point (global, not track) live.selectScene(2); // select a scene (global) Working with individual tracks

// we can get info about our tracks live.printTracks(); // or have it spit out everything we know about the live set live.printAll();

// from the track info printed above we find out the index and name of each track // grab a reference to a track by index ofxAbletonLiveTrack track = live.getTrack(0);

// or by name... // careful! either method returns NULL if track doesn't exist ofxAbletonLiveTrack
track = live.getTrack("My Track"); // tracks have these setters (and the corresponding getters) track->setVolume(ofRandom(1)); track->setPan(ofRandom(-1, 1)); track->setArmed(false); track->setMute(false); track->setSolo(false);

Working with a track's clips

// get a track's clips ofxAbletonLiveTrack track = live.getTrack(0); track->printClips();

// grab a reference to a clip, either by index or by name // careful! either method returns NULL if clip doesn't exist ofxAbletonLiveClip
clip = track->getClip(0); ofxAbletonLiveClip clip = track->getClip("Name of my clip");

// clip actions clip->play(); clip->setDetune(-25); // -50 to 50 clip->setTranspose(36); // -48 to 48 clip->setLooping(true); clip->setLoopStart(25.0); clip->setLoopEnd(100.0); clip->setWarp(true);

Working with a track's devices

ofxAbletonLiveTrack
track = live.getTrack(0);

// print all the devices we have (index, name) track->printDevices();

// grab a reference to a device, either by index or by name // careful! either method returns NULL if clip doesn't exist ofxAbletonLiveDevice device = track->getDevice(0); ofxAbletonLiveDevice device = track->getDevice("Name of my clip");

// you can enable/disable devices device->setEnabled(false); // you can query a device for its parameters // returns: (index) "name" {min, max} device->printParameters(); // get a handle to a parameter by index or name (note: index start at 1, not 0) // careful! either method returns NULL if clip doesn't exist ofxAbletonLiveParameter parameter = device->getParameter(1); ofxAbletonLiveParameter parameter = device->getParameter("Attack"); // set value of parameter by hand parameter->setValue(0.5);

// you can chain the getters to grab the desired parameter, e.g live.getTrack("2-Audio")->getDevice("Vocoder")->getParameter("Dry/Wet")->setValue(0.7);

Included examples



Known bugs, missing features, to-do



Get this addon

HTTPS
SSH

Latest release

v1.0 AbletonOSC published 10y ago

AbletonOSC



This application presents an interface for choosing parameters from your Ableton set and routing OSC messages to them. It is meant to live in between your OSC-sending application and Ableton, facilitating the process of latching parameters without having to derive their addresses yourself (which is somewhat tedious using LiveOSC).

More detailed instructions and a tutorial will be posted soon. For now, see these bare-bones instructions:

Instructions



1) Install and activate LiveOSC in Ableton.

2) Launch Ableton, and then launch AbletonOSC. AbletonOSC will then parse your current Ableton Live set and return all the available parameters, at which point you can select them from your gui.

3) To control the selected parameters, see the output address in the OSC gui (by default /wek/outputs) and port (default 12000). Sending a multi-value array of parameter values (between 0 and 1) to this address on localhost will change the values. Alternatively, you can change one parameter at a time by sending to /wek/outputs/# where # is the index of the parameter.

4) At this point, changing the outputs in your application should change them in Ableton via AbletonOSC.

5) ♩♪♫♪