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

Add support for ALDA 2 in the decompiler and importer #73

Closed
3 tasks done
truj opened this issue Apr 20, 2022 · 2 comments
Closed
3 tasks done

Add support for ALDA 2 in the decompiler and importer #73

truj opened this issue Apr 20, 2022 · 2 comments

Comments

@truj
Copy link
Owner

truj commented Apr 20, 2022

There are some slight syntax differences between ALDA 1 and 2.
The decompiler was made before ALDA 2 came out.
Also the CLI might be different.

  • Check if the decompiler still works with ALDA 2 (I'm pretty sure that's not the case)
  • Add ALDA 2 support in the decompiler
  • Add ALDA 2 support in the importer (probably necessary as well)

Maybe it's easy enough to support both versions. But if that's too much overhead, it should be ok to skip ALDA 1 support at all. I guess most people won't use it any more.

@truj
Copy link
Owner Author

truj commented Aug 2, 2023

Key signatures need to be converted in the decompiler. Everything else still works.

The importer can check the alda version and then decide what to do.

In the exporter this is not so reasonable because the target could be another system.
Of cause I could add a checkbox to choose the target version but I think that's not worth it.
So my decision is to stop supporting decompilation to alda 1.

@truj truj closed this as completed in 441cdfe Aug 9, 2023
@truj
Copy link
Owner Author

truj commented Aug 9, 2023

Upgrade finally done.

As ALDA 2 doesn't crash on too many MIDI channels any more, I was able to improve the Unit tests to import/export/re-import from/to several formats.
This revealed some bugs in other parts that I didn't find so far, and that are also fixed within this issue.

Two things are a little annoying:

  • The unit tests where ALDA is involved for import take a really long time.
  • From time to time ALDA crashes unpredictably, causing an EOFException in my tests.

A little more background information for those who are interested

I improved the MidicaPL language a lot in #79, now supporting bar lines and more compact syntax, taking inspiration from ALDA.
Then I wanted to support all these improvements in the exporter as well. That's what I did in #80, improving the decompiler a lot by the way.
I applied these changes also in the ALDA exporter (still in #80).

Here the improvements from #80:

  • Added line breaks after a (configurable) number of elements (to avoid extremely long lines)
  • Added bar lines whenever possible (assuming that each time signature event happens at the beginning of a bar)
  • Fixed some bugs
  • Added comments about source and target tick ranges to each line (can be switched off)

That was a lot of work. Compared to that, the upgrade to supporting ALDA 2 was trivial.
In the exporter I only had to change the key signatures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant