programming with max/msp - Virtual Sound
programming with max/msp - Virtual Sound
programming with max/msp - Virtual Sound
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Interlude A - Programming <strong>with</strong> Max/MSP<br />
In this first “Interlude” we will examine a few aspects of <strong>programming</strong> Max/MSP<br />
in more depth, so to provide useful information to you. Because of the essential<br />
nature of this information, we encourage you to not skip over this section unless<br />
you are already truly expert in Max/MSP. It is important that you implement all<br />
of the tutorial patches that we propose in the text, as these small efforts yield<br />
the biggest results.<br />
IA.1 MAX AND THE NUMBERS:<br />
THE BINARY OPERATORS<br />
Like any respectable <strong>programming</strong> language, Max can do many things <strong>with</strong><br />
numbers. We will begin this chapter by looking at the simplest operators, those<br />
for addition, subtraction, multiplication, and division.<br />
INTEGER ADDITION<br />
Recreate the simple patch shown in Figure IA.1 (and make sure that there is a<br />
space between ‘+’ and ‘5’!).<br />
Fig. IA.1 Addition<br />
The + object adds its argument (which is, in this case, 5) to whatever number it<br />
receives on its left inlet. If we feed some numbers to the object via the number<br />
box above it (by selecting it, for example, in performance mode and then using<br />
the arrow keys on the keyboard to change its value), we can track the results of<br />
the operation in the lower number box.<br />
The right inlet of + changes the argument, and if we enter a number on this<br />
inlet by using another number box, the number will be substituted for the argument<br />
of the + object in the sum that will be produced when new numbers are<br />
input via the left inlet.<br />
Try this by adding a number box on the right, as shown in Figure IA.2:<br />
Fig. IA2 Addition <strong>with</strong> a changeable argument<br />
from “Electronic Music and <strong>Sound</strong> Design” Vol. 1 by Alessandro Cipriani and Maurizio Giri<br />
© ConTempoNet 2010 - All rights reserved<br />
IA<br />
131