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

mini notation reference table should mention chooseBy for random choice #67

Open
jwaldmann opened this issue Dec 9, 2021 · 2 comments

Comments

@jwaldmann
Copy link

the table in https://tidalcycles.org/docs/reference/mini_notation
does not give an equivalent source-level function for "random choice" ([ .. | .. ]).

The implementation uses chooseBy https://github.com/tidalcycles/Tidal/blob/main/src/Sound/Tidal/ParseBP.hs#L120 , so it could be mentioned in the table. Cf. "randomly remove (?)" and `degradeBy.

I can make a PR, but want to ask for comments first. Perhaps it was a deliberate omission?

@jwaldmann
Copy link
Author

Ah, now I see that's not choose(By) alone, because its type is choose :: [a] -> Pattern a, combining just values, while we want to combine patterns here. The implementation uses unwrap . segment 1 . choose (essentially)

So, perhaps add a reference to choose?

@jqueraltmo
Copy link
Collaborator

The example in the docs works the same as d1 $ segment 1 $ s (choose ["bd","cp","hh"]). I'll put this as equivalent if nobody says otherwise.

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

No branches or pull requests

2 participants