[trunk] two identical notes in the same bar with the same accidentals have different pitch

• Dec 29, 2010 - 17:02
Type
Functional
Severity
S2 - Critical
Status
closed
Project

See http://musescore.org/en/node/8389

In Score::changeAccidental() the call to line2pitch() sometimes calculates different values for pitch for two subsequent notes in the same bar with same accidentals, so you can't tie them. See above bug report


Comments

Here's a patch. What I did:

(+) I fixed the bug with precautionary accidentals (wrong playback, unremovable)
(+) I added a remove_accidentals function, so you can now easily remove accidentals from a whole selection and there's a shortcut for using the function during note entry
(+) I changed some of the standard shortcuts for easier accidental handling in note entry mode

The two icons files have to be added, they don't show up in the diff.

Here's what i changed byle filename:

mscore/mscore/actions.cpp:
Remove accidentals function added

shortcut Qt::SHIFT + Qt::Key_Asterisk

Changed standard shortcuts:

double sharp Qt::SHIFT + Qt::Key_Slash,
sharp Qt::Key_Slash
natural Qt::Key_Asterisk
flat Qt::Key_Minus // this is the same
double flat Qt::SHIFT + Qt::Key_Minus
acciaccatura Qt::CTRL + Qt::Key_Slash // collision with sharp

mscore/mscore/icons.h:
mscore/mscore/icons.cpp:
mscore/mscore/mscore.qrc:
mscore/mscore/mscore-apple.qrc:
mscore/mscore/mscore.cpp:
mscore/mscore/CMakeLists.txt:
removeaccidentals added

mscore/mscore/data/icons/removeaccidentals.svg:
mscore/mscore/data/icons-dark/removeaccidentals.svg:
created (dummies, copied from natural.svg)

mscore/mscore/cmd.cpp
in void Score::changeAccidental()
fixed buggy creation of precautionary accidental
notes were looking correct, but had wrong pitches, so playback was
broken and tying notes didn't work
Also precautionary were undeletable, fixed this two

Title two identical notes in the same bar with the same accidentals have different pitch (internal) two identical notes in the same bar with the same accidentals have different pitch

there was a bug in the above code, removing accidentals wasn't handled properly.

I seperated the bugfix from the above feature request, because this is more urgent I think. Otherwise people would end up with notes playing wrong that have an accidental, which is not deletable.

Hmm... Maybe this is a problem on trunk only (0.9.6.3 is at the moment not running on my machine, something strange with the file dialogs).

- create two measures full of C's
- make them all C#'s in the first measure (select measure, press # from the toolbar)
- playback

Title two identical notes in the same bar with the same accidentals have different pitch [trunk] two identical notes in the same bar with the same accidentals have different pitch

Setup: trunk rev. 3864, Qt Creator 2.0 (Qt lib 2.7.0) under Windows XP (but same bug under Ubuntu 10.4)

The thing is serious. See attached sample score and annotated screen shot. The score has been created by:

1) Filling 3 measures of G quavers
2) Selecting meas. 1 and pressing 'flat' button
3) Selecting meas. 2 and pressing 'natural' button
4) Selecting meas. 3 and pressing 'sharp' button

Results:
1) measure with naturals is correct
2) In other measures, the first note is correct, BUT:
3) All even notes have a flat/sharp but sound as naturals
4) All odd notes (except the first) do not have a flat/sharp

The same result is reached by pressing the relevant accidental shortcut after entering each note.

Priority increased, as this issue may lead to scores garbled and difficult to correct.

M.