Sky Frostenson
DSP / Max/MSP / pd experiments
(course site for ACE 277 WI04, Musical Applications of DSP, instructor Chris Dobrian)
revision note (05/22/04)
i've noticed this page gets the occasional hit from people searching for noise gate patches, etc. -- everything below is assignment work for the class mentioned above, but hopefully you'll find something along the lines of what you're looking for, as long as you're here. it's all pretty basic stuff, but feel free to drop me a line if you found anything useful or if you have any questions. contact info is on the front page.
max patches are in txt format for easy cross-platform compatibility.
take-home final assignments
For the final take-home assignment I attempted to do assignments 1, 3, and 4.
Assignment 1 -- read in sound file, draw an amplitude envelope (amp_env.txt)
Here I attempted to create a Max patch that reads in a sound file and draws a graph of its amplitude envelope. The file is read into a buffer, then the groove~ object reads through the buffer, with the audio signal sent to a peakamp~ object. Since the right output of groove~ ramps from 0 at the beginning of a sample to 1 at the end, I used snapshot~ to keep a normalized time record, which is sent as the first input to a function graph. The second input to the function graph is the output from peakamp~. Both peakamp~ and snapshot~ are locked to a single time interval value, which can be set to any millisecond interval. Even at sizeable time intervals (~100ms) the amplitude envelope graph seems reasonably accurate (at least for the test files I was using).
Assignments 3 & 4 -- use fm synthesis to emulate an electric guitar, use midi bendin to change pitch (fm_synth.txt)
For this patch I attempted to include a MIDI bendin feature in a FM synthesis guitar emulation patch, effectively combining assignments 3 & 4.
The FM synthesis portion of the patch is based mostly (but not exactly) on the Schottstaedt stringed instrument example on pages 135-136 in the Dodge and Jerse textbook. It is also derivative of the pd FM synthesis examples seen in class. With that as a starting point, I essentially just played with different arrangements and parameters, finally going with what seemed to sound the most like an electric guitar. I had problems finding the optimal modulation frequency for varying carrier frequencies, so after experiementing with that for a while it seemed like a good carrier to modulation frequency ratio was 3 to 1, so that's why the main modulation frequency is simply the carrier frequency divided by 3. The other modulating oscillators that receive the carrier frequency and their parametric values are based directly on the aforementioned book example. To be honest, I'm not sure how much they really increase the “spectral richness” of the tone, as the book suggests they should, but I left them in anyway. The amplitude and modulation envelopes aren't really based on anything other than intuition and experimentation. Obviously a guitar should have a strong short attack and a long slow decay, so I tried to illustrate that in the amplitude envelope. The only real problem I noticed in the overall sound was a very slight filter-like sweep as the signal decays, and I wasn't sure how to get rid of that, or if it was even possible.
To automate the progression through the guitar's open strings (E, A, D, G, B, E) I used the coll object with a list of MIDI note numbers saved in the coll. It is controlled by a metro object with a variable time interval. One can also step through the strings one by one. In addition, I set up a drunk object for random note playback, and there is also a keyboard attached for more specific input.
As for the MIDI pitch bending, I tried to incorporate what I thought was the spirit of the assignment, though I wasn't able to test it with an actual MIDI input device. I tried to set up a bendout object in the hope that bendin would pick up its messages, but apparently (and not surprisingly) things don't seem to work that way. As a sort of cheat, I added a slider (that was supposed to control the bendout object) that ranges from -2 to 2. The output from that slider is fed into what was supposed to be the bendin's output, which is then added to the MIDI message coming from the coll, drunk, or keyboard objects. Then mtof converts it into the frequency number which is fed to the FM synth patch. The slider works to alter the pitch, although only in discrete pitch levels. I note this because I seem to remember most MIDI pitchbend sliders I have used in the past having a more continuous effect.
final project -- pseudo tape delay emulator
paper (pdf format)
Max/MSP patch
for best results use a tinny-sounding reggae loop, download one here
final project status report
here's my progress so far in emulating an analog tape delay system. right now it's basically a variable delay through a lowpass filter. it has a lot of that dub delay sound already. i'm going to work this week on emulating more of the physical characteristics of a tape system, like pre- and post-emphasis filtering, wow and flutter, and soft saturation. i realize some of those things are going to be easier than others to implement, so i'll be trying to implement the easy ones first. i'm also thinking about putting less emphasis on strict emulation of the old device, with more emphasis on creating a delay processing system that's at least inspired by the old device.
week 8 assignment
all files used this test file as input: test12.wav
noisegate.txt - simple noise gate, no line ramp
noisegate_innout.txt - simple noise gate, no line ramp, designed as subpatch for use with use_subpatch.txt and adc_use_noisegate.txt
noisegate_wline.txt - noise gate with line ramp, but not sure it's working properly, so i didn't incorporate it into the other patches, although that would be easy to do.
week 4 assignment pt.2
Space guitar -- does the same thing as the guitar emulator below, only with different settings, and I added another adjustable FM oscillator which makes it sound like a... space guitar. At least that's what I'm calling it. Audio example here.
week 4 assignment
Electric guitar emulator -- reads and plays through a score of midi notes as a plain text file at variable speed. the current score is an except from AC/DC's Thunderstruck. A collection of oscillators allows for real-time timbre shifts for control over distortion. Two examples for your listening pleasure: 1 and 2. Screenshot here. Score here.
week 2 assignment
I more or less rewrote the original putwave.c in java (test01.java, test01.class, results.txt) with a few modifications, but didn't get much further than that due to a whole lot of problems trying to implement the Java API. Weak, I know. Next time i'm working in c. Anyway, the main difference in my java version is that the central frequency is now blended with two others with a random offset of as much as 40 Hz, which should occasionally result in beats. However, this is unverified because I haven't been able to put a header on the output file.
past pd work:
![]() |