Tidal
Tidal copied to clipboard
Mininotation can take patterns after symbols e.g. ~ @ _ and ?
Currently, it is possible to use patterns inside the mininotation e.g.
setB "kick" $ fast (irand 16) "t"
d1 $ struct "^kick 1@3 1@2" $ s "bd"
However, it seems that mininotation does not allow to use patterns after symbols such as ~
, @
and _
.
The following example will not give the desired outcome:
do
let n = irand 8
d1 $ struct "t!^n f@^n t@^n" $ s "p_bd"
In fact, it produces only one possible outcome.
Although workarounds exist as noted by @bgold-cosmos e.g.
setB "kick" $ fast (irand 16) "t"
d1 $ struct "^kick 1@3 1@2" $ s "bd"
I think it would be nice to have such an option.
PS: it might be totally possible that I am using the wrong syntax, if so what is the correct way of doing it?
Just to rephrase the underlying problem is that e.g. "1@<3 4> 2" :: Pattern Int
doesn't work.
Apart from technical issues, one possible point of confusion is that the notation for !
and _
allows spacing, so you can write things like "bd ! ! sn"
or "bd !2 sn"
. But if you can modify them with patterns, then both of these are allowed
n "0 ! ! <1 2>"
n "0 ! !<1 2>"
but probably were intended to mean completely different things
Just to rephrase the underlying problem is that e.g.
"1@<3 4> 2" :: Pattern Int
doesn't work.
True that! I remember I came up some time ago with the same exact problem, check this question on Tidal club.