Subsections

random midi note sine wave

Figure 3 summary

Randomness

So now we can connect the random number generator and get an octave of notes in a western chromatic scale, a wandering melody. Each number is as likely to occur next as all the others, including itself so some notes may appear to hold for more than one period. [random] is actually a pseudo random number generator that follows a very long but theoretically repeatable pattern, although distribution of the numbers is essentialy random. Because the object starts in the same initial state when a patch is loaded you hear the same random sequence unless you "seed" [random]. This can be extremely useful in composition to have control over, whether a sequence is predictable but complex, or completely unpredictable.

Loadbang

There is a new [loadbang] object right at the top of the signal path. This emits one bang when the patch is loaded, so it automatically starts the metronome. Having control over this is useful, you may not want to have to switch on every process in your programs, some must start automatically.

Volume control

This patch is made slightly quieter by multiplying the audio signal by 0.3, which is a useful scaling amount when mixing musical signals. In computer composition it's best to work with plenty of headroom until you need to mix something down, about one third of FSD is a fine place to work from.
Figure 3: random-sine
\includegraphics[angle=0, scale=1]{/home/zero/PRODUCTION/TEACHING/PD/Composition-000/images/C-random-sine-play}
C-random-sine-play.pd C-random-sine-play.ogg
Andy Farnell
http://obiwannabe.co.uk/