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 play function #758

Merged
merged 2 commits into from Oct 26, 2023
Merged

add play function #758

merged 2 commits into from Oct 26, 2023

Conversation

felixroos
Copy link
Collaborator

@felixroos felixroos commented Oct 26, 2023

The play function allows adding a pattern to the scheduler, as an alternative to stacking it in the bottom:

stack(
  s("bd"),
  s("~ cp")
)

can now also be written as

s("bd").play()
s("~ cp").play()

this is also how it already works in https://github.com/tidalcycles/strudel/tree/main/packages/web

@felixroos
Copy link
Collaborator Author

play now also returns the pattern itself, which opens up some interesting patterning possibilities:

s("rim(3,8)")
  .pan(0).play()
  .pan(1).rev().play()

@felixroos felixroos merged commit 5958c69 into main Oct 26, 2023
2 checks passed
@felixroos felixroos deleted the play-function branch October 26, 2023 12:14
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.

None yet

1 participant