alphaTab
alphaTab copied to clipboard
AlphaTexImporter corrections and simplifications
I fixed some things I found in AlphaTexImporter.
List of changes
- Corrected the error message logic: SymbolErrors previously only printed the value 'null' as found.
- Before:
MalFormed AlphaTex: @22: Error on block keysignature, expected a String found a MetaCommand: 'null' - After:
MalFormed AlphaTex: @22: Error on block keysignature, expected a String found a MetaCommand: 'ro'
- Before:
- Simplified Enum lookups: Instead of doing switch-case over an entire Enum, simply using the incoming number (or the default) is easier.
- Also made
parseKeySignaturereference theKeySignatureenum instead of literals.- Also corrected the comment on
KeySignature.CSharp.
- Also corrected the comment on
- Also made
- Added a limit of 2048 on the
rctag. Typing a large number on this tag in the playground made the browser freeze and run out of memory due to the size of the midi generated. I hope it was OK to include this, I understand if you don't want to introduce hidden limits though. Maybe this could be discussed in a different issue. - ...and other minor fixes.
Checklist
- [x] I consent that this change becomes part of alphaTab under it's current or any future open source license
- [x] Changes are implemented
- [x] Existing builds tests pass
- [ ] New tests were added
Further details
- [ ] This is a breaking change
- [ ] This change will require update of the documentation/website
Turns out I don't have the correct dotnet SDK on my machine to verify... I made my best guess at what the breaking change was, so try running workflows again. If issues remain I'll have to fix my setup and make it work on my end before pushing.
I converted this PR to a draft until your work is done. Please mark it as ready then 😉
It should be working at this point. (yup, it did)