Get List of Devices in a track, and turn them on or off

notechnotech's icon

Hi,

Is there a way to get a list of devices(do not need name, but if it had 3 devices(say drumkit + 2 effects) is there an object that would return 3, and another that would allow me to toggle a particular device on and off(ie sending device 3 on/off would toggle the last effect).

thanks

notechnotech's icon

Reading my last post again, i realize it was worded poorly,

This is a bit more direct,

I'd like to:
Query: Number of channels.
Query: How many devices any one of those channels has.
Toggle a device on any of the channels on/off

Thanks

broc's icon

I think your questions are answered in the LOM documentation

notechnotech's icon

hi broc,

if possible could you look at the following snipit,

Max Patch
Copy patch and select New From Clipboard in Max.

It should toggle a toggle box when i toggle on/off the first device on the first track.. live.path splits out Id 0, so it looks that i'm not sending it the correct path, but it's what i gathered from the API as to what i should send it..

broc's icon

In your path you need to replace 'is_enabled' by '0', which is the number of the device on/off parameter.
I thought it was documented in the LOM but seems not there..

notechnotech's icon

hey, that worked! thank you!

Jay's icon

I was able to use the above technique to get the status of whether the device is enabled or not.

But I can't figure out how to change it. Here's what I'm trying...

Max Patch
Copy patch and select New From Clipboard in Max.

Thanks!

broc's icon

Just insert [live.path] to get the id from path.