Forums > Max For Live

get names of chains of a audio rack

September 26, 2011 | 5:27 pm

how can i put the names of the chains of a audio rack into a M4L menue?

I wanna make a max chain selector and want to select the chains by name from a m4l menue. how can the chain names be read into a m4l menue ?


September 29, 2011 | 9:16 pm

Look for an example at Audio Effects => Max Audio Effect => Tools => API => Max Api Ctrl1LFO


September 29, 2011 | 11:51 pm

Its relatively easy.. The Device class has a child called ‘chains’ which you can get or observe. As such that is your key to getting all the chain id’s of a rack. Once you have the id’s you can iterate over ‘m (go over them one by one) using the ‘zl’ object (use the ‘iter 2′ option).

You can then get the Name property and you’re done.

You mention "M4L menu" but there really is no such thing; M4L provides several ways of menus. There is a problem though, unfortunately the "live.menu" object isn’t the easiest when it comes to dynamic changes.

If you’re not looking for something which can be controlled by a control surface (such as the APC40) then I’d recommend using the ‘umenu’ object instead. This makes it much easier to control the menu contents.

As said; the downside to this is although its perfectly usable in Live you can’t map this critter in any way nor will you be able to control it using external devices such as the apc40.


September 30, 2011 | 3:35 pm

yeah I got it.

get chains, get name, does it.

thanx


September 30, 2011 | 4:28 pm

@Shelluser

You can’t control a umenu staight away. But you can use a live.numbox that has it’s left outlet connected to the inlet of the umenu.


April 12, 2013 | 3:23 pm

Hi.

I know this is and old post, but this is exactly what I need to do. I just don’t get the iteration thing..

I got all the chain ids in the device, but how do i make a loop to get the ids converted to names?


April 12, 2013 | 6:12 pm

As mentioned above the iteration can be done like this:

[attachment=220889,5414]

Attachments:
  1. Picture1.png

April 12, 2013 | 6:57 pm

But how do I make it loop it. That just gives me one name and error messages for the once it didn’t go through?


April 12, 2013 | 7:24 pm

If you post your patch (copy compressed) we may see what’s going wrong.


April 12, 2013 | 7:50 pm

Hmm, this is my patch.

It finds the name of the scene currently playing and then it will hold that name against the names in the chain to select it (it also renames a track for some feedback).

I got it working using some of the docs, but it seems a bit excessive if it can be done with just a few elements.

– Pasted Max Patch, click to expand. –

April 13, 2013 | 2:46 am

I’ve only looked at the part which creates the list of chain names and made some changes for simplification (not tested).

– Pasted Max Patch, click to expand. –

April 14, 2013 | 11:46 am

Hmm, that doesn’t work.


April 14, 2013 | 12:44 pm

Sorry, there was a typo in my patch: replace [iter 2] with [zl iter 2].


April 14, 2013 | 2:43 pm

Ahh, yeah. Now it works perfectly. Thank you very much.


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