Skip to content

Commit

Permalink
Merge pull request #317 from CPJKU/cross_staff_beaming
Browse files Browse the repository at this point in the history
A unit test example for cross staff beaming for musicxml
  • Loading branch information
fosfrancesco authored Sep 20, 2023
2 parents 0cea6b0 + a2e52b8 commit 51efb97
Show file tree
Hide file tree
Showing 2 changed files with 410 additions and 0 deletions.
390 changes: 390 additions & 0 deletions tests/data/musicxml/test_cross_staff_beaming.musicxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,390 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 4.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise version="4.0">
<work>
<work-title>Untitled score</work-title>
</work>
<identification>
<creator type="composer">Composer / arranger</creator>
<encoding>
<software>MuseScore 4.0.0</software>
<encoding-date>2023-09-20</encoding-date>
<supports element="accidental" type="yes"/>
<supports element="beam" type="yes"/>
<supports element="print" attribute="new-page" type="no"/>
<supports element="print" attribute="new-system" type="no"/>
<supports element="stem" type="yes"/>
</encoding>
</identification>
<part-list>
<score-part id="P1">
<part-name>Piano</part-name>
<part-abbreviation>Pno.</part-abbreviation>
<score-instrument id="P1-I1">
<instrument-name>Piano</instrument-name>
</score-instrument>
<midi-device id="P1-I1" port="1"></midi-device>
<midi-instrument id="P1-I1">
<midi-channel>1</midi-channel>
<midi-program>1</midi-program>
<volume>78.7402</volume>
<pan>0</pan>
</midi-instrument>
</score-part>
</part-list>
<part id="P1">
<measure number="1">
<attributes>
<divisions>2</divisions>
<key>
<fifths>0</fifths>
</key>
<time>
<beats>4</beats>
<beat-type>4</beat-type>
</time>
<staves>2</staves>
<clef number="1">
<sign>G</sign>
<line>2</line>
</clef>
<clef number="2">
<sign>F</sign>
<line>4</line>
</clef>
</attributes>
<note>
<pitch>
<step>G</step>
<octave>4</octave>
</pitch>
<duration>1</duration>
<voice>1</voice>
<type>eighth</type>
<stem>down</stem>
<staff>1</staff>
<beam number="1">begin</beam>
</note>
<note>
<pitch>
<step>F</step>
<octave>4</octave>
</pitch>
<duration>1</duration>
<voice>1</voice>
<type>eighth</type>
<stem>down</stem>
<staff>1</staff>
<beam number="1">continue</beam>
</note>
<note>
<pitch>
<step>E</step>
<octave>4</octave>
</pitch>
<duration>1</duration>
<voice>1</voice>
<type>eighth</type>
<stem>down</stem>
<staff>1</staff>
<beam number="1">continue</beam>
</note>
<note>
<pitch>
<step>D</step>
<octave>4</octave>
</pitch>
<duration>1</duration>
<voice>1</voice>
<type>eighth</type>
<stem>down</stem>
<staff>1</staff>
<beam number="1">end</beam>
</note>
<note>
<pitch>
<step>C</step>
<octave>4</octave>
</pitch>
<duration>1</duration>
<voice>1</voice>
<type>eighth</type>
<stem>down</stem>
<staff>1</staff>
<beam number="1">begin</beam>
</note>
<note>
<pitch>
<step>B</step>
<octave>3</octave>
</pitch>
<duration>1</duration>
<voice>1</voice>
<type>eighth</type>
<stem>up</stem>
<staff>2</staff>
<beam number="1">continue</beam>
</note>
<note>
<pitch>
<step>A</step>
<octave>3</octave>
</pitch>
<duration>1</duration>
<voice>1</voice>
<type>eighth</type>
<stem>up</stem>
<staff>2</staff>
<beam number="1">continue</beam>
</note>
<note>
<pitch>
<step>G</step>
<octave>3</octave>
</pitch>
<duration>1</duration>
<voice>1</voice>
<type>eighth</type>
<stem>up</stem>
<staff>2</staff>
<beam number="1">end</beam>
</note>
<backup>
<duration>8</duration>
</backup>
<note>
<pitch>
<step>C</step>
<octave>5</octave>
</pitch>
<duration>4</duration>
<voice>2</voice>
<type>half</type>
<stem>up</stem>
<staff>1</staff>
</note>
<note>
<pitch>
<step>D</step>
<octave>5</octave>
</pitch>
<duration>4</duration>
<voice>2</voice>
<type>half</type>
<stem>up</stem>
<staff>1</staff>
</note>
<backup>
<duration>8</duration>
</backup>
<note>
<pitch>
<step>C</step>
<octave>3</octave>
</pitch>
<duration>4</duration>
<voice>5</voice>
<type>half</type>
<stem>down</stem>
<staff>2</staff>
</note>
<note>
<chord/>
<pitch>
<step>E</step>
<octave>3</octave>
</pitch>
<duration>4</duration>
<voice>5</voice>
<type>half</type>
<stem>down</stem>
<staff>2</staff>
</note>
<note>
<pitch>
<step>B</step>
<octave>2</octave>
</pitch>
<duration>4</duration>
<voice>5</voice>
<type>half</type>
<stem>down</stem>
<staff>2</staff>
</note>
<note>
<chord/>
<pitch>
<step>D</step>
<octave>3</octave>
</pitch>
<duration>4</duration>
<voice>5</voice>
<type>half</type>
<stem>down</stem>
<staff>2</staff>
</note>
</measure>
<measure number="2">
<note>
<pitch>
<step>G</step>
<octave>4</octave>
</pitch>
<duration>1</duration>
<voice>1</voice>
<type>eighth</type>
<stem>down</stem>
<staff>1</staff>
<beam number="1">begin</beam>
</note>
<note>
<pitch>
<step>F</step>
<octave>3</octave>
</pitch>
<duration>1</duration>
<voice>1</voice>
<type>eighth</type>
<stem>up</stem>
<staff>2</staff>
<beam number="1">continue</beam>
</note>
<note>
<pitch>
<step>F</step>
<octave>4</octave>
</pitch>
<duration>1</duration>
<voice>1</voice>
<type>eighth</type>
<stem>down</stem>
<staff>1</staff>
<beam number="1">continue</beam>
</note>
<note>
<pitch>
<step>G</step>
<octave>3</octave>
</pitch>
<duration>1</duration>
<voice>1</voice>
<type>eighth</type>
<stem>up</stem>
<staff>2</staff>
<beam number="1">end</beam>
</note>
<note>
<pitch>
<step>A</step>
<octave>3</octave>
</pitch>
<duration>1</duration>
<voice>1</voice>
<type>eighth</type>
<stem>up</stem>
<staff>2</staff>
<beam number="1">begin</beam>
</note>
<note>
<pitch>
<step>B</step>
<octave>3</octave>
</pitch>
<duration>1</duration>
<voice>1</voice>
<type>eighth</type>
<stem>down</stem>
<staff>1</staff>
<beam number="1">end</beam>
</note>
<note>
<pitch>
<step>C</step>
<octave>4</octave>
</pitch>
<duration>2</duration>
<voice>1</voice>
<type>quarter</type>
<stem>up</stem>
<staff>1</staff>
</note>
<backup>
<duration>8</duration>
</backup>
<note>
<pitch>
<step>E</step>
<octave>5</octave>
</pitch>
<duration>4</duration>
<voice>2</voice>
<type>half</type>
<stem>up</stem>
<staff>1</staff>
</note>
<note>
<pitch>
<step>D</step>
<octave>5</octave>
</pitch>
<duration>4</duration>
<voice>2</voice>
<type>half</type>
<stem>up</stem>
<staff>1</staff>
</note>
<backup>
<duration>8</duration>
</backup>
<note>
<pitch>
<step>B</step>
<octave>2</octave>
</pitch>
<duration>4</duration>
<voice>5</voice>
<type>half</type>
<stem>down</stem>
<staff>2</staff>
</note>
<note>
<chord/>
<pitch>
<step>D</step>
<octave>3</octave>
</pitch>
<duration>4</duration>
<voice>5</voice>
<type>half</type>
<stem>down</stem>
<staff>2</staff>
</note>
<note>
<pitch>
<step>C</step>
<octave>3</octave>
</pitch>
<duration>4</duration>
<voice>5</voice>
<type>half</type>
<stem>down</stem>
<staff>2</staff>
</note>
<note>
<chord/>
<pitch>
<step>E</step>
<octave>3</octave>
</pitch>
<duration>4</duration>
<voice>5</voice>
<type>half</type>
<stem>down</stem>
<staff>2</staff>
</note>
<barline location="right">
<bar-style>light-heavy</bar-style>
</barline>
</measure>
</part>
</score-partwise>
Loading

0 comments on commit 51efb97

Please sign in to comment.