-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[CMD: up/down chord] Traverse as list after range selection #24400
base: master
Are you sure you want to change the base?
[CMD: up/down chord] Traverse as list after range selection #24400
Conversation
9d7462c
to
9f3422f
Compare
Just checked the linux artifact quickly, and seems to kind of work. I got a crash though on a single selection moving down into second voice and trying to go down further. Doesn't happen on 3.x so something went amiss. I'll try to toy with it. Update: with the if check, no crash. Seems to be on par with 3.x branch now |
fbd62d7
to
2a8b2f6
Compare
Not sure that 2nd commit is worth the effort, it is quite fat for its little purpose. |
2a8b2f6
to
5104741
Compare
Congratulations on exceeding like 20 force pushes in 10 minutes! Hey moveAlt can return a nullptr, yet there was no check, so there needs to be a safeguard on the single traversal: // Single traverse:
if (currentSingle && (currentSingle->isNote() || currentSingle->isRest())) {
EngravingItem* newSingle = _score.moveAlt(currentSingle, d);
if (newSingle == currentSingle) {
return;
}
while (newSingle && newSingle->isRest() && toRest(newSingle)->isGap()) {
newSingle = _score.moveAlt(newSingle, d);
if (newSingle == oldSingle) {
break;
}
}
if (newSingle) {
select({ newSingle }, SelectType::SINGLE, newSingle->staffIdx());
showItem(newSingle);
}
return;
} That also could probably be refactored to be more simple |
5104741
to
b7414d1
Compare
b5b190d
to
3c34944
Compare
… even when input state has no ChordRest Port of #666
3c34944
to
8861e63
Compare
The commands [up/down chord] work only with a single selection of a note/rest, moving through a chord, and then moves to the next voice above/below.
At the moment, it won't work while in a list selection of multiple notes, nor will it do anything while having a range selection.
Posited feature: allow a range selection to convert to a list selection, where [up] takes the list selection to the top of that chord and [down] takes to the bottom note. It will work on multiple chords at once in the range.
Let a list-selection do likewise of moving up/down but only within selected chords. That is, when a list-selection is active, "bottom out" or "top out" on the chord that is initially selected as a designed limitation, and not move on to a chord/rest above/below it.
Finally, regular single element selection should function exactly the same way as usual.
This will allow for something akin to the "Chord Levels Selector" Plugin but built in through traversal. And, in addition with @XiaoMigros' changes (in already) a list selection will still have a valid selection after deletion or [add interval] - so it kind of takes on a new charm that Mu4.4 and before just didn't have
An example doing inversions on a range of chords:
demonstration.webm
Nifty. The only thing it doesn't really do that the Chord Level Selector plugin does is the "select all but particular voice", but whatever.
Update: Had to make use of some other personal changes to get this to work here, which is to allow to "stay" within the beat when using up/down the chord when going beyond the current chord. It's also an enhancement in my opinion, but you can test that ---
The old 3.6.2 way forces into a voice that isn't related to the beat:
2.olderUpDown.webm
With this change the beat takes precedence (the vertical space)
1newerUpDown.webm
And with the ability to keep the list selection after deleting/adding intervals (was backported earlier), you can do something like this:
enh3.webm
Port of Jojo-Schmitz#607 to fix Jojo-Schmitz#606
Fix regression from the above and also allow for [prev measure/system] in note-entry even when input state has no ChordRest
Resolves: #604 regression and enabling previous measure/previous system when input track doesn't contain a correspondent chordrest
That should do it. Unfortunately that means your "up-port" (is that the word?) would also need to be updated
Verification:
1.webm
2.webm
3.webm
Port of Jojo-Schmitz#666 to fix Jojo-Schmitz#604