musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.31k stars 2.66k forks source link

[MU4 Issue] Instrument change to unpitched instrument causes key signatures to appear on unpitched lines #14702

Closed GabeS573 closed 1 year ago

GabeS573 commented 1 year ago

Describe the bug Using the Instrument Change text to change from a pitched to an unpitched instrument causes subsequent unpitched clefs to have a key signature. image

To Reproduce Steps to reproduce the behavior:

  1. Create a score with any pitched instrument.
  2. Add a key signature (other than C major/A minor).
  3. Midway through the score, add an Instrument Change (from the text palette) and select an unpitched instrument (such as Drumset).
  4. Notice that, on all subsequent lines, the unpitched clef still has the old key signature next to it. Additionally, these erroneous key signatures cannot be deleted (as far as I can tell). image

Expected behavior Lines with an unpitched clef should never show a key signature.

Platform information

erinic04 commented 1 year ago

A workaround would be to add the atonal key signature locally to the staff when it changes

GabeS573 commented 1 year ago

A workaround would be to add the atonal key signature locally to the staff when it changes

@erinic04 That workaround doesn't work because local key signatures can't be added to unpitched percussion parts (i.e. Ctrl+dragging any key signature onto the unpitched staff does nothing).

The unpitched staff doesn't honor global key signatures either, leading to problems like this: image

fredg999 commented 1 year ago

I can still reproduce the issue mentioned by the OP on the current nightly build (2022-12-18). @RomanPudashkin Unless I'm mistaken here, I propose to reopen this issue.

Here's a workaround:

  1. Add a "staff type change" (from the Layout palette) on the same bar as the instrument change (or the next bar; more on that later).
  2. Select the staff type change, open the properties panel and toggle the "Generate key signatures" checkbox.
  3. Repeat steps 1-2 for any subsequent changes between pitched and unpitched instruments.

I think it would be handy if MuseScore automatically added the staff type change when the user adds an instrument change between pitched and unpitched instruments, or more generally a clef change to and from a percussion clef (if there are other cases when that happens of which I haven't thought).

Since the settings affect whether courtesy key signatures are generated on the following staves, I think that when the instrument change is not on the first beat of the bar, the staff type change should be placed on the next bar instead of on the same bar as the instrument change, as illustrated below (otherwise the key signature would not be generated on the second staff).

Capture d’écran du 2022-12-18 01-52-10

An additional issue I see here is that the key signature should be generated alongside the clef when changing from an unpitched to a pitched instrument. I'm not sure if it should apply when the key signature is already present at the beginning of the staff, such as in the above example, but it definitely should appear when the beginning of the staff was unpitched.

For the record, while the "erroneous key signatures" cannot be deleted, they can be hidden, but the solution above is much more appropriate for this issue.

sammik commented 1 year ago

I can still reproduce the issue mentioned by the OP on the current nightly build (2022-12-18). @RomanPudashkin Unless I'm mistaken here, I propose to reopen this issue.

It seems, nigthtlies are not produced on top of master (I checked local built master and issue is fixed, but in nightly, it is not.)