Forums > Max For Live

M4L select previous/next device

December 2, 2009 | 7:11 pm

Just starting off with M4L and trying to wrap my head around the LOM. I want to make 4 buttons on my controller: previous track, next track, previous device, next device. The track buttons are easy, there ‘s sample patches coming with M4L that do it… Not for device selection though so i’m trying to make that now. (Btw, by select i mean visually select it in the Live app so my controller’s knobs will automap to the device’s parameters.)

In theory it would go something like this: (select next device)
– get id of current device
– if more devices in track: select next

(To work as i intend it a track switch should also select the first device in the track so the device select buttons apply to the currently selected track.)

I’ve been digging into the API and LOM documentation but haven’t found out how to realize this correctly. Any help welcome!

December 2, 2009 | 8:38 pm

I’m getting a bit further in navigating paths now but I can’t find the function that will select and show a given device in Live. Track.View has the ‘select_instrument’ function which selects the first device in a track but I don’t see what function selects a device further down the line.

December 2, 2009 | 8:49 pm

Ok I’m dumb and blind. Song.View has a ‘select_device’ function…

December 2, 2009 | 9:49 pm

got it!

— Pasted Max Patch, click to expand. —
December 4, 2009 | 6:30 am

Thanks for sharing…

December 9, 2009 | 3:43 pm


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

Forums > Max For Live