Same Max module, different name

    Jun 16 2013 | 12:18 pm
    First of all, Happy Father's Day to all fathers out there. :-)
    I have a Max patch (with several sub patches, JS objects, lots of sends and receives) which I will use on a per-MIDI-controller basis. Right now I have two copies of the same patch in two separate folders, and the subpatches and JS objects\scripts. All has been renamed with the name of the respective MIDI controller.
    I am in uncharted territory here : If I open up the two separate instances of my module, changing presets on one also changes presets on the other, by virtue of the fact that the names of the send and receive objects have not changed.
    Must I change the names of all send\receive pairs as well ? There are many. many in each module. I would hate to have to go through all of then and rename these objects in every copy of this module I make. That would be a nightmare !
    Is there a better way ? or perhaps a different structure which would be more practical ? I will be making 7 copies of these which will all operate at the same time.

    • Jun 16 2013 | 3:16 pm
      Check the docs for Abstractions and also Changeable Arguments... #0 or #1-9
      You'd be best off arranging things to use a single abstraction rather than 7 discrete copies of the patch. In the abstraction prepend your send and receive names with #0 (as in [send #0_whatever]) then each instance of the patch will receive a unique numbered argument such as [send 1000_whatever] when it is created.
      Alternately, given you are 'identifying' each patch with the name of the specific controller, you could just use #1_whatever and when you create an instance in the main patch provide an id of each controller as an argument to the abstraction ie [Midipatch Modwheel] so then the send/receive called whatever would become Modwheel_whatever in the Abstraction (which here is identified as 'Midipatch'
    • Jun 16 2013 | 8:40 pm
      Two good solutions that should work. What about JS objects ? Same rule applies to JS and Jason file names ?