Page 25 of 28
Re: Who wants access to Ableton's Python API? .. You? .. Ok!
Posted: Sat Jun 27, 2009 11:17 am
by hoffman2k
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.
Re:
Posted: Sat Jun 27, 2009 11:51 am
by Hermanus
sqook wrote:hoffman2k wrote:Bitchin
You can say that again.
Maybe it's finally time to learn python now...
Indeed!
Great work here!
Re: Who wants access to Ableton's Python API? .. You? .. Ok!
Posted: Sat Jun 27, 2009 11:52 am
by julienb
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
Re: Who wants access to Ableton's Python API? .. You? .. Ok!
Posted: Sat Jun 27, 2009 11:58 am
by hoffman2k
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.
Re: Who wants access to Ableton's Python API? .. You? .. Ok!
Posted: Sat Jun 27, 2009 12:20 pm
by julienb
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")
Re: Who wants access to Ableton's Python API? .. You? .. Ok!
Posted: Sat Jun 27, 2009 4:20 pm
by julienb
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

Re: Who wants access to Ableton's Python API? .. You? .. Ok!
Posted: Sat Jun 27, 2009 4:39 pm
by hoffman2k
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.
Re: Who wants access to Ableton's Python API? .. You? .. Ok!
Posted: Sat Jun 27, 2009 4:49 pm
by julienb
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!
Re: Who wants access to Ableton's Python API? .. You? .. Ok!
Posted: Sat Jun 27, 2009 5:00 pm
by julienb
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)
Re: Who wants access to Ableton's Python API? .. You? .. Ok!
Posted: Sat Jun 27, 2009 5:52 pm
by yannxou
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!
Re: Who wants access to Ableton's Python API? .. You? .. Ok!
Posted: Sat Jun 27, 2009 6:48 pm
by hoffman2k
Re: Who wants access to Ableton's Python API? .. You? .. Ok!
Posted: Sat Jun 27, 2009 8:09 pm
by yannxou
Thanks it works.
Re: Who wants access to Ableton's Python API? .. You? .. Ok!
Posted: Wed Aug 05, 2009 8:02 am
by nbinder
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.
Re: Who wants access to Ableton's Python API? .. You? .. Ok!
Posted: Wed Aug 05, 2009 8:08 am
by nbinder
Strange. Downloaded the latest ZIP, and it is working again. Let's see for how long.

Re: Who wants access to Ableton's Python API? .. You? .. Ok!
Posted: Wed Aug 05, 2009 8:45 am
by julienb
all will be solved and .. EASIER with max for live
