首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >musicXML: 1次测量中的2个语音

musicXML: 1次测量中的2个语音
EN

Stack Overflow用户
提问于 2021-09-22 20:02:24
回答 1查看 42关注 0票数 1

我正在尝试创建一个包含两个声音的musicXML文件:

代码语言:javascript
复制
<?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时,第二个声音会转移到下一个测量值:

怎么啦?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-09-23 06:17:24

musicxml中的每个音符都将时间指针向前移动,因此我的musicxml表示两个紧随其后的声音。为了使它们平行,我们需要在语音2的音符之前<backup>一个完整的小节,以将时间指针重置到小节的开始。

代码语言:javascript
复制
<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/

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69290589

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档