fillMaster icon indicating copy to clipboard operation
fillMaster copied to clipboard

Bug: No error handling for setCustomSettingsForPattern

Open dcallus opened this issue 3 years ago • 2 comments

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 avatar May 26 '22 08:05 dcallus

done

dcallus avatar Jun 23 '22 16:06 dcallus

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.

dcallus avatar Jun 25 '22 11:06 dcallus