next up previous contents index
Next: Conversion between frequency and Up: Examples Previous: Smoothed amplitude control with   Contents   Index

Major triad

Example A05.output.subpatch.pd, whose active ingredients are shown in Figure 1.12 (part c), presents three sinusoids with frequencies in the ratio 4:5:6, so that the lower two are separated by a major third, the upper two by a minor third, and the top and bottom by a fifth. The lowest frequency is 440, equal to A above middle C, or MIDI 69. The others are approximately four and seven half-steps higher, respectively. The three have equal amplitudes.

The amplitude control in this example is taken care of by a new object called output~. This isn't a built-in object of Pd, but is itself a Pd patch which lives in a file, ``output.pd". (You can see the internals of output~ by opening the properties menu for the box and selecting ``open".) You get two controls, one for amplitude in dB (100 meaning ``unit gain"), and a ``mute" button. Pd's audio processing is turned on automatically when you set the output level--this might not be the best behavior in general, but it's appropriate for these example patches. The mechanism for embedding one Pd patch as an object box inside another is discussed in Section 4.7.


next up previous contents index
Next: Conversion between frequency and Up: Examples Previous: Smoothed amplitude control with   Contents   Index
Miller Puckette 2006-09-24