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 2Fundamentals:Adjustable oscillatorFade In <strong>and</strong> Fade OutThe combination of line~ <strong>and</strong> *~ also helps to avoid the clicks that can occur when theaudio is turned on <strong>and</strong> off. The 1 <strong>and</strong> 0 “on” <strong>and</strong> “off” messages from the toggle are usedto fade the volume up to the desired amplitude, or down to 0, just as the start or stopmessage is sent to dac~. In that way, the sound is faded in <strong>and</strong> out gently rather thanbeing turned on instantaneously.On <strong>and</strong> off messages fade audio in or out before starting or stopping the DACJust before turning audio off, the 0 from toggle is sent to the pack object to start a 100 msfade-out of the oscillator’s volume. A delay of 100 ms is also introduced before sendingthe stop message to dac~, in order to let the fade-out occur. Just before turning the audioon, the desired amplitude value is triggered, beginning a fade-in of the volume; the fadeindoes not actually begin, however, until the dac~ is started—immediately after, in thiscase. (In an actual program, the start <strong>and</strong> stop message boxes might be hidden from view orencapsulated in a subpatch in order to prevent the user from clicking on them directly.)SummaryMultiplying each sample of an audio signal by some number other than 1 changes itsamplitude; therefore the *~ object is effectively an amplifier. A sudden drastic change ofamplitude can cause a click, so a more gradual fade of amplitude—by controlling theamplitude with another signal—is usually advisable. The line segment signal generatorline~ is comparable to the Max object line <strong>and</strong> is appropriate for providing a linearlychanging value to the signal network. The combination of line~ <strong>and</strong> *~ can be used tomake an envelope for controlling the over-all amplitude of a signal.66

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

Saved successfully!

Ooh no, something went wrong!