1

我正在尝试用 2 个声音创建一个 musicXML 文件:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE score-partwise PUBLIC
    "-//Recordare//DTD MusicXML 4.0 Partwise//EN"
    "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise version="4.0">
  <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>1</fifths>
        </key>
        <time>
          <beats>4</beats>
          <beat-type>4</beat-type>
        </time>
        <clef>
          <sign>G</sign>
          <line>2</line>
        </clef>
      </attributes>
      <note>
        <voice>1</voice>
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
        </pitch>
        <duration>2</duration>
        <type>half</type>
      </note>
      <note>
        <pitch>
          <step>G</step>
          <alter>0</alter>
          <octave>4</octave>
        </pitch>
        <voice>1</voice>
        <duration>2</duration>
        <type>half</type>
      </note>
      <note>
        <pitch>
          <step>C</step>
          <alter>0</alter>
          <octave>4</octave>
        </pitch>
        <voice>2</voice>
        <duration>2</duration>
        <type>half</type>
      </note>
      <note>
        <pitch>
          <step>A</step>
          <alter>0</alter>
          <octave>3</octave>
        </pitch>
        <voice>2</voice>
        <duration>2</duration>
        <type>half</type>
      </note>
    </measure>
  </part>
</score-partwise>

对我来说似乎没问题:笔记是相同的。但是当我使用musicxml2ly然后lilypond我得到第二个声音转移到下一个测量:

在此处输入图像描述

怎么了?

4

1 回答 1

0

musicxml 中的每个音符都会向前移动时间指针,因此我的 musicxml 代表两个相互跟随的声音。为了使它们平行,我们需要<backup>在声音 2 的音符之前进行完整的小节,以将时间指针重置为小节的开始。

<note>
    <voice>1</voice>
    ...
</note>
<backup>
    <duration>4</duration>
</backup>
<note>
    <voice>2</voice>
    ...
</note>

https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/backup/

于 2021-09-23T06:17:23.820 回答