--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.0 Partwise//EN"
+ "http://www.musicxml.org/dtds/partwise.dtd">
+<score-partwise>
+ <identification>
+ <miscellaneous>
+ <miscellaneous-field name="description">Different note styles, using the
+ <notehead> element. First, each note head style is printed
+ with four quarter notes, two with filled heads, two with unfilled
+ heads, where first the stem is up and then the stem is down. After
+ that, each note head style is printed with a half note (should have
+ an unfilled head by default). Finally, the Aiken note head styles are
+ tested, once with stem up and once with stem down.</miscellaneous-field>
+ </miscellaneous>
+ </identification>
+ <part-list>
+ <score-part id="P1">
+ <part-name>MusicXML Part</part-name>
+ </score-part>
+ </part-list>
+ <!--=========================================================-->
+ <part id="P1">
+ <measure number="1">
+ <attributes>
+ <divisions>1</divisions>
+ <key>
+ <fifths>0</fifths>
+ <mode>major</mode>
+ </key>
+ <time symbol="common">
+ <beats>4</beats>
+ <beat-type>4</beat-type>
+ </time>
+ <clef>
+ <sign>G</sign>
+ <line>2</line>
+ </clef>
+ </attributes>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>slash</notehead>
+ <lyric number="1"><text>slash</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>slash</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">slash</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">slash</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="2">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>triangle</notehead>
+ <lyric number="1"><text>triangle</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>triangle</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">triangle</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">triangle</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="3">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>diamond</notehead>
+ <lyric number="1"><text>diamond</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>diamond</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">diamond</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">diamond</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="4">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>square</notehead>
+ <lyric number="1"><text>square</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>square</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">square</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">square</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="5">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>cross</notehead>
+ <lyric number="1"><text>cross</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>cross</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">cross</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">cross</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="6">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>x</notehead>
+ <lyric number="1"><text>x</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>x</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">x</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">x</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="7">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>circle-x</notehead>
+ <lyric number="1"><text>circle-x</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>circle-x</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">circle-x</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">circle-x</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="8">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>inverted triangle</notehead>
+ <lyric number="1"><text>inverted triangle</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>inverted triangle</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">inverted triangle</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">inverted triangle</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="9">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>arrow down</notehead>
+ <lyric number="1"><text>arrow down</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>arrow down</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">arrow down</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">arrow down</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="10">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>arrow up</notehead>
+ <lyric number="1"><text>arrow up</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>arrow up</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">arrow up</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">arrow up</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="11">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>slashed</notehead>
+ <lyric number="1"><text>slashed</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>slashed</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">slashed</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">slashed</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="12">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>back slashed</notehead>
+ <lyric number="1"><text>back slashed</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>back slashed</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">back slashed</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">back slashed</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="13">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>normal</notehead>
+ <lyric number="1"><text>normal</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>normal</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">normal</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">normal</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="14">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>cluster</notehead>
+ <lyric number="1"><text>cluster</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>cluster</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">cluster</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">cluster</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="15">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>none</notehead>
+ <lyric number="1"><text>none</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>none</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">none</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">none</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="16">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>2</duration>
+ <voice>1</voice>
+ <type>half</type>
+ <notehead>slash</notehead>
+ <lyric number="1"><text>slash</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>2</duration>
+ <voice>1</voice>
+ <type>half</type>
+ <notehead>triangle</notehead>
+ <lyric number="1"><text>triangle</text></lyric>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="17">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>2</duration>
+ <voice>1</voice>
+ <type>half</type>
+ <notehead>diamond</notehead>
+ <lyric number="1"><text>diamond</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>2</duration>
+ <voice>1</voice>
+ <type>half</type>
+ <notehead>square</notehead>
+ <lyric number="1"><text>square</text></lyric>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="18">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>2</duration>
+ <voice>1</voice>
+ <type>half</type>
+ <notehead>cross</notehead>
+ <lyric number="1"><text>cross</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>2</duration>
+ <voice>1</voice>
+ <type>half</type>
+ <notehead>x</notehead>
+ <lyric number="1"><text>x</text></lyric>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="19">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>2</duration>
+ <voice>1</voice>
+ <type>half</type>
+ <notehead>circle-x</notehead>
+ <lyric number="1"><text>circle-x</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>2</duration>
+ <voice>1</voice>
+ <type>half</type>
+ <notehead>inverted triangle</notehead>
+ <lyric number="1"><text>inverted triangle</text></lyric>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="20">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>2</duration>
+ <voice>1</voice>
+ <type>half</type>
+ <notehead>arrow down</notehead>
+ <lyric number="1"><text>arrow down</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>2</duration>
+ <voice>1</voice>
+ <type>half</type>
+ <notehead>arrow up</notehead>
+ <lyric number="1"><text>arrow up</text></lyric>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="21">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>2</duration>
+ <voice>1</voice>
+ <type>half</type>
+ <notehead>slashed</notehead>
+ <lyric number="1"><text>slashed</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>2</duration>
+ <voice>1</voice>
+ <type>half</type>
+ <notehead>back slashed</notehead>
+ <lyric number="1"><text>back slashed</text></lyric>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="22">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>2</duration>
+ <voice>1</voice>
+ <type>half</type>
+ <notehead>normal</notehead>
+ <lyric number="1"><text>normal</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>2</duration>
+ <voice>1</voice>
+ <type>half</type>
+ <notehead>cluster</notehead>
+ <lyric number="1"><text>cluster</text></lyric>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="23">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>do</notehead>
+ <lyric number="1"><text>do</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>do</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">do</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">do</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="24">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>re</notehead>
+ <lyric number="1"><text>re</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>re</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">re</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">re</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="25">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>mi</notehead>
+ <lyric number="1"><text>mi</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>mi</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">mi</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">mi</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="26">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>fa</notehead>
+ <lyric number="1"><text>fa</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>fa</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">fa</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">fa</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="27">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>so</notehead>
+ <lyric number="1"><text>so</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>so</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">so</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">so</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="28">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>la</notehead>
+ <lyric number="1"><text>la</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>la</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">la</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">la</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="29">
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>ti</notehead>
+ <lyric number="1"><text>ti</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>ti</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">ti</notehead>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead filled="no">ti</notehead>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="30">
+ <attributes>
+ <key>
+ <fifths>3</fifths>
+ <mode>major</mode>
+ </key>
+ </attributes>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>3</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>do</notehead>
+ <lyric number="1"><text>do</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>B</step>
+ <octave>3</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>re</notehead>
+ <lyric number="1"><text>re</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <alter>1</alter>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>mi</notehead>
+ <lyric number="1"><text>mi</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>D</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>fa</notehead>
+ <lyric number="1"><text>fa</text></lyric>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="31">
+ <note>
+ <pitch>
+ <step>E</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>so</notehead>
+ <lyric number="1"><text>so</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>F</step>
+ <alter>1</alter>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>la</notehead>
+ <lyric number="1"><text>la</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>G</step>
+ <alter>1</alter>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>ti</notehead>
+ <lyric number="1"><text>ti</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>4</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>do</notehead>
+ <lyric number="1"><text>do</text></lyric>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="32">
+ <attributes>
+ <key>
+ <fifths>0</fifths>
+ <mode>major</mode>
+ </key>
+ </attributes>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>do</notehead>
+ <lyric number="1"><text>do</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>D</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>re</notehead>
+ <lyric number="1"><text>re</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>E</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>mi</notehead>
+ <lyric number="1"><text>mi</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>F</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>fa</notehead>
+ <lyric number="1"><text>fa</text></lyric>
+ </note>
+ </measure>
+ <!--=======================================================-->
+ <measure number="33">
+ <note>
+ <pitch>
+ <step>G</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>so</notehead>
+ <lyric number="1"><text>so</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>A</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>la</notehead>
+ <lyric number="1"><text>la</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>B</step>
+ <octave>5</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>ti</notehead>
+ <lyric number="1"><text>ti</text></lyric>
+ </note>
+ <note>
+ <pitch>
+ <step>C</step>
+ <octave>6</octave>
+ </pitch>
+ <duration>1</duration>
+ <voice>1</voice>
+ <type>quarter</type>
+ <notehead>do</notehead>
+ <lyric number="1"><text>do</text></lyric>
+ </note>
+ <barline location="right">
+ <bar-style>light-heavy</bar-style>
+ </barline>
+ </measure>
+ </part>
+</score-partwise>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.1 Partwise//EN"\r
+ "http://www.musicxml.org/dtds/partwise.dtd">\r
+<score-partwise version="1.1">\r
+ <identification>\r
+ <miscellaneous>\r
+ <miscellaneous-field name="description">Staff-connected note styles: \r
+ slash notation, hidden notes (with and without hidden staff\r
+ lines)</miscellaneous-field>\r
+ </miscellaneous>\r
+ </identification>\r
+ <part-list>\r
+ <score-part id="P1">\r
+ <part-name>MusicXML Part</part-name>\r
+ </score-part>\r
+ </part-list>\r
+ <!--=========================================================-->\r
+ <part id="P1">\r
+ <measure number="1">\r
+ <print>\r
+ <system-layout>\r
+ <system-margins>\r
+ <left-margin>70</left-margin>\r
+ <right-margin>0</right-margin>\r
+ </system-margins>\r
+ <top-system-distance>211</top-system-distance>\r
+ </system-layout>\r
+ </print>\r
+ <attributes>\r
+ <divisions>1</divisions>\r
+ <key>\r
+ <fifths>0</fifths>\r
+ <mode>major</mode>\r
+ </key>\r
+ <time symbol="common">\r
+ <beats>4</beats>\r
+ <beat-type>4</beat-type>\r
+ </time>\r
+ <clef>\r
+ <sign>G</sign>\r
+ <line>2</line>\r
+ </clef>\r
+ </attributes>\r
+ <note>\r
+ <pitch>\r
+ <step>A</step>\r
+ <octave>4</octave>\r
+ </pitch>\r
+ <duration>1</duration>\r
+ <voice>1</voice>\r
+ <type>quarter</type>\r
+ <stem>down</stem>\r
+ </note>\r
+ <attributes>\r
+ <measure-style>\r
+ <slash type="start" use-stems="no"/>\r
+ </measure-style>\r
+ </attributes>\r
+ <note>\r
+ <pitch>\r
+ <step>A</step>\r
+ <octave>4</octave>\r
+ </pitch>\r
+ <duration>1</duration>\r
+ <voice>1</voice>\r
+ <type>quarter</type>\r
+ <stem>up</stem>\r
+ <lyric number="1"><text>slash, no stem</text></lyric>\r
+ </note>\r
+ <note>\r
+ <pitch>\r
+ <step>C</step>\r
+ <octave>5</octave>\r
+ </pitch>\r
+ <duration>1</duration>\r
+ <voice>1</voice>\r
+ <type>quarter</type>\r
+ <stem>down</stem>\r
+ </note>\r
+ <attributes>\r
+ <measure-style>\r
+ <slash type="stop"/>\r
+ </measure-style>\r
+ <measure-style>\r
+ <slash type="start" use-stems="yes"/>\r
+ </measure-style>\r
+ </attributes>\r
+ <note>\r
+ <pitch>\r
+ <step>A</step>\r
+ <octave>4</octave>\r
+ </pitch>\r
+ <duration>1</duration>\r
+ <voice>1</voice>\r
+ <type>quarter</type>\r
+ <stem>down</stem>\r
+ <lyric number="1"><text>slash, with stem</text></lyric>\r
+ </note>\r
+ </measure>\r
+ <!--=======================================================-->\r
+ <measure number="2">\r
+ <note>\r
+ <pitch>\r
+ <step>C</step>\r
+ <octave>5</octave>\r
+ </pitch>\r
+ <duration>1</duration>\r
+ <voice>1</voice>\r
+ <type>quarter</type>\r
+ <stem>down</stem>\r
+ </note>\r
+ <attributes>\r
+ <measure-style>\r
+ <slash type="stop"/>\r
+ </measure-style>\r
+ </attributes>\r
+ <note print-object="no">\r
+ <pitch>\r
+ <step>A</step>\r
+ <octave>4</octave>\r
+ </pitch>\r
+ <duration>1</duration>\r
+ <voice>1</voice>\r
+ <type>quarter</type>\r
+ <stem>up</stem>\r
+ <lyric number="1"><text>hidden notes</text></lyric>\r
+ </note>\r
+ <note print-object="no">\r
+ <pitch>\r
+ <step>C</step>\r
+ <octave>5</octave>\r
+ </pitch>\r
+ <duration>1</duration>\r
+ <voice>1</voice>\r
+ <type>quarter</type>\r
+ <stem>down</stem>\r
+ </note>\r
+ <attributes>\r
+ <staff-details>\r
+ <staff-lines>0</staff-lines>\r
+ </staff-details>\r
+ </attributes>\r
+ <note print-object="no">\r
+ <pitch>\r
+ <step>C</step>\r
+ <octave>4</octave>\r
+ </pitch>\r
+ <duration>1</duration>\r
+ <voice>1</voice>\r
+ <type>quarter</type>\r
+ <stem>up</stem>\r
+ <lyric number="1"><text>hidden notes, staff lines</text></lyric>\r
+ </note>\r
+ </measure>\r
+ <measure number="3">\r
+ <note print-object="no">\r
+ <pitch>\r
+ <step>D</step>\r
+ <octave>4</octave>\r
+ </pitch>\r
+ <duration>2</duration>\r
+ <voice>1</voice>\r
+ <type>half</type>\r
+ <stem>up</stem>\r
+ </note>\r
+ <attributes>\r
+ <staff-details>\r
+ <staff-lines>5</staff-lines>\r
+ </staff-details>\r
+ </attributes>\r
+ <note>\r
+ <pitch>\r
+ <step>G</step>\r
+ <octave>4</octave>\r
+ </pitch>\r
+ <duration>2</duration>\r
+ <voice>1</voice>\r
+ <type>half</type>\r
+ <stem>up</stem>\r
+ <lyric number="1"><text>normal settings restored</text></lyric>\r
+ </note>\r
+ <barline location="right">\r
+ <bar-style>light-heavy</bar-style>\r
+ </barline>\r
+ </measure>\r
+ </part>\r
+ <!--=========================================================-->\r
+</score-partwise>\r
pitches = []
basepitch = None
for x in note_events:
- pitches.append (x.pitch.ly_expression ())
+ pitches.append (x.chord_element_ly ())
if not basepitch:
basepitch = previous_pitch
printer ('<%s>' % string.join (pitches))
else:
return ''
+
+class FunctionWrapperEvent (Event):
+ def __init__ (self, function_name = None):
+ Event.__init__ (self)
+ self.function_name = function_name
+ def pre_note_ly (self, is_chord_element):
+ if self.function_name:
+ return "\\%s" % self.function_name
+ else:
+ return ''
+ def pre_chord_ly (self):
+ return ''
+ def ly_expression (self):
+ if self.function_name:
+ return "\\%s" % self.function_name
+ else:
+ return ''
+
+class ParenthesizeEvent (FunctionWrapperEvent):
+ def __init__ (self):
+ FunctionWrapperEvent.__init__ (self, "parenthesize")
+
+class NotestyleEvent (Event):
+ def __init__ (self):
+ Event.__init__ (self)
+ self.style = None
+ self.filled = None
+ def pre_chord_ly (self):
+ if self.style:
+ return "\\once \\override NoteHead #'style = #%s" % self.style
+ else:
+ return ''
+ def pre_note_ly (self, is_chord_element):
+ if self.style and is_chord_element:
+ return "\\tweak #'style #%s" % self.style
+ else:
+ return ''
+ def ly_expression (self):
+ return self.pre_chord_ly ()
+
+
class ChordPitch:
def __init__ (self):
self.alteration = 0
def __init__ (self):
Event.__init__ (self)
self.duration = Duration()
-
+ self.associated_events = []
+
+ def add_associated_event (self, ev):
+ if ev:
+ self.associated_events.append (ev)
+
+ def pre_chord_ly (self):
+ return [ev.pre_chord_ly () for ev in self.associated_events]
+
+ def pre_note_ly (self, is_chord_element):
+ return [ev.pre_note_ly (is_chord_element) for ev in self.associated_events]
+
+ def ly_expression_pre_note (self, is_chord_element):
+ res = string.join (self.pre_note_ly (is_chord_element), ' ')
+ if res != '':
+ res = res + ' '
+ return res
+
def get_length (self):
return self.duration.get_length()
def __init__ (self):
RhythmicEvent.__init__ (self)
self.pitch = None
+
def ly_expression (self):
+ res = self.ly_expression_pre_note (False)
if self.pitch:
- return "%s%s\\rest" % (self.pitch.ly_expression (), self.duration.ly_expression ())
+ return res + "%s%s\\rest" % (self.pitch.ly_expression (), self.duration.ly_expression ())
else:
return 'r%s' % self.duration.ly_expression ()
def print_ly (self, printer):
+ for ev in self.associated_events:
+ ev.print_ly (printer)
if self.pitch:
self.pitch.print_ly (printer)
self.duration.print_ly (printer)
excl_question += '!'
return excl_question
-
+
def ly_expression (self):
+ # obtain all stuff that needs to be printed before the note:
+ res = self.ly_expression_pre_note (True)
if self.pitch:
- return '%s%s%s' % (self.pitch.ly_expression (),
+ return res + '%s%s%s' % (self.pitch.ly_expression (),
self.pitch_mods(),
self.duration.ly_expression ())
elif self.drum_type:
- return '%s%s' (self.drum_type,
+ return res + '%s%s' (self.drum_type,
self.duration.ly_expression ())
+ def chord_element_ly (self):
+ # obtain all stuff that needs to be printed before the note:
+ res = self.ly_expression_pre_note (True)
+ if self.pitch:
+ return res + '%s%s' % (self.pitch.ly_expression (),
+ self.pitch_mods())
+ elif self.drum_type:
+ return res + '%s%s' (self.drum_type)
+
+
def print_ly (self, printer):
+ for ev in self.associated_events:
+ ev.print_ly (printer)
if self.pitch:
self.pitch.print_ly (printer)
printer (self.pitch_mods ())