Using 'When' or 'Fix' with patterned cps

Hi, still very new to tidal and I'm trying to see if it's possible to apply a function when the cps is at a certain rate. So for example if I had something simple like

d1
    $ s "bd*4 sn*4"
    # cps "0.2 0.6"

How would I apply (fast 2) for example, or anything else, if the cps value was at 0.2
I've tried to take a look and I would guess when or fix would be the answer but I can't seem to get them to work. Think it's me getting confused with control patterns but I'm not sure. Any help would be appreciated!

there are clunky ways around it that I can think of - using a common binary pattern and stitch, eg

let pat = "<0 1>
in
d1 
$ fast (stitch pat "2" "1")
$ s "bd*4 sn*4"
# cps (stitch pat "0.2" "0.6")

(should work, I don't have a test system handy I'm afraid)

This isn't a conditional based on the cps value though, it's just matching fast and cps to the same binary pattern

Ah yes that does work. Thanks very much! Wonder if there is still a way to make something like this conditional on actual cps value though, but either way this is a good work around. thank uuu

1 Like