d1
$ sometimesBy 0.5 (stutWith 3 (1/16) (|* gain 0.9))
$ s "bd*4"
I think I get why this doesn't behave like sending 50% of events to a delay. It seems like the stuttering is always happening and $ sometimesBy 0.5 Is letting half of the stuttered events through.
Could I somehow make a "sometimed" stut send every event through when sometimes triggers it?
So that half of what gets sent through gets the full stutter. Am I making sense?
I could probably work this out through studying basic syntax for another week but I'm impatient and think grasping this could help me wrap my head around some concepts.
Ah I see! Well this is how sometimesBy is defined:
sometimesBy x f p = overlay (degradeBy x p) (unDegradeBy x $ f p)
unDegradeBy does the opposite of degradeBy, so with 0.5 half of the events get the function f applied and half don't. But as you say the f gets applied before the (un)degrade, so the results of the function get degraded. so try running this before running your code:
sometimesBy x f p = overlay (degradeBy x p) (f $ unDegradeBy x p)
I'm not completely sure but I think you've found a bug, as I think people would always want this behaviour? In which case I'll release this as a bugfix.. Thanks!