發布日期:Jan 3, 2022

文章於 Jan 3, 2022 更新

Musicxml 格式初步理解

摘要:

  • musicxml 是一種 xml 格式的延伸,主要作用是以人眼可讀、同時網頁可辨識的約定格式來標示譜面資訊
  • 雖然如上宣稱,但因為實際的譜面資訊多,約定格式組合之後不易讀,所以還是需要依靠軟體轉換為五線譜或其他常用譜面
  • 好處是能夠用文字文本的形式儲存音樂,相較於 MIDI 格式,能保留較齊全的演奏指示

疑問:

  • 似乎要跟 Lilypond 所採用 ABC記譜法(ABC notion) 取得平衡點,盡可能用簡潔文字紀錄可以跨平台呈現的譜面?

我的需求:

  • 用文本儲存音樂資訊,可任意轉換為五線譜與簡譜
    • 用文本儲存音樂資訊,可任意轉換為五線譜
      • musicxml + musescore 已可達成雙向轉換的功能
    • 用文本儲存音樂資訊,可任意轉換為簡譜
      • TODO

參考資料

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE score-partwise PUBLIC
    "-//Recordare//DTD MusicXML 3.1 Partwise//EN"
    "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise version="3.1">
  <part-list>
    <score-part id="P1">
      <part-name>Music</part-name>
    </score-part>
  </part-list>
  <part id="P1">
    <measure number="1">
      <attributes>
        <divisions>1</divisions>
        <key>
          <fifths>0</fifths>
        </key>
        <time>
          <beats>4</beats>
          <beat-type>4</beat-type>
        </time>
        <clef>
          <sign>G</sign>
          <line>2</line>
        </clef>
      </attributes>
      <note>
        <pitch>
          <step>C</step>
          <octave>4</octave>
        </pitch>
        <duration>4</duration>
        <type>whole</type>
      </note>
    </measure>
  </part>
</score-partwise>