You are on page 1of 1

Chapter 1P - Sound synthesis w ith Max/ MSP 1p

220 330 440

~- ~cle- 440

rai
Fig. 1.19 Use of th e message box

Here we have added three new message boxes to the previous patch. (The
message box is t he second icon in the palette .) A message box has rounded
corners and a grey background with no border, wh ich makes it easy to distin-
gu ish from an object box, w hich has a dark border and a wh ite backgro und (or
a grey backgrou nd when it is selected). A message box can contain any message
t hat you type into it (a message being some amalgam of characters, phrases,
words, numbers, and ot her symbols), and its stored message is sent whenever it
is clicked in performanc e mode. It is a very impo rtant object, so commonly used
tha t it can be created withou t the palette by j ust typi ng the lett er 'm ' .

Try mod ifying the patc h from the previous secti on 18 in the way that we j ust
suggested, by adding some message boxes, fi lling them w ith numbers, and
then clicking on them to vary the fr equency of t he cycle- (aft er, of course,
fo llow ing what shou ld now be a fami liar sta rtup proced ure: enter performan ce
mode, click t he ezdac- loudspeaker to enable the digital-to-analog converter,
and raise the level of the volume fader). Note that the "440" argument that
fo llows the word "cycle- " doesn't change when we click on a message box.
The arg ument to cyc le- is replaced by the message box value, wh ich is imme -
d iately copied into an interna l storage slot (that has no visual representati on) in
th e object. The fre quency t hat we hear fr om cycle- w hile t he patch is running
is based on th is int ernal value rather t han the onscreen characters.
With t he message box mechan ism, we can on ly send pre-defined values that we
have placed into message boxes ahead of ti me. If we w ish to change numbers
arbit rarily wh ile a patc h is running, we need to use a nu mber box fo r integer val-
ues or a flonum (or float numb er box) for floa ti ng point values. These objects
are t he sixth and seventh icons on the palette (figure 1.20) and can be created
instantly by typ ing t he sing le character 'i' (for th e integer number box) or 'f' (for
t he fl oati ng poi nt number box).

Fig. 1.20 The icons fo r th e number boxes as t hey appear in the palette

l 8 If you didn't save the patch from the previous section, modify t he f ile 01_01.maxpat and save
it using anot her name. (One that doesn't correspond to a Max object name! See Section 1.1 fo r
advice on t his.)
69

You might also like