Music 171 assignment 7 (due Feb. 24): waveshaping example

Assignment 7 is to make a monophonic (1-voice) waveshaping instrument, using the techniques developed in chapter 5 of the textbook. The instrument should play a sequence of notes to demonstrate the time-varying timbre you get when changing the amplitude of the incoming wave that is "waveshaped".

The incoming signal can just be a sinusoid, multiplied by an envelope generator (a line~ object with controls to make it rise and fall over the life of each "note"). This goes into a nonlinear transfer function which could be a polynomial, an exponential, or just a cos~ object. If you use a cos~ object, it's a good idea to add a constant offset to the sinusoid so that you don't only get odd harmonics.

Then as in the previous homework, make a simple repeating sequence of notes for the instrument to play. This can be done using "control" (message" objects driven by a metro.

The result might sound like this.

For extra credit, extend the instrument as described for homework 3 (but note that, since the sequencing is done using control messages, it's not so horribly complicated to do as it was then). If the sequence has 16 notes (as the example here does), make every third note have a sharper timbre than the others. The result should sound something like this.