-
-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"within" not functioning as it should #313
Comments
The behavior is what I'd expect, the reference audio sounds wrong to me!
I don't know why the reference audio sounds weird. |
Hi @bgold-cosmos! Thanks to your reply I realize now that there are two ways of thinking about how this could work because there are two ways to chain up The way you're thinking about it (strategy A) is that first the original cycle is cloned (duplicated). Then Strategy A in pseudo code: The way I was thinking about it (strategy B) is that first the arc of notes in just the [0,0.2] interval in the original cycle are selected, producing (conceptually) a masked version Strategy B in pseudo code: New to Haskell AND new to tidal btw so please forgive me if I'm making a fool out of myself. |
I'm trying to understand how This would seem to be more in line with strategy B, right? Because it selects the arc before it applies the function. Sorry for the verbosity. Looking forward to hearing what you think! |
The order of the arguments doesn't really matter to Haskell. If you look at the source, If you want something like strategy B, that's possible, but I think a little more complicated, because when you "clone" the interval to apply the function you need to tell it to use the interval as a cycle boundary. You can do something like this (sorry for the lack of formatting) within' (s,e) f p = stack [
playWhen (\t -> cyclePos t >= s && cyclePos t < e) $ compress (s,e) $ f $ zoom (s,e) $ p,
playWhen (\t -> not $ cyclePos t >= s && cyclePos t < e) $ p
] So the new
|
nice! got your new function to work. haha you made that look easy. I see the old version of Would you like me to add your |
Go ahead! |
I'm assuming this is done, please reopen if not! |
When I type
d1 $ within (0, 0.2) (fast 2) $ sound "bd hh cp sd"
,I expect the equivalent of
d1 $ sound "[bd bd] hh cp sd"
but instead I heard1 $ sound "[bd hh] hh cp sd"
.Via the reference for the
within
function:d1 $ within (0, 0.5) (fast 2) $ sound "bd*2 sn lt mt hh hh hh hh"
When I copy this code and run it, it is different than the reference audio sample, instead applying
fast 2
to the hi-hats.The text was updated successfully, but these errors were encountered: