Specifications

5.6 Common abstraction techniques 55
freq_2
freq_1
freq_3
freq_4
pack f f f f
t b f t b f t b f
outlet
(a) Packing a list
pd patch
dac~
pd programer
freq_2
freq_1
freq_3
freq_4
0.165354 0.19685 0.165354 0.110236
0.346 0.251 0.22 0.1653
list prepend set
(b) Making a programmer
fig 5.16: Packing and using parameter lists
the keyword set to a list, a message box that receives it will store those values.
Now we have a way of crea ting patch presets, because the message box a lways
contains a snapshot of the current fader values. You can see in Fig. 5.16 (right)
some empty messages ready to be filled and one that’s been copied ready to use
later as a preset.
Control normalisation
Most patches re quire different parameter sets with some control ranges betwe e n
0.0 and 1.0, maybe s ome between 0.0 and 20000, maybe some bipolar ones
100.0 to +100.0 and so on. But all the sliders in the interface of Fig. 5.17 have
ranges from 0.0 to 1.0. We say the control surfa c e is normalised.
pd patch
freq_2
freq_1
freq_3
freq_4
dac~
fig 5.17: All faders are
normalised 0.0 to 1.0
If you build an interface where the input parameters
have mixed ranges it can get confusing. It means
you generally need a customised set of sliders for each
patch. A better alternative is to norma lis e the con-
trols, making each input range 0.0 to 1.0 and then
adapting the control ranges as required inside the patch.
Pre-conditioning means ada pting the input parame-
ters to best fit the synthesis pamaters. Normalisa tion
is just one of the tasks carried out at this stag e. Occasionally you will see a
log
or
sqrt
used to adjust the parameter curves. Pre-conditioning ope rations
belong together as close to where the control signals are to be used as possible,
They nea rly always follow the same pattern, multiplier, then offset, then curve
adjustment.
Summation chains
Sometimes when you have a lot of subpa tches that will be summed to produce
an output it’s nicer to be able to stack them vertically instead of having many
connections going to one place. Giving each an inlet (as in Fig. 5.18) and placing
a
+~
object as pa rt of the subpatch makes for eas ier to read patches.
Routed inputs
A powerful way to assign parameter s to destinatio ns while making them human
readable is to use
route
. Look at Fig. 5.19 to see how you can construct arbitrary