M4L select previous/next device

dtr's icon

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!

dtr's icon

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.

dtr's icon

Ok I'm dumb and blind. Song.View has a 'select_device' function...

dtr's icon
Max Patch
Copy patch and select New From Clipboard in Max.

got it!

Tj Shredder's icon

Thanks for sharing...

Morgan's icon

Thanks!

dtr's icon