.
To make the patch:
- Download this flute recording. Load it into
an array in your patch. (You can use the soundfiler object to load it; be sure
to use the "-resize" flag to get the array resized to the size of the soundfile.
To keep the patch file small, make sure the "save contents" flag is unset for the array.
- Using phasor~, tabread4~, and the techniques shown in class Tuessday, read through a
portion of the array. For testing you can use a 1-Hz. phasor (but you'll
change this as described below.)
Fix the range over which the phasor~ indexes the table so that you get a continuous tone (not starting and stopping) and so that you don't hear a click
when the phasor~ wraps around.
- Make another array, with 12 elements. Its y-value range should be set from
5 (for example) to 0 as you descend from its top to bottom. (How this should be
set depends on how high you want the sound to get and also depending on the
range you specify for the . My in-class example went all
the way up to 10). This table should control the frequency of the phasor~ object
described above, so that you hear a sequence of 12 different speeds of playback
(which will sound like 12 different musical pitches.) You will have to use
another phasor~ object to read the values in sequence, and a tabread~ object (no
interpolation!) to read the 12 values. This is the same operation as reading the
flute array except that the table only has 12 values instead of the many
thousands that the flute array will have. When you have this working you should
hear a sequence of 12 audible transpositions of the flute sound.
- Find reasonable frequency for the controlling phasor~ object, and
reasonable values to put in the 12-element array (which controls the pitches),
and a reasonable range of values over which to read the array holding the
recorded flute sound. Once this is working you should hear a sequence of 12
pitches that repeats forever.
- Once you hear the sequence of pitches, you can then duplicate the entire
patch (except the two tables/arrays). Use the phase offset technique (from
Tuesday's class) to generate a phase signal to replace the phasor~ object in
the second copy.
- Add controls to change the relative phase (smoothed with a line~ object so
that changing the phase doesn't cause clicks) and to turn the second copy on and
off (either using message boxes or a toggle switch), again using line~ to avoid
clicks. The ramp time for the phase change might have to be slower than that
for the amplitudes to avoid scratchy sounds when the phase difference is
changed.
as before, please submit a zip file containing the patch and support files
(the flute sample; the out1~ object; and whatever other files your patch uses).
Note: the included flute recording was downloaded from freesound.org.
It's on a Creative Commons
license (attribution; non-commercial), uploaded by Carlos_Vaquero.
back to music 171 main page