Shortcuts may produce wrong notes in repitch mode on percussion staves

• Jan 9, 2017 - 15:25
Type
Functional
Severity
S4 - Minor
Status
closed
Regression
No
Workaround
No
Project

Windows 10, GIT commit: 3c7a69d

1) new score for Snare Drum
2) enter notes AAAA
3) enable repitch mode
4) return cursor to first note
5) type "A" or "B:"

Result: a totally different note is entered - sounds like a bass drum

Repitch mode seems to work fine for staves using the Drumset instrument, also for Cymbal, but not for Snare Drum or Bass Drum. Not sure yet why.


Comments

Scratch that about it working OK for drumset staves, it doesn't.

Tracing through the code it seems the calculations are wrong in Score::repitchNote():

https://github.com/musescore/MuseScore/blob/73a2e6a1a474d5f4620b926d94f…

We start with the same Position value that works when not in repitch mode, but we get the wrong pitch out of it here. Not surprising, I think, since there is no checking for drumset here. We probably need to use noteValForPosition() or something similar as happens in the normal case.

Fix version
3.5.0