Drum input palette: Allow Shift + double-click on an icon to add a note to a chord

• Feb 16, 2015 - 05:15
Priority
P2 - Medium
Type
Functional
Severity
S5 - Suggestion
Status
closed
Regression
No
Workaround
No
Project

While entering drumset notes I often need to select a note from the palette because there aren't enough hotkeys to map to all the necessary drums. Currently if I select a note from the palette it will replace whatever note is selected in the measure even if I am holding shift, but what I really want to be able to do is have musescore add the note to the "chord" just like when I am using keyboard hotkeys and I hold shift. Any chance this can be added?


Comments

Shift *does* work to add notes to the current "chord" when entering notes by keyboard - on drum staves the same as for other staves. When entering notes by clicking in the staff, notes are added to chords by *not* pressing Shift - again, the same for both normal and drum staves.

But indeed, there doesn't seem to be a way to add notes to a "chord" when double clicking the palette icon rather than using one of these other input methods.

Yes it's not a deal breaker. I can find ways to work around it. It would just be a big productivity boost for me if this feature were added.

Regardless, thanks for looking at this and for all the hard work you do on this program. Musescore has been a blessing for me both for learning and teaching drumset, and without people like you the program wouldn't even exist. So big thanks!

Cheers!

Thanks for the kind words. I don't understand your comment about noteheads not being accounted for, though. It should, and does for me. Can you post a score and steps to reproduce the problem?

Yeah, I just realized that I was wrong about that behavior. It works great when you pick the note from the palette and add it to the stave by using the mouse. Not sure why I never tried this. I had it in my head that it didn't work properly. This really helps quite a bit. Thanks!

OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.5.0.12703, revision: f469566

Issue still active. [Shift] + shortcut adds a note to an existing chord; but not [Shift] + click on a drum input palette icon.

Status PR created fixed

Fixed in branch 3.x, commit 01599e6780

_fix #47821, fix #153686: issues with voice and chords with drum input

Resolves: https://musescore.org/en/node/47821
Resolves: https://musescore.org/en/node/153686

When adding drum notes to a score by double-clicking in the palette,
the semantics have always been a bit odd,
and even with some bugs fixed, there have still be inconsistencies,
as well as needless limitations and outright bugs.
This fixes a number of interrelated problems,
that stem from two main issues.
The issues are conceptually separate,
but they exists in the exact same blocks of code,
so there is no practical way to separate these

1) Shift+double-click should add note to chord, not replace

This mostly required checking for ShiftModifier in Note::drop()
and calling addNote instead of setNoteRest.
But also, it required correcting the management of the selection
and of the note input cursor, which was non-standard.
All other note input methods leave the note you just entered selected,
then move the input cursor.
Double-click was selecting the note or rest at the new input position.
That would have resulted in Shift adding to the next chord
rather than the one you just entered.
It also caused a bug in itself: entering a note before an existing one
caused playback of the existing note after the playback of the new one.
Changing the selection to stay on the new note helped,
but now it meant the new note got played twice -
once because you clicked it on the palette,
then again in endCmd because the note was selected.
Preventing the double playback was achieved
by turning off setPlayNote and setPlayChord in applyPaletteElement.
A change to that function was also needed
to make sure we use the selection when adding to the chord with Shift.
The code designed to favor the input cursor position over the selection
is now skipped when using Shift.

2) Double-click should use the voice defined for the note in the drumset

This happened "sometimes" but it was unpredictable,
and in some of the cases where it didn't work,
it actually changed the voice of the note in the palette itself.
That turned out to be a bad side effect of a fix I made many years ago.
Removing the assignment of track of the element in applyPaletteElement
fixes that problem, then I made the corresponding change
to how we select the track in Note::drop.
But this still would leave us with the issue that the note
would be added in the wrong voice any time
there was no existing note or rest in that voice
at the current input position.
The solution to this was to borrow the code from putNote,
which is what gets used when entering a note via keyboard shortcut:
walking backwards until we find a place to enter the note._

Fix version
3.5.1