Electronic Studio Resources II: Assignment 8 — Max: Intro to Audio
If you’re having trouble with the material, focus on tutorials 8-10 and 12.
Use a microphone input to bring sound into the patch, and process this sound before sending it to the speakers. Process by using a delay line (with feedback) in some configuration and also some sort of filter. Provide a way to change the delay time smoothly. See below for implementation hints.
Consider this patch as practice for doing the simplest kind of Max piece for acoustic instrument and computer: one in which the performer, using a foot pedal (or the computer operator, using the space bar), steps through several fixed-media cues while performing the piece. This allows the performer to have more control over the time flow of the piece than she would if playing with a CD or single sound file (or tape in the old days). See below for hints.
If you want to use the Mackie mixer, its group out 1-2 will appear as channels 5-6 in Max. To use the left input of that pair, go to Options > Audio Status in Max, and change the Input Ch 1 popup menu from Input 1 to Input 5.
The live.gain~ slider lets you control the level of the input signal reaching the rest of your patch. Again, merely turning this fader down will not prevent clipping that is happening prior to the sound entering Max.
WARNING: When testing this patch with a laptop’s built-in microphone, be sure to use headphones. Otherwise, you will get loud feedback, due to the proximity of the laptop speakers to the mic.
Constrain the delay time value so that it cannot be negative or greater than the maximum delay time you allow for your delay line.
Constrain the feedback value so that it cannot be less than -1 or greater than 1. (Use the Inspector to set up these constraints on your number boxes or sliders.) If you allow feedback factors outside of this range, feedback will grow quickly to very high levels.
When using playlist~, you will find that moving your patch folder to a different place in the file system or to a different computer will make it impossible for Max to find the file you had loaded into the playlist~, even if it’s in the same folder. To get around this, make a message box with this contents:
clear, append mysoundfile.wav 1and connected it to the playlist~ inlet. Trigger the message box from loadbang. If your sound file name contains spaces, first: stop doing that, second: if you must do that, enclose the entire file name in straight (not curly) double quotes.
It’s a good idea also to detect a space bar press (using the key object and another sel) as an alternative to using a MIDI pedal. This way, someone can operate the patch for the performer, if they don’t want to use a pedal. Also, some USB foot pedals simulate a space bar press, instead of transmitting MIDI messages, so this allows that kind of pedal to work.
Set up your counter to start with 1 and count to some maximum that is much higher than the number of cues you have (such as 999). That way, there will be no chance of accidentally starting the piece over after giving the final cue (due to the counter automatically looping).