rettinghaus / MEILER

MEI Lilypond Engraving Refinement
MIT License
20 stars 7 forks source link

ottava lines #25

Closed th-we closed 7 years ago

th-we commented 7 years ago

In MEI it seems common to encode written pitch with @pname/@oct so to say "ignoring" ottava brackets (at least that's what one find in the samples). Sounding pitch can optionally be encoded with @pname.ges and @oct.ges. Lilypond however wants the resulting transposed pitch encoded.

That's not really a problem - I'm currently thinking that I might wrap notes of an ottava bracket inside a \transpose. What I don't understand is what \unset Staff.middleCPosition actually does. In any case it does weird things, e.g. for this example:

<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="3.0.0">
  <meiHead>
    <fileDesc>
      <titleStmt>
        <title/>
      </titleStmt>
      <pubStmt/>
    </fileDesc>
  </meiHead>
  <music>
    <body>
      <mdiv>
        <score>
          <scoreDef meter.count="4" meter.unit="4">
            <staffGrp>
              <staffDef n="1" clef.line="2" clef.shape="G" lines="5"/>
              <staffDef n="2" clef.line="4" clef.shape="F" lines="5"/>
            </staffGrp>
          </scoreDef>
          <section>
            <measure n="1">
              <staff n="1">
                <layer n="1">
                  <note pname="c" oct="4" dur="2" oct.ges="3" xml:id="note1"/>
                  <note pname="c" oct="4" dur="2" oct.ges="3" xml:id="note2"/>
                </layer>
              </staff>
              <staff n="2">
                <layer n="1">
                  <note pname="c" oct="4" dur="2" oct.ges="3" xml:id="note3"/>
                  <note pname="c" oct="4" dur="2" oct.ges="3" xml:id="note4"/>
                </layer>
              </staff>
              <octave dis="8" dis.place="below" startid="#note1" endid="#note1" staff="1"/>
              <octave dis="8" dis.place="above" startid="#note2" endid="#note2" staff="1"/>
              <octave dis="8" dis.place="below" startid="#note3" endid="#note3" staff="2"/>
              <octave dis="8" dis.place="above" startid="#note4" endid="#note4" staff="2"/>
            </measure>
          </section>
        </score>
      </mdiv>
    </body>
  </music>
</mei>

bildschirmfoto vom 2017-03-12 19-13-06

My plan would be:

Any better ideas?

rettinghaus commented 7 years ago

Originally I didn't want to rely on oct.ges. So I tried to "fake" it (which obviously only works with standard G clefs). I'll give it some thoughts.

th-we commented 7 years ago

I'll try to take care of it by using the \transpose approach, at least to the extend that's manageable right now. It might be restricted to <octave> with @startid/@endid and a single voice. That would at least cover some use cases, but not others.

rettinghaus commented 7 years ago

this should be ok now