Launchpad/APC rectangle


    Mar 14 2012 | 3:55 pm
    Hi, can anyone tell me how to set/get the location of the clip matrix through m4l?
    thanks, L

    • Mar 15 2012 | 10:14 am
      if i remeber correctly that was only possible via remote script. but i'm not sure at the moment. you have to wait until broc is giving you the reliable answer:)O.
    • Mar 15 2012 | 6:18 pm
      The reliable answer is that broc doesn't have a clue about launchpad/apc:)
    • Mar 16 2012 | 3:42 am
      in that case... you can only get(not set) it via m4l. try searching abltn m4l forum with keywords "rectangle" or "box".
      O.
    • Mar 16 2012 | 8:44 am
      For the Launchpad (and presumably the APC as well), you can set the position of the red box by calling 'set_offsets' on the "Session_Control" component of the control surface.
      Save the following javascript in setRedBox.js
      function setRedBox(x, y)
      {
      var api = new LiveAPI(this.patcher, 'control_surfaces 0 components 1');
      api.call('set_offsets', x, y);
      }
      And use from Max like this:
      Note the javascript above makes two assumptions.
      Firstly, you have your Launchpad set up as your first control surface.
      Secondly, that the 'Session_Control' component of the Launchpad control surface object always has the path 'components 1'. This *could* change if Ableton were to update the Launchpad remote scripts. You can work out the correct path of the 'Session_Control' component like so:
      function findSessionControlPath()
      {
      var controlSurfaceIndex = 0;
      var api = new LiveAPI(this.patcher, 'control_surfaces ' + controlSurfaceIndex);
      var count = api.getcount('components');
      for (var index = 0; index < count; index++) {
      var path = 'control_surfaces ' + controlSurfaceIndex + ' components ' + index;
      api.path = path;
      if ('Session_Control' == api.get('name')) {
      break;
      }
      }
      post (path, 'n');
      }
    • Mar 16 2012 | 4:28 pm
      aha, didn't know that. nice post..
    • Mar 24 2012 | 10:24 pm
      great stuff, thanks alot for the help :)
    • Jul 13 2014 | 4:38 am
      It looks like Push doesn't have this component! Am I crazy?