Question about stut/ply and the like

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.

Questions always welcome! I guess you're after this, degrading the pattern before sending on to stutWith:

d1  $ stutWith 3 (1/16) (|* gain 0.9)) $ degradeBy 0.5 $ s "bd*4" 

No not quite, I see why you would get that though. I didn't do the best job of explaining.

I want to keep the structure going into stutWith but only have half of 'em stuttered.

1 Like

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!

1 Like

Ahh.. That's what it used to be until @kindohm reported it as a bug: https://github.com/tidalcycles/Tidal/issues/464

hmm!

Hah, this is what I like about open source platforms.

Will you release this fix as an update any time soon or could I implement it myself?

It's already released in tidal 1.7. The old behaviour that @kindohm wanted is available as sometimesBy' although a different approach is here https://github.com/tidalcycles/Tidal/issues/464#issuecomment-767159213

1 Like

Oh right! It's working!

2 Likes

Thanks for the heads up!