Professional Documents
Culture Documents
Emsd1 001 162
Emsd1 001 162
f?J~
toggle
1000
metro
\0 \6 C
T
1
p random-minmax n
..
'--- -----startwindow U .........-
line':
~:~
Fig. IA.29 The operationa l subpatch
The p atcher now contains the algo rithm for generati ng random numbers,
and this algor ithm can be used in Max like any othe r litt le box. Put both Patcher
Wi ndows into perfo rmance mode and make sure that the patch behaves in the
same way that it did before by generating a random stream of notes and varying
the paramete rs. It is possible to close the {random-minmaxj w indow and t hen
reopen it by double -clicking (in performa nce mode) on the patche r object.
Ano t her way to create a subpatch is to select a group of objects that you wou ld
like to insert into a new object and then choose the Encapsulate item from the
Edit menu . Try, fo r example, to change the oscillato r section into a subpatch
that takes a MIDI not e number on its inlet, and that produces a signal out let. To
do this, f irst, select th e section of the patch that is relevant (as in f igure IA.30):
um , ;; Jnrnum1
: ;';;a,um ~~ -,..&-._j
"i;gg. le - m .. \ ~ .. -~
Q 1;,000
me
.I
T tro1000
' .
··
:~:rm...
3iT~+"mc
\ ~J....... :
p random·minmax ·~
;-1ar1wfldow
~~~
Fig. IA.30 Selecting t he oscillator block
Aft er th is, select the Encapsulate item fr om th e Edit menu and t he g roup of
objects w ill "magical ly" reappear in a patcher that has no argum ents. Type in
a name argument to illuminate the fu nction of the object, perhaps, for example,
"oscillator", and then clean up and compact the patch so that it occupies
147