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

Discuss music production with Ableton Live.
Tone Deft
Posts: 24152
Joined: Mon Oct 02, 2006 5:19 pm

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

Post by Tone Deft » Fri Mar 13, 2009 8:10 pm

how will max4Live impact this project? will it be worth it to continue to develop? is all this any closer to being usable without pain?
In my life
Why do I smile
At people who I'd much rather kick in the eye?
-Moz

t0gg1e4u
Posts: 10
Joined: Fri Mar 13, 2009 12:28 pm

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

Post by t0gg1e4u » Fri Mar 13, 2009 9:25 pm

I updated the package again (if you have downloaded already, please do it again). I simplified the installation process and no java or javascript error messages should appear.

hoffman2k
Posts: 14718
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

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

Post by hoffman2k » Fri Mar 13, 2009 9:54 pm

t0gg1e4u wrote:I updated the package again (if you have downloaded already, please do it again). I simplified the installation process and no java or javascript error messages should appear.
Did you change anything to the python scripts or only the java code within the max patches?
Tone Deft wrote:how will max4Live impact this project? will it be worth it to continue to develop? is all this any closer to being usable without pain?
I got it running without any glitches at the moment. It all depends on what you do I guess, the only thing my patch does is the Clip grid. And only in its basic form.
We'll need deeper access for stuff like differentiating between a group track and a normal track.
Who knows when we'll see that. Still 6 weeks till the Cycling expo which is the earliest date I expect to hear about it again. Messe, much like Namm will probably be all about Live 8.

t0gg1e4u
Posts: 10
Joined: Fri Mar 13, 2009 12:28 pm

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

Post by t0gg1e4u » Fri Mar 13, 2009 10:24 pm

Did you change anything to the python scripts or only the java code within the max patches?
I made only changes to the Clip.py script, changed the faulty

Code: Select all

is_playing_has_listener
add_is_playing_listener
remove_is_playing_listener
to these:

Code: Select all

playing_status_has_listener
add_playing_status_listener
remove_playing_status_listener
and dropped

Code: Select all

add_is_triggered_listener
remove_is_triggered_listener
alltogether because I couldnt find a replacement that made sense

with the java code: I unpacked the jar, decompiled the classes, compiled them again and dropped them into max5/cycing 74/java/classes
with the javascript code of the max patches: I dropped tham all in the same folder as the max patches, this way max doesnt need any additional configuration

otherwise no changes. it works with the provided live patch, but not with my own, and I dont know why. yet.
I got it running without any glitches at the moment. It all depends on what you do I guess, the only thing my patch does is the Clip grid. And only in its basic form.
We'll need deeper access for stuff like differentiating between a group track and a normal track.
I need a function that allows me to recognise the devices and their properties and a way to access them directly (and not through the midi teaching way). it looks though, as if this requires a serious hack, because this three midi bytes will make it difficult to access them directly. osc might be a solution, but

(a) i wasnt able to make an osc-script to run
(b) I am not sure if osc is fast enough - as far as those scripts I found tell me, only 100ms update rates are possible, but I would like to have as little latency as possible.

@Bjorn: if your code you mentioned uses osc, i would like to have a look at it.

I certainly would be happy to join forces and participate in this effort, my only challange is my ignorance on python.

@Tone Deft: I dont think so, as far as I understand is max4live a special kind of programmable device. but time will tell.

hoffman2k
Posts: 14718
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

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

Post by hoffman2k » Sat Mar 14, 2009 7:06 pm

This is the first test version of a clip launcher I wrote in Max without using Java.
There are 3 files:

- The Grid.jzml = The lemur template for this clip launcher

- APIMIDILive8.zip = Unzip this in the MIDI Remote Scripts folder within the Live application contents.

- The Grid.maxpat = Can be used in Max 5 and Max runtime.

1) Enter your Lemur IP

2) Setup the MIDI in Live and Max (a screenshot is included if you need help)

3) Press the "Start Loading" button.

Now the application will load for 30 seconds. It is feeding all the messages needed to monitor a 100 by 100 grid.
Once the loading is finished, the Lemur should refresh and show you the clips. You'll be able to scroll the grid and trigger clips and scenes.

When a Clip is playing, it turns white on the Lemur. I've chosen this route because its the easiest. But you can reprogram it to do anything really.
I was going to go with LED's, but you cant resize the damn things.

On my end, this application is fairly stable. Give it a go to see if you can get it running. I'll make a video once this patch is out of beta.

http://covops.org/uploads/The%20Grid%20 ... %208v1.zip

In theory, people with those touchy phonomopods that runs OSC could use this patch too. Get a clipgrid on your ipod.

I know the max patch is a bit convoluted, but when it comes to the Lemur, it does work.
I'm not gonna spend too much time on it anymore though. Too much new stuff in Live 8 that'll need more than just a change of 3 lines of code. Group tracks come to mind. Funny enough, the visual display for group tracks work, but not the triggers.

t0gg1e4u
Posts: 10
Joined: Fri Mar 13, 2009 12:28 pm

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

Post by t0gg1e4u » Sun Mar 15, 2009 3:05 pm

Bjorn, thank you very much for your code. If I understand your solution correctly, you are using the Max-Patch as a Bridge between OSC and Midi:

Lemur >--OSC--> Max-Patch >--MIDI--> APIMidiLive8 >--MIDI--> MaxPatch >--OSC--> Lemur

may I ask why you didnt use the LiveOSC solution?

I was able to send OSC Messages to Live directly, havent been able to receive them yet, but my stubornness hasnt been tired yet. I keep you informed..

hoffman2k
Posts: 14718
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

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

Post by hoffman2k » Sun Mar 15, 2009 3:57 pm

I haven't gotten any of the OSC solutions to work with Osx.
The patch goes Python to Sysex to OSC.

t0gg1e4u
Posts: 10
Joined: Fri Mar 13, 2009 12:28 pm

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

Post by t0gg1e4u » Mon Mar 16, 2009 11:32 am

Its working both ways now, but shaky - it crashes live if I choose a different script again - and because of a hack that avoids pythons socket object it has up to a 1s latency plus suffers of some package losses. I decided to wait until max4live is out, according to a cycling74 story (http://www.cycling74.com/story/2009/1/15/114420/967) it will have access to the so called
live.object, live.path, and live.observer
objects, whatever that means.

hoffman2k
Posts: 14718
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

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

Post by hoffman2k » Mon Mar 16, 2009 12:03 pm

t0gg1e4u wrote:Its working both ways now, but shaky - it crashes live if I choose a different script again - and because of a hack that avoids pythons socket object it has up to a 1s latency plus suffers of some package losses. I decided to wait until max4live is out, according to a cycling74 story (http://www.cycling74.com/story/2009/1/15/114420/967) it will have access to the so called
live.object, live.path, and live.observer
objects, whatever that means.
They also said its at GUI refresh rate. So Max for Live will not be faster than the current hacks.

circuitb
Posts: 115
Joined: Fri Dec 30, 2005 11:11 am

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

Post by circuitb » Tue Mar 17, 2009 1:32 am

hello and
sorry it's perhaps a bit out of topic :)

but do you think it's possible with APIMidi or LiveAPI (crash Live8b17 when i choose LiveApi as remote)
to receive selected devices/Racks info's ?
in fact i'ld like to receive the looper state(rec/play/overdub)/number of recorded measure/position/pitch/reverse etc....
if it's possible does the latency thing also apply to this?
or M4L would be the only way to achieve this?

thanks
_________________

t0gg1e4u
Posts: 10
Joined: Fri Mar 13, 2009 12:28 pm

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

Post by t0gg1e4u » Tue Mar 17, 2009 10:17 am

Hi

Theoretically it is possible to gain access to some of the devices and their paramateres, since Lives' API allows Midi-Scripts to do so. Now what is called LiveAPI is (so my understanding) a collection of such Midi-Scripts, with names like APIMidi, LiveOSC or LiveTelnet. They all allow to control certain aspects of Live, but as far as I can see no Devices or their Parameters. If you need such functionality you certainly can implement it, if you wish to dive into python and Lives' API. If havent got any experiences in these fields and do not want to become a programmer but make music, you better keep your hands from it.

m4l seems to have similar access to Lives' API as through those MidiScripts, but those specs are not public yet. most likely this approach is going to better documented and supported by abelton/cycling 74 than the midi-script thing, and most likely easier to programm as well, because m4l is (again to my understanding) a programming environment that is seemlessly embedded within live.

hope this helped.

cheers

circuitb
Posts: 115
Joined: Fri Dec 30, 2005 11:11 am

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

Post by circuitb » Tue Mar 17, 2009 11:15 am

hey t0gg1e4u
thanks for your explanations
i've seen some transport/clips/tracks & scene scripts
but no such things for devices....
not sure i've time & skills to learn pyhton :roll:
but it should be simple for live to send all the parameters(including hidden ones)
of the selected device (blue hand remote)
_________________

hydrogen
Posts: 60
Joined: Wed Feb 20, 2008 12:01 am

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

Post by hydrogen » Tue Apr 07, 2009 6:15 pm

Anyone having problems with the new Ableton 8.0.1 and LiveOSC?

I get runtime errors and was unable to spew any output as to what was going on.

camus
Posts: 15
Joined: Tue Mar 20, 2007 7:49 pm
Location: paris, france

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

Post by camus » Mon Jun 08, 2009 8:33 am

Who works with sysex and live API?

what i want to to is first, being able to handle sysex, when a sysex message come , to do an action ...

next , since i use a mpd32 , i want to hack its led display , i know the type of sysex message that need to be send to change it , but i don't know how to do it python.

if a sctipt or a class already exist , let me know it.

thanks

camus
Posts: 15
Joined: Tue Mar 20, 2007 7:49 pm
Location: paris, france

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

Post by camus » Mon Jun 08, 2009 1:20 pm

cool , i succeed in sending SYSEX from my MPD32 to Live , now i'm gonna try the contrary , live sending SYSEX to MPD32

Post Reply