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

AlphaTexImporter corrections and simplifications #852

Merged
merged 6 commits into from
Aug 27, 2022

Conversation

jonaro00
Copy link
Contributor

@jonaro00 jonaro00 commented May 15, 2022

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'
  • Simplified Enum lookups: Instead of doing switch-case over an entire Enum, simply using the incoming number (or the default) is easier.
    • Also made parseKeySignature reference the KeySignature enum instead of literals.
      • Also corrected the comment on KeySignature.CSharp.
  • Added a limit of 2048 on the rc tag. 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

  • I consent that this change becomes part of alphaTab under it's current or any future open source license
  • Changes are implemented
  • Existing builds tests pass
  • New tests were added

Further details

  • This is a breaking change
  • This change will require update of the documentation/website

Copy link
Member

@Danielku15 Danielku15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Various code changes are only working in the JavaScript work but make the C# and Kotlin compilation fail.

@jonaro00
Copy link
Contributor Author

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.

@Danielku15 Danielku15 marked this pull request as draft June 12, 2022 11:55
@Danielku15
Copy link
Member

I converted this PR to a draft until your work is done. Please mark it as ready then 😉

@jonaro00 jonaro00 marked this pull request as ready for review June 13, 2022 22:12
@jonaro00
Copy link
Contributor Author

jonaro00 commented Jun 13, 2022

It should be working at this point.
(yup, it did)

@Danielku15 Danielku15 enabled auto-merge (squash) August 27, 2022 21:54
@Danielku15 Danielku15 merged commit 264ebd3 into CoderLine:develop Aug 27, 2022
ChiHoc pushed a commit to ChiHoc/alphaTab that referenced this pull request Nov 7, 2022
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.

2 participants