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

Bug: No error handling for setCustomSettingsForPattern #10

Open
dcallus opened this issue May 26, 2022 · 2 comments
Open

Bug: No error handling for setCustomSettingsForPattern #10

dcallus opened this issue May 26, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@dcallus
Copy link
Contributor

dcallus commented May 26, 2022

setCustomSettingsForPattern in the patternMaker.ts file needs error handling.

  1. When you have a beat higher than the beatsPerBar
  2. When you have a subBeat higher than the current subdivision -1.
    The -1 is necessary because [0, 1, 2, 3] would be your options for ['1', 'e', '&', 'a'] with a subdivision of 4.

Add some tests to make sure an error is being thrown.

@dcallus dcallus added the bug Something isn't working label Jun 3, 2022
@dcallus
Copy link
Contributor Author

dcallus commented Jun 23, 2022

done

@dcallus dcallus closed this as completed Jun 23, 2022
@dcallus dcallus reopened this Jun 25, 2022
@dcallus
Copy link
Contributor Author

dcallus commented Jun 25, 2022

Re-opened as I've had to comment this error checking out at the class level.

There is no way to select a fill start beat too high (compared with beats per bar) on the UI, so it is currently safe. But this should be checked on the class level too.

Unfortunately there seems to be some sort of race condition where the error will throw even before the correct beat start is updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant