-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix #43906: Support 256th, 512th, and 1024th Notes [WIP] #2677
Conversation
90e90c3
to
eec1c05
Compare
@@ -81,6 +81,7 @@ QMap<QString, QString> nmap { | |||
{ "rests.5", "rest32nd" }, | |||
{ "rests.6", "rest64th" }, | |||
{ "rests.7", "rest128th" }, | |||
{ "rests.8", "rest256th" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing for 512th and 1024th?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point - my understanding is this code is intended to create links between Lilypond's Feta/Emmentaler font and the SMuFL compliant Mscore font. Glyphs for rests.9
and rests.10
are not defined in Feta. Actually now that I double check http://lilypond.org/doc/v2.18/Documentation/notation/the-feta-font#rest-glyphs it looks like rests.8
isn't defined either, so this might be leftover from my testing and I should just cut that line too. Or am I misunderstanding the purpose of this code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea, I was just wondering...
The mtest failures are all around division and ticks. I wonder whether we really need to adjust all the mtest files or whethr and how to have some backward compatibility to avoid all these failures, which might mean that we can't add these new shorter notes to 2.0 files, only to 3.0 ones? |
I feel like there is a way to do this as a non-breaking change... The whole issue is coming from the fact that ticks have any place at all in the score object model. If all positions were represented as compound fractions this would be a non-issue, and it would also fix a lot of the bugs in tuplets right now as well (and let us fully support arbitrarily nested tuplets too!). But maybe that is outside of the scope of 2.x |
I think this change it too big to make it into 2.0.4, so it's be for 3.0 only? |
I didn't take a close look yet but two things.
|
It was actually working before for most common tuples, but certain values (1024th 9-tuplets, etc.) broke things. Increased It seems like there is already some built in way to convert the embedded division value in the scores which might handle the compatibility issue for us. Maybe it's here: Line 740 in 1a8cdf1
I also added a sanity check to Seems to me that there won't be a way around making this change without editing mtests... |
case 7: | ||
opers.quantValue.setDefaultValue(QuantValue::Q_512, false); | ||
break; | ||
case 8: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation issue with those case statements
1024th, 512th and 256th notes will be added by me in the next version of the Gootville font - 1.4. But... Who are using these notes? |
@Gootector Is it ok to use my slightly hacky glyphs in the meantime before you finish 1.4 just so we can have everything supported in the meantime? These values appear in Beethoven even - https://en.wikipedia.org/wiki/Two_hundred_fifty-sixth_note - as well as lots of contemporary music. The aim is to make this environment more permissive for composers so we don't decide for them what they should or shouldn't notate (to be honest, personally I would never write these values, but many of my peers do). It's an easy enough feature to implement with all the scaffolding already in place. |
@ajyoon I'll add 256th-1024th noteflags and rests to the font files - as a new glyphs. No problem for me. If it's necessary... |
Bravura supports up to 1024th, so should any other SMuFL font. More shouldn't be needed |
Increasing the division to 65536 will limit the length of score to MAX_INTEGER/65536= 32768 quarters notes, = 8192 measures in 4/4. (assuming MAX_INTEGER = 2^31) |
how about 26880, it divides by 256, 3, 5 and 7, so we should be fine up until at least 10-plets (only x-plets with x being a prime number >= 11 won't work) of 1024th and allow more than double the lenght of a score than with 65536 (which still won't allow triplets, 5-plets or 7-plets of 1024th)? |
I was about to comment along @Jojo-Schmitz line: 65536 is only divisible by 2 (several times) and does not accommodate any tuplet at all. I was going to suggest 9 * 7 * 5 = 315 * a convenient amount of powers of 2; for instance, 315 * 32 = 10080 or 315 * 64 = 20160. 9 is required to allow 9-plets. |
Ah, yes, I forgot 9-plets. |
Note values in commercial scorewriters: |
Extreme of conventional notation http://homes.soic.indiana.edu/donbyrd/CMNExtremesBody.htm#duration For 1024th and 3,5,6,9 tuplets, we would need 256*315=80640... |
Indeed! But it is so important to support tuplets of 1024th? 315*64 = 20160 would support tuplets of 256th (1/4 / 1/256 = 64), which is already quite esoteric... |
Mmm, we still need to be able to represent 1024th, so the number needs to be divisible by 256 right? |
Ops, yes! |
To be honest I don't understand the mechanics behind how tuplets interract with ticks, since my tests with these values (even triplets with the previously tested |
There is indeed "voodoo" scattered throughout the code - various fudge factors worked in to tick calculations. But they only work up to a point, so it would be nice to not have to rely on these so much. |
Thanks everyone for the feedback! I've reduced the |
Apologies for the delay on this, I spent the night taking another crack at this but after rebase the tests are failing even worse than before. I suspect b85cad9 may be involved, but I'm not entirely sure. I tried rebuilding the tests using this branch with a script that uses the build to open and save every Would it be helpful or just more noise for me to push my test tinkering? |
If this doesn't seem worth pursuing for the compatibility risk for such a trivial feature, please feel free to close and I'll work on something more useful |
@@ -81,6 +81,9 @@ QMap<QString, QString> nmap { | |||
{ "rests.5", "rest32nd" }, | |||
{ "rests.6", "rest64th" }, | |||
{ "rests.7", "rest128th" }, | |||
// { "rests.8", "rest256th" }, // Glyphs currently don't exist in Emmentaler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so these need to get added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if genft
is actually doing anything at all at this point. It seems like it was used previously when converting the original Emmantaler to the MuseScore font, but since the two have forked I don't really understand what this code does anymore. Do we still need it at all?
Rebase needed. And thanks to the new fallback, the added glyphs for MScore and Gootville are not vital anymore (but would still be appreciated) |
0bd1fa3
to
1601989
Compare
Rebased with new smufl mapping accounted for. Also rolled back all changes on |
A typesetting software should allow the publisher or composer to make those decisions and do their work. The developers, on the other hand, should work to provide the framework for them to decide this. In the repertoire, this notation has been used since the 17th century...
|
Rebase needed. |
The shortest notes are fully supported now thanks to the switching to Fractions. |
Awesome, thanks! |
Still we don't have notes that short, still 128th is the shortest note we can enter (via toolbar or shortcuts), except via entering a 128th and than using Q to half its duration |
importmidi
support for these valuesimportmidi
preferences options to allow smallest note value of 1024MidiOperations::QuantValue fractionToQuantValue
with a default valuePotentially problematic change needing review and feedback: Change
MScore::division
from 480 to51265536. Current handling of ticks relied on rounding errors when translatingDurationType
's to ticks, causing bars missing tiny amounts (usually a 1024th value) when pasting sections and similar operations involving the new values. ChangingMScore::division
is also causing most tests to fail currently because of a diff between the embedded division value in the test references and certain tick values diverging. Is this a good way to proceed? If not, are there some better solutions?TODO's (maybe more appropriate for a separate PR?):
Q
repeatedly on a note)