I'd like the value for this
every to go from 6 to 2 (and stay at 2) over the course of say 64 cycles:
every 6 (fast 2)
I thought of trying something this but I get errors:
every (trigger 1 $ range 2 6 $ slow 64 $ envL) (fast 2)
It looked like an integer/float error so I thought maybe I needed some rounding, but I get different errors:
every (floor <$> trigger 1 $ range 2 6 $ slow 64 $ envL) (fast 2)
I'm not sure if counting is needed here, so maybe this is in the wrong thread. Sorry if so...
Or maybe I could do this with a list?
Anyway, it feels like the answer might be more simple than it seems. Any guidance would be great.
(Moved to its own thread, it is related to counting but not really to state)
The only problem with your attempt is that
$ has the lowest precedence than
<$> splitting things up like this:
every ((floor <$> trigger 1) (range 2 6 $ slow 64 $ envL)) (fast 2) $ sound "bd sn"
It seems to work if you give a bit more help with parenthesis:
every (floor <$> (trigger 1 $ range 2 6 $ slow 64 $ envL)) (fast 2) $ sound "bd sn"
That makes sense thanks @yaxu! At least I was close, lol.
As an aside, I'd thought I'd seen that
every could now take decimal numbers. Was I imagining that? Is there a way to do something like
every 1.5 for instance?
Conceptually I think it would make sense / be cool to have
every work with fractional cycles but I could be wrong.
PS: I have another question that feels very basic but stopped me: is there a way to go through a list in order and then remain on the last value? So in this case after
every goes through it's numbers it stays on 5 and doesn't wrap around?
d1 $ every "<2 3 4 5>" (hurry 3.5) $ sound "bd sn"