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

Functional demo with a new TransposeCalculator #1419

Open
ammatwain opened this issue Jul 2, 2023 · 4 comments
Open

Functional demo with a new TransposeCalculator #1419

ammatwain opened this issue Jul 2, 2023 · 4 comments

Comments

@ammatwain
Copy link
Contributor

ammatwain commented Jul 2, 2023

I have created a functional demo with a new TransposeCalculator.

Features:

  • Transpose by Key and octave, with or without Key signature transposing;
  • transpose by halftones, with or without Key signature transposing;
  • transpose by interval, with or without Key signature transposing;
  • in progress, transpose diatonically, without Key signature transposing (obviously).

You can find it at this URL:
https://ammatwain.github.io/extended-transpose-calculator/
This could potentially solve some OSMD issues related to transposition.
If you have some free time, please test it and let me know if you encounter any problems.
I need to gather positive feedback before making a pull request.
Thank you for your attention.
Amedeo

https://github.com/ammatwain

Originally posted by @ammatwain in #1391 (comment)

@ammatwain ammatwain changed the title Hey Simon, I haven't forgotten about you! Functional demo with a new TransposeCalculator Jul 2, 2023
@sschmidTU
Copy link
Contributor

This is looking very good so far! The ability to change the octaves is fantastic.

I've just noticed a small issue where the key signatures don't look correct if you transpose the default scale sample to G major in the second measure.
image

But admittedly that is also not a very common case.

A pull request eventually would be appreciated!

@ammatwain
Copy link
Contributor Author

ammatwain commented Jul 6, 2023

Hey Simon, you caught a bug right away! I want to assure you that the second key is correct, as Db is a homophonic key of C#, which is the MainKey of the score.
G does not have any homophonic key signatures. Therefore, when transposing from C# to G or from Db to G, both will be transposed to G.
However, the octave on which it transposes is wrong, and this represents an abnormal behavior that needs to be corrected urgently.

@ammatwain
Copy link
Contributor Author

Problem on octave solved, I've sent you the pull request.

@ammatwain
Copy link
Contributor Author

ammatwain commented Jul 7, 2023

I believe I misunderstood your instruction. You were referring to the fact that the sharp symbol is on the wrong line of the "A" note, instead of "F," as if the Clef were for the violin and not for the bass. In this case, I assume (but I need to do some checking), that the issue lies upstream of the transposition system.

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

No branches or pull requests

2 participants