M4L select previous/next device

Dec 2, 2009 at 7:11pm

M4L select previous/next device

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!

Dec 2, 2009 at 8:38pm

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.

Dec 2, 2009 at 8:49pm

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

Dec 2, 2009 at 9:49pm

got it!

– Pasted Max Patch, click to expand. –
Dec 4, 2009 at 6:30am

Thanks for sharing…

Dec 9, 2009 at 3:43pm


Dec 9, 2009 at 5:55pm

You must be logged in to reply to this topic.