Вы находитесь на странице: 1из 1

Interlude A - Programming w it h Max/MSP IA

three equivalent ways to pass


the list [0.5 20] to the line~ object

~ l;O_ ~
append 20 o.
pack 20 $1 20
I_ I- l-
line- line~
--
line~

Fig. IA.61 Three ways to obta in the same result with Max

The next example (as shown in figure IA .62, and which you shou ld build, as
usual) uses tw o variable arguments :

(µ ~
~ckOO
~ n. $1 metronometempo$2

piece n. 2 metronometempo 144

Fig. IA.62 How to use two dolla r variables

Here, the variable arguments are "$1" and "$2 ", w hich means that the f irst
and second elements of the list received on the message box will be used as
replacement values. To pass two numerical argu ments to the message box in the
form of a list, we "pack" them toge ther using the pack object (remember ing
that th is list w ill be sent to the message box only when we update the "ho t "
inlet of pack) . It isn't possible to simp ly give the f irst element to the left inlet
and the second element to the rig ht inlet, because anyth ing sent to the right
inlet w ill become the new contents of th e message box!
In f igur e IA .63 w e ill ustrate a patch that generates rand om g lissandi: t ry
bui ldin g it.

f?l -
metro 200
::c
I bb

IT -
- - • - - -
vs betwee n 55. 440 vs.between 1000 . 2000

-------
i. / r.........
....
pack 0. 0.
~~ $2 200

.L - :

~-=
_
...
.
;
line-

.

:
s~tartwindow
stop
..
... ......... - :.w
dac~

Fig. IA.63 A str eam of random glissandi

For every bang generated by th e metro nome, two random numbe rs are cre-
ated, the fi rst between 55 and 440, and th e second between 1000 and 2000 .
These two numb ers are jo ined into a list and passed to a message box.
167

Вам также может понравиться