M4L.api Device abstractions

David's icon

Hi. I want to select a device parameter and then set its values (using M4L.api.DeviceParameter). It appears that I should be using the abstractions M4L.api.SelectDevice and M4L.api.SelectParameter. However, these should be put in a bpatcher and I'm having trouble seeing how to make this work. Can someone show me how to create a menu of devices and parameters so I can use the menu output to set device parameter values please? Thanks, David.

David's icon

More exactly, Can someone show me how to create a menu of devices and parameters so I can use the menu output to set the path for a M4L.api.DeviceParameter? Is there an example patch that shows how to do this? I find it quite hard to navigate the M4L help system so I might have missed this. David

Stephane Morisse's icon

If I get what you want, all the API devices use this menu system to map a controller to a parameter in your set. You should have a look at them.

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

Thanks for your replies, but I mustn't have made myself sufficiently clear. I knew that the abstractions provided a way to access devices and parameters through menus, but I had difficulty seeing how to use these. The bpatcher tutorial said that you embed gui abstractions in a bpatcher but it didn't explain exactly how to do this. After some thrashing about I found that you have to select"Embed patcher in parent" in the bpatcher inspector in order to make the gui element visible. This allowed me to use the abstractions to access devices and device parameters via menus. I have copied this below in case someone else has the same problem. David

thomasswell's icon

This has been really helpful.
I was wondering if i could get help with perhaps the inverse.

I can use this patch here to control a parameter of my choosing.

But what I would like to do is use a parameter to control something else.

I am using the clip itself to automate weather a device is on or off.

what I would like to do is have a patch that monitors weather that clip is on or off.

so instead of controlling a specific parameter.... watch a specific parameter.

any help would be great thanks