Music 172: assignment 7

Assignment 7 is to recreate the famous 'mutron' guitar effect.

This is nothing but an envelope follower controlling the center frequency of a bandpass filter. The envelope follower measures the short-term power of the signal. When you play a note on a guitar, the power jumps up and then decays off over time, and so it makes an ideal "envelope" to control a filter (among other possibilities).

To start with, make a simple looping sampler to read the supplied guitar sound (or your own if you would prefer a different tune). My loop went from the beginning and lasted 4650 msec). Here is the guitar sample I used.

Next, make an envelope follower (don't just use "env~" because you will want to adjust the response speed which env~ doesn't allow in real time). To do that, square the guitar loop signal and lowpass the result. I used a series of two lop~ objects, one with a cutof of 80 and the other with 160; the choice of frequencies will affect the response speed of the envelope follower.

Noticing that the "power" outputs thus obtained were on the order of 1/1000, and wanting a filter frequency range on the order of 1000 Hz, I multiplied by a seemingly absurd number (10 million, 1e7) and then added 140 to avoid getting values below that. I then clipped the result between 0 and 1000 because it sometimes spiked wildly. You can use your own judgement -- you might want to make a table to control how the result is applied to the next step.

finally, going back to the guitar loop signal, send it into a "vcf~" object whose "q" is between 3 and 10 or so and whose center frequency is controlled by the massaged envelope follower signal you made above. And voila.

Here is my sample output.