Music 171 homework 4
Hats off to Wendy Carlos
First off if you have 2 free hours someday, do watch Stanley Kubrick's Clockwork
Orange - you'll never hear Beethoven the same way again. This assignment
is to make a simple polyphonic synth that (to my ears at least) hearkens somehow
to Wendy Carlos's soundtrack for that movie.
The assignment is to build a polyphonic wavetable synthesizer. The
synthesizer's design itself is quite simple - just two slightly detuned
oscillators each playing a hand-drawn waveform using tabread4~. The main
point of the exercise is to learn how to use Pd's abstraction mechanism to
manage four-voice polyphonic synthesis. There are more complicated examples
how to do this in the textbook, but this one can be quite simple - it should
just play four-note chords (or, in music speak, four-voice chords), set off
by simply sending a message with the four desired MIDI pitches. For example,
the first chord (C major) should be set off by a message box with these
contents:
48 52 55 60
To make the patch (each of the following steps is worth 2 points for a total
of 10):
- Make a patch that plays one voice of the synthesizer; you can call it
"voice.pd" if you want. The patch should take a pitch as input (either as an
inlet (easiest) or via a receive (neater but you'll have to use a "$" variable
to disambiguate it between the copies you'll later make)). The patch should
then have two wavetable oscillators in the style of the example patch,
01.15c-more-wavetables.pd, whose frequencies are set, respectively, to the
frequency corresponding to the desired pitch (via mtof) and to 0.5 Hz. higher.
Use a line~ - controlled envelope generator to control the amplitude of the
sum of the two oscillator outputs. (I squared the output of my line~ to get
a nicer-sounding envelope.)
- Make a network of message boxes and delay objects to send messages to the
line~ object to make an "envelope". On attack (which can be triggered every
time you receive a new pitch to play) make a fast attack up to 1 (the peak value
of 1 needn't be variable since there's no "velocity sensitivity", also known
as "dynamic control", needed in the patch). This way, you can square the output
of the line~ and the constant "1" will just translate again to "1". Another
message box after a delay equal to the attack time (the time you took to ramp up
to "1" should decrease the output to a "steady state" around 0.5 (after squaring
if you're going to square it, so about 0.7 before squaring in that case). Then
after another delay that will set the (constant) length of the note, around 1000
msec, "release" the envelope by ramping it gently down to 0 again.
- Either make a signal outlet for the voice patch, or else (more
sophisticatedly) use "throw"" to send all the amplitude-controlled outputs to a
shared "catch~. Now make a parent patch that invokes four of the voice patches
as abstractions, summing their outputs, but, since each of them will have a peak
amplitude on the order of 1, multiplying the output by 0.1 or so before sending
it on to a dac! object.
- Now make a few message boxes with chords (like the one above). THe first
six chords will suffice to make it clear that the patch is working. Use an
unpack object, invoked as "unpack 0 0 0 0" to get four outlets, to unpack the
messages' four arguments and rout them via lines or via send/receive, to the
four copies of the "voice" abstraction. At this point when you click on any of
the message boxes you should hear the corresponding chord.
- Put the two patches in an otherwise empty directory ("folder") which you
could name, for instance, "miller-homework-4" so that it's unlikely to clash
with anyone else's name; then make a zip archive of the folder and upload,
so that when it's unpacked it makes the directory with the two files in it;
upload the zip file and not the individual patches.
Your successful patch should sound something like
this.
Here's my version of the first six measures of score, not guaranteed to
have perfect voice leading:
48 52 55 60
45 52 57 60
41 50 57 62
43 50 55 59
45 50 57 60
47 50 55 62
48 55 60 64
45 57 60 64
41 57 60 65
43 55 60 64
44 53 59 62
45 52 57 60
41 53 57 62
43 52 55 60
43 50 53 59
36 52 55 60
back to music 171 main page