(max) encapsulation

As you learn more objects and more complicated ways of interacting with MIDI and synthesis with Max, your patchers will likewise become increasingly complex. While use of presentation mode can make your final interface much easier to use and understand, you will need to make extensive use of encapsulation if you want to keep any sense of clarity as you develop your patchers. Encapsulation takes two main forms: the [patcher] object, and patchers saved as files that can be used as objects in other patchers. Liberal use of well-named encapsulated patchers and objects will go along way towards making your patchers easier for you and others to understand. I’m going to focus on the [p] object only.

encapsulation and the [patcher] object

I talked about encapsulation in a previous post. Max 7 adds an incredibly easy way to take an existing partial network of objects and encapsulate them with a single command. Select the group of objects you want to encapsulate, then use encapsulate command: Edit > Encapsulate <shift>+<cmd>+<E>. The objects will be moved into a [p] (patcher) object, with all connections and relative placements intact. Any connection to an object outside the selection will automatically generate an inlet or outlet as needed, and connections to those inlets/outlets will already be made. All you have to do is name the [p] object.
Encap1

 

becomesEncap2

with this inside.Encap3

Be sure to name the [p] object (something useful and explanatory of its function – gainControl would be good in this case), and also to add an explanation of the function of the outlet (or inlet) in the Comment attribute field in its Inspector window. The comment is what shows in the popup when you hold your mouse over an inlet or outlet of an object.

 

 


Comments

Leave a Reply