Forums > Max For Live

Get notified, if a control surface (e.g. APC40) gets connected

March 21, 2013 | 11:52 am


Is it possible to get notified, if a control surface gets connected? For example, I want to get notified, if a APC40 gets connected, so that I can automatically take control of the grid.

Is it also possible to get notified, if the list of control surfaces changes (e.g. if the user adds a control surface)?


March 22, 2013 | 6:15 am

Don’t think you can do this in Live 8 as it didn’t handle addition/removal of devices whilst running, buy maybe in Live 9 you could poll the control_surfaces list too see if it changes?

March 22, 2013 | 7:12 am

Thanks, but I can’t find anything named control_surfaces or similar.

March 22, 2013 | 7:22 am

control_surfaces is part of the LOM.

check out the M4L.api.SelectControlSurface.maxpat abstraction

March 22, 2013 | 7:23 am

I tried this, but I don’t get any changes (I’m changing the right control surface in the list):


  1. Picture.png


March 22, 2013 | 7:29 am

perhaps it doesn’t auto update then when things are changed in Live? maybe c74 could comment….

March 22, 2013 | 7:31 am

There MUST be way. If you look at this device
it automatically updates the list. But I can’t find the code that does this.

March 22, 2013 | 7:41 am

if you use the patch i listed above to list all available control devices and then plug/unplug and the re-run the patch, does the list change?

March 22, 2013 | 8:18 am

Thanks, it works! If I add devices manually in the list of the Ableton settings, the list in the patch updates.

Now, the last thing I want, is to get a notification, if a device, that is already in my list, gets connected/disconnected.

The patch you mentioned shows all control surfaces, that are added in the ableton settings, regardless of whether they are connected or not.

March 22, 2013 | 8:28 am

not much more I can add, other than looking inside the patch you pointed out earlier….

just out of interest, what controller are you talking about? i know that the apc40 does some special handshaking with live which means it may behave different to other controllers….

hopefully s4racen will comment, he knows alot about the controller side of things…

March 22, 2013 | 8:40 am

The patch I mentioned (APC40 step sequencer) doesn’t do this either. You need to switch to another track and back to the track with the step sequencer to change the 6×8 grid to the custom interface.

I want to built a patch that detects, if an APC 40 gets connected, so that it can change the 6×8 grid interface automatically. Right now I can only find patches/devices that assume that the apc is already connected or that the user turns the custom grid manually on/off.

Viewing 11 posts - 1 through 11 (of 11 total)

Forums > Max For Live