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

Discuss music production with Ableton Live.
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 Jun 27, 2009 11:17 am

Hi Guys,

Peter Kirn from CDM hosted a little irc session last night. And with the help of him and his team of python experts, we were able to debug the LiveOSC for Live 8 script and I got it running on OSX.
Peter has it running on Windows.

Here's the finished result for osx: http://covops.dreamhosters.com/uploads/ ... 270609.zip

This is based on the work going on in this thread: http://post.monome.org/comments.php?Dis ... 607&page=1

So for more instructions on how to actually use OSC to talk to Live refer to their documentation.
http://monome.q3f.org/wiki/LiveOSC

Its only been confirmed to work on my system so far. So be cautious. The way towards getting it to work started with a lot of crashing.

Hermanus
Posts: 1659
Joined: Mon Apr 20, 2009 7:47 pm
Location: Belgium

Re:

Post by Hermanus » Sat Jun 27, 2009 11:51 am

sqook wrote:
hoffman2k wrote:Bitchin :D

You can say that again. :)

Maybe it's finally time to learn python now...
Indeed!

Great work here!

julienb
Posts: 1843
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 » Sat Jun 27, 2009 11:52 am

hi friends,

I'd like to know who uses python API with live 8.
Did you make any changes between Live 7 or Live 8 python scripts ?

I have a strange error as I redive inside scripting for my protodeck project
Julien Bayle
Art + Teaching/Consulting

Ableton Certified Trainer
Max Certified Trainer


Structure Void / Ableton Certified Training Center

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 Jun 27, 2009 11:58 am

julienb wrote:hi friends,

I'd like to know who uses python API with live 8.
Did you make any changes between Live 7 or Live 8 python scripts ?

I have a strange error as I redive inside scripting for my protodeck project
Define strange error. What does the error log say?
Which API version are you using? On which OS?

Ableton changed the playing status stuff which is currently not implemented in this LiveOSC version. But I did change it for the Lemur patch I released earlier this year. But the is_triggered message isn't there.
For up to date Live API info, you gotta dig in the monome community.

julienb
Posts: 1843
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 » Sat Jun 27, 2009 12:20 pm

hi hoffman2k,
here is the code I'm using, just commited, even if it isn't completed:
http://trac2.assembla.com/live-api/brow ... Controller
or
http://svn2.assembla.com/svn/live-api/t ... ontroller/

the whole structure is from noofny/mike.
he makes it working with 7.0.1

I don't (we don't) use it with OSC anymore, cause MIDI is very enough for my controller.

The error concerns at least the first part: AddListeners function
I tested one listener add at a time, it seems the problem comes from song().add_metronom_listener
but not sure

here is the function you can check in the svn repo too:

Code: Select all

# Here we tell Live which methods we want to execute when certain SONG/VIEW/TRACK events are fired.
    def AddListeners(self):
        try:
            if (self._LOG_LISTENER_EVENTS):
                self.logger.log("Adding Song Listeners...")
            if not (self.song().metronom_has_listener):
                self.song().add_metronom_listener(self.Song_MetronomeChanged)
            if not (self.song().is_playing_has_listener ):
                self.song().add_is_playing_listener(self.Song_PlayingChanged)
            if not (self.song().tempo_has_listener ):
                self.song().add_tempo_listener(self.Song_TempoChanged)
        except:
            self.logger.log("    ERROR >>> Adding Song Listeners")
        try:
            if (self._LOG_LISTENER_EVENTS):
                self.logger.log("Adding Track Listeners...")

            # create the solo listeners just for the 8 group tracks.
            for channel in range(0, 8):
                groupTrack = self.GetGroupTrack(channel)
                groupTrackIndex = self.GetTrackIndex(groupTrack)
                trackSoloListener = self.CreateTrackSoloListener(groupTrack, groupTrackIndex, channel)
                if not (groupTrack.solo_has_listener(trackSoloListener)):
                    groupTrack.add_solo_listener(trackSoloListener)
                self.AddGroupClipListeners(groupTrack, groupTrackIndex, channel)
            
            # now create the clip listeners - only for clip tracks.
            for track in self.song().tracks:
                if (track.has_audio_output != 1):
                    continue    # so we skip midi tracks.
                trackIndex = self.GetTrackIndex(track)
                trackChannel = self.GetTrackChannel(trackIndex)
                if (trackChannel == None):
                    continue    # so we skip non clip tracks.
                self.AddClipListeners(track, trackIndex, trackChannel)
                
        except:
            self.logger.log("    ERROR >>> Adding Track Listeners")
Julien Bayle
Art + Teaching/Consulting

Ableton Certified Trainer
Max Certified Trainer


Structure Void / Ableton Certified Training Center

julienb
Posts: 1843
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 » Sat Jun 27, 2009 4:20 pm

no problem with 7.0.1
problem with 7.0.15
I didn't try between these 2 versions..

so...
I'll downgrade to 7.0.1
:)
Julien Bayle
Art + Teaching/Consulting

Ableton Certified Trainer
Max Certified Trainer


Structure Void / Ableton Certified Training Center

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 Jun 27, 2009 4:39 pm

Like I said earlier, the playing status messages changed.
The 7.0.14 decompiled scripts are in the LiveAPI group download area. Same place where you got the noonfy files from.

julienb
Posts: 1843
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 » Sat Jun 27, 2009 4:49 pm

But I hope these new API doc doesn't only contain new status message, cause, indeed, it seems a lot of things has been changed.
thanks hoffman2k, I'll check it right now!
Julien Bayle
Art + Teaching/Consulting

Ableton Certified Trainer
Max Certified Trainer


Structure Void / Ableton Certified Training Center

julienb
Posts: 1843
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 » Sat Jun 27, 2009 5:00 pm

Ok.

I don't know how begin to "translate" my script from one API to the new one (new man 7.0.14... cause I don't know if it is still the same in 8.x)
Julien Bayle
Art + Teaching/Consulting

Ableton Certified Trainer
Max Certified Trainer


Structure Void / Ableton Certified Training Center

yannxou
Posts: 153
Joined: Fri Feb 27, 2004 8:39 pm
Location: Barcelona
Contact:

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

Post by yannxou » Sat Jun 27, 2009 5:52 pm

I'm on Leopard and Live 8 always crashes when trying to select the LiveOSC as a control surface :(
I've installed python but don't know if I need to setup anything else. Somebody succeeded and want to share a step-guide? Thanks!
Live 12.1 Suite / M1 MacBook Pro 16" / 32Gb RAM
https://soundcloud.com/bachstripvoice

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 Jun 27, 2009 6:48 pm


yannxou
Posts: 153
Joined: Fri Feb 27, 2004 8:39 pm
Location: Barcelona
Contact:

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

Post by yannxou » Sat Jun 27, 2009 8:09 pm

Thanks it works.
Live 12.1 Suite / M1 MacBook Pro 16" / 32Gb RAM
https://soundcloud.com/bachstripvoice

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 » Wed Aug 05, 2009 8:02 am

Ok, so OSC is back for the osx folks like me.

It worked for some weeks but then - out of a sudden - stopped working. Currently it only sends OSC, receiving OSC doesn't work any more.

Code: Select all

lsof -i -P

...
Live      3002  user   24u  IPv4 0xe380a28      0t0  UDP *:65042
Live      3002  user   27u  IPv4 0x6e61798      0t0  UDP *:9000
So, the LiveOSC is currently listening on port 9000, which is fine. However, it doesn't receive anything. Even a simple /live/play fails.

Anybody any ideas? I should add that an hour ago it worked for a few minutes, but stopped without having changed anything.

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 » Wed Aug 05, 2009 8:08 am

Strange. Downloaded the latest ZIP, and it is working again. Let's see for how long. :?

julienb
Posts: 1843
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 » Wed Aug 05, 2009 8:45 am

all will be solved and .. EASIER with max for live :)
Julien Bayle
Art + Teaching/Consulting

Ableton Certified Trainer
Max Certified Trainer


Structure Void / Ableton Certified Training Center

Post Reply