Thanks a lot, Alex!
Here's my cobbled-together attempt at a simplified Steve Reich's "clapping music".
I'm not repeating each shift of the pattern 12 times, but rather 2 (best heard when using the "debugging" arpy-pattern instead of the clap:3-pattern). Still, towards the end of the 12ths shift the displacement seems to be less then an 8th note.
hush
resetCycles
setcps (-1)
setcps 0.4
twelfthPat = "<0.0 8.333333333333333e-2 0.16666666666666666 0.25 0.3333333333333333 0.4166666666666667 0.5 0.5833333333333334 0.6666666666666666 0.75 0.8333333333333334 0.9166666666666666 1.0>/2"
clapPat = "arpy:7 ~ ~ ~ arpy:8 ~ ~ ~ arpy:9 ~ ~ ~" -- for debugging
clapPat = "clap:3 clap:3 clap:3 ~ clap:3 clap:3 ~ clap:3 ~ clap:3 clap:3 ~"
d1 $ stack [
sound clapPat # pan 0,
twelfthPat <~ (sound clapPat) # pan 1
]
There were two issues apart from the wrong displacements mentionend above:
I didn't manage to get the patterns to start synchronously at the beginning.
Also, generating the pattern of 12ths-shifts like this:
import Text.Printf
twelfthPat = "<"++ concatMap (printf "%f ") [ x/12 | x <- [0..12]] ++ ">/2"
failed. I had to print the twelfthPat
variable and then copy the output from the status window and paste it as a literal string:
"<0.0 0.08333333333333333 0.16666666666666666 0.25 0.3333333333333333 0.4166666666666667 0.5 0.5833333333333334 0.6666666666666666 0.75 0.8333333333333334 0.9166666666666666 1.0 >/2"
I'm eager to learn about more Tidalish ways to achieve this!
Thank you!