How to change the key in the middle of a bar (measure)

• Jan 23, 2025 - 17:46

I've searched the handbook but couldn't find how to change the key signature within a score. Of course I know how to make it between two bars, but the piece I'm currently engraving, require the key to be changed in the middle of a bar, see attached picture.

How is this done?

NB, the time signature is 6/8.

Attachment Size
KeyChange.png 244.69 KB

Comments

In reply to by SteveBlower

Thanks. The old material I used was published by Belwin and Mills Publishing Corp. which I never heard about, but when I checked an even older Schlesinger (Berlin) publication, I see that they make the key change between two measures so I think I trust that solution better

Sorry, I read the old and difficult to read score incorrect4ly. In fact, they also change the key in the middle of the measure.
Also, what's written in the handbook, i.e.
"Note: It is also possible, though uncommon, to add a key-signature mid measure by selecting a note then clicking a palette key signature, or dragging the key signature to a note."
does not work.

It doesn't make a difference if you click a note, a rest or drag the key where you want it. It always jump to a beginning of a measure. Somewhere midway through a measure does not4 exist. For me as a software and signal processing engineer I would call the quantisation is only whole measures or am I wrong.

In reply to by TomStrand

Well, you could add local key signatures to all the staves.

I am surprised that the handbook instructions don't work. It's a long time since I had to add a mid-bar key signature but I don't recall any problems. Tomorrow, when I get back to my PC I will try again.

One thought occurs to me, are you trying to add the key signature at a point where a note is sustaining in another stave? If so, you probably need to split the sustaining note and use a tie so that the key signature has somewhere to go that is not the middle of a note.

In reply to by SteveBlower

After further investigation/experimentation it seems that neither MU3 or MU4
allow a general key signature to be added mid-bar at all. The bar has to be split.

However, the behaviour when an attempt is made differs between MU3 and MU4: In MU3 a local key signature is added mid-bar on the stave where it is added. In MU4 a general key signature is added at the start of the bar where it is added.

I guess this is just how they work rather than either or both being a bug. However, the MU4 handbook is definitely wrong where it says "Note: It is also possible, though uncommon, to add a key-signature mid measure by selecting a note then clicking a palette key signature, or dragging the key signature to a note".

The MU3 handbook is also wrong in this section https://musescore.org/en/handbook/3/key-signatures#add where in the section headed "Add new key signature to all staves" it says:
" - Select a note or rest and click a key signature in a palette (double-click in versions prior to 3.4).
- Drag a key signature from the palette onto an empty part of a measure or a note or rest."
,
as that adds the key signature to only a single staff if a note or rest other than at the beginning of a bar is selected.

In reply to by TomStrand

Yes, the new barline must be made invisible. This is how you put a key change (or a repeat) in the middle of a measure.

It will not cause corruption problems. This sort of measure causes problems only when set up incorrectly (e.g., when the measure is imported from .MID or .PDF or another format). By Splitting the measure or by explicitly changing its Actual Duration in the Measure Properties dialog, you are explicitly setting it up correctly to have fewer or more beats than the time signature shows.

Because I have to split the bar to insert a key change in the middle of the bar, the bar numbering get "corrupted" as the split bar in MS then counts as two bars although it in realit4y is just a single bar which happens to be split. To me, this is a bug.

In reply to by TomStrand

Which bit of the default behaviour?

The facility is available to do it, but it takes a bit of work. The handbook not describing what actually happens when you add a key change to a mid-bar note is not a bug, just a problem with the handbook.

The current procedure is

1 split the bar where the key change us needed

2 Add the key change

3 Adjust the bar number

4 Make the bar line invisible

That's quite straight forward and it's hardly going to be worth the effort to implement something that would allow it to work as a single operation, given the rarity that such a facility would be used. It would need to take into account notes whose duration extends across the position of the key change. And that seems to add quite some complexity, especially if tuplets are involved. Note that splitting a bar doesn't (yet) work if you try to split within a tuplet.

In reply to by SteveBlower

Ok, maybe it would be an overkill, but for me, and because you have to split the bar to achieve a key change in the middle of a bar, the second half is like an anacrusis which you never count.

It took me some time to realise this behaviour so now I've to go back to correct the music because I couldn't understand why I never finished at the same bar number.

I'm still learning MS. In Lilypond which I normally use for complex and large works, don't have these "design features".

In reply to by TomStrand

Actually I just tried, and you can split a bar mid-tuplet. So perhaps it would not be so tricky to implement mid-bar key changes for all staves at once.

If it is important to you, you could add a feature request to Github https://github.com/musescore/MuseScore/issues/new/choose

Regarding numbering of split bars: sometimes you do want the two parts to be included in the numbering, sometimes you don't. Only one behaviour can be the default. Currently it is to include the two parts in the numbering.

In reply to by SteveBlower

Thanks, I think about it.

By the way, in the handbook, it says one should go to measure properties. That's also visible in the header of the picture, In fact, at least on my installation, it's bar properties. I know it's the same but nevertheless slightly misleading.

To the numbering, you do not need to set a specific number. It's sufficient to exclude a bar / measure from the numbering.

Do you still have an unanswered question? Please log in first to post your question.