Music 171 homework 3 (due Jan. 29)
Make a patch that plays ascending A-major triads (frequencies of
440, 550, and 660 are fine, but you may use the tempered pitches if
you prefer them.) A number box, which the patch should initialize
to 6, should control the number of notes per second. (The whole
3-note sequence should repeat at 1/3 that rate.) Use an array of
numbers to control the pitches via the "tabread~" object. (There
are other ways to accomplish this, but please stick to this method
for now.)
There should be easy-to-find buttons to start and stop the sound
(by controlling the output amplitude), as well as teh control to
change the rate. If you've done it right, using a negative number
for the rate should reverse the order the three pitches rotate
in.
To do this you might need to:
- use a 'loadbang' object to initialize a number box
- use a text message to an array to get numeric values into it
(see help for arrays)
- use the 'tabread~' object to get values out of an array as an
audio signal
It should sound like this.
For extra credit, make alternating tones have two different
timbres, one sinusoidal, the other a hand-drawn waveform. Since the
pattern of pitches is three long, the whole thing will only repeat
after six notes in stead of three. To do that you might need
to:
- make a network that cross-fades between two audio signals
- use the tabread4~ (or tabosc4~) object to oscillate with a
given waveform;
- use a third table (interpolating so you don't get clicks) as a
signal to control a cross-fade.
The result should sound something like this.
back to music 171 main page