Subsections
Figure 3 summary
- send bang to start once at load
- every 300 ms
- pick a random note from 2 octaves
- start on note 48
- convert midi number to Hz
- cosine/sine generator
- make it quieter
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.
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.
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.
C-random-sine-play.pd
C-random-sine-play.ogg
Andy Farnell
http://obiwannabe.co.uk/