13.07.2015 Views

Tutorials and Topics - Peabody Computer Music

Tutorials and Topics - Peabody Computer Music

Tutorials and Topics - Peabody Computer Music

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Tutorial 1Fundamentals:Test toneWavetable synthesis: cycle~The best way to produce a periodic waveform is with cycle~. This object uses thetechnique known as “wavetable synthesis”. It reads through a list of 512 values at aspecified rate, looping back to the beginning of the list when it reaches the end. Thissimulates a periodically repeating waveform.You can direct cycle~ to read from a list of values that you supply (in the form of an audiofile), or if you don’t supply one, it will read through its own table which represents a cycleof a cosine wave with an amplitude of 1. We’ll show you how to supply your ownwaveform in Tutorial 3. For now we’ll use the cosine waveform.Graph of 512 numbers describing one cycle of a cosine wave with amplitude 1cycle~ receives a frequency value (in Hz) in its left inlet, <strong>and</strong> it determines on its own howfast it should read through the list in order to send out a signal with the desiredfrequency.Technical detail: To figure out how far to step through the list for eachconsecutive sample, cycle~ uses the basic formulaI=ƒL/Rwhere I is the amount to increment through the list, ƒ is the signal’sfrequency, L is the length of the list (512 in this case), <strong>and</strong> R is the audiosampling rate. cycle~ is an “interpolating oscillator”, which means that if Idoes not l<strong>and</strong> exactly on an integer index in the list for a given sample,cycle~ interpolates between the two closest numbers in the list to find theproper output value. Performing interpolation in a wavetable oscillatormakes a substantial improvement in audio quality. The cycle~ object useslinear interpolation, while other MSP objects use very high-quality (<strong>and</strong>more computationally expensive) polynomial interpolation.By default cycle~ has a frequency of 0 Hz. So in order to hear the signal, we need to supplyan audible frequency value. This can be done with a number argument as in the example59

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!