Professional Documents
Culture Documents
Ia.4 Subpatches and Abstractions: The Subpatch
Ia.4 Subpatches and Abstractions: The Subpatch
at t he end of every note under 1000 milliseconds long. We w ill see soon how
to link t he durat ion of the envelope to the rate of th e metro . Meanw hile, save
the patch to disk; we w ill retu rn to it shortly.6
r ~
p random-minmax
Now press < Enter> or click in an empty spot in the Patcher W indow. An empty
window w ill appear, in edit mode, which has the t itle [random -minmax}.
The tit le of the wi ndow corresponds to the argument that we gave to the
patcher , and is typed in brackets to indicate that it is not a free-standing
Patcher W indow, but instead, a patch that is contained wit hin another patch.
Arrange t he w indows in a way t hat you can see t hem both (that is to say, in a
way that you can see both the w indow enti tled [random -minmax} and t he main
wi ndow th at conta ins the random-min max patcher t hat w e just created).
The argume nt g iven isn' t used in any special way by th e patcher, but it is
always a good idea to name any patcher in a way th at suggests the behavior
th at it implement s. In the current example, we are about to create a random
number generator that w ill generate number s that span an interval rangi ng
fr om some minim um to some maximum , and so we name it "ra ndom-m inmax" .
The [random -minmax] w indow shows t he int ernal implementat ion of this
patcher, and inside the w indow we wi ll implement the patch, putti ng it in
contact w ith the "o utside wor ld" (def ined, in th is case, as th e Patcher Wi ndow
6 A s we already pointed out in Section 1.1, it wou ld a very bad idea to save this patch using a
name that happens to mat ch an existing Max/MSP object. Therefore , do n't call th is patch "random.
maxpat", for example, or "me tro.maxpat" . The better way to go would be to use a name composed
of multiple words with spaces between t hem, such as "random sequence.maxpat " .
144