[live.api] [js] How to get selected clip path ?


    Jul 14 2013 | 9:00 am
    HI !
    its hard to find examples about LiveAPI in javascript :/ does anyone know how to replicate this behaviour into the code ?
    . im full of hope k

    • Jul 15 2013 | 7:33 am
      any chances ?
    • Jul 15 2013 | 12:06 pm
      i'll send you this when I get home tonight
    • Jul 15 2013 | 12:10 pm
      off the top of my head though, try:
      function get_selected_clip_path() { var api = new LiveAPI( callback, 'live_set view detail_clip' );
      api.get( 'path' ); }
      function callback() { }
    • Jul 15 2013 | 12:10 pm
      all good Lee ! whenever you can
    • Jul 15 2013 | 1:55 pm
      Thanks Lee , yeah ,ive been trying that . am i right saying that IT CANT be monitored in realtime ? i saw code that observe "level/gain slider" . but it doesnt work for id here . or im just missing something
    • Jul 16 2013 | 9:15 am
      didn't get chance to try last night... real-time monitoring shouldn't be triggered until you set the 'property' field of an API object... I'll have a look tonight, but if you're getting that message, then it *may* be a bug in the M4L code
    • Oct 05 2014 | 11:49 pm
      Hey List,
      I'm digging this one up cause also I don't have a clue how to observe changes in the path of detail_clip, using javascript.
      Setting the 'property' member to 'id' doesn't work. Am I right in assuming this is currently not possible?
      thanks! -tarik
    • Oct 07 2014 | 12:48 am
      Found the answer, for whoever needs it:
      var songView = new LiveAPI(myFunc,"live_set","view"); songView.property="detail_clip";
      function myFunc(args) { post("id is " + args[2]); }