-
-
Notifications
You must be signed in to change notification settings - Fork 133
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 useful pattern selection behavior for performing. #897
Conversation
It looks like the tests did not like the setCps() function added to the examples, is there a way around this, or should I just remove it? |
good one! it should be noted that there are a lot of edge cases around the pattern tab that have to be tested manually (mainly to make sure the previously opened pattern is not accidentally overwritten when loading another one)
all functions used in tests have to be present in test/runtime.mjs (many are just stubs, as not relevant for testing hap output only). But I don't think the setCps is needed, as shuffling will reset the cps to 1 anyway: strudel/website/src/repl/Repl.jsx Lines 156 to 163 in 0506e4a
same for strudel/website/src/repl/Repl.jsx Lines 142 to 146 in 0506e4a
|
Okay I made it so that clicking on an example pattern will run reset, and reversed changes on the example patterns Regarding the edge cases causing overwriting patterns, yes I discovered that as I was working on this feature :o I believe I solved for them all after a lot of manual testing |
fixed some merge conflicts after #891 |
just tested it and it's super handy! I've noticed some minor things:
I don't think these are very critical and they might be fixed in a future PR. There is now also #910 which probably conflicts with this one. |
|
Maybe we do not need the examples displayed now that we have community patterns? we could also split it into community and user |
yap examples should go.. the question is what shuffle does then |
@felixroos I updated it so the UI is consistent with the sounds tab. Shuffle still loads an example pattern, I think thats probably fine for now. |
maybe someday "shuffle" could autogenerate something interesting using math and music theory :) |
Selected pattern will show in the window, and the selected pattern button will be highlighted.
Selected pattern will not play automatically.
on Evaluated, selected pattern will become the active pattern.
Active pattern button will have an outline around it when playing.
Additional change:
Added setCps(1) to all of the example files to support the change in behavior, so they will be set to the proper cps when shuffled. I think this will actually help new users as how to change the speed is not immediately apparent. I can find another way around this if this is not an acceptable change.