Live API

Jun 7, 2007 at 4:42pm

Live API

So this seems pretty interesting:

http://www.liveapi.org

Considering the Cycling/Ableton relationship, I think we all should
beg Brad Garton to make us a Python Max external… ;-) Or perhaps
there’s a way at Python via Java… Hmmmm:

http://www.jython.org/Project/index.html

Dan

Dan Nigrin
Defective Records
202 Hack / PC-1600 User / VSTi Host / OMS Convert / Jack OS X / Major
Malfunction
http://www.defectiverecords.com

http://www.jackosx.com

#32352
Jun 7, 2007 at 5:42pm

You mean something like this http://grrrr.org/ext/py/ ?

#106211
Jun 7, 2007 at 5:44pm

OK, now I feel stupid! That’ll teach me to post before checking maxobjects first… Anyway, props to Mr. Grill, now off to learn Python and think of cool stuff to do with Max < -> Live!

Dan

#106212
Jun 7, 2007 at 5:44pm

On 07 Jun 2007, at 18:42, Dan Nigrin wrote:
>
> Considering the Cycling/Ableton relationship, I think we all should
> beg Brad Garton to make us a Python Max external… ;-) Or perhaps
> there’s a way at Python via Java… Hmmmm:

did you have looked at
http://grrrr.org/ext/py/
?

#106213
Jun 7, 2007 at 6:34pm

Dan Nigrin skrev:
> OK, now I feel stupid! That’ll teach me to post before checking maxobjects first… Anyway, props to Mr. Grill, now off to learn Python and think of cool stuff to do with Max < -> Live!
>
> Dan
> –
>
The way I see it you don’t even need to learn python – just run the
python scripts like they instruct and control Live over OSC… Looks
rad, to be honest. I hope it pushes Ableton towards an official stance
on OSC.

Andreas.

#106214
Jun 7, 2007 at 6:41pm

#106215
Jun 7, 2007 at 7:14pm

Yeah, just noticed the same thing. But the sources are there –
perhaps someone who knows this stuff better than I could build a Mac
UB version? Or perhaps Thomas himself??

Thanks,
Dan

At 2:41 PM -0400 6/7/07, Gary Lee Nelson wrote:
>Had a look. No 4.6 version and apparently no Intel.
>
>
> > did you have looked at
>> http://grrrr.org/ext/py/
> > ?


Dan Nigrin
Defective Records
202 Hack / PC-1600 User / VSTi Host / OMS Convert / Jack OS X / Major
Malfunction
http://www.defectiverecords.com

http://www.jackosx.com

#106216
Jun 7, 2007 at 7:15pm

At 8:34 PM +0200 6/7/07, Andreas Wetterberg wrote:
>Dan Nigrin skrev:
>>OK, now I feel stupid! That’ll teach me to post before checking
>>maxobjects first… Anyway, props to Mr. Grill, now off to learn
>>Python and think of cool stuff to do with Max < -> Live!
>>
>>
>The way I see it you don’t even need to learn python – just run the
>python scripts like they instruct and control Live over OSC… Looks
>rad, to be honest. I hope it pushes Ableton towards an official
>stance on OSC.

Good point – will have to explore whether all that is possible to be
done via the API is accessible via OSC…

Dan

Dan Nigrin
Defective Records
202 Hack / PC-1600 User / VSTi Host / OMS Convert / Jack OS X / Major
Malfunction
http://www.defectiverecords.com

http://www.jackosx.com

#106217
Jun 7, 2007 at 7:38pm

#106218
Jun 7, 2007 at 7:51pm

>Ugly draft to start up.

To the contrary, a thing of beauty!

Dan

Dan Nigrin
Defective Records
202 Hack / PC-1600 User / VSTi Host / OMS Convert / Jack OS X / Major
Malfunction
http://www.defectiverecords.com

http://www.jackosx.com

#106219
Jun 8, 2007 at 3:52pm

over here it’s running fine under max 4.6 (ppc).
thomas grill has done an update some time ago.
couln’t find it on his site though.
v

On 07 Jun 2007, at 21:14, Dan Nigrin wrote:

> Yeah, just noticed the same thing. But the sources are there –
> perhaps someone who knows this stuff better than I could build a
> Mac UB version? Or perhaps Thomas himself??
>
> Thanks,
> Dan
>
> At 2:41 PM -0400 6/7/07, Gary Lee Nelson wrote:
>> Had a look. No 4.6 version and apparently no Intel.
>>

#106220
Jun 8, 2007 at 5:12pm

#106221
Feb 4, 2008 at 2:41am

this is really interesting. has anyone done any thing between max and ableton in terms of getting clip names and states to max with this one?

im just starting to get into the live api stuff. the liveapi.org site is now taken down though. and only has a bit of evidence left over on the google forums.

#106222
Feb 4, 2008 at 9:00am

On 4 Feb 2008, at 02:41, blairell wrote:

> this is really interesting. has anyone done any thing between max
> and ableton in terms of getting clip names and states to max with
> this one?

Last time I checked, the API was Windows-only – so, no.

– N.

nick rothwell — composition, systems, performance — http://
http://www.cassiel.com

#106223
Mar 1, 2008 at 12:45pm

yes.
works fine under windows OS.
I’m interested by sending message via OSC with max.
I just communicate with live via LiveTelnet.

#106224
Mar 11, 2008 at 6:47pm

Hi everybody (my first post here hehe).

I was thinking…looking at the LiveAPI, all that the scripts do when sending data to Live is printing OSC codes (at least that’s what I have assumed reading python).

Wouldn’t be possible to do the same, let’s say, in C? If we can, it’s just a matter of building an object with some networking functions concrete to this proccess, and import it to Max.

Maybe I’m wrong, I’m an absolute begginer in Max, but I know something about networking.

#106225
Mar 14, 2008 at 2:35pm

Jorge schrieb:
> Wouldn’t be possible to do the same, let’s say, in C? If we can, it’s
> just a matter of building an object with some networking functions
> concrete to this proccess, and import it to Max.
>
> Maybe I’m wrong, I’m an absolute begginer in Max, but I know
> something about networking.

It had been done, look at the OSC objects from CNMAT… (maxobjects.com
to search)


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#106226
Mar 15, 2008 at 10:34am

Some of you might know already but I started a google group for LiveAPI discussions and development here :

http://groups.google.com/group/liveapi

And i’ve revived the code base and moved it here :

http://www.assembla.com/wiki/show/live-api

I just put together a new demo to show Live <> LiveAPI <> Max communication via Midi because so far it hasnt been possible to get python sockets working on OSX.

You can download the files and follow the thread for that from here

http://groups.google.com/group/liveapi/browse_thread/thread/afba51728b708452

Im aiming to implement as much of the API as possible via MIDI so that it works on both Windows and OSX.

If you interested then come and join the group, hopefully with enough interest over time Ableton might start implementing more API features so we can build really crazy stuff :)

#106227
Oct 29, 2008 at 7:06pm

I would like to control Live via Max using LiveAPI.
I am having some trouble getting things working.
I have been looking at the following docs…

http://www.assembla.com/spaces/live-api/documents

These examples do not seem to work. The following
sample does not work either…

– Pasted Max Patch, click to expand. –

Are there any additional software componenets or settings
I need in order to get Live to respond?

#106228
Oct 29, 2008 at 7:12pm

ok, what platform are you on and how exactly have you setup your system?

#106229
Oct 29, 2008 at 7:16pm

I am using Max5, Live7, on WinXp.

#106230
Oct 29, 2008 at 7:26pm

hi Anthony – welcome to the Dark Side :)

Have you gone over the instructions
http://www.assembla.com/wiki/show/live-api/Running_the_API_Midi_Demo ?

sorry, of course you have. But what steps have you gone through? Adding
in the script in Live etc?

Hope to help you out, mate.

Andreas.

Anthony Palomba skrev:
> I would like to control Live via Max using LiveAPI.
> I am having some trouble getting things working.
> I have been looking at the following docs…
> http://www.assembla.com/spaces/live-api/documents
>

#106231
Oct 30, 2008 at 5:07pm

Okay, went over the instruction, that helped a lot.
Amazing how helpful instructions are when you read them ;)

So I installed all the files and configured ports and ran the
demo Live project. When I call getAllClips and getAllTracks
only some of the info makes it over. The clips that do make it
over I am able to trigger via the buttons.

Any idea why clip/track names are missing?

#106232
Nov 17, 2008 at 6:37am

Quote: Anthony Palomba wrote on Thu, 30 October 2008 13:07
—————————————————-
> Okay, went over the instruction, that helped a lot.
> Amazing how helpful instructions are when you read them ;)
>
> So I installed all the files and configured ports and ran the
> demo Live project. When I call getAllClips and getAllTracks
> only some of the info makes it over. The clips that do make it
> over I am able to trigger via the buttons.
>
> Any idea why clip/track names are missing?
—————————————————-

Not sure, things seem to work for me here. I just wish they added more functionality. How can you adjust BPM? How about Global Quantize? Etc…right now I am only able to launch clips/scenes.

#106233
Nov 17, 2008 at 12:23pm

marcos wrote:
> I just wish they added more functionality. How can you adjust BPM? How about Global Quantize? Etc…right now I am only able to launch clips/scenes.
>
BPM and Global Quantize are accessible via regular midi.
The focus of the LiveAPI work has been on actually expanding the
(especially output) data streams of Live.

#106234
Nov 17, 2008 at 12:39pm

those particular features are accessible via the API but I didnt implement them for the APIMIDI setup because, as has been pointed out, they are things that you could already map via other means.

if you do want to control them using the same system then you’ll have to add it yourself. :)

the sourcecode is available and there is some documentation about the protocol (although i think its slightly out of date)

http://www.assembla.com/wiki/show/live-api/API_Midi_Protocol

also the available API functions (as in what is accessible at the python level) are documented here :

http://relivethefuture.com/code/live/apidocs/

I did consider the tempo mapping situation and you’ll need to think about how you want to represent a floating point number using 7-bit MIDI data. Things like :

What bounds do you want on the lowest and highest tempo?
How fine do you want the resolution? tenths of a BPM?

or you could even devise a completely different system of using a static lookup table where you predefine the tempos you want in the python code and use cc data as indices into the table.

as you can see the problem here is that no single solution really fits all needs.

#106235
Nov 17, 2008 at 2:29pm

Thanks. I did check out the documentation on the Midi Api and it does seem outdated. The only thing that has managed to work has been clip launching and scene launching. I’ll try to go through the API and see if I can do something with it.

I wasn’t aware quantization could be changed via Midi already, I’ll check that out.

Do you plan on adding features to the MidiAPI? Track arming, Track toggle, Track Solo?

#106236
Nov 17, 2008 at 2:43pm

For example, according to the documentation if I send a CC message to ctlout n on Channel 4, MIDICC #13, Value 0, Scene 1 should Fire…however it doesn’t.

I know how to launch scenes via Clickscene to Controller.js, but nothing in the documentation really works. I am probably being really dense about something.

#106237
Nov 17, 2008 at 2:50pm

I dont have any plans to add anything in particular to that version of the APIMIDI setup, what I have started (quite some time ago now) is a system for configuring your own setup. (MultiAPI)

With that you would use a text file to define how you want to get the data in and out,(via OSC or MIDI) and then define if you want to use Midi notes, CCs, which OSC addresses etc, so you could say you want to send in clip triggers via MIDI ccs but send out clip information via OSC…that kind of thing.

Obviously the rationale for this is that people can then build the system they want without having to worry about coding and also it would open up some more interesting integration scenarious, like midi in from some controller and OSC data out going to Quartz Composer or a remote SuperCollider setup, oh yeah and Max/MSP ;)

anyway…there is some code in SVN for this but I havent actually tried running it with Live yet, just in my test setup.

The problem at the moment is that I have no time to spare for any of these ‘home projects’, but i’ll try to answer any questions to the best of my ability.

good luck.

#106238
Nov 17, 2008 at 2:54pm

Quote: marcoskohler wrote on Mon, 17 November 2008 15:43
—————————————————-
> For example, according to the documentation if I send a CC message to ctlout n on Channel 4, MIDICC #13, Value 0, Scene 1 should Fire…however it doesn’t.
—————————————————-

the best i can suggest at the moment is the typical ‘follow the flow’ procedure.

verify that the data is correct at each junction in the system and see where it breaks down.

again, that may well mean digging into the python code to add some logging or other kind of feedback info.

#106239
Nov 17, 2008 at 5:34pm

Ok Cool thanks for your help. I think I am going to try to hack my way through this and add some features. I’ve had an FCB1010 controller and used this:

http://bl0rg.net/~manuel/fcb1010-mappings/

you add that content to Live’s MidiMappings folder as well, it’s in python. So for example when I send a MidiCC on Channel 1, MIDICC # 15, VALUE 127…it will ARM the first track.

Now I found this function in the .py files:

def receive_midi_cc(self, channel, cc_no, cc_value):
def index_of(list, elt):
for i in range(0,len(list)):
if (list[i] == elt):
return i

if (channel == FCB1010_CHANNEL):
if (cc_no in RECORD_CLIP_CCS):
idx = index_of(RECORD_CLIP_CCS, cc_no)
if (idx < len(self.song().tracks)):
track = self.song().tracks[idx]
scene = self.parent.song().view.selected_scene
if track.can_be_armed:
if track.arm:
track.arm = 0
else:
self.arm_track(track)

What would I have to add to your .py to get this to work?
1) Obviously I am going to change FCB1010_CHANNEL to a number of my choosing

2) I found this in another .py:

RECORD_CLIP_CCS = [ i * 10 + 5 for i in range(1,10)]

So I can just define that in the def

My overall question is, to hack together/steal my own functions from other examples and .py what declarations/vars/etc should I be copying over and to WHERE.

It would be great if you could walk me through implementing this into MIDIAPI. I know it’s asking for alot, but I think once I can understand one example, the rest will flow. Thanks!

#106240
Nov 28, 2008 at 10:13pm

Quote: marcoskohler wrote on Mon, 17 November 2008 18:34
—————————————————-

> My overall question is, to hack together/steal my own functions from other examples and .py what declarations/vars/etc should I be copying over and to WHERE.
>
> It would be great if you could walk me through implementing this into MIDIAPI. I know it’s asking for alot, but I think once I can understand one example, the rest will flow. Thanks!
>
—————————————————-

Sorry for the delay in replying..im not ignoring your request, i’ve just been too busy with deadlines recently. I’ll try and put something together over the weekend.

#106241

You must be logged in to reply to this topic.