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

Add binary and binaryN #1226

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Add binary and binaryN #1226

wants to merge 9 commits into from

Conversation

heerman
Copy link

@heerman heerman commented Dec 11, 2024

Create patterns from binary, such as binary(5) -> "1 0 1".

"hh".s().struct(binary(5))
// "hh".s().struct("1 0 1")
"hh".s().struct(binaryN(55532, 16))
// "hh".s().struct("1 1 0 1 1 0 0 0 1 1 1 0 1 1 0 0")

From tidal cycles https://userbase.tidalcycles.org/binary.html

Addresses #670

@heerman
Copy link
Author

heerman commented Dec 11, 2024

Hey, this is my first contribution to strudel. Loving strudel and the live coding community!

@felixroos
Copy link
Collaborator

great stuff thanks :) the test is still failing, you can fix it by running pnpm codeformat

@felixroos
Copy link
Collaborator

tests now failing.. you can fix it withm pnpm snapshot i think. also it would be ace if these functions appeared in the docs, maybe here: https://strudel.cc/learn/factories/ (generated from factories.mdx)

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.

2 participants