Subsections
Figure 8 summary
- scale to 0 - 1
- invert amplitude range
- use note as decay time
- attack and decay
- filtered noise
- amplitude envelope
Our third synth creates splashes of noise in different frequency bands
so it can be used for snare or hihat like effects. We filter some
white noise using a bandbass filter, [bp~ 100 0.5] which has its
center frequency controlled by the MIDI note frequency.
You can see how we adapt the MIDI
note number so that we get a quieter and shorter sound when the
frequency is higher. Dividing the full note range 0 to 127 with [/127]
gives us a normalised value from zero to one. The combination of
[swap 1] and [-] is an idiom that inverts a normalised signal, so that
it ranges from one down to zero as the input increases. A [swap]
object exchanges its inputs, so when used with [-] we get 1 minus x for
an input x.
For an envelope we have used an ordinary [line~], activated
by a message producing a variable decay envelope. The decay range is
substituted in $1, a value ranging between zero and 400
milliseconds. Notice the second part of a message to [line~] can
be omitted when it's a zero in the first position.
Where we use $1, $2 etc
9 in a message box, each is
replaced by the value of any corresponding list element that appears
at the message box inlet. In this case a float in the range 0 to 400
will replace $1 in the list so it becomes something like
[1, 0 390(, the MIDI note now controls the decay time.
Finally we sculpt the frequency range of the filtered noise with a little EQ in the
form of a [lop~] final stage, and then boost it back to reasonable
level. [lop~] is a simple low pass element with one parameter
for its cutoff frequency.
Do not use $0 in message box lists as this has a special meaning.
F-synth3.pd
Andy Farnell
http://obiwannabe.co.uk/