Who wants access to Ableton's Python API? .. You? .. Ok!

Discuss music production with Ableton Live.
julienb
Posts: 1816
Joined: Sat Oct 29, 2005 1:15 pm
Location: France
Contact:

Re: Who wants access to Ableton's Python API? .. You? .. Ok!

Post by julienb » Thu Mar 11, 2010 10:16 am

yannxou wrote:@ST8: Thanks, I'll keep checking for updates in liveOSC. After evaluating both Python and Max4Live (even with javascript) I prefer the Python alternative which I feel more like a real programming environment.

I don't know which method has better performance but if you just want to communicate with Live to build a new interface, I see some advantages of Python over Max4Live:
1. Users do not need a licence for Max4Live.
2. Once the Python script is configured as a control surface it works for all projects and there's no need to load a Max4Live patch every time.

One thing I don't really feel comfortable though, is how the callbacks are implemented, but that's a problem of Live itself I guess. For example, I'd like to see a global callback for clips like 'clipChanged(int track, int scene, int property)' instead of needing to add a callback for each property on each clip which forces the need to rescan all clips and add/remove new callbacks to newly added/removed clips each time a track/scene is added/deleted...
you're right.
but it all depends the time you have to code that and the time you want to use it.
I mean, if you'd need a supported interface immediatly, you wouldn't be here to talk about python and just use m4L.
So I guess you have time. So I agree 100% with you: you have to code your own things :)
Julien Bayle
____________________________________________________________________________________________________

art + teaching/consulting
ableton certified trainer
____________________________________________________________________________________________________

ST8
Posts: 259
Joined: Mon Jan 26, 2009 12:55 pm

Re: Who wants access to Ableton's Python API? .. You? .. Ok!

Post by ST8 » Thu Mar 11, 2010 2:11 pm

I agree julien if you're looking for a supported api then m4l is the one to use.

If you're happy to work out what’s going on yourself then the python api works too. Granted you can’t achieve everything you can with m4l, but you can implement quite a lot. My LiveControl monome script implements everything the launchpad has and more including a midi clip sequencer (thanks to griotspeak), simple looper, grid splitter, midi control, and device control. I personally am not a particularly visual orientated programmer, even with javascript support i wasnt taken with m4l. I’m really only interested in interfacing my monome to live, i'm never going to develop audio plugins.

Performance wise, ive personally found the python api to be fast, there’s no waiting for live.path. You can add listeners to the entire live set (clips, tracks, devices) almost instantaneously.

nbinder
Posts: 867
Joined: Tue Apr 29, 2008 1:47 pm

Re: Who wants access to Ableton's Python API? .. You? .. Ok!

Post by nbinder » Sun Mar 28, 2010 10:53 am

Hi ST8,

first of all I'm glad you found your way to the forum 8)

I the latest LiveOSC package there's also a rack preset called LiveOSC Control.adg
I'm wondering what this is supposed to do....?

Also I wanna let you know that I extended an older version to allow note access. I implemented both ways (observer/getter as well as setter), however using the observer/getter is pretty much PITA as Live only provides selected notes information and each note change using the mouse/keyboard causes a loss of selection. I already asked for a way to get notes without changing the selection, but never got any response. I understand that fixing the stability issues has a higher priority, therefore I postponed the two way communication regarding notes.
Unfortunately I deleted the Live folder containing those extended API files when I updated to the last version some time ago. Therefore I cannot send you the code right now. However I want to rewrite it in the next couple of days....

Guess you're interested in merging it into official code...? :wink:

julienb
Posts: 1816
Joined: Sat Oct 29, 2005 1:15 pm
Location: France
Contact:

Re: Who wants access to Ableton's Python API? .. You? .. Ok!

Post by julienb » Sun Mar 28, 2010 10:56 am

nbinder wrote:Hi ST8,

first of all I'm glad you found your way to the forum 8)

I the latest LiveOSC package there's also a rack preset called LiveOSC Control.adg
I'm wondering what this is supposed to do....?

Also I wanna let you know that I extended an older version to allow note access. I implemented both ways (observer/getter as well as setter), however using the observer/getter is pretty much PITA as Live only provides selected notes information and each note change using the mouse/keyboard causes a loss of selection. I already asked for a way to get notes without changing the selection, but never got any response. I understand that fixing the stability issues has a higher priority, therefore I postponed the two way communication regarding notes.
Unfortunately I deleted the Live folder containing those extended API files when I updated to the last version some time ago. Therefore I cannot send you the code right now. However I want to rewrite it in the next couple of days....

Guess you're interested in merging it into official code...? :wink:
backuping rules the world ;)
Julien Bayle
____________________________________________________________________________________________________

art + teaching/consulting
ableton certified trainer
____________________________________________________________________________________________________

nbinder
Posts: 867
Joined: Tue Apr 29, 2008 1:47 pm

Re: Who wants access to Ableton's Python API? .. You? .. Ok!

Post by nbinder » Sun Mar 28, 2010 11:04 am

julienb wrote:backuping rules the world ;)
The world famous three basic rules of proper computer usage: backup, backup, backup ;-)

Funny thing is that I always did backups before that happened and had to stop because my internal hard drive is now larger than the external backup drive :?

But we're talking about a couple of lines of code... people have lost way more data than this in history ;-)

But still.... Julien... do you know about the device preset? Guess that's for the monome application, but I'm curious anyway :D

julienb
Posts: 1816
Joined: Sat Oct 29, 2005 1:15 pm
Location: France
Contact:

Re: Who wants access to Ableton's Python API? .. You? .. Ok!

Post by julienb » Sun Mar 28, 2010 12:44 pm

nbinder wrote:But still.... Julien... do you know about the device preset? Guess that's for the monome application, but I'm curious anyway :D
what?
Julien Bayle
____________________________________________________________________________________________________

art + teaching/consulting
ableton certified trainer
____________________________________________________________________________________________________

ST8
Posts: 259
Joined: Mon Jan 26, 2009 12:55 pm

Re: Who wants access to Ableton's Python API? .. You? .. Ok!

Post by ST8 » Sun Mar 28, 2010 5:52 pm

The rack in the latest release lets you toggle on and off the listeners for clip position and track level meters. If you put the rack as the first device on your master track, the dials should turn those listeners on and off as they send a lot of data when on by default.

Im using the notes commands in a sequencer ive built for LiveControl. If you do select_all_notes, get_selected_notes, then deselect all. You can essentially dump all the notes from the clip. Id be happy to merge any changes you've made into the trunk release though :)

Device preset? LiveOSC already deals with most device parameters, what are you interested in?

nbinder
Posts: 867
Joined: Tue Apr 29, 2008 1:47 pm

Re: Who wants access to Ableton's Python API? .. You? .. Ok!

Post by nbinder » Sun Mar 28, 2010 7:30 pm

ST8 wrote:The rack in the latest release lets you toggle on and off the listeners for clip position and track level meters. If you put the rack as the first device on your master track, the dials should turn those listeners on and off as they send a lot of data when on by default.
Ah I see.... clever idea. I used the track level meter listeners before and built a pretty mixer on my Lemur, but unfortunately even though the meters aren't updated at control rate I had too much network traffic for the poor Lemur ;)
ST8 wrote:Im using the notes commands in a sequencer ive built for LiveControl. If you do select_all_notes, get_selected_notes, then deselect all. You can essentially dump all the notes from the clip. Id be happy to merge any changes you've made into the trunk release though :)
I did exactly the same procedure. However this is a major PITA.... try this: Add your listener, then select a note and press Cmd+D. Your selection is gone and you can't duplicate twice that way. As I already said: You'll always lose your selection if you try to get the notes this way. I'm not going to add a callback using select_all + get_selected + deselect_all again, as it totally kills my workflow (I use Cmd+D a lot, and even worse than the duplicate issue: It even deselects when you MOVE a note!)
ST8 wrote:Device preset? LiveOSC already deals with most device parameters, what are you interested in?
Eh... I meant rack. .adg are "device presets", but what I was talking about was your nifty little rack :wink:

ST8
Posts: 259
Joined: Mon Jan 26, 2009 12:55 pm

Re: Who wants access to Ableton's Python API? .. You? .. Ok!

Post by ST8 » Thu Apr 01, 2010 11:38 am

The rack is just a blank rack, i renamed the parameters, coloured them, then hit the save button! Nothing special really.

Regards the notes listener, i kind of got round it in LiveControl using a timer, select_all_notes, get_notes, deselect_all_notes is only called about 500ms after the actual notes listener is triggered. That way if its triggered multiple times, it only processes once after all the events have finished. Thus you should be able to do quick multiple ctrl-d s, then the notes listener will trigger and get all the data.

nbinder
Posts: 867
Joined: Tue Apr 29, 2008 1:47 pm

Re: Who wants access to Ableton's Python API? .. You? .. Ok!

Post by nbinder » Sat Apr 03, 2010 7:28 pm

But still the selection will be lost after you pulled the note data.... there should be a get_all_notes function. Guess they didn't think about losing the selection when they implemented this.

baseinstinct
Posts: 929
Joined: Sun Feb 24, 2008 3:45 am

Re:

Post by baseinstinct » Sun May 16, 2010 4:46 am

Nathan Ramella wrote: Check out the API docs

http://www.liveapi.org/downloads/Ableto ... I_docs.rar
Broken link.

Are they available anywhere else?

ton
Posts: 168
Joined: Sun Apr 21, 2002 11:55 am
Location: year 2032

Re: Re:

Post by ton » Fri Aug 20, 2010 8:10 am

baseinstinct wrote:Are they available anywhere else?
Was the following link already mentioned in this topic: http://remotescripts.blogspot.com/2010/ ... asses.html

It includes two nice examples ProjectX/Y and nanoPad how you can make use of Python and Live-API. You can simply download the examples and try yourself. Reading the instructions is also not a bad idea.

nbinder
Posts: 867
Joined: Tue Apr 29, 2008 1:47 pm

Re: Who wants access to Ableton's Python API? .. You? .. Ok!

Post by nbinder » Sun Aug 22, 2010 4:47 pm

Some ideas/issues ( :arrow: ST8)

- If you insert/delete a new track, /live/refresh is sent, followed by all tracks and clips. However there is no info about which clips are playing.... Wouldn't it be a good idea to send that as well?
- Is there any way to find out which slots have a stop button and which do not?

Edit: Stop Button info is available. I'll add a callback and/or info when sending out clips. Perhaps I'll also add the status myself.

bubbleboys
Posts: 7
Joined: Tue Feb 22, 2011 3:24 am

Re: Who wants access to Ableton's Python API? .. You? .. Ok!

Post by bubbleboys » Fri Mar 04, 2011 3:45 am

Is this thing still active?

I visited the links and they are all down

If this API is exactly what I'm looking for, I'm definitely going with Ableton. Hopefully it is


Post Reply