Difference between revisions of "fix"
From TidalCycles userbase
m |
m |
||
Line 16: | Line 16: | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:Higher-order functions]] | [[Category:Higher-order functions]] | ||
− | [[Category:Conditional | + | [[Category:Conditional Transformers]] |
Revision as of 22:28, 25 November 2018
Type: fix :: (ControlPattern -> ControlPattern) -> ControlPattern -> ControlPattern -> ControlPattern
The fix function applies another function to matching events in a pattern of controls.
For example:
d1 $ slow 2 $ fix (# crush 3) (n "[1,4]") $ n "0 1 2 3 4 5 6" # sound "arpy"
The above only adds the crush
control when the n
control is set to either 1
or 4
.
You can be quite specific, for example fix (hurry 2) (s "drum" # n "1")
to apply the function hurry 2
to sample 1
of the drum
sampleset, and leave the rest as they are.