One can apply functions to the properties of event lists, as in the following example, which creates a drum roll and applies a crescendo modifier to it.
[ | roll decresc |
roll := ((Roll length: 3000 rhythm: 150 note: 60) ampl: 120) eventList.
decresc := Swell new function: (ExponentialFunction from: #((0 1 4) (1 0))).
decresc applyTo: roll.
roll play]
Similarly, the following changes the tempo of the drum roll.
[ | roll rub |
roll := ((Roll length: 5000 rhythm: 150 note: 60) ampl: 80) eventList.
rub := Rubato new function: (LinearFunction from: #((0 1) (1 0.5))).
rub applyTo: roll.
roll edit]