The
fix function applies another function to matching events
in a pattern of controls.
fix is
contrast where the
false-branching function is set to the identity
id. It is like
contrast, but one function is given and applied to events with
matching controls.
For example, the following only adds the
crush control when
the
n control is set to either 1 or 4:
d1 $ slow 2
$ fix (# crush 3) (n "[1,4]")
$ n "0 1 2 3 4 5 6"
# sound "arpy"
You can be quite specific; for example, the following applies the
function
hurry 2 to sample 1 of the drum sample set,
and leaves the rest as they are:
fix (hurry 2) (s "drum" # n "1")