Professional Documents
Culture Documents
All rights reserved. No part of this book may be reproduced in any form by any electronic
or mechanical means (including photocopying, recording, or information storage and
retrieval) without permission in writing from the publisher.
This book was set in Stone Serif and Stone Sans by Graphic Composition, Inc. and was
printed and bound in the United States of America.
Material
7 Composer Objects
Copyrighted Material
174 Core Components
Performers may affect computer output in one of two ways. The com-
puter may look for a specific note, a condition, or other listener data
to trigger a prerecorded sequence or to begin a compositional process.
When a specified conditional is met, playback or processing will com-
mence. Performers may also have continuous control over specific
Copyrighted Material
176 Core Components
Data Sources
on/oft tempo
range range
250 size minimum
etro 25 50 46
p RandomPitchRange
makenote88 20
noteout
Figure 7.1
Random melody
Generates a range of random notes. The lowest note is set by the + object;
the range size is set by the random object.
Figure 7.2
RandomPitchRange (subpatch of fig. 7.1)
Copyrighted Material
178 Core Components
Generative methods use sets of rules to produce complete musical output from
the stored fundamental material.
Transformative methods take some existing musical material and apply trans-
formation to it to produce variants. According to the technique, these variants
may or may not be recognizably related to the original. For transformative algo-
rithms, the source material is complete musical input.
Source material may come from one of several sources: a live perfor-
mance, a stored sequence, or a generative algorithm. Transformative
methods may be used to alter musical material from any source. They
are represented as musical processors, taking existing material as input,
and shaping it to produce new versions based on some aspect of the
original. Thus, they are the primary means for creating variations. The
transformation may alter a single parameter, such as pitch transposi-
tion, or may alter several parameters so drastically as to produce results
that are unrecognizable, yet formally related, to the original. Processors
are analogous to MIDI effects boxes (signal processors): the input signal
is warped, distorted, colored, or otherwise altered according to the se-
lected algorithm. In fact, previous examples have shown that it is pos-
sible to create Max objects that mimic some functions of a signal
processor, such as delay, pitch shift, arpeggios, and panning. A few ba-
sic categories of processor types are discussed below.
Filtering
Copyrighted Material
179 Composer Objects
Limiting
This example uses RandomPitchRange to create pitches that are then further
limited by split. The allowable range of values is set with the low and high split
inlets. When the GSwitch is sending to the left outlet, it chooses new random notes
until it gets one within that range. When the GSwitch is sending to the right outlet,
notes outside the range will not sound.
on/off tempo
range range
>250 size minimum
L
metro 250
L
r 50 6
p RandomPitchRange
8 O
split 48 60
J-
pitches outside range
makenote 88 200
Click here to correct
noteout pitches out of range.
Figure 7.3
Range ioop
Copyrighted Material
180 Core Components
plays notes only within a predefined range using a single split object.
Each bang from metro produces a random value from Random-
PitchRange, with pitches out of split being ignored. This makes the
object fairly limited, but it does create interesting rhythms because val-
ues outside of the split range will produce rests (they do not go to
makenote). Fine tuning the range of random values from Random-
PitchRange and the range of notes to play from split will produce
continuous rhythmic variations that are somewhat predictable, since
the values are highly constrained. Many algorithms that improvise and
produce constant variations use constrained random values. In this
example, a simple correction algorithm may be added by clicking on
the GSwitch, which creates a feedback loop by sending a bang back to
RandomPitchRange for each out-of-range value. Such feedback loops
should be used with caution, since indeterminately endless looping
can use up processor time on the computer. However, this should not
be a problem if an appropriate value is generated within a short time.
Figure 7.4 shows the output of an arpeggio-generating algorithm,
AddArpeggio, being processed by a more generalized algorithm,
RangeMod, to place values within a predefined range. RangeMod
takes in melodies (or any other data) in the first inlet and alters pitches
that fall outside the selectable minimum and maximum range using
flip
on/off speed time interval (-12 to 12)
i331
AddArpeggio
1250 positive for up
negative for down
range range
minimum maximum
40 60
; RangMod
makenote 100 20
noteout
-
Figure 7.4
Constrained arpeggio
Copyrighted Material
181 Composer Objects
the % object (the modulo operator), which divides two numbers and
outputs the remainder. The size of the range is determined by sub-
tracting the maximum from the minimum. (1 is added to include the
specified end points.) The number received in the right inlet of % (the
divisor) determines the maximum value of the range; the middle inlet
determines the minimum value (fig. 7.5). Values sent to % will result
in numbers between O and the range size. A previous example showed
the use of [% 121 (mod 12) to analyze incoming notes as pitch classes,
reducing all values to fall within a range of O to 11 (fig. 6.14).
RangeMod first checks to see if values are in range using split; if they
are, the values are sent out without further processing (fig. 7.5). The
expr object calculates the size of the range. To be fail-safe, an abs object
(absolute value) is used to convert any possible negative numbers to
positive. Next, the modulo operator creates new values within the
specified range, starting at 0. To get the new values in the proper regis-
ter, the minimum value (Range Ìvfinirnurn) is added to offset the results.
(See figures 7.30 and 7.31 for a third range method.)
Each notein to AddArpeggio begins a new arpeggio from the last
note played (fig. 7.6). Speed controls the arpeggio speed and is sent out
to the duration inlet of makenote to assure that the duration and the
range range
input minimum maximum
Figure 7.5
RangeMod (subpatch of fig. 7.4)
Copyrighted Material
182 Core Components
AddArpeggio takes a note played on the keyboard as a starting point and adds or
subtracts a specified interval repeatedly, creating an arpeggio. The addition/subtraction
will restart each time a note is played on the keyboard. In regutar time intervals (flip
time), the arpeggio direction will be reversed by multiplying the original interval by -1.
flip time
on/off speed
/ 40 250
met ro 1000
interval
metro 50 note i n
\/ 4
st rip n ote
Positive intervals will create
inI 60 starting ascending arpeggios;
note negative numbers will create
descending arpeggios.
Figure 7.6
AddArepeggio (subpatch of figure 7.4)
speed are equal (legato). Arpeggios in this example are created by con-
tinuously adding or subtracting a single interval, as specified in the
right inlet, producing ascending and descending lines. An mt is used
to hold the starting keyboard pitch, which gets replaced each time an
interval is added or subtracted. Flip time, in milliseconds, determines
how often the direction of the arpeggio will change using a second
metro. With each bang from the metro, the direction of the arpeggio
is reversed by multiplying the arpeggio interval by 1.
Scaling
Selecting
The select object is a very useful tool for matching and obtaining a
bang for desirable numbers specified as arguments. However, it can also
notein
¶27
st rip note
+ 10
metro 2 370
Figure 7.7
Scaling
Copyrighted Material
184 Core Components
Timing Processes
metro 200
random 24
choose tonic/register
select 1 4 6 9 11 13 16 18 21 23 46
in the minor
60
scale are sent to
makenote to be played.
gate
noteout
If the gate is open, notes outside the minor scale re-bang' the random
number generator until an acceptable value is found. When the gate is
closed, notes outside the minor scale will not sound, creating rests."
Note: care should be taken when using this method since the computer
could spend much of its time looping if a desired value is not found.
Figure 7.8
Select scale
Copyrighted Material
185 Composer Objects
Thinning
Speedlim (chap. 6) is the data-thinner of choice for many composition
functions, especially when a continuous controller from the keyboard
is used to control compositional processes, since the rate of data
change sent from controllers is faster than many algorithms require.
Speedlim keeps data streams to a minimum, which improves efficiency
for the overall program. Speedlim allows only one value output every
X milliseconds. For example, if the modulation wheel is used to deter-
mine the register of a melody, looking at its position once every 40
milliseconds might be just as effective as looking at it every millisec-
ond, with forty times less information to process. In figure 7.9, Mod-
WheelMelody scales modulation-wheel values to fall between 60 and
85, and sends them to select to create a melody. (The tonic is not vari-
able in this example; select will reject any notes outside a C minor
scale.) The right inlet is a variable that controls the maximum speed
of the melody by thinning the data-transfer rate with speedlim. Slid-
ers can generate a thinned data stream by using an offset and a multi-
plier in GET INFo. Here the slider values go from 50 to 1000
(millisecond speed for melody), in increments of 10. This makes the
190 duration
speedlim loo
select 61 64 66 69 71 73 76 78 81 83
Notes outside of C makenote88 20
minor are filtered out.
noteout
Figure 7.9
Modulation wheel melody
Copyrighted Material
186 Core Components
slider smoother to operate since the data stream has been reduced. In
this case, speed changes of less than 10 milliseconds offer more detail
than is needed.
Gating
In figure 7.10, the subpatch Rest is an elaborate switching filter that
takes in steady metronome beats and creates varied rhythm and phras-
ing (fig. 7.10). Two variables control the operation of Rest. Both num-
bers represent constrained random values between 1 and the specified
maximum number (i.e., a value of six means random values between
one and six). The middle inlet represents the rest phrase length, the
maximum number of notes that will be played continuously before a
rest. The right inlet determines the rest size, the maximum duration of
a rest. As soon a phrase is completed, a new rest size number is issued,
and the melody waits that number of metro beats. Then, the algorithm
gets a new number for the phrase length and plays that number of
beats, and so on. A GSwitch alternately switches back and forth be-
tween the two (fig. 7.11). When it switches to phrases, bangs are out-
put, when it switches to rests, the signal is blocked. (A similar effect
could be achieved usìng a gate to open for X number of beats for the
phrase, and close for Y number of beats for the rest.) For example, long
100
metro 200
phrase rest
length Size
p Rest
E
random 3
T
+ 40
-
makenote 110 200
E
noteout
Figure 7.10
Rest example
'eriaI
187 Composer Objects
-9 RestPhraseLen RestSize
RestPhraseLen sets the maximum
When RestSize number of beats to play before a rest.
is O, there
are no rests -
all bangs are
sent directly
through.
Figure 7.11
Rest (subpatch of fig. 7.10)
phrases with infrequent rests of one or two beats would result from
choosing 25 for the phrase length and 2 for the rest size, whereas
choppy, pointillistic rhythms would result from a phrase length of 4
and a rest size of 8. When the rest size is O, the beat is continuous and
bangs from metro will bypass the entire algorithm to prevent unneces-
sary computer calculations. (Note: Remote sends in fig. 7.11 are used
to improve the readability of the example.)
Copyrighted Material
188 Core Components
actions. The line object can also be used to automate the increase or
decrease of variable values in a composer object, and to create "ramp"
values that interpolate between two end points.
Line takes four variables: a starting value, an ending value, the time
it takes to get from the starting value to the ending value, and the time
"grain," the number of milliseconds it takes to output an updated value
(a thinning value). A single number to the left inlet is the starting
value; a pair of numbers to the left inlet [0 500] represents the starting
value (0) and the time (500). The middle inlet is the destination value,
and the right inlet is the time grain. Perhaps the easiest way to use line
is to send a message of three variables in the form of 10, 200 5000],
where O is the starting point, 200 is the destination value, and 5000 is
the time in milliseconds to output values between O and 200. Option-
ally, line takes two typed-in arguments that represent the starting value
and the time grain.
on/off
note i n message lists for line
27 1000 Go to 127 in one second.
g ate
10 2000 Begin at 88, go to
ti i
10 in two seconds.
stripnote p GetDur
velocity = new duration = time to
>86 >2226
target value target value
line 1 10
bendout ctlout 1
Figure 7.12
Interpolator
Copyrighted Material
189 Composer Objects
L till 1024
o Play
Reset Delay
o Stop
Start/Stop Delay
Figure 7.13
Canon by Robert Gibson
Copyrighted Material
190 Core Components
The Follower Tempo slider sets the tempo of the "follower" voice. The
default is 1024the same tempo as the "leader" (the original tempo
of the sequence). Values higher than 1024 create canons in diminution
(e.g., 2048 plays the follower at twice the speed of the leader); values
less than 1024 produce canons in augmentation. The Delay slider sets
the number of milliseconds between the start of the leader and the start
of the follower. The Ramped Delay slider sets the rate of an optionally
increasing time interval between the leader and the follower, triggered
by clicking ori the start/stop toggle for Ramped Delay. This can create
phasing effects, as the two versions slowly drift out of synch. The pitch
interval of the follower can be set by selecting a number (in half steps
above or below the leader) with the Transpose Interval slider. The slider
has a four-octave range (-24 to +24). The default is O (unison). The
device (or port) and channel of the leader and follower can be set in
the MIDI menu. The final result can be recorded.
Using this program, Gibson has successfully created new computer
pieces as well as renditions of several acoustic pieces, including Georg
Philip Teleman's Allegro (III) from Six Canonic Sonatas and Steve Reich's
Piano Phase.
Mapping
Copyrighted Material
191 Composer Objects
in turn, be used as the index to another table. Select and match are
often used to define an initial set of data.
After choosing the variable that will alter a process, the composer
must select the performance feature(s) that will control the variable. A
clear example of performance feature to variable mapping can be seen
in the user interface of Robert Rowe's Cypher program (fig. 7.14). Note
that the clearly marked performance features above (listener objects)
can be connected to influence any of the music-producing parameters
below (composer objects). The user simply draws a line between them
to map (connect) any listener feature to a composition method. In this
example, the first two rows of connected ovals will cause the following
to occur (from left to right): a slower performance tempo will increase
the tempo of the computer (accelerando), a soft dynamic level will
i--
si Oil irisi o
- ,,-_-',
rrifa.s
,,-' ici id s h rt i':' no C E:' Eb
r,-- (,
' ' ' .i '.
:' i, i ',
_...- --.- ---. ----
i. i
r , , I
J i ii i i
flat i nvt acci tite swng tril loup arpq st.rc chrd bass t.rris treni
U
irin i rrg rgrg i rsp i riir irpi
i
phrs
',- -.'
i.
--. i i
rqini
t i_____i
.---.-' '___I ,"i i')
'.___.'
rcisp
____
i rdu
,----,
rqdl4
riodn
t i_J p___',
,-, ,___.,
basi
l,)
basN tapY
i,J i
tapN accru
i._)
sa/nri t..':ib
n
I' F...i..PJL!
Figure 7.14
Cypher by Robert Rowe
Copyrighted Material
192 Core Components
produce a trill, playing loudly will invert the melody, playing any C
will produce a chord, and playing any B will produce an arpeggio. The
bottom two rows of connections handle responses based on larger
changes over time, such as phrasing features or detecting regular or
irregular skips in register. (Note: Cypher is not a Max program).
Allen Strange's MIDI reMap demonstrates a Max program with a sim-
ilar approach to mapping parameters (fig. 7.15). In this clearly designed
interface, a menu selects a MIDI performance control, such as velocity,
aftertouch, or mod wheel, and maps this controller onto specified com-
position parameters, such as panning or duration. In the description
provided with the program, Strange writes:
This instrument allows the player to remap various MIDI controls to selected
parameters of a free running instrument. Each data stream can be "inverted"
with the toggle to give reciprocal values [i.e. duration can be the inversion of
velocityl. Each parameter can also be determined by a free running random
object or controlled by a screen slider.
MIDI reMap
by Allen Strange
Start/Stop Pitch JG#3 I
34 o
Velocity PRNNIN6
After Touch After Touch
Invert E 19 Manual Invert E 16 Manual
38 o
Duration
Key
Invert E 53 Manual
Figure 7.15
MIDI reMap by Allen Strange
Copyrighted Material
193 Composer Objects
The pitches are determined by a "Brown Noise" generator [the Max drunk
objectj accessing a table consisting of various pitches in related modes. The
possible deviation from the last sounded pitch to the next is controlled by the
STEP SIZE parameter. Any key pressed on the MIDI keyboard instantly resets
the "seed" for the selection of the next pitch.
200
metro 200
spews random
random 48 Tonic Tonic Strength
pitches
+ 36 lili
range around
tonic to change
Toiciz
makenote 100 200
-
noteout
Figure 7.16
Tonicize tutorial
Copyrighted Material
194 Core Components
figure out
closest tonic
I 12
12
tonicizing range offset for odd
closest tonic tonic strength
tonic to be
output
Figure 7.17
Tonicize (subpatch of fig. 7.16)
setting, the stronger the force of the tonic note. For example, a range
of six will map to the tonic any pitch that is three semitones above or
below the tonic so that a selected C) tonic will cause any A), B, C, D,
D), or E to be changed to a C). This creates a variable situation where
the prominence or weight of a single note can be controlled in terms of
the frequency of occurrence and its isolation from surrounding pitches.
Quantization is a technique that takes a large set of continuous val-
ues and changes them to a smaller set of discrete values. This may be
done using a rounding function, a formula, or mapping techniques.
PitchQuant (pitch quantization) is a custom object that maps incom-
ing pitches to a predetermined scale (fig. 7.18). lt may be used in the
typical sense of quantizing a scale, for example changing chromatic
scale input to major scale output, but is flexible enough to allow for
quite unusual mapping. The interface asks for the input note, the new
note to map it to, and the percentage of time that the mapping will
occur (quantization strength). The store button updates a coli that con-
Copyrighted Material
195 Composer Objects
PitchOuant maps incoming pitches to a predetermined scale. The percentage chance that a pitch
will be mapped is specified by the user. The Note menu selects which pitch class should be
changed. The New Note menu selects the new value of that pitch class. Chance of quantization
specifies the percentage chance of the original pitch class being changed when played.
on/off chance of
>200 note in new note quantization (%)
store -->
metro 200 settings
spews random random 48
pitches
+ 36
p PitChQuant
Figure 7.18
PitchQuant tutorial
tains all the mapping information. Each line of the coli contains pitch
class (0 - 11) as the address, followed by the new note, followed by
the percentage chance that the original has to change. Thus, (4, 5, 50)
in the coli would mean to change all Es to Fs fifty percent of the time.
A user monitor gives feedback about which pitch is entering Pitch-
Quant and which pitch is being output.
When a note enters PitchQuant, an analysis object separates pitch
class from register, a technique that allows similar processing of notes
for all octaves (fig. 7.19). Register is later added back to the final pitch
class. Pitch class goes into the coli, acting as the address to trigger the
new note and percentage change. The new note and the old note are
stored in ints The percentage algorithm chooses how often to output
an altered note. Each note input generates a random value between i
and 100. A less-than (<) operation sets the percentage range: All values
below the percentage change will trigger the new note; all values above
will trigger the old note. The < object works by sending a i if the
condition is true, or a O if the condition is false.
How could PitchQuant be improved? Although PitchQuant is set
up to work on all octaves the same way, it could be easily expanded so
Copyrighted Material
196 Core Components
add register
back to pitch class
Figure 7.19
PitchQuant (subpatch of fig. 7.18)
Copyrighted Material
197 Composer Objects
All notes passing through the Scale object will conform to a pre-defined
scale type, selectable from a menu. Scale uses a different algorithm than
PitchOuant to map incoming notes.
Range Range
Size Minimum
jtro
250
i i
p RandomPitchRange
46
Chromatic I
conforms entering
p Scale
--
- I notes to selected scale
makenote77 350
-
noteout
Figure 7.20
Scale tutorial
Copyrighted Material
198 Core Components
Chromatic, 0 1 2 3 4 5 6 7 8 9 10 11;
Pentatonic, 1 1 1 336688 10 10 10;
C_major, 00244557799 11;
C_minor, 0 02 335 577 88 10;
Figure 7.21
Scales stored in first coil, raw storage
0, 0;
0;
2;
4;
4,
5,
5;
7;
7,
9,
9;
11;
Figure 7.22
Scales stored in second coli, usable for mapping
PitchAnalyze o o o O O o o o
funnel 12
final pitch
Figure 7.23
Scale (subpatch of fig. 7.20)
Copyrighted Material
199 Composer Objects
in the first coil, giving a graphic display to the user who can check the
mapping for each pitch class and easily experiment with different
scales. Funnel takes single values in and creates ordered pairs, supply-
ing the address numbers for the next coli. As in the previous example,
this coli uses the pitch class as the index to output the mapped note,
adding back the register at the end. PitchAnalyze is simply an encap-
suiated version of an algorithm that separates pitch class from register.
The second coil below is reformatted, as in figure 7.22.
Scale is straightforward and easy to use. It could easily be expanded
to include the features found in the previous two examples. However,
beware of "feature creep." Feature creep refers to commercial software
companies' constant addition of new features to old software, even
though the old software is perfect for the job. The new features may
add confusion or be rarely used. Composer objects may have so many
capabilities that they lose their single purpose, or offer so many options
that their operation becomes confusing.
Copyrighted Material
200 Core Components
Takes flotes played from the keyboard and generates a melody based on the intervals played.
metro 300 I6
otein J
Direction J
makenote 77 300
noteout
Figure 7.24
Melodic contour: the easy version
Copyrighted Material
201 Composer Objects
Gets intervals from incoming pitches, and stores them in table intervals.
pitch
Figure 7.25
Getlnterval (subpatch of fig. 7.24)
Copyrighted Material
202 Core Components
counter 0 2
table intervals
Figure 7.26
Addlnterval (subpatch of fig. 7.24)
random 4
Selects a number between
1 and Direction.
Figure 7.27
RandDir (subpatch of fig. 7,24)
Copyrighted Material
203 Composer Objects
change
direction
Figure 7.28
UpDown (subpatch of fig. 7.24)
Copyrighted Material
204 Core Components
Takes notes played from the keyboard and generates a melody based on
the intervals played. The melody is kept within a user-specified range.
K
Maximum number of beats between
300 notein
V5 changes of melodic direction.
p UpDown
makenote 77 300
noleout
Figure 729
Melodic contour: the medium version
Places pitches within a specified range by adding to a low number or subtracting from a high number.
RangeMin RangeMax
input lower limit upper limit below add above subtract
RangeMin RangeMax RangeLowAdd RangeHighSub
Dont let the Dont let the If input is lower If input is higher
input fall input exceed than RangeMin, than RangeMax,
below this this amount. then add this then subtract this
amount. amount. amount.
selects input
less than 30 or split -127 30
RangeMin
adds 24 or + 24
LowAdd selects input greater than
split 110 256
110 or RangeMax
subtracts 24 or 24
HighSub pitches within range
output
Figure 7.30
RangeFlip (subpatcPKIÍQq Material
205 Composer Objects
300
number of voices
L
metro 300
notein
J
JVoiceNum
ripnote
random on/off
s RanVoice
G et Interval
range controls
p UpDown t36 I
RangeMin RangeMax
p RangeFlip
24 24
RangeLowAdd RangeHighSub
makenote 77 300
noteout
Figure 7.31
Melodic contour: the tricky version
Copyrighted Material
206 Core Components
r VoiceNum
random
+1
gate
r VoiceNum
bangs out
Figure 7.32
VoiceNum (subpatcti of fig. 7.31)
version. VoiceNum sends out one or more bangs for each one received
using Uzi (fig. 7.32). A single number to the left inlet of Uzi sends out
that many bangs immediately. A bang to the left inlet will continue to
send out multiple bangs. The number may also be set by the right inlet
(as in this example) or as an argument. In this way, it is possible to
make chords of two, three, four, or more notes with each metro bang,
all based on the same interval set. Another option, [s RanVoicel, uses
constrained random numbers to create a mixture of single notes and
chords, with the maximum number of notes per chord specified by
[s VoiceNumj. Thus, setting [s VoiceNumi to 3 and [s RanVoice] to on
will generate music with a mixture of single notes, dyads (two-note
chords), and triads (three-note chords).
stripnote
start/stop playback
set tempo
loo (defaults to tempo of recording)
EI
p ParamCollPlay
makenote
ParamCollplay plays the recorded melody.
noteout
Figure 7.33
ParamColl example
Copyrighted Material
208 Core Components
ParamCoiiRecorder uses four coils to store pitch, velocity, duration, and rhythm. All
subpatches use counters to pack the current event number (used as the index) with the data.
sei O i
Figure 7.34
ParamCollRecorder (subpatch of fig. 7.33)
start/stop tempo
Tempo
p PiayRhythm
PlayRhythm turns the metronome
beat into the rhythms recorded.
r Length
Figure 7.35
ParamCollPlayer (subpatch of fig. 7.33)
Sequencer Methods
Copyrighted Material
210 Core Components
method for a live interactive piece is for the composer to record the
performer's part using a seq, and then work with that file as a virtual
performer to do much of the programming and rehearsing without
the performer being there physically. That way, any problems that arise
within the program or the music can be discovered and ironed out
without wasting the performer's time. Analysis can be done on seq
using midiparse to separate the various parameters, but this is a job
more easily handled by detonate.
While ParamColl is a good study of how several analysis objects can
be coordinated with colls to generate musical variations, it is not a
very practical example since the detonate object already exists to re-
cord, edit, and playback most of the same information. In addition,
detonate records on multiple tracks, reads and writes MIDI files, and
displays all the data in a full-featured graphical editing window. In fact,
detonate uses delta time in the way suggested above for ParamColl,
Since it does not have an automatic timing mechanism, as does seq, it
usually gets its timing data from an analysis of the performed delta
times, stored in its left inlet. Other inlets are used to record pitch, ve-
locity, track number, MIDI channel, and there are two extra unspecified
inlets for any type of data (which could store the sixteenth-note rhyth-
mic values, for instance, or data from a modulation wheel or foot
pedal). All these parameters can then be viewed and edited in a graphic
score, or altered for playback with a variety of messages. Upon play-
back, detonate sends analysis data out separate outlets representing
delta time, velocity, pitch, duration, MIDI channel, track number, and
the two unspecified data tracks. Detonate is also very useful for under-
standing how complex and unpredictable composer objects work, by
capturing and displaying the musical output that shows the variations
that result from parameter changes.
Copyrighted Material
211 Composer Objects
Copyrighted Material
212 Core Components
notein
93 strip not
metro 200
% to Value to
tbb randomize randomize
random 30 15 11>89
+ 40 p Randomize
flotea ut
Figure 7.36
Randomize example
Copyrighted Material
213 Composer Objects
15 tb
converts input
to percentage 0.01
tb
*
calculates range of 0.5
± this amount
randomness
random
random amount
adds a positive or
+ negative random amount
to the original value
output 96
Figure 7.37
Randomize (subpatch of fig. 7.36)
Copyrighted Material
214 Core Components
Takes flotes played from the keyboard and generates melodies based on the intervals played. These
melodies are kept within a user-specified range and may tend toward one end or the other of that range.
40 300
p Randomize notein
J- j33 I
random set
p Randomize
duration duration RangeMin RangeMax
>60 300
makenote 77 300
J-
n oteo ut
Figure 7.38
Melodic contour: the hard version
Copyrighted Material
215 Composer Objects
p CaptureGesture p PlayGesture
Figure 7.39
CaptureGesture example
sel i O
s RecStart RecStop
notein
Borax clear
pack1
J
coil CGDuration.c
stores durations
Figure 7.40
CaptureGesture (subpatch of fig. 7.39)
gramming. CaptureGesture uses both a seq and a coli to store the data
it needs; the coil stores durations and the seq stores rhythm and veloc-
ity (fig. 7.40). CaptureGesture can use a seq to record a portion of a
performance or a prerecorded seq. On playback, it is parsed for delta
time, velocity, and duration (fig. 7.41). In this way, it stores a tempo
map in a very compact form. It can then use this timing and dynamic
information, based on phrasing and other expressive playing tech-
niques, to impart those qualities to composer algorithms. In figure
7.41, the bang outputs are used to drive a random pitch-generating
algorithm, accompanied by the original "feel" of the performance. In
this way, a phrase from a performer can be captured, and that musical
gesture applied to a different computer melody or other parameters.
eriaI
216 Core Components
tbb idiin
percentage of RecStop
original tempo 0.01
op
converts to seq scale 1* 1024.
st ri p note
pitches are converted
to bangs for playback
counter
random 3
+ 36 coli CGDuration.c
makenote 75 200
1
noteout
Figure 7.41
PlayGesture (subpatch of fig. 7.39)
The phrase can be played back slower or faster using tempo scale. This is
an interesting abstraction of a performance, since timing and dynamic
information do not have a life of their own separated from sound (De-
sain and Honing 1991). Composers will then find inventive ways to
apply these uniquely human properties to influence computer music
output.
CaptureGesture can also generate time-varying functions in con-
junction with Interpolator, which uses the line object to continuously
represent dynamic changes over time (fig. 7.12). These functions can
be used to control any parameters over time anywhere in the program,
imparting a live performance quality to the variable changes. These
continuous changes are especially effective for the continuous control
of timbre, vibrato, and signal-processing parameters.
Copyrighted Material
217 Composer Objects
These composer objects have shown just some of the diverse ap-
proaches to creating computer music using performer input based on
transformative, generative, and sequenced methods. These algorithms,
which represent a composer's tools and techniques, produce the mate-
rials and musical processes for a composition. In some cases, a few
simple algorithms may be very effective in producing short works. How
larger collections of objects are connected and how their events are
synchronized will be the focus of chapter 9. Resources for further study
are numerous, and additional examples are provided on the accompa-
flying CD-Rom. Of special note are several Internet sites where Max
programs are available for downloading.
Copyrighted Material