some basic problems with the API

    Sep 10 2012 | 4:17 pm
    this is my first attempt to get access to a couple of ableton live functions via the API. i tried a couple of things and had a look in the help file + tutorials but i can´t get any further without some help. i don´t see what i´m doing wrong. may is just because of that i spend the whole day in front of my mac running ableton+m4l. :)
    anyway, i have got 4 really small but different patches. two of them (set global tempo + your live version) are working pretty fine but the other once are not working. i would like to control the global tempo from a max patch but i cant´t find the right solution. also i try to trigger a clip from a patch but it´s not working as well. would be nice if someone could push me in the right direction.
    knows anyone a good tutorial for this whole "api thing"? i can´t find that much in the help file so it would be nice if there is something like that.

    • Sep 10 2012 | 5:11 pm
      not in front of live now but I think that in the right part of the patch, the problem comes from the message box and on the left, you should replace the int box with a float...
      As for the ressource, this page by Shelluser is invaluable :
    • Sep 10 2012 | 5:13 pm
      Also, don't forget to click on the property value message box in the left part. You could also add a [t b b] under the int box used to select the track number.
    • Sep 10 2012 | 6:01 pm
      thx mate, the trigger part is working like a charm now but i can´t observe and control the volume. i clicked on all message boxes just to make sure that its not my fault. and yes unfortunately the page is down so i could use the lom navigator. i found it a couple of weeks ago in a post on this forum and though about that it could be a good tool for learning as well.
      do you have any idea about the "tempo control thing"?
    • Sep 10 2012 | 6:17 pm
      The volume observer version I posted works for me in live... But you can't control the volume with that patch. You should use a 'set value' to do that.
    • Sep 11 2012 | 9:51 am
      if you have a look in my first patch you can see the "set value". i found this patch on a cycling website:
      i know that there is a similar workaround and a sample patch in the help file but i think this should work to.
      but anyway back to my question, is there anyone who can show how to access the global tempo and the clip tempo? i would like to control and observe it by a max patch. this is my main problem and i need it for another patch, this is just some research. i would appreciate any help.
    • Sep 11 2012 | 4:58 pm
      Everything works : get and set tempo, set track volume.
    • Sep 11 2012 | 8:50 pm
      thx mate, slowly i get how to access the api. normaly i´m quite a big noob in programming languages but i really like it to work with m4l. i guess i got hooked, but there is still a lot to learn.
      i have just one final question, is it possible to observe the tempo? i tried a couple of patches but its not working. i´m pretty happy for now with the two other patches but it would be away better if i would get the actual tempo without to click a button or use a metro object that triggers the button.
      i would appreciate an example again, its away easier for me to understand what´s going on in the patch. thx for all your help guys, it´s just amazing!!!
    • Sep 12 2012 | 6:06 am
      Looking at the LOM chart and refecrence, I don't think you can access clip tempo. At work in a few minutes so I can't help you with the obserfve question now but you should try again using some modifications I made to make your patches work (such as floats instead of ints boxes to be able to read tempo).
    • Sep 12 2012 | 7:42 am
      hey stephane, first of all thx for all your input, even if its just "basic stuff". i had a couple of hours on a research for the clip tempo and i´m pretty shure there is no way to access the clip tempo. i also use the LOM navigator for this purpose but it didn´t help me ether. i think i will cancel this from my list for now. there are still a lot of other things that have to be done.
      but you got me wrong in my last post. i would like to observe the global tempo. the two patches that you can find above are receive and send the value for the global tempo. but if you want to receive the actual tempo you have to click a button first (of corse i could use a metro object, but i´m pretty shure there is another workaround with the observer object). i would like to see if i change the tempo in lives view that it changes as well in my patch and the other way. so its a kind of bi-directional. you see what i mean?
    • Sep 12 2012 | 9:16 pm
      hey sorry about all this confusion. i just found a folder in the live library with all or nearly all api functions that i want to use. i didn´t know this and unfortunately there was no hint in the m4l help file that you could find them easily as usual. so it was my fault, sorry. but thx for all the input!!
    • Sep 13 2012 | 12:24 pm
      Observe tempo isn't part of the abstractions. Here is how to do it :
    • Sep 15 2012 | 7:11 am
      In short... If you check the Song class you'll notice a property 'tempo' in there. Its of type 'float' and its access is get, set, observe. As such you can do basically everything you want with it.
      Thats usually the best way to try and solve these problems; open the LOM chart and simply search for something. Searching for 'tempo' will eventually get you across this property.