Launchpad/APC rectangle

Mar 14, 2012 at 3:55pm

Launchpad/APC rectangle

Hi, can anyone tell me how to set/get the location of the clip matrix through m4l?

thanks, L

Mar 15, 2012 at 10:14am

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 at 6:18pm

The reliable answer is that broc doesn’t have a clue about launchpad/apc:)

Mar 16, 2012 at 3:42am

in that case… you can only get(not set) it via m4l. try searching abltn m4l forum with keywords “rectangle” or “box”.

Mar 16, 2012 at 8:44am

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′);‘set_offsets’, x, y);

And use from Max like this:

– Pasted Max Patch, click to expand. –

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’)) {
post (path, ‘n’);

Mar 16, 2012 at 4:28pm

aha, didn’t know that. nice post..

Mar 24, 2012 at 10:24pm

great stuff, thanks alot for the help :)


You must be logged in to reply to this topic.