27.11.2012 Views

programming with max/msp - Virtual Sound

programming with max/msp - Virtual Sound

programming with max/msp - Virtual Sound

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1.1<br />

58<br />

Practice<br />

Paragraph 1.1 - First steps <strong>with</strong> Max/MSP<br />

When this file opens, you will see that we have added new objects to the<br />

original patch. The new objects on the left, in which you can see numerical<br />

values, are called number~ objects, and they show, via the value that they<br />

display, a snapshot of the signal that they are receiving. The larger rectangular<br />

objects on the right are called scope~ objects, 13 which act as oscilloscopes on<br />

which it is possible to view an incoming signal as graphic waveform. The object<br />

[p gain_to_amp] and the object that is connected to its outlet (which is called<br />

a flonum or a float number box) are used to view exactly how much gain~ is<br />

being applied to amplify or attenuate the signal.<br />

Once again, start the patch by clicking on the ezdac~, and observe the numbers<br />

changing in the number~ object high on the left. These numbers are being produced<br />

by the cycle~ object and, if we observe them for a bit, we can see that<br />

their values, both positive and negative, fall between 1 and -1. On the upper right<br />

side we can see the scope~ object displaying the same numbers in graphical<br />

form; the upper half of its panel corresponds to positive numbers, and the lower<br />

half to negative numbers. In the scope~ panel, hundreds of different elements are<br />

shown, visualized as a sequence of points, rather than the single number shown by<br />

the number~ object. The points fall very close to each other on the screen, and so<br />

they appear as a solid curve. The elements that they represent, the numbers themselves,<br />

are called samples in the terminology of digital music. And the line made<br />

from these sample values, as they undulate high and low across the oscilloscope<br />

panel, is precisely the sinusoidal wave produced by the cycle~ object.<br />

The patch also contains a second number~ and a second scope~, each connected<br />

to the gain~ object. These objects should be displaying the number 0<br />

and a flat line (which is, of course, a sequence of zeros), because the volume<br />

fader is at its lowest setting, resulting in a volume of 0. If we move the gain~<br />

fader upwards, we should see number~ begin to display values that start out<br />

very small and gradually grow larger as the volume rises, and at the same time,<br />

the flat line of the lower scope~ should begin its undulation and assume the<br />

same look as the other scope~. We can infer from this that gain~ is controlling<br />

the amplitude of the signal– the more we raise the fader, the greater the<br />

amplitude of the oscillations becomes. If we go too far, and raise the value of<br />

the gain~ fader to be close to its <strong>max</strong>imum setting, we see number~ begin to<br />

exceed the amplitude limits of 1 and -1, and the waveform on the oscilloscope<br />

becomes clipped. More important than these visual clues, you should be able<br />

to actually hear the sound change, as it becomes distorted.<br />

We can draw some conclusions from what we’ve seen:<br />

1) The cycle~ object produces a sequence of digital values that follow the pattern<br />

of a (co)sine wave.<br />

13 The objects number~ and scope~ can be found, like the first objects, on the palette. If you<br />

want to create new number~ and scope~ objects in your patch and don’t want to use the palette,<br />

you can always use the trick that we demonstrated above: take an object box and type the name of<br />

the desired object into its interior. We will see later how to make searching for icons easier.<br />

from “Electronic Music and <strong>Sound</strong> Design” Vol. 1 by Alessandro Cipriani and Maurizio Giri<br />

© ConTempoNet 2010 - All rights reserved

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!