musescore / musescore/MuseScore

Incorrect accidentals appear on notes after slash notation with change of key

Open
#21,897 0 comments 0 reactions 2 assignees View on GitHub

Nobody has claimed this yet.

engraving P3 UX/interaction
Dominant language
C++
Stars
15.1k
Forks
3.3k
Avg merge
2d 2h
Merged PRs (30d)
91

Description

Issue type

Engraving bug (incorrect score rendering)

Bug description

If you create slash notation in just a portion of a measure, then change the key from flats to sharps or vice versa, notes after the slash notation get incorrect accidentals.

Steps to reproduce
  1. New score, treble template, key of C
  2. Select measure 2
  3. Tools / Fill with slashes
  4. Delete last slash (leaving a rest)
  5. Enter a B quarter note
  6. Add an F major key signature to bar 1

Result: the natural sign that should now appear on the B does not.

This presumably happens because the slashes are B internally, and they when the key signature gets added, the slashes "take" the natural sign and the B "thinks" it doesn't need it.

Also, try selecting the B and pressing down. Now it gets an unnecessary flat sign.

As far as I can tell, this only happens if the key is changed after the slashes are added, causing me to suspect the issue happens when the new key is added. This issue does survive save/reload. but it is fixed by selecting the slashes themselves and hitting Up or Down to change their internal pitch to one that doesn't need an accidental.

Confirmed in both 4.2.1 and 4.3 nightly. Surprisingly, this is true going back to MU3 as well but I don't think it was ever found & reported. This report came from Facebook, BTW.

Screenshots/Screen recordings

slash-accident

MuseScore Version

OS: Debian GNU/Linux 12 (bookworm), Arch.: x86_64, MuseScore version (64-bit): 4.3.0-240710504, revision: github-musescore-musescore-5be2b33

Regression

No.

Operating system

Debian 12

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.