You are on page 1of 1

Chapter 1P - Sound synthesis with Max/MSP 1p

As the multiplicat ion factor for the left dimin ishes (because the sound is moving
to the right), the mult iplication factor for the right increases. Note that the sum
of the two factors, right and left, is always 1. The values fo r th e two factors
are t herefore linked, and can not assume arbitrary values. They cannot, for
example, both have the value 1, or both 0. This means that we can contro l their
position in the stereo fie ld using j ust one of the factors, for example the right
channel, and we can extract the other factor using a calculation: in this case,
the left factor w ill always be equal to 1 minus the right factor (because, as we
know, the sum of th e two factors w ill always be 1).
Having picked a mult iplication factor, we also need to take psychoacoustics into
account: the perceived int ensity of the sound will be proportional to the square
of its amplitude (as you remember from Theory Section 1.6). This means that
before using the amplitude multiplication factor, we must calculate its square
root as a fina l step.
These dangerously mathemati cal details can be clarified by looking at the
algorithm implemented in 01_ 17_pan.maxpat (seen in figure 1.59).

move the slider to control --------


the position of the sound 1.,-.-!!-------'
in the stereo image
,...__....,_ control value for sound position:
------' :x==::!....::0:....: ,o =
. .5 centered, 1 right
-':....:le:::_ft'.!... =
1 minus the
control value !- 1·

left multiplication ~ .75 · ·


factor
square wave
~~=== right multiplication
factor

square root sqrt ;;;ct:' 440 sqrt square root

!~8660 1 :-'!;·.. QI:]


;_
iippe-nd 20 ." •, append 20
.~line- :
: •••, J: - h . I
line- t e numencal va ues are
:..-··
-• .- • •• , , , ... - smoothed using line-
• • • • • ._.:.
"- ·-
the multiplicatio;• '• ,, ...the multiplication
factor Is applied factor is applied
to the amplitude to the amplitude
of the oscillator of the oscillator
panning
algorithm

startwindow
S~..s
dac-

Fig. 1.59 The f ile 01_ 17_pan.maxpat

First off, we introduce a new graphical object, slider, which is a UI slider


that produces a stream of integers when it is moved. This object can be either
vert ical (appearing similar to the gain~ fader) or horizontal, as you see in
the figure . If you resize th e slider , rendering it longer than it is w ide, it will
change or ientat ion automatically.
105

You might also like