musescore / musescore/MuseScore

add _keyList property to masterscore

Open
#18,950 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request P3
Dominant language
C++
Stars
15.1k
Forks
3.3k
Avg merge
2d 2h
Merged PRs (30d)
91

Description

Your idea

Key signature is (in most cases) global property of system. Local key signature for single staff is exception of this general rule.

So it make sense to have master score _keyList property, where global key signatures are stored.

Similar, like we have _timemap and _tempomap.

It would solve some problems, namely:

  • if first staff has local key signature in place, where global key signature is in score, newly added part copies this local key signature, instead of correct global key signature

https://github.com/musescore/MuseScore/assets/1646034/217c1af6-930a-4189-be32-482576edb149

  • if all instruments are removed in Instruments tab, key list for score is lost - newly added instrument has no key signatures (but has time signatures)

https://github.com/musescore/MuseScore/assets/1646034/857d4091-2305-4866-8fae-fdad6e3fe2b7

Problem to be solved

Properly define, what "global key signature is", how it is added to score (standard key signature for all staves), how is removed, ...

Rules should be consistent with time signatures (masterscore._timemap).

Prior art

No response

Additional context

Once this FR would be aplied, #18949 wouldn't be relevant anymore and may be reverted.
Some context - #18906.

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.

Research direction

Start by reading the existing masterscore._timemap and _tempomap behavior, then review the related issues #18949 and #18906. The issue considers how a master-score key list should define, add, and remove global key signatures; done would mean those rules and the affected part-creation and instrument-removal cases are consistently addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.