You are on page 1of 1

IA4 Pract ice ParagraphIA.

4 - Subpatches and abstractions

less space. In fig ure IA.3 1 we see how t his might f inally look : note t hat, to
accommodate our user interface, the button connected to the function
object must now receive its bang directly from the metro object.

toggle maximum minimum

g~
metro 1000

p random-minmax

..-
line-
....
Fig. IA.3 1 Add ing a second subpatch

If you have had any problems follow ing these examples, we've included
the completed patch in th e file IA_04_subpatch.ma xpat . We recommend,
howeve r, th at you try to build it o n your own.

It is possible to modify a subpatc h at any time by doub le-clicking on the cor-


respond ing patcher and putti ng it into edit mode. Note that patc hes and
subpatches are able to move back and fo rt h betwee n edit and perfo rmance
modes independently from each other.

ABSTRACTIONS
The patcher object is useful, as we have seen, for collapsing and hiding the
interconnected objects of an algorith m in a single object box that perform s the
algo rithm . But if we decide that we wa nt to use th is algori th m in a differe nt
patch than the one in wh ich it was created, we have a prob lem: the only way to
use it in a d ifferent patch is to copy and paste it into the new Patcher W indow .
Wouldn't it be nicer to be able to pack an algorithm int o a "real" object t hat we
could reuse simply by typing its name into an object box, exactly as we do with
standard Max/M SPobjects? The good news is th at some patches can be reused
in this way, as though th ey were objects. Key to th is usage is th at Max/MSP
knows where to find them.

Look for t he fi le IA_OS_abstraction.maxpat to see a complet ed example


(shown in f ig ure IA.32). This patch is almost the same as the preceding one, the
on ly difference being that in place of th e two patcher objects th at had as their
argume nts "ran dom- minmax" and "osci llator", there are now two external
objects whose names are random -m inmax and oscillator .
148

You might also like