Help: Chain Selector Auto On/Off Device

Nov 24, 2012 at 6:38am

Help: Chain Selector Auto On/Off Device

Hey Everyone,

I just made a m4l patch for the instrument rack chain, but I was wondering if you could help me simplify it or offer some advice. It’s just a patch that automatically turns off the devices that are not a part of the selected chain in an instrument rack. It is built for just a 6 layer chain, but ideally I want it to work for a 64 layer instrument rack chain. But the thing is I couldn’t use the uzi object, even with the defer object and get it to work. So I just made a more cumbersome patch, but I have like a patcher for each layer, which seems silly, I would like it to be more automated.

– Pasted Max Patch, click to expand. –

The way it works now is that the patcher at the top observes the chain selector value. Then that value gets sent to the patchers below to be compared. Each patcher below is for a respective chain layer. So it would be weird to have like 64 of those patchers.

Any suggestions?

#65340
Nov 24, 2012 at 12:54pm

I think the [poly~] object provides an elegant solution for this.

Here is a thread with a related example and discussion of specific limitations.

http://cycling74.com/forums/topic.php?id=39413

#235482
Nov 24, 2012 at 5:35pm

Maybe I am wrong, but I don’t think that will work. Because even though I need 64 instances of those patchers at the bottom, each patcher has a different value for the live.object to control. And live objects can’t be changed dynamically.

Could you explain a bit further how I would implement the poly object here if I am wrong?

#235483
Nov 26, 2012 at 11:42am

You are wrong because poly~ creates multiple copies of the patcher. So internally there will be a separate live.object for each chain, ie. no dynamic changes.

Anyway, I like your idea of optimizing the instrument racks and thus have implemented it for my own usage (see attachment). It’s a MIDI effect device to be placed directly in front of the instrument rack and can be set to any number of chains from 1 to 127. Note that the device is frozen to include the poly~ patcher. So for editing you need to click the freeze/unfreeze button.

Attachments:
  1. OptiRack.amxd
#235484
Nov 26, 2012 at 9:20pm

Cool, this is really helpful. I am trying to understand the specifics in your patch, I understand how it works overall, but there are a couple of spots which are stumping me right now because I am new to max. There are three inputs in the poly object. Why is there an uzi object to set to the 2nd input on the poly? Because it will uzi out id’s before any values into the first input are even sent. Also why is “target” placed in the message boxes?

#235485
Nov 27, 2012 at 2:45am

The 2nd and 3rd input of poly are used for initialization, ie. calculating id’s for the live.object instances. This must be done before values are sent to the objects (1st input).

The ‘target’ message specifies to which instance subsequent messages will be sent. For example, [target 3, 5] means that the number 5 is sent to instance 3.

#235486
Nov 27, 2012 at 4:14am

ahhh right, because it’s a poly object. ok cool, thanks again for posting up your patch. this is helping me a lot.

#235487

You must be logged in to reply to this topic.