[home]
[policies]
[syllabus]
[signup]
[CECM]
Assignment 8: Max/MSP data structures and comb filters
You can store any type of data — pitches, file names, delay parameters,
etc. — in a coll object and recall the data later.
Make a patch that applies a bank of comb filters to either a sound file or
live input. Tune the comb filters to chords drawn from a coll, and
trigger the chords with the computer keyboard.
- Review the coll object
(Max Quickstart: “11 data structures”).
Don’t forget to use the “save data with patcher”
setting, unless you want to learn how to store the contents of a coll
in a text file.
- Set your patch up to switch between file and live input with a
selector~. Provide a meter~ and gain~ slider.
- Make a bank of four comb filters, using four copies of the comb~
object. Use “15 0 0.5” as the arguments (and look up what
these mean). Run the output of the selector~ into each of the
combs, in parallel.
- Connect the four combs to left and right output faders in alternation,
so that you can generate a stereo effect from a mono source. (In other
words, combs 1 and 3 go to the left output, 2 and 4 to the right output.)
- Provide a global feedback control that affects all the combs. This goes
into the feedback coefficient inlet of comb~. The number should
be between 0 and 1. Don’t let it go above 1, or the filter will
blow up. To get much resonance out of the combs, this will need to be
around 0.9 or above. Below about 0.7, you won’t hear any resonance,
just a variable stereo width effect.
- You tune the combs by setting the delay time to the period of the pitch
you want to resonate. Recall that period = 1 / frequency. You will be
storing pitches as MIDI note numbers in the coll. Build some logic
to convert these pitches into delay times (in milliseconds) for use by
comb~. The !/ object is your friend.
- Create a coll, and edit it so that you store eight 4-note chords.
Use index numbers between 1 and 8.
- Scan the computer keyboard for the typing tutor keys: 'a', 's', 'd', 'f',
and 'j', 'k', 'l', ';'. Use these to select the eight chords stored in the
coll. (See Max Quickstart: “06 matching numbers”.)
- When you send an index number into the coll, it spits out the
4-note chords at that index as a list. Use unpack to distribute
these notes to your pitch-to-delay-time converters.
- Apply a low-pass filter, with adjustable cutoff frequency, to the output
of the combs. (Use either onepole~ or biquad~ for this.)
You need one filter per output channel. This will let you tame the
buzziness of the combs.
- Make a nice user interface with Presentation Mode. Select an object,
and choose Object > Add to Presentation to see that object when you
switch to Presentation mode (View > Presentation). To make your
patch open in Presentation mode, choose View > Patcher Inspector,
and check the the Open in Presentation box. Save and re-open the patch.
©2011, John Gibson