Page 3 of 28
Posted: Wed Jun 06, 2007 7:14 pm
by Nathan Ramella
Here's a really simple example of how to use the API. Install LiveTelnet, load up a project, select 'LiveTelnet' from the remote surfaces menu.
Telnet to localhost, you will be greeted with the LiveTelnet banner.. Then type in the following commands:
doc=Live.Application().get_application().get_document()
'doc' is now an object that contains all the information about your song, all the tracks, clips, etc.. There's a lot of nesting in the objects but for a really simple example..
Type:
doc.tempo = 80
You've just set your project tempo to 80.
Is that 'hello' enough for you?
It's really easy to manipulate and make changes, check out 'LiveUtils.py' for a bunch of functions that wrap API functionality..
Posted: Wed Jun 06, 2007 7:48 pm
by Angstrom
firstly wow, secondly holy shit!
thirdly well done,
fourthly hooray for Ableton & Bernd for not shutting this down - it can only benefit them as a company, and perhaps even personally. I can imagine Robert working on a python powered Henke-controller number 3 right now!
Posted: Wed Jun 06, 2007 7:55 pm
by Bumblebeeman
at the risk of sounding stupid what does it do?
should 'ordinary' live users stay way or is there anything in it for us?
Posted: Wed Jun 06, 2007 8:08 pm
by noisetonepause
Bumblebeeman wrote:at the risk of sounding stupid what does it do?
should 'ordinary' live users stay way or is there anything in it for us?
Don't be ordinary! Learn Python, read docs, have a hack!
Posted: Wed Jun 06, 2007 8:08 pm
by bigbadotis
crazy cool. And again props to Ableton for getting behind it. I can't wait to play around with this!
Posted: Wed Jun 06, 2007 8:12 pm
by hoffman2k
bigbadotis wrote:crazy cool. And again props to Ableton for getting behind it. I can't wait to play around with this!
I cant wait till you play around with it either
Live dashboard?

Posted: Wed Jun 06, 2007 8:39 pm
by Tone Deft
Nathan Ramella wrote:Is that 'hello' enough for you?

omfg I'm speachless.
Posted: Wed Jun 06, 2007 9:06 pm
by JamesAndrew
Here's one to impress your friends. Ever notice that you can rename all the tracks in Live except the "Master"? Not anymore.
When I was first poking around at the internal API shortly after Rob had figured out how to inject code via the remote scripts so Nathan could extend his original 'hack' so that we could actually get Live up and running while maintaining our control window, I wanted to do something - anything - that couldn't be done through the Live UI or via MIDI. This is what I did :
sys.modules['Live'].Application.getApplication().getDocument().master_track.name = '0wned'
Let me tell you, it was intense to see the track name change as I hit enter! Sure, its not that "useful" per se, but that wasn't the point. We were in. We were in further than anyone outside of Ableton up to this point.
Now with the LiveUtils included in the distro its simpler. Launch Live and select the LiveTelnet script. telnet to localhost and type :
getSong().master_track.name = 'TheMaster'
voila, you have a custom-named master track.
Posted: Wed Jun 06, 2007 9:52 pm
by kooki415
well hot pants. i was waiting for osc support before i upgraded (still on live 4) but i guess thats no longer an issue. this is 100 times more awesome than what i expected to come out of the c74 deal. but maybe that means that will only be CRAZYER.
this rocks.
Posted: Wed Jun 06, 2007 9:56 pm
by Sales Dude McBoob
Huh.
Telnet server?
OSC?
Huh... okay.
::Launches Sasha clip. Pumps fist in air to empty apartment::
Posted: Wed Jun 06, 2007 10:00 pm
by Nathan Ramella
Sales Dude McBoob wrote:Huh.
Telnet server?
OSC?
Huh... okay.
::Launches Sasha clip. Pumps fist in air to empty apartment::
Can I put this on our 'success story' page?

Posted: Wed Jun 06, 2007 10:18 pm
by dizzib
Well I've managed to telnet in and change midi clip attributes. Now if I could only get at the midi notes themselves, say Notes-->Note classes with an associated listener, I'd be able to hook it up to a Monome controller and have a hands-on step sequencer completly integrated with live! I think this will be very cool

Posted: Wed Jun 06, 2007 10:21 pm
by Nathan Ramella
dizzib wrote:Well I've managed to telnet in and change midi clip attributes. Now if I could only get at the midi notes themselves, say Notes-->Note classes with an associated listener, I'd be able to hook it up to a Monome controller and have a hands-on step sequencer completly integrated with live! I think this will be very cool

Look at the code. There's midi_recieve() and midi_send() methods in there.. Although I haven't played with it at all..
I should also note, anyone who wants to can send the LiveAPI.org project physical MIDI devices and we'll be happy write custom scripts for you.

Posted: Wed Jun 06, 2007 10:44 pm
by dizzib
Hi Nathan,
I can't seem to find midi_* functions you mention... please could you point me in the right direction?
For complete integration I'd need to be able to read all midi info from a clip as soon as the user maniuplates a clip in Live. This is so the monome always displays what is shown on the screen even when playback is stopped.
Unfortunately I don't actually own a monome but it's fun to speculate...
Posted: Wed Jun 06, 2007 10:47 pm
by stjohn
hi all, this sounds brilliant thanks!!
ive installed pythos 2.2.3, copied it into the Midi resources, and installed a demo of absolute telnet..
im new to telnet so im unsure of how to connect to localhost 23.
any help would be greatly appreciated
thanks all
