Skip to content
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

if first argument of euclid is negative, apply euclidInv #916

Merged
merged 2 commits into from
May 29, 2022

Conversation

polymorphicengine
Copy link
Collaborator

this is also patternable.

Copy link
Contributor

@ndr-brt ndr-brt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you

src/Sound/Tidal/UI.hs Outdated Show resolved Hide resolved
@@ -756,7 +758,7 @@ euclid = tParam2 _euclid

_euclid :: Int -> Int -> Pattern a -> Pattern a
_euclid n k a | n >= 0 = fastcat $ fmap (bool silence a) $ bjorklund (n,k)
| otherwise = _euclidInv (-n) k a
| otherwise = fastcat $ fmap (bool a silence) $ bjorklund (-n,k)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? bjorklund should be called with (n,k)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is correct, this is the case of n < 0, so -n > 0 (otherwise bjorklund wouldn't produce anything). Note the reversed order of a and silence

Copy link
Contributor

@ndr-brt ndr-brt May 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, right, I did a wrong assumption! So ok for me 👍

@yaxu yaxu merged commit a6bbd63 into tidalcycles:main May 29, 2022
@yaxu
Copy link
Member

yaxu commented May 29, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mini-notation for euclidInv
3 participants