Help: Chain Selector Auto On/Off Device

    Nov 24 2012 | 6:38 am
    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.
    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?

    • Nov 24 2012 | 12:54 pm
      I think the [poly~] object provides an elegant solution for this.
      Here is a thread with a related example and discussion of specific limitations.
    • Nov 24 2012 | 5:35 pm
      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?
    • Nov 26 2012 | 11:42 am
      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.
    • Nov 26 2012 | 9:20 pm
      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?
    • Nov 27 2012 | 2:45 am
      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.
    • Nov 27 2012 | 4:14 am
      ahhh right, because it's a poly object. ok cool, thanks again for posting up your patch. this is helping me a lot.