Skip to content

MEI: adding a rest in the middle of a measure results in panic error #6

@yomannnn

Description

@yomannnn

Description

using MEI, adding a rest in the middle of a measure results in panic error. However MEI code renders fine in https://editor.verovio.org/

plugin panicked: wasm `unreachable` instruction executed

Example

<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="5.1">
   <music>
      <body>
         <mdiv>
            <score>
               <scoreDef meter.count="4" meter.unit="4" multi.number="false">
                  <staffGrp>
                     <staffDef n="1" lines="5" />
                  </staffGrp>
               </scoreDef>
               <section>

<measure >
<staff >
<layer n="1">
<note dur="4" head.shape="x" pname="f" oct="5" stem.dir="up"/>
<note dur="4" head.shape="x" pname="f" oct="5" stem.dir="up"/>
<note dur="4" head.shape="x" pname="f" oct="5" stem.dir="up"/>
<note dur="4" head.shape="x" pname="f" oct="5" stem.dir="up"/>
</layer>
<layer n="2">
<note dur="4" pname="d" oct="4" stem.dir="down"/>
<note dur="4" pname="c" oct="5" stem.dir="down"/>
<note dur="4" pname="d" oct="4" stem.dir="down"/>
<note dur="4" pname="c" oct="5" stem.dir="down"/>
</layer>
</staff>
</measure>

<measure >
<staff >
<layer n="1">
<note dur="4" head.shape="x" pname="f" oct="5" stem.dir="up"/>
<note dur="4" head.shape="x" pname="f" oct="5" stem.dir="up"/>
<note dur="4" head.shape="x" pname="f" oct="5" stem.dir="up"/>
<note dur="4" head.shape="x" pname="f" oct="5" stem.dir="up"/>
</layer>
<layer n="2">
<note dur="4" pname="d" oct="4" stem.dir="down"/>
 <note dur="4" pname="c" oct="5" stem.dir="down"/>
 <note dur="4" pname="d" oct="4" stem.dir="down"/>
 <rest dur="4"/>  <!-- adding rest here create panic error -->
 <note dur="4" pname="c" oct="5" stem.dir="down"/>
 <rest dur="4"/>  <!-- renders OK -->
</layer>
</staff>
</measure>


               </section>
            </score>
         </mdiv>
      </body>
   </music>
</mei>

Environment

  • scoryst: 0.1.2, #import "@preview/scoryst:0.1.2": score
  • Typst: latest
  • Editor: VSCode with tinymist
  • OS: Win11
  • Input format: MEI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions