Professional Documents
Culture Documents
Emsd1 001 148
Emsd1 001 148
In this style of patch, the "co ld" inlet of the add it ion object behaves as though
it we re a "hot" inlet. Try build ing it, and verifying th at the number box on the
right triggers a result every ti me that its value is changed.
It is essential that th e positions of the objects in your patch are absolute ly the
same as the posit io ns in the f igure. Placing the button to the right of the
+ object, for example, w ill produce undesired results, since t he bang wi ll f ire
before t he new value is stored, causing th e addition object to use t he old value
th at had been copied into the internal variable previously in its calculation rather
than the new value (as shown in f igure IA.4).
if the bang is on
the right, you'll
+5 have some
T. surprises!
OD
Fig. IA.4 Buggy results produced by an error in the order of execution
Delete t he two numbe r boxes above the + object and connect a message box to
its left inlet. After t his is done, type two numbers (separated by a space) inside
the message box, as in f igure IA.S:
93
[_
+5
ck
Fig. IA. 5 Summing a list
If you now click on the message box in performanc e mode, t he + object w ill
sum its values; th e operator behaves as t houg h it had received t he second
number on th e right inlet (and, as usual, the argument 5 inside t he object box
is replaced by t hat new value). This behavior (t he ability to accept lists of two o r
more elements on t heir left inlet and t hen route th e individual list items t o the
ot her inlets) is also a common featu re of many Max objects, and wor ks not only
with binary operators, but of ten wi th objects t hat have t hree or more inlets.