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

2.1 fix to prevent Q or Shift+Q from resulting in 256th rests #3101

Merged

Conversation

ericfont
Copy link
Contributor

Prevents problem described from comments 40-44 in https://musescore.org/en/node/175461#comment-682261, whereby pressing Q or Shift+Q might produce a dotted or double-dotted note duration that would have resulted in the subsequent creation of a 256th rest (which 2.1 code does not support, and which thus created other problems).

@ericfont ericfont force-pushed the Prevent-256th-rests-from-Q-or-ShiftQ branch from 61b58c8 to 69f3cd6 Compare March 23, 2017 16:26
((newValue == int(DurationType::V_128TH)) && (newDots >= 1)) ||
((newValue == int(DurationType::V_64TH)) && (newDots >= 2)) ||
((newValue == int(DurationType::V_32ND)) && (newDots >= 3)) ||
((newValue == int(DurationType::V_16TH)) && (newDots >= 4)))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: I'm just being extra safe with the quad-dotted 16th note, although I haven't actually been able to produce a quad-dotted note yet...

Copy link
Contributor

Choose a reason for hiding this comment

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

There is no provision for 4 dots in MuseScore 2. In Chord, the NoteDot array has only 3 slots.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok... Well so I guess I don't need that final condition.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll repush, this time forgetting about that final condition, but also changing those == into >= just because.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lasconic If the eventual limits in master is 1024th, then I guess I should make a corresponding master fix which prevents the corresponding cases that would produce 2048th rests...sound good?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sound excellent

Must prevent Q or Shift+Q from resulting in a note with a number of dots that would result in a 256th rest to balance it out.  This causes problems because 256ths durations don't work on 2.1.
@ericfont ericfont force-pushed the Prevent-256th-rests-from-Q-or-ShiftQ branch from 69f3cd6 to aeee109 Compare March 23, 2017 16:44
@lasconic lasconic merged commit ab899a0 into musescore:2.1 Mar 24, 2017
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.

None yet

2 participants