Open AlbertHart opened 4 years ago
I am going to address the rests-in-beams problem later. It won;t be that hard, but it is an interesting problem when creating scores or transposing.
I asked my piano teacher what would be the best way to handle rests in beams - reposition the rest, or lengthen the stems. His first choice was to prefer the way Sibelius does it to the way Musescore does it. But he wondered how Finale or Dorico process it.
If you use Finale, and you try to add a similar beam with a rest in the middle and see how they handle it. And also see what happens when you load the MusicXML for "An die Ferne" into it.
Here is a section of Shirmer's manuscript of the An die ferne Geliebte. With a rest in the beam of the two C's in the bass clef.
Here is the MusicXML, the the two Cs and the rest between them with display-step used to position the rest between the two Cs
<note default-x="76.94" default-y="-236.96">
<pitch>
<step>C</step>
<octave>4</octave>
</pitch>
<duration>2</duration>
<voice>5</voice>
<type>eighth</type>
<stem>down</stem>
<staff>2</staff>
<beam number="1">begin</beam>
</note>
<note>
<rest>
<display-step>C</display-step>
<display-octave>4</display-octave>
</rest>
<duration>1</duration>
<voice>5</voice>
<type>16th</type>
<staff>2</staff>
</note>
<note default-x="140.46" default-y="-236.96">
<pitch>
<step>C</step>
<octave>4</octave>
</pitch>
<duration>1</duration>
<voice>5</voice>
<type>16th</type>
<stem>down</stem>
<staff>2</staff>
<beam number="1">end</beam>
<beam number="2">backward hook</beam>
</note>
Here is how the musicxml loads into Musescore - probably recognizing the rest positioning in the MusicXML.
Here is how it looks on the OSMD demo.
And here is how it loads into Sibelius - which ignores the display-step, but lengthens the stems.
👍 It is interesting. My finale out-of-date, can not use the transpose function. I think musescore's way is better. And maybe this the way musicxml want.
OSMD ignores transposed or repositioned rests, and also does not extend the stems of beams with rests, like everyone else. So I am not going to try to fix either of these until they decide what to do.
OSMD says they are going to process transposed rests properly. So I am going to transpose the rest with display-step and see what happens.
ice6 - your DOM sample had code to transpose the position of a rest.
I had not thought about transposing rests before.
Then yesterday, I was showing our transposing stuff to my piano teacher, and he immediately noticed that the original, un-transposed, musicxml score had a rest in the middle of a beam group, where the rest was obscured by the beam.
Rest step and octave is used to move rests, and should not normally be transposed.
However, display-step does not seem to work with OSMD. I posted an issue about it this morning:
https://github.com/opensheetmusicdisplay/opensheetmusicdisplay/issues/759
Not having stems over rests is a larger problem. And I don't think we want to handle it yet.