From 4526dbc6a9c79fdf17554d470136b893c7ab3bc1 Mon Sep 17 00:00:00 2001 From: Bryant Date: Tue, 28 May 2019 14:56:00 -0400 Subject: [PATCH 001/171] Add stanzas to first voice --- ly/musicxml/ly2xml_mediator.py | 5 ++++- ly/musicxml/lymus2musxml.py | 3 +++ ly/musicxml/xml_objs.py | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ly/musicxml/ly2xml_mediator.py b/ly/musicxml/ly2xml_mediator.py index a9ec6951..5920c044 100644 --- a/ly/musicxml/ly2xml_mediator.py +++ b/ly/musicxml/ly2xml_mediator.py @@ -42,6 +42,7 @@ def __init__(self): """ create global lists """ self.score = xml_objs.Score() self.sections = [] + self.permanent_sections = [] """ default and initial values """ self.insert_into = None self.current_note = None @@ -94,6 +95,7 @@ def new_section(self, name, glob=False): section = xml_objs.ScoreSection(name, glob) self.insert_into = section self.sections.append(section) + self.permanent_sections.append(section) self.bar = None def new_snippet(self, name): @@ -101,6 +103,7 @@ def new_snippet(self, name): snippet = xml_objs.Snippet(name, self.insert_into) self.insert_into = snippet self.sections.append(snippet) + self.permanent_sections.append(section) self.bar = None def new_lyric_section(self, name, voice_id): @@ -117,7 +120,7 @@ def check_name(self, name, nr=1): return name def get_var_byname(self, name): - for n in self.sections: + for n in self.permanent_sections: if n.name == name: return n diff --git a/ly/musicxml/lymus2musxml.py b/ly/musicxml/lymus2musxml.py index 13dfb733..a51d675f 100644 --- a/ly/musicxml/lymus2musxml.py +++ b/ly/musicxml/lymus2musxml.py @@ -615,6 +615,8 @@ def End(self, end): self.mediator.set_voicenr(nr=1) elif end.node.context() == 'Devnull': self.mediator.check_voices() + elif end.node.context() == 'Lyrics': + self.mediator.check_voices() elif end.node.token == '<<': if self.voice_sep: self.mediator.check_voices_by_nr() @@ -632,6 +634,7 @@ def End(self, end): elif end.node.token == '\\lyricsto': self.mediator.check_lyrics(end.node.context_id()) self.sims_and_seqs.pop() + self.mediator.new_lyric_nr(self.mediator.lyric_nr + 1) elif end.node.token == '\\with': self.with_contxt = None elif end.node.token == '\\drums': diff --git a/ly/musicxml/xml_objs.py b/ly/musicxml/xml_objs.py index bad1e057..b23ce0d5 100644 --- a/ly/musicxml/xml_objs.py +++ b/ly/musicxml/xml_objs.py @@ -318,7 +318,7 @@ def merge_lyrics(self, lyrics): ext = False for bar in self.barlist: for obj in bar.obj_list: - if isinstance(obj, BarNote): + if isinstance(obj, BarNote) and obj.voice == 1: if ext: if obj.slur: ext = False From 42c641d660912572cf4d4896507e789794b0b276 Mon Sep 17 00:00:00 2001 From: Bryant Date: Wed, 29 May 2019 13:24:29 -0400 Subject: [PATCH 002/171] Recognize underscore as skip --- ly/musicxml/ly2xml_mediator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ly/musicxml/ly2xml_mediator.py b/ly/musicxml/ly2xml_mediator.py index 5920c044..7a02db3b 100644 --- a/ly/musicxml/ly2xml_mediator.py +++ b/ly/musicxml/ly2xml_mediator.py @@ -553,7 +553,7 @@ def new_rest(self, rest): self.current_note = xml_objs.BarRest(dur, self.voice) elif rtype == 'R': self.current_note = xml_objs.BarRest(dur, self.voice, show_type=False) - elif rtype == 's' or rtype == '\\skip': + elif rtype == 's' or rtype == '\\skip' or rtype == '_': self.current_note = xml_objs.BarRest(dur, self.voice, skip=True) self.check_current_note(rest=True) @@ -829,7 +829,7 @@ def new_lyrics_item(self, item): self.lyric_syll = True elif item == '__': self.lyric.append("extend") - elif item == '\\skip': + elif item == '\\skip' or item == '_': self.insert_into.barlist.append("skip") def duration_from_tokens(self, tokens): From 0dfc5369834caae452f4f7aed54235f66aa526e5 Mon Sep 17 00:00:00 2001 From: Bryant Date: Thu, 6 Jun 2019 15:42:16 -0400 Subject: [PATCH 003/171] * ly2xml: Fix pickup note timing --- ly/musicxml/xml_objs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ly/musicxml/xml_objs.py b/ly/musicxml/xml_objs.py index b23ce0d5..3365318c 100644 --- a/ly/musicxml/xml_objs.py +++ b/ly/musicxml/xml_objs.py @@ -458,7 +458,8 @@ def create_backup(self): s *= obj.duration[1] elif isinstance(obj, BarBackup): break - self.add(BarBackup((b, s))) + if b != 0: # prevents the pickup measure from already having a blank BarBackup + self.add(BarBackup((b, s))) def is_skip(self, obj_list=None): """ Check if bar has nothing but skips. """ @@ -778,7 +779,6 @@ def merge_attr(self, barattr, override=False): if barattr.tempo is not None and (override or self.tempo is None): self.tempo = barattr.tempo - class BarBackup(): """ Object that stores duration for backup """ def __init__(self, duration): From 2cab7be61853e45a28386928f07867455ac4e6c6 Mon Sep 17 00:00:00 2001 From: Bryant Date: Fri, 7 Jun 2019 13:55:42 -0400 Subject: [PATCH 004/171] * ly2xml: Add support for special barlines --- ly/musicxml/lymus2musxml.py | 36 ++++++++++++++++++++++++++++++++++-- ly/musicxml/xml_objs.py | 4 ++++ 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/ly/musicxml/lymus2musxml.py b/ly/musicxml/lymus2musxml.py index a51d675f..c16d1c3d 100644 --- a/ly/musicxml/lymus2musxml.py +++ b/ly/musicxml/lymus2musxml.py @@ -89,6 +89,11 @@ def __init__(self): self.slurcount = 0 self.slurnr = 0 self.phrslurnr = 0 + # Variables to keep track of place in music, and place of barlines (made with \bar) + self.voice = 0 + self.time = 0 + self.measure = 1 + self.barline_locations = [] def parse_text(self, ly_text, filename=None): """Parse the LilyPond source specified as text. @@ -232,6 +237,8 @@ def check_context(self, context, context_id=None, token=""): self.mediator.new_part(context_id) self.mediator.add_staff_id(context_id) elif context == 'Voice': + self.voice += 1 + self.measure = 1 self.sims_and_seqs.append('voice') if context_id: self.mediator.new_section(context_id) @@ -242,6 +249,20 @@ def check_context(self, context, context_id=None, token=""): else: print("Context not implemented:", context) + def check_for_barline(self): + """ + Checks at the current location in music to see if a barline is needed + Creates a barline if needed + Based on whether the first voice had a barline at the current location + Only operates after the first voice + """ + if self.voice != 1: + for b in self.barline_locations: + if self.measure == b[0] and self.time == b[1]: + self.mediator.create_barline(b[2]) + self.time = 0 + self.measure += 1 + def VoiceSeparator(self, voice_sep): self.mediator.new_snippet('sim') self.mediator.set_voicenr(add=True) @@ -253,7 +274,10 @@ def Change(self, change): def PipeSymbol(self, barcheck): """ PipeSymbol = | """ - self.mediator.new_bar() + if self.time != 0: # Avoids making blank measures + self.time = 0 + self.measure += 1 + self.mediator.new_bar() def Clef(self, clef): r""" Clef \clef""" @@ -269,6 +293,7 @@ def Relative(self, relative): def Note(self, note): """ notename, e.g. c, cis, a bes ... """ #print(note.token) + self.time += note.length() if note.length(): if self.relative and not self.rel_pitch_isset: self.mediator.new_note(note, False) @@ -290,6 +315,8 @@ def Note(self, note): # chord as grace note if self.grace_seq: self.mediator.new_chord_grace() + # After every note in voices past 1, check if a barline is needed + self.check_for_barline() def Unpitched(self, unpitched): """A note without pitch, just a standalone duration.""" @@ -508,8 +535,13 @@ def UserCommand(self, usercommand): def String(self, string): prev = self.get_previous_node(string) - if prev and prev.token == '\\bar': + # If a \bar is found in the first voice (not at the beginning of a measure): + # Record its position and style-type, and create appropriate barline + if self.voice == 1 and prev and prev.token == '\\bar' and self.time != 0: + self.barline_locations.append([self.measure, self.time, string.value()]) self.mediator.create_barline(string.value()) + self.time = 0 + self.measure += 1 def LyricsTo(self, lyrics_to): r"""A \lyricsto expression. """ diff --git a/ly/musicxml/xml_objs.py b/ly/musicxml/xml_objs.py index b23ce0d5..311be6ee 100644 --- a/ly/musicxml/xml_objs.py +++ b/ly/musicxml/xml_objs.py @@ -760,6 +760,8 @@ def has_attr(self): check = True elif self.divs != 0: check = True + elif self.barline is not None: + check = True return check def merge_attr(self, barattr, override=False): @@ -841,3 +843,5 @@ def convert_barl(bl): return 'light-heavy' elif bl == "'": return 'tick' + elif bl == "": + return 'none' From 5df0a44be86d0571ff2292ae1cabcefe2be152c9 Mon Sep 17 00:00:00 2001 From: Bryant Date: Fri, 7 Jun 2019 14:20:22 -0400 Subject: [PATCH 005/171] * ly2xml: Skip slurs and ties lyrically --- ly/music/read.py | 2 +- ly/musicxml/ly2xml_mediator.py | 4 ++++ ly/musicxml/xml_objs.py | 41 +++++++++++++++++++++++++--------- 3 files changed, 35 insertions(+), 12 deletions(-) diff --git a/ly/music/read.py b/ly/music/read.py index 50b3526d..2b7a07a0 100644 --- a/ly/music/read.py +++ b/ly/music/read.py @@ -821,7 +821,7 @@ def read_lyric_item(self, t): item = self.factory(LyricText, t) self.add_duration(item) return item - elif isinstance(t, lilypond.Lyric): + elif isinstance(t, lilypond.Lyric) or t == '\\slurOff' or t == '\\slurOn': return self.factory(LyricItem, t) else: item, source = self.test_music_list(t) diff --git a/ly/musicxml/ly2xml_mediator.py b/ly/musicxml/ly2xml_mediator.py index 7a02db3b..f723ccfa 100644 --- a/ly/musicxml/ly2xml_mediator.py +++ b/ly/musicxml/ly2xml_mediator.py @@ -829,6 +829,10 @@ def new_lyrics_item(self, item): self.lyric_syll = True elif item == '__': self.lyric.append("extend") + elif item == '\\slurOff': + self.lyric.append("slurOff") + elif item == '\\slurOn': + self.lyric.append("slurOn") elif item == '\\skip' or item == '_': self.insert_into.barlist.append("skip") diff --git a/ly/musicxml/xml_objs.py b/ly/musicxml/xml_objs.py index b23ce0d5..d3ca7de2 100644 --- a/ly/musicxml/xml_objs.py +++ b/ly/musicxml/xml_objs.py @@ -198,9 +198,12 @@ def new_xml_note(self, obj): self.musxml.add_fingering(obj.fingering) if obj.lyric: for l in obj.lyric: - try: - self.musxml.add_lyric(l[0], l[1], l[2], l[3]) - except IndexError: + # Allows a lyric to have the extend tag if necessary + if l[-1] == "extend": + self.musxml.add_lyric(l[0], l[1], l[2], l[-1]) + elif l[-2] == "extend": + self.musxml.add_lyric(l[0], l[1], l[2], l[-2]) + else: self.musxml.add_lyric(l[0], l[1], l[2]) def new_xml_rest(self, obj): @@ -312,27 +315,43 @@ def merge_voice(self, voice, override=False): if len(voice.barlist) > bl_len: self.barlist += voice.barlist[bl_len:] + ##TODO def merge_lyrics(self, lyrics): """Merge in lyrics in music section.""" i = 0 - ext = False + slurOn = True # Indicates whether subsequent slurred notes should be skipped + slur = False # Indicates whether the current note is slurred + tie = False # Indicates whether the current note is tied for bar in self.barlist: for obj in bar.obj_list: if isinstance(obj, BarNote) and obj.voice == 1: - if ext: + # Ends open slurs/ties + if slur and tie: if obj.slur: - ext = False + slur = False + elif obj.tie: + tie = False + elif slur: + if obj.slur: + slur = False + elif tie: + if obj.tie: + tie = False + # If not a slurred/tied note, begins slurs/ties if needed and adds lyrics else: + if obj.slur and slurOn: + slur = True + if obj.tie and slurOn: + tie = True try: l = lyrics.barlist[i] except IndexError: break + if l[-1] == "slurOff" or l[-2] == "slurOff": + slurOn = False + elif l[-1] == "slurOn" or l[-2] == "slurOn": + slurOn = True if l != 'skip': - try: - if l[3] == "extend" and obj.slur: - ext = True - except IndexError: - pass obj.add_lyric(l) i += 1 From f2f1c6ed2c33559c944f7ad7f6597e468b662c07 Mon Sep 17 00:00:00 2001 From: Bryant Date: Mon, 10 Jun 2019 15:16:36 -0400 Subject: [PATCH 006/171] - ly2xml: Prevent multiple backups --- ly/musicxml/xml_objs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ly/musicxml/xml_objs.py b/ly/musicxml/xml_objs.py index 3365318c..ec7bbf0f 100644 --- a/ly/musicxml/xml_objs.py +++ b/ly/musicxml/xml_objs.py @@ -457,6 +457,7 @@ def create_backup(self): b += obj.duration[0] s *= obj.duration[1] elif isinstance(obj, BarBackup): + b = 0 # prevents multiple BarBackups from being made in same measure break if b != 0: # prevents the pickup measure from already having a blank BarBackup self.add(BarBackup((b, s))) From fa865eec27846c1a5b1522b3300209e5f8264fce Mon Sep 17 00:00:00 2001 From: Bryant Date: Tue, 11 Jun 2019 10:30:36 -0400 Subject: [PATCH 007/171] * ly2xml: Add dotted dashed heavy-heavy support --- ly/musicxml/xml_objs.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ly/musicxml/xml_objs.py b/ly/musicxml/xml_objs.py index 311be6ee..1b4536e1 100644 --- a/ly/musicxml/xml_objs.py +++ b/ly/musicxml/xml_objs.py @@ -827,17 +827,17 @@ def dur2lines(dur): def convert_barl(bl): if bl == '|': return 'regular' - elif bl == ':': + elif bl == ':' or bl == ';': return 'dotted' - elif bl == 'dashed': - return bl + elif bl == 'dashed' or bl == '!': + return 'dashed' elif bl == '.': return 'heavy' elif bl == '||': return 'light-light' elif bl == '.|' or bl == 'forward': return 'heavy-light' - elif bl == '.|.': + elif bl == '.|.' or bl == '..': return 'heavy-heavy' elif bl == '|.' or bl == 'backward': return 'light-heavy' From d0246f36c0b19e83850e62333a57cae617d7d888 Mon Sep 17 00:00:00 2001 From: Bryant George Date: Wed, 12 Jun 2019 12:29:29 -0400 Subject: [PATCH 008/171] Resolve "Fix tests" --- .gitlab-ci.yaml | 7 + requirements.txt | 1 + tests/musicxml.xsd | 1455 ++++++++++++----- tests/test_xml.py | 65 +- tests/test_xml_files/barlines.ly | 72 + tests/test_xml_files/barlines.musicxml | 1026 ++++++++++++ .../{dynamics.xml => dynamics.musicxml} | 0 .../{glissando.xml => glissando.musicxml} | 0 tests/test_xml_files/lyrics.ly | 95 ++ tests/test_xml_files/lyrics.musicxml | 969 +++++++++++ .../{merge_voice.xml => merge_voice.musicxml} | 0 tests/test_xml_files/pickup.ly | 58 + tests/test_xml_files/pickup.musicxml | 245 +++ .../test_xml_files/{tie.xml => tie.musicxml} | 0 .../{tuplet.xml => tuplet.musicxml} | 0 .../{variable.xml => variable.musicxml} | 0 16 files changed, 3556 insertions(+), 437 deletions(-) create mode 100644 .gitlab-ci.yaml create mode 100644 requirements.txt mode change 100644 => 100755 tests/musicxml.xsd create mode 100644 tests/test_xml_files/barlines.ly create mode 100644 tests/test_xml_files/barlines.musicxml rename tests/test_xml_files/{dynamics.xml => dynamics.musicxml} (100%) rename tests/test_xml_files/{glissando.xml => glissando.musicxml} (100%) create mode 100644 tests/test_xml_files/lyrics.ly create mode 100644 tests/test_xml_files/lyrics.musicxml rename tests/test_xml_files/{merge_voice.xml => merge_voice.musicxml} (100%) create mode 100644 tests/test_xml_files/pickup.ly create mode 100644 tests/test_xml_files/pickup.musicxml rename tests/test_xml_files/{tie.xml => tie.musicxml} (100%) rename tests/test_xml_files/{tuplet.xml => tuplet.musicxml} (100%) rename tests/test_xml_files/{variable.xml => variable.musicxml} (100%) diff --git a/.gitlab-ci.yaml b/.gitlab-ci.yaml new file mode 100644 index 00000000..94feebe0 --- /dev/null +++ b/.gitlab-ci.yaml @@ -0,0 +1,7 @@ +tests: + stage: test + tags: + - python + script: + - pip3 install -r requirements.txt + - python3 -m tests.test_xml diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..e38a4b2e --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +lxml==4.3.3 diff --git a/tests/musicxml.xsd b/tests/musicxml.xsd old mode 100644 new mode 100755 index 48116bf7..93d402ab --- a/tests/musicxml.xsd +++ b/tests/musicxml.xsd @@ -1,27 +1,28 @@ - + - MusicXML™ W3C XML schema (XSD) + MusicXML W3C XML schema (XSD) -Version 3.0 +Version 3.1 -Copyright © 2004-2011 MakeMusic, Inc. -http://www.makemusic.com/ +Copyright © 2004-2017 the Contributors to the MusicXML Specification, published by the W3C Music Notation Community Group under the W3C Community Final Specification Agreement (FSA): -This MusicXML™ work is being provided by the copyright holder under the MusicXML Public License Version 3.0, available from: + https://www.w3.org/community/about/agreements/final/ - http://www.musicxml.org/dtds/license.html - -This is the W3C XML Schema (XSD) version of the MusicXML 3.0 language. Validation is tightened by moving MusicXML definitions from comments into schema data types and definitions. Character entities and other entity usages that are not supported in W3C XML Schema have been removed. The features of W3C XML Schema make it easier to define variations of the MusicXML format, either via extension or restriction. +A human-readable summary is available: + + https://www.w3.org/community/about/agreements/fsa-deed/ -This file defines the MusicXML 3.0 XSD, including the score-partwise and score-timewise document elements. +This is the W3C XML Schema (XSD) version of the MusicXML 3.1 language. Validation is tightened by moving MusicXML definitions from comments into schema data types and definitions. Character entities and other entity usages that are not supported in W3C XML Schema have been removed. The features of W3C XML Schema make it easier to define variations of the MusicXML format, either via extension or restriction. + +This file defines the MusicXML 3.1 XSD, including the score-partwise and score-timewise document elements. - The MusicXML 3.0 DTD has no namespace, so for compatibility the MusicXML 3.0 XSD has no namespace either. Those who need to import the MusicXML XSD into another schema are advised to create a new version that uses "http://www.musicxml.org/xsd/MusicXML" as the namespace. + The MusicXML 3.1 DTD has no namespace, so for compatibility the MusicXML 3.1 XSD has no namespace either. Those who need to import the MusicXML XSD into another schema are advised to create a new version that uses "http://www.musicxml.org/xsd/MusicXML" as the namespace. - - + + @@ -34,7 +35,7 @@ This file defines the MusicXML 3.0 XSD, including the score-partwise and score-t - + The MusicXML format supports six levels of beaming, up to 1024th notes. Unlike the number-level type, the beam-level type identifies concurrent beams in a beam group. It does not distinguish overlapping beams such as grace notes within regular notes, or beams used in different voices. @@ -44,10 +45,10 @@ This file defines the MusicXML 3.0 XSD, including the score-partwise and score-t - + - The color type indicates the color of an element. Color may be represented as hexadecimal RGB triples, as in HTML, or as hexadecimal ARGB tuples, with the A indicating alpha of transparency. An alpha value of 00 is totally transparent; FF is totally opaque. If RGB is used, the A value is assumed to be FF. + The color type indicates the color of an element. Color may be represented as hexadecimal RGB triples, as in HTML, or as hexadecimal ARGB tuples, with the A indicating alpha of transparency. An alpha value of 00 is totally transparent; FF is totally opaque. If RGB is used, the A value is assumed to be FF. For instance, the RGB value "#800080" represents purple. An ARGB value of "#40800080" would be a transparent purple. @@ -57,7 +58,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The comma-separated-text type is used to specify a comma-separated list of text elements, as is used by the font-family attribute. @@ -66,7 +67,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The css-font-size type includes the CSS font sizes used as an alternative to a numeric point size. @@ -88,7 +89,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The enclosure-shape type describes the shape and presence / absence of an enclosure around text or symbols. A bracket enclosure is similar to a rectangle with the bottom line missing, as is common in jazz notation. @@ -101,10 +102,16 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< + + + + + + - + The fermata-shape type represents the shape of the fermata sign. The empty value is equivalent to the normal value. @@ -113,17 +120,22 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< + + + + + - + The font-size can be one of the CSS font sizes or a numeric point size. - + The font-style type represents a simplified version of the CSS font-style property. @@ -133,7 +145,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The font-weight type represents a simplified version of the CSS font-weight property. @@ -143,7 +155,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The left-center-right type is used to define horizontal alignment and text justification. @@ -154,7 +166,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The left-right type is used to indicate whether one element appears to the left or the right of another element. @@ -164,7 +176,18 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + + + + The line-length type distinguishes between different line lengths for doit, falloff, plop, and scoop articulations. + + + + + + + + The line-shape type distinguishes between straight and curved lines. @@ -174,7 +197,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The line-type type distinguishes between solid, dashed, dotted, and wavy lines. @@ -186,7 +209,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The midi-16 type is used to express MIDI 1.0 values that range from 1 to 16. @@ -196,7 +219,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The midi-16 type is used to express MIDI 1.0 values that range from 1 to 128. @@ -206,7 +229,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The midi-16 type is used to express MIDI 1.0 values that range from 1 to 16,384. @@ -216,7 +239,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The mute type represents muting for different instruments, including brass, winds, and strings. The on and off values are used for undifferentiated mutes. The remaining values represent specific mutes. @@ -239,7 +262,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The non-negative-decimal type specifies a non-negative decimal value. @@ -248,17 +271,17 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + - Slurs, tuplets, and many other features can be concurrent and overlapping within a single musical part. The number-level type distinguishes up to six concurrent objects of the same type. A reading program should be prepared to handle cases where the number-levels stop in an arbitrary order. Different numbers are needed when the features overlap in MusicXML document order. When a number-level value is implied, the value is 1 by default. + Slurs, tuplets, and many other features can be concurrent and overlapping within a single musical part. The number-level type distinguishes up to six concurrent objects of the same type. A reading program should be prepared to handle cases where the number-levels stop in an arbitrary order. Different numbers are needed when the features overlap in MusicXML document order. When a number-level value is optional, the value is 1 by default. - + The number-of-lines type is used to specify the number of lines in text decoration attributes. @@ -268,7 +291,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The number-or-normal values can be either a decimal number or the string "normal". This is used by the line-height and letter-spacing attributes. @@ -281,7 +304,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The over-under type is used to indicate whether the tips of curved lines such as slurs and ties are overhand (tips down) or underhand (tips up). @@ -291,7 +314,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The percent type specifies a percentage from 0 to 100. @@ -301,7 +324,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The positive-decimal type specifies a positive decimal value. @@ -310,7 +333,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The positive-divisions type restricts divisions values to positive numbers. @@ -319,7 +342,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The positive-integer-or-empty values can be either a positive integer or an empty string. @@ -332,7 +355,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The rotation-degrees type specifies rotation, pan, and elevation values in degrees. Values range from -180 to 180. @@ -342,7 +365,7 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The semi-pitched type represents categories of indefinite pitch for percussion instruments. @@ -356,7 +379,59 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + + + + The smufl-glyph-name type is used for attributes that reference a specific Standard Music Font Layout (SMuFL) character. The value is a SMuFL canonical glyph name, not a code point. For instance, the value for a standard piano pedal mark would be keyboardPedalPed, not U+E650. + + + + + + + The smufl-accidental-glyph-name type is used to reference a specific Standard Music Font Layout (SMuFL) accidental character. The value is a SMuFL canonical glyph name that starts with acc. + + + + + + + + + The smufl-coda-glyph-name type is used to reference a specific Standard Music Font Layout (SMuFL) coda character. The value is a SMuFL canonical glyph name that starts with coda. + + + + + + + + + The smufl-lyrics-glyph-name type is used to reference a specific Standard Music Font Layout (SMuFL) lyrics elision character. The value is a SMuFL canonical glyph name that starts with lyrics. + + + + + + + + + The smufl-pictogram-glyph-name type is used to reference a specific Standard Music Font Layout (SMuFL) percussion pictogram character. The value is a SMuFL canonical glyph name that starts with pict. + + + + + + + + + The smufl-segno-glyph-name type is used to reference a specific Standard Music Font Layout (SMuFL) segno character. The value is a SMuFL canonical glyph name that starts with segno. + + + + + + The start-note type describes the starting note of trills and mordents for playback, relative to the current note. @@ -367,11 +442,11 @@ As in SVG 1.1, colors are defined in terms of the sRGB color space (IEC 61966).< - + The start-stop type is used for an attribute of musical elements that can either start or stop, such as tuplets. - + The values of start and stop refer to how an element appears in musical score order, not in MusicXML document order. An element with a stop attribute may precede the corresponding element with a start attribute within a MusicXML document. This is particularly common in multi-staff music. For example, the stopping point for a tuplet may appear in staff 1 before the starting point for the tuplet appears in staff 2 later in the document. @@ -383,7 +458,7 @@ The values of start and stop refer to how an element appears in musical score or The start-stop-continue type is used for an attribute of musical elements that can either start or stop, but also need to refer to an intermediate point in the symbol, as for complex slurs or for formatting of symbols across system breaks. - + The values of start, stop, and continue refer to how an element appears in musical score order, not in MusicXML document order. An element with a stop attribute may precede the corresponding element with a start attribute within a MusicXML document. This is particularly common in multi-staff music. For example, the stopping point for a slur may appear in staff 1 before the starting point for the slur appears in staff 2 later in the document. @@ -395,7 +470,7 @@ The values of start, stop, and continue refer to how an element appears in music - The start-stop-single type is used for an attribute of musical elements that can be used for either multi-note or single-note musical elements, as for tremolos. + The start-stop-single type is used for an attribute of musical elements that can be used for either multi-note or single-note musical elements, as for groupings. @@ -403,21 +478,22 @@ The values of start, stop, and continue refer to how an element appears in music - + - The string-number type indicates a string number. Strings are numbered from high to low, with 1 being the highest pitched string. + The string-number type indicates a string number. Strings are numbered from high to low, with 1 being the highest pitched full-length string. - The symbol-size type is used to indicate full vs. cue-sized vs. oversized symbols. The large value for oversized symbols was added in version 1.1. + The symbol-size type is used to distinguish between full, cue sized, grace cue sized, and oversized symbols. + @@ -443,6 +519,20 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t + + + The tied-type type is used as an attribute of the tied element to specify where the visual representation of a tie begins and ends. A tied element which joins two notes of the same pitch can be specified with tied-type start on the first note and tied-type stop on the second note. To indicate a note should be undamped, use a single tied element with tied-type let-ring. For other ties that are visually attached to a single note, such as a tie leading into or out of a repeated section or coda, use two tied elements on the same note, one start and one stop. + +In start-stop cases, ties can add more elements using a continue type. This is typically used to specify the formatting of cross-system ties. + + + + + + + + + The time-only type is used to indicate that a particular playback-related element only applies particular times through a repeated section. The value is a comma-separated list of positive integers arranged in ascending order, indicating which times through the repeated section that the element applies. @@ -461,7 +551,19 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + + + + The tremolo-type is used to distinguish multi-note, single-note, and unmeasured tremolos. + + + + + + + + + The trill-beats type specifies the beats used in a trill-sound or bend-sound attribute group. It is a decimal value with a minimum value of 2. @@ -470,7 +572,7 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + The trill-step type describes the alternating note of trills and mordents for playback, relative to the current note. @@ -481,7 +583,7 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + The two-note-turn type describes the ending notes of trills and mordents for playback, relative to the current note. @@ -492,7 +594,7 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + The up-down type is used for the direction of arrows and other pointed symbols like vertical accents, indicating which way the tip is pointing. @@ -512,7 +614,7 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + The valign type is used to indicate vertical alignment to the top, middle, bottom, or baseline of the text. Defaults are implementation-dependent. @@ -524,7 +626,7 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + The valign-image type is used to indicate vertical alignment for images and graphics, so it does not include a baseline value. Defaults are implementation-dependent. @@ -535,7 +637,7 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + The yes-no type is used for boolean-like attributes. We cannot use W3C XML Schema booleans due to their restrictions on expression of boolean values. @@ -561,9 +663,9 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + - + The cancel-location type is used to indicate where a key signature cancellation appears relative to a new key signature: to the left, to the right, or before the barline and to the left. It is left by default. For mid-measure key elements, a cancel-location of before-barline should be treated like a cancel-location of left. @@ -574,7 +676,7 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + The clef-sign element represents the different clef symbols. The jianpu sign indicates that the music that follows should be in jianpu numbered notation, just as the TAB sign indicates that the music that follows should be in tablature notation. Unlike TAB, a jianpu sign does not correspond to a visual clef notation. @@ -589,21 +691,21 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + The fifths type represents the number of flats or sharps in a traditional key signature. Negative numbers are used for flats and positive numbers for sharps, reflecting the key's placement within the circle of fifths (hence the type name). - + The mode type is used to specify major/minor and other mode distinctions. Valid mode values include major, minor, dorian, phrygian, lydian, mixolydian, aeolian, ionian, locrian, and none. - + The show-frets type indicates whether to show tablature frets as numbers (0, 1, 2) or letters (a, b, c). The default choice is numbers. @@ -613,21 +715,21 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + The staff-line type indicates the line on a given staff. Staff lines are numbered from bottom to top, with 1 being the bottom line on a staff. Staff line values can be used to specify positions outside the staff, such as a C clef positioned in the middle of a grand staff. - + The staff-number type indicates staff numbers within a multi-staff part. Staves are numbered from top to bottom, with 1 being the top staff on a part. - + The staff-type value can be ossia, cue, editorial, regular, or alternate. An alternate staff indicates one that shares the same musical data as the prior staff, but displayed differently (e.g., treble and bass clef, standard notation and tab). @@ -640,7 +742,7 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + The time-relation type indicates the symbol used to represent the interchangeable aspect of dual time signatures. @@ -654,7 +756,7 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + The time-separator type indicates how to display the arrangement between the beats and beat-type values in a time signature. The default value is none. The horizontal, diagonal, and vertical values represent horizontal, diagonal lower-left to upper-right, and vertical lines respectively. For these values, the beats and beat-type values are arranged on either side of the separator line. The none value represents no separator with the beats and beat-type arranged vertically. The adjacent value represents no separator with the beats and beat-type arranged horizontally. @@ -667,7 +769,7 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + The time-symbol type indicates how to display a time signature. The normal value is the usual fractional display, and is the implied symbol type if none is specified. Other options are the common and cut time symbols, as well as a single number with an implied denominator. The note symbol indicates that the beat-type should be represented with the corresponding downstem note rather than a number. The dotted-note symbol indicates that the beat-type should be represented with a dotted downstem note that corresponds to three times the beat-type value, and a numerator that is one third the beats value. @@ -681,9 +783,9 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + - + The backward-forward type is used to specify repeat directions. The start of the repeat has a forward direction while the end of the repeat has a backward direction. @@ -693,7 +795,7 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + The bar-style type represents barline style information. Choices are regular, dotted, dashed, heavy, light-light, light-heavy, heavy-light, heavy-heavy, tick (a short stroke through the top line), short (a partial barline between the 2nd and 4th lines), and none. @@ -712,7 +814,7 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + The ending-number type is used to specify either a comma-separated list of positive integers without leading zeros, or a string of zero or more spaces. It is used for the number attribute of the ending element. The zero or more spaces version is used when software knows that an ending is present, but cannot determine the type of the ending. @@ -721,7 +823,7 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + The right-left-middle type is used to specify barline location. @@ -732,7 +834,7 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + The start-stop-discontinue type is used to specify ending types. Typically, the start type is associated with the left barline of the first measure in an ending. The stop and discontinue types are associated with the right barline of the last measure in an ending. Stop is used when the ending mark concludes with a downward jog, as is typical for first endings. Discontinue is used when there is no downward jog, as is typical for second endings that do not conclude a piece. @@ -743,7 +845,7 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + The winged attribute indicates whether the repeat has winged extensions that appear above and below the barline. The straight and curved values represent single wings, while the double-straight and double-curved values represent double wings. The none value indicates no wings and is the default. @@ -758,17 +860,17 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + - The accordion-middle type may have values of 1, 2, or 3, corresponding to having 1 to 3 dots in the middle section of the accordion registration symbol. + The accordion-middle type may have values of 1, 2, or 3, corresponding to having 1 to 3 dots in the middle section of the accordion registration symbol. This type is not used if no dots are present. - + The beater-value type represents pictograms for beaters, mallets, and sticks that do not have different materials represented in the pictogram. The finger and hammer values are in addition to Stone's list. @@ -777,6 +879,7 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t + @@ -786,14 +889,16 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t + + - + The degree-symbol-value type indicates indicates that a symbol should be used in specifying the degree. @@ -806,7 +911,7 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + The degree-type-value type indicates whether the current degree element is an addition, alteration, or subtraction to the kind of the current chord in the harmony element. @@ -817,10 +922,10 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + - The effect type represents pictograms for sound effect percussion instruments. The cannon value is in addition to Stone's list. + The effect type represents pictograms for sound effect percussion instruments. The cannon, lotus flute, and megaphone values are in addition to Stone's list. @@ -831,6 +936,8 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t + + @@ -839,16 +946,18 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - - + + - The glass type represents pictograms for glass percussion instruments. + The glass-value type represents pictograms for glass percussion instruments. + + - + The harmony-type type differentiates different types of harmonies when alternate harmonies are possible. Explicit harmonies have all note present in the music; implied have some notes missing but implied; alternate represents alternate analyses. @@ -859,11 +968,11 @@ Distances in a MusicXML file are measured in tenths of staff space. Tenths are t - + A kind-value indicates the type of chord. Degree elements can then add, subtract, or alter from these starting points. Values include: - + Triads: major (major third, perfect fifth) minor (minor third, perfect fifth) @@ -904,7 +1013,7 @@ Other: pedal (pedal-point bass) power (perfect fifth) Tristan - + The "other" kind is used when the harmony is entirely composed of add elements. The "none" kind is used to explicitly encode absence of chords or functional harmony. @@ -943,7 +1052,7 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + The line-end type specifies if there is a jog up or down (or both), an arrow, or nothing at the start or end of a bracket. @@ -956,7 +1065,7 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + The measure-numbering-value type describes how measure numbers are displayed on this part: no numbers, numbers every measure, or numbers every system. @@ -967,36 +1076,45 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + - The membrane type represents pictograms for membrane percussion instruments. The goblet drum value is in addition to Stone's list. + The membrane type represents pictograms for membrane percussion instruments. + + + + + - + The metal type represents pictograms for metal percussion instruments. The hi-hat value refers to a pictogram like Stone's high-hat cymbals but without the long vertical line at the bottom. + + + + @@ -1009,16 +1127,21 @@ The "other" kind is used when the harmony is entirely composed of add elements. + + + + + - + The on-off type is used for notation elements such as string mutes. @@ -1028,22 +1151,39 @@ The "other" kind is used when the harmony is entirely composed of add elements. + + + + The pedal-type simple type is used to distinguish types of pedal directions. The start value indicates the start of a damper pedal, while the sostenuto value indicates the start of a sostenuto pedal. The change, continue, and stop values can be used with either the damper or sostenuto pedal. The soft pedal is not included here because there is no special symbol or graphic used for it beyond what can be specified with words and bracket elements. + + + + + + + + + - + - The pitched type represents pictograms for pitched percussion instruments. The chimes and tubular chimes values distinguish the single-line and double-line versions of the pictogram. The mallet value is in addition to Stone's list. + The pitched-value type represents pictograms for pitched percussion instruments. The chimes and tubular chimes values distinguish the single-line and double-line versions of the pictogram. + + + + - + The principal-voice-symbol type represents the type of symbol used to indicate the start of a principal or secondary voice. The "plain" value represents a plain square bracket. The value of "none" is used for analysis markup when the principal-voice element does not have a corresponding appearance in the score. @@ -1055,7 +1195,18 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + + + + The staff-divide-symbol type is used for staff division symbols. The down, up, and up-down values correspond to SMuFL code points U+E00B, U+E00C, and U+E00D respectively. + + + + + + + + The start-stop-change-continue type is used to distinguish types of pedal directions. @@ -1067,7 +1218,7 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + The tip-direction type represents the direction in which the tip of a stick or beater points, using Unicode arrow terminology. @@ -1083,7 +1234,7 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + The stick-location type represents pictograms for the location of sticks, beaters, or mallets on cymbals, gongs, drums, and other instruments. @@ -1095,7 +1246,7 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + The stick-material type represents the material being displayed in a stick pictogram. @@ -1108,7 +1259,7 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + The stick-type type represents the shape of pictograms where the material @@ -1117,12 +1268,17 @@ The "other" kind is used when the harmony is entirely composed of add elements. + + + + + - + The up-down-stop-continue type is used for octave-shift elements, indicating the direction of the shift from their true pitched values because of printing difficulty. @@ -1134,7 +1290,7 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + The wedge type is crescendo for the start of a wedge that is closed at the left side, diminuendo for the start of a wedge that is closed on the right side, and stop for the end of a wedge. The continue type is used for formatting wedges over a system break, or for other situations where a single wedge is divided into multiple segments. @@ -1146,41 +1302,57 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + - The wood type represents pictograms for wood percussion instruments. The maraca and maracas values distinguish the one- and two-maraca versions of the pictogram. The vibraslap and castanets values are in addition to Stone's list. + The wood type represents pictograms for wood percussion instruments. The maraca and maracas values distinguish the one- and two-maraca versions of the pictogram. + + + + + + + - + - + - The distance-type defines what type of distance is being defined in a distance element. Values include beam and hyphen. This is left as a string so that other application-specific types can be defined, but it is made a separate type so that it can be redefined more strictly. + The distance-type defines what type of distance is being defined in a distance element. Values include beam and hyphen. This is left as a string so that other application-specific types can be defined, but it is made a separate type so that it can be redefined more strictly. + + + + + + + The glyph-type defines what type of glyph is being defined in a glyph element. Values include quarter-rest, g-clef-ottava-bassa, c-clef, f-clef, percussion-clef, octave-shift-up-8, octave-shift-down-8, octave-shift-continue-8, octave-shift-down-15, octave-shift-up-15, octave-shift-continue-15, octave-shift-down-22, octave-shift-up-22, and octave-shift-continue-22. This is left as a string so that other application-specific types can be defined, but it is made a separate type so that it can be redefined more strictly. + +A quarter-rest type specifies the glyph to use when a note has a rest element and a type value of quarter. The c-clef, f-clef, and percussion-clef types specify the glyph to use when a clef sign element value is C, F, or percussion respectively. The g-clef-ottava-bassa type specifies the glyph to use when a clef sign element value is G and the clef-octave-change element value is -1. The octave-shift types specify the glyph to use when an octave-shift type attribute value is up, down, or continue and the octave-shift size attribute value is 8, 15, or 22. - The line-width-type defines what type of line is being defined in a line-width element. Values include beam, bracket, dashes, enclosure, ending, extend, heavy barline, leger, light barline, octave shift, pedal, slur middle, slur tip, staff, stem, tie middle, tie tip, tuplet bracket, and wedge. This is left as a string so that other application-specific types can be defined, but it is made a separate type so that it can be redefined more strictly. + The line-width-type defines what type of line is being defined in a line-width element. Values include beam, bracket, dashes, enclosure, ending, extend, heavy barline, leger, light barline, octave shift, pedal, slur middle, slur tip, staff, stem, tie middle, tie tip, tuplet bracket, and wedge. This is left as a string so that other application-specific types can be defined, but it is made a separate type so that it can be redefined more strictly. @@ -1202,23 +1374,24 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + - The note-size-type type indicates the type of note being defined by a note-size element. The grace type is used for notes of cue size that that include a grace element. The cue type is used for all other notes with cue size, whether defined explicitly or implicitly via a cue element. The large type is used for notes of large size. + The note-size-type type indicates the type of note being defined by a note-size element. The grace-cue type is used for notes of grace-cue size. The grace type is used for notes of cue size that include a grace element. The cue type is used for all other notes with cue size, whether defined explicitly or implicitly via a cue element. The large type is used for notes of large size. + - + - The accidental-value type represents notated accidentals supported by MusicXML. In the MusicXML 2.0 DTD this was a string with values that could be included. The XSD strengthens the data typing to an enumerated list. The quarter- and three-quarters- accidentals are Tartini-style quarter-tone accidentals. The -down and -up accidentals are quarter-tone accidentals that include arrows pointing down or up. The slash- accidentals are used in Turkish classical music. The numbered sharp and flat accidentals are superscripted versions of the accidental signs, used in Turkish folk music. The sori and koron accidentals are microtonal sharp and flat accidentals used in Iranian and Persian music. + The accidental-value type represents notated accidentals supported by MusicXML. In the MusicXML 2.0 DTD this was a string with values that could be included. The XSD strengthens the data typing to an enumerated list. The quarter- and three-quarters- accidentals are Tartini-style quarter-tone accidentals. The -down and -up accidentals are quarter-tone accidentals that include arrows pointing down or up. The slash- accidentals are used in Turkish classical music. The numbered sharp and flat accidentals are superscripted versions of the accidental signs, used in Turkish folk music. The sori and koron accidentals are microtonal sharp and flat accidentals used in Iranian and Persian music. The other accidental covers accidentals other than those listed here. It is usually used in combination with the smufl attribute to specify a particular SMuFL accidental. The smufl attribute may be used with any accidental value to help specify the appearance of symbols that share the same MusicXML semantics. @@ -1239,6 +1412,12 @@ The "other" kind is used when the harmony is entirely composed of add elements. + + + + + + @@ -1255,9 +1434,10 @@ The "other" kind is used when the harmony is entirely composed of add elements. + - + The arrow-direction type represents the direction in which an arrow points, using Unicode arrow terminology. @@ -1278,7 +1458,7 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + The arrow-style type represents the style of an arrow, using Unicode arrow terminology. Filled and hollow arrows indicate polygonal single arrows. Paired arrows are duplicate single arrows in the same direction. Combined arrows apply to double direction arrows like left right, indicating that an arrow in one direction should be combined with an arrow in the other direction. @@ -1293,7 +1473,7 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + The beam-value type represents the type of beam associated with each of 8 beam levels (up to 1024th notes) available for each note. @@ -1306,7 +1486,7 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + The breath-mark-value type represents the symbol used for a breath mark. @@ -1315,6 +1495,22 @@ The "other" kind is used when the harmony is entirely composed of add elements. + + + + + + + + The caesura-value type represents the shape of the caesura sign. + + + + + + + + @@ -1327,7 +1523,7 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + The fan type represents the type of beam fanning present on a note, used to represent accelerandos and ritardandos. @@ -1338,12 +1534,13 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + The handbell-value type represents the type of handbell technique being notated. + @@ -1357,7 +1554,30 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + + + + The harmon-closed-location type indicates which portion of the symbol is filled in when the corresponding harmon-closed-value is half. + + + + + + + + + + + + The harmon-closed-value type represents whether the harmon mute is closed, open, or half-open. + + + + + + + + The hole-closed-location type indicates which portion of the hole is filled in when the corresponding hole-closed-value is half. @@ -1369,7 +1589,7 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + The hole-closed-value type represents whether the hole is closed, open, or half-open. @@ -1380,7 +1600,7 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + The note-type type is used for the MusicXML type element and represents the graphic note type, from 1024th (shortest) to maxima (longest). @@ -1402,13 +1622,17 @@ The "other" kind is used when the harmony is entirely composed of add elements. - + -The notehead type indicates shapes other than the open and closed ovals associated with note durations. The values do, re, mi, fa, fa up, so, la, and ti correspond to Aikin's 7-shape system. The fa up shape is typically used with upstems; the fa shape is typically used with downstems or no stems. +The notehead-value type indicates shapes other than the open and closed ovals associated with note durations. -The arrow shapes differ from triangle and inverted triangle by being centered on the stem. Slashed and back slashed notes include both the normal notehead and a slash. The triangle shape has the tip of the triangle pointing up; the inverted triangle shape has the tip of the triangle pointing down. The left triangle shape is a right triangle with the hypotenuse facing up and to the left. +The values do, re, mi, fa, fa up, so, la, and ti correspond to Aikin's 7-shape system. The fa up shape is typically used with upstems; the fa shape is typically used with downstems or no stems. + +The arrow shapes differ from triangle and inverted triangle by being centered on the stem. Slashed and back slashed notes include both the normal notehead and a slash. The triangle shape has the tip of the triangle pointing up; the inverted triangle shape has the tip of the triangle pointing down. The left triangle shape is a right triangle with the hypotenuse facing up and to the left. + +The other notehead covers noteheads other than those listed here. It is usually used in combination with the smufl attribute to specify a particular SMuFL notehead. The smufl attribute may be used with any notehead value to help specify the appearance of symbols that share the same MusicXML semantics. Noteheads in the SMuFL "Note name noteheads" range (U+E150–U+E1AF) should not use the smufl attribute or the "other" value, but instead use the notehead-text element. @@ -1421,6 +1645,7 @@ The arrow shapes differ from triangle and inverted triangle by being centered on + @@ -1437,9 +1662,10 @@ The arrow shapes differ from triangle and inverted triangle by being centered on + - + Octaves are represented by the numbers 0 to 9, where 4 indicates the octave started by middle C. @@ -1449,14 +1675,14 @@ The arrow shapes differ from triangle and inverted triangle by being centered on - + The semitones type is a number representing semitones, used for chromatic alteration. A value of -1 corresponds to a flat and a value of 1 to a sharp. Decimal values like 0.5 (quarter tone sharp) are used for microtones. - + The show-tuplet type indicates whether to show a part of a tuplet relating to the tuplet-actual element, both the tuplet-actual and tuplet-normal elements, or neither. @@ -1467,7 +1693,7 @@ The arrow shapes differ from triangle and inverted triangle by being centered on - + The stem type represents the notated stem direction. @@ -1479,7 +1705,7 @@ The arrow shapes differ from triangle and inverted triangle by being centered on - + The step type represents a step of the diatonic scale, represented using the English letters A through G. @@ -1494,7 +1720,7 @@ The arrow shapes differ from triangle and inverted triangle by being centered on - + Lyric hyphenation is indicated by the syllabic type. The single, begin, end, and middle values represent single-syllable words, word-beginning syllables, word-ending syllables, and mid-word syllables, respectively. @@ -1506,7 +1732,17 @@ The arrow shapes differ from triangle and inverted triangle by being centered on - + + + + The tap-hand type represents the symbol to use for a tap element. The left and right values refer to the SMuFL guitarLeftHandTapping and guitarRightHandTapping glyphs respectively. + + + + + + + The number of tremolo marks is represented by a number from 0 to 8: the same as beam-level with 0 added. @@ -1516,9 +1752,9 @@ The arrow shapes differ from triangle and inverted triangle by being centered on - + - + The group-barline-value type indicates if the group should have common barlines. @@ -1529,7 +1765,7 @@ The arrow shapes differ from triangle and inverted triangle by being centered on - + The group-symbol-value type indicates how the symbol for a group is indicated in the score. The default value is none. @@ -1542,13 +1778,22 @@ The arrow shapes differ from triangle and inverted triangle by being centered on - + + + + The measure-text type is used for the text attribute of measure elements. It has at least one character. The implicit attribute of the measure element should be set to "yes" rather than setting the text attribute to an empty string. + + + + + + - + The bend-sound type is used for bend and slide elements, and is similar to the trill-sound attribute group. Here the beats element refers to the number of discrete elements (like MIDI pitch bends) used to represent a continuous bend or slide. The first-beat indicates the percentage of the direction for starting a bend; the last-beat the percentage for ending it. The default choices are: - + accelerate = "no" beats = "4" first-beat = "25" @@ -1559,25 +1804,27 @@ The arrow shapes differ from triangle and inverted triangle by being centered on - + The bezier attribute group is used to indicate the curvature of slurs and ties, representing the control points for a cubic bezier curve. For ties, the bezier attribute group is used with the tied element. Normal slurs, S-shaped slurs, and ties need only two bezier points: one associated with the start of the slur or tie, the other with the stop. Complex slurs and slurs divided over system breaks can specify additional bezier data at slur elements with a continue type. - -The bezier-offset, bezier-x, and bezier-y attributes describe the outgoing bezier point for slurs and ties with a start type, and the incoming bezier point for slurs and ties with types of stop or continue. The attributes bezier-offset2, bezier-x2, and bezier-y2 are only valid with slurs of type continue, and describe the outgoing bezier point. - -The bezier-offset and bezier-offset2 attributes are measured in terms of musical divisions, like the offset element. These are the recommended attributes for specifying horizontal position. The other attributes are specified in tenths, relative to any position settings associated with the slur or tied element. + +The bezier-x, bezier-y, and bezier-offset attributes describe the outgoing bezier point for slurs and ties with a start type, and the incoming bezier point for slurs and ties with types of stop or continue. The bezier-x2, bezier-y2, and bezier-offset2 attributes are only valid with slurs of type continue, and describe the outgoing bezier point. + +The bezier-x, bezier-y, bezier-x2, and bezier-y2 attributes are specified in tenths, relative to any position settings associated with the slur or tied element. The bezier-offset and bezier-offset2 attributes are measured in terms of musical divisions, like the offset element. + +The bezier-offset and bezier-offset2 attributes are deprecated as of MusicXML 3.1. If both the bezier-x and bezier-offset attributes are present, the bezier-x attribute takes priority. Similarly, the bezier-x2 attribute takes priority over the bezier-offset2 attribute. The two types of bezier attributes are not additive. - - + + - + The color attribute group indicates the color of an element. @@ -1588,7 +1835,7 @@ The bezier-offset and bezier-offset2 attributes are measured in terms of musical The dashed-formatting entity represents the length of dashes and spaces in a dashed line. Both the dash-length and space-length attributes are represented in tenths. These attributes are ignored if the corresponding line-type attribute is not dashed. - + @@ -1599,7 +1846,7 @@ The bezier-offset and bezier-offset2 attributes are measured in terms of musical - + The document-attributes attribute group is used to specify the attributes for an entire MusicXML document. Currently this is used for the version attribute. @@ -1608,14 +1855,14 @@ The version attribute was added in Version 1.1 for the score-partwise and score- - + The enclosure attribute group is used to specify the formatting of an enclosure around text or symbols. - + The font attribute group gathers together attributes for determining the font within a credit or direction. They are based on the text styles for Cascading Style Sheets. The font-family is a comma-separated list of font names. These can be specific font styles such as Maestro or Opus, or one of several generic font styles: music, engraved, handwritten, text, serif, sans-serif, handwritten, cursive, fantasy, and monospace. The music, engraved, and handwritten values refer to music fonts; the rest refer to text fonts. The fantasy style refers to decorative text such as found in older German-style printing. The font-style can be normal or italic. The font-size can be one of the CSS sizes (xx-small, x-small, small, medium, large, x-large, xx-large) or a numeric point size. The font-weight can be normal or bold. The default is application-dependent, but is a text font vs. a music font. @@ -1625,7 +1872,7 @@ The version attribute was added in Version 1.1 for the score-partwise and score- - + In cases where text extends over more than one line, horizontal alignment and justify values can be different. The most typical case is for credits, such as: @@ -1639,21 +1886,21 @@ The halign attribute is used in these situations. If it is not present, its valu - + The justify attribute is used to indicate left, center, or right justification. The default value varies for different elements. For elements where the justify attribute is present but the halign attribute is not, the justify attribute indicates horizontal alignment as well as justification. - + The letter-spacing attribute specifies text tracking. Values are either "normal" or a number representing the number of ems to add between each letter. The number may be negative in order to subtract space. The default is normal, which allows flexibility of letter-spacing for purposes of text justification. - + The level-display attribute group specifies three common ways to indicate editorial indications: putting parentheses or square brackets around a symbol, or making the symbol a different size. If not specified, they are left to application defaults. It is used by the level and accidental elements. @@ -1662,45 +1909,59 @@ The halign attribute is used in these situations. If it is not present, its valu - + - The line-height attribute specifies text leading. Values are either "normal" or a number representing the percentage of the current font height to use for leading. The default is "normal". The exact normal value is implementation-dependent, but values between 100 and 120 are recommended. + The line-height attribute specifies text leading. Values are either "normal" or a number representing the percentage of the current font height to use for leading. The default is "normal". The exact normal value is implementation-dependent, but values between 100 and 120 are recommended. + + + + + + + The line-length attribute distinguishes between different line lengths for doit, falloff, plop, and scoop articulations. - + - + The line-shape attribute distinguishes between straight and curved lines. - + The line-type attribute distinguishes between solid, dashed, dotted, and wavy lines. - + + + + The optional-unique-id attribute group allows an element to optionally specify an ID that is unique to the entire document. This attribute group is not used for a required id attribute, or for an id attribute that specifies an id reference. + + + + The orientation attribute indicates whether slurs and ties are overhand (tips down) or underhand (tips up). This is distinct from the placement attribute used by any notation type. - + The placement attribute indicates whether something is above or below another element, such as a note or a notation. - + - The position attributes are based on MuseData print suggestions. For most elements, any program will compute a default x and y position. The position attributes let this be changed two ways. + The position attributes are based on MuseData print suggestions. For most elements, any program will compute a default x and y position. The position attributes let this be changed two ways. The default-x and default-y attributes change the computation of the default position. For most elements, the origin is changed relative to the left-hand side of the note or the musical position within the bar (x) and the top line of the staff (y). @@ -1724,7 +1985,7 @@ For the note, figured-bass, and harmony elements, the default-x value is conside Since the credit-words and credit-image elements are not related to a measure, in these cases the default-x and default-y attributes adjust the origin relative to the bottom left-hand corner of the specified page. The relative-x and relative-y attributes change the position relative to the default position, either as computed by the individual program, or as overridden by the default-x and default-y attributes. - + Positive x is right, negative x is left; positive y is up, negative y is down. All units are in tenths of interline space. For stems, positive relative-y lengthens a stem while negative relative-y shortens it. The default-x and default-y position attributes provide higher-resolution positioning data than related features such as the placement attribute and the offset element. Applications reading a MusicXML file that can understand both features should generally rely on the default-x and default-y attributes for their greater accuracy. For the relative-x and relative-y attributes, the offset element, placement attribute, and directive attribute provide context for the relative position information, so the two features should be interpreted together. @@ -1736,21 +1997,21 @@ As elsewhere in the MusicXML format, tenths are the global tenths defined by the - + The print-object attribute specifies whether or not to print an object (e.g. a note or a rest). It is yes by default. - + The print-spacing attribute controls whether or not spacing is left for an invisible note or object. It is used only if no note, dot, or lyric is being printed. The value is yes (leave spacing) by default. - + The print-style attribute group collects the most popular combination of printing attributes: position, font, and color. @@ -1759,7 +2020,7 @@ As elsewhere in the MusicXML format, tenths are the global tenths defined by the - + The print-style-align attribute group adds the halign and valign attributes to the position, font, and color attributes. @@ -1768,7 +2029,7 @@ As elsewhere in the MusicXML format, tenths are the global tenths defined by the - + The printout attribute group collects the different controls over printing an object (e.g. a note or rest) and its parts, including augmentation dots and lyrics. This is especially useful for notes that overlap in different voices, or for chord sheets that contain lyrics and chords but no melody. @@ -1780,6 +2041,27 @@ By default, all these attributes are set to yes. If print-object is set to no, t + + + + The smufl attribute group is used to indicate a particular Standard Music Font Layout (SMuFL) character. Sometimes this is a formatting choice, and sometimes this is a refinement of the semantic meaning of an element. + + + + + + + The symbol-formatting attribute group collects the common formatting attributes for musical symbols. Default values may differ across the elements that use this group. + + + + + + + + + + @@ -1789,14 +2071,14 @@ By default, all these attributes are set to yes. If print-object is set to no, t - + The text-direction attribute is used to adjust and override the Unicode bidirectional text algorithm, similar to the W3C Internationalization Tag Set recommendation. - + The text-formatting attribute group collects the common formatting attributes for text elements. Default values may differ across the elements that use this group. @@ -1812,28 +2094,28 @@ By default, all these attributes are set to yes. If print-object is set to no, t - + The rotation attribute is used to rotate text around the alignment point specified by the halign and valign attributes. Positive values are clockwise rotations, while negative values are counter-clockwise rotations. - + The trill-sound attribute group includes attributes used to guide the sound of trills, mordents, turns, shakes, and wavy lines, based on MuseData sound suggestions. The default choices are: - + start-note = "upper" trill-step = "whole" two-note-turn = "none" accelerate = "no" beats = "4". - + Second-beat and last-beat are percentages for landing on the indicated beat, with defaults of 25 and 75 respectively. - + For mordent and inverted-mordent elements, the defaults are different: - + The default start-note is "main", not "upper". The default for beats is "3", not "4". The default for second-beat is "12", not "25". @@ -1847,21 +2129,21 @@ For mordent and inverted-mordent elements, the defaults are different: - + The valign attribute is used to indicate vertical alignment to the top, middle, bottom, or baseline of the text. Defaults are implementation-dependent. - + The valign-image attribute is used to indicate vertical alignment for images and graphics, so it removes the baseline value. Defaults are implementation-dependent. - + The x-position attribute group is used for elements like notes where specifying x position is common, but specifying y position is rare. @@ -1871,7 +2153,7 @@ For mordent and inverted-mordent elements, the defaults are different: - + The y-position attribute group is used for elements like stems where specifying y position is common, but specifying x position is rare. @@ -1881,20 +2163,22 @@ For mordent and inverted-mordent elements, the defaults are different: - + - + - The image-attributes group is used to include graphical images in a score. The required source attribute is the URL for the image file. The required type attribute is the MIME type for the image file format. Typical choices include application/postscript, image/gif, image/jpeg, image/png, and image/tiff. + The image-attributes group is used to include graphical images in a score. The required source attribute is the URL for the image file. The required type attribute is the MIME type for the image file format. Typical choices include application/postscript, image/gif, image/jpeg, image/png, and image/tiff. The optional height and width attributes are used to size and scale an image. The image should be scaled independently in X and Y if both height and width are specified. If only one attribute is specified, the image should be scaled proportionally to fit in the specified dimension. + + - + The print-attributes group is used by the print element. The new-system and new-page attributes indicate whether to force a system or page break, or to force the current music onto the same system or page as the preceding music. Normally this is the first music data within a measure. If used in multi-part music, they should be placed in the same positions within each part, or the results are undefined. The page-number attribute sets the number of a new page; it is ignored if new-page is not "yes". Version 2.0 adds a blank-page attribute. This is a positive integer value that specifies the number of blank pages to insert before the current measure. It is ignored if new-page is not "yes". These blank pages have no music, but may have text or images specified by the credit element. This is used to allow a combination of pages that are all text, or all text and images, together with pages of music. @@ -1907,9 +2191,9 @@ The staff-spacing attribute specifies spacing between multiple staves in tenths - + - + The element and position attributes are new as of Version 2.0. They allow for bookmarks and links to be positioned at higher resolution than the level of music-data elements. When no element and position attributes are present, the bookmark or link element refers to the next sibling element in the MusicXML file. The element attribute specifies an element type for a descendant of the next sibling element that is not a link or bookmark. The position attribute specifies the position of this descendant element, where the first position is 1. The position attribute is ignored if the element attribute is not present. For instance, an element value of "beam" and a position value of "2" defines the link or bookmark to refer to the second beam descendant of the next sibling element that is not a link or bookmark. This is equivalent to an XPath test of [.//beam[2]] done in the context of the sibling element. @@ -1930,9 +2214,9 @@ The staff-spacing attribute specifies spacing between multiple staves in tenths - + - + The group-name-text attribute group is used by the group-name and group-abbreviation elements. The print-style and justify attribute groups are deprecated in MusicXML 2.0 in favor of the new group-name-display and group-abbreviation-display elements. @@ -1944,28 +2228,32 @@ The staff-spacing attribute specifies spacing between multiple staves in tenths The measure-attributes group is used by the measure element. Measures have a required number attribute (going from partwise to timewise, measures are grouped via the number). - + The implicit attribute is set to "yes" for measures where the measure number should never appear, such as pickup measures and the last half of mid-measure repeats. The value is "no" if not specified. - -The non-controlling attribute is intended for use in multimetric music like the Don Giovanni minuet. If set to "yes", the left barline in this measure does not coincide with the left barline of measures in other parts. The value is "no" if not specified. -In partwise files, the number attribute should be the same for measures in different parts that share the same left barline. While the number attribute is often numeric, it does not have to be. Non-numeric values are typically used together with the implicit or non-controlling attributes being set to "yes". For a pickup measure, the number attribute is typically set to "0" and the implicit attribute is typically set to "yes". Further details about measure numbering can be defined using the measure-numbering element. +The non-controlling attribute is intended for use in multimetric music like the Don Giovanni minuet. If set to "yes", the left barline in this measure does not coincide with the left barline of measures in other parts. The value is "no" if not specified. + +In partwise files, the number attribute should be the same for measures in different parts that share the same left barline. While the number attribute is often numeric, it does not have to be. Non-numeric values are typically used together with the implicit or non-controlling attributes being set to "yes". For a pickup measure, the number attribute is typically set to "0" and the implicit attribute is typically set to "yes". + +If measure numbers are not unique within a part, this can cause problems for conversions between partwise and timewise formats. The text attribute allows specification of displayed measure numbers that are different than what is used in the number attribute. This attribute is ignored for measures where the implicit attribute is set to "yes". Further details about measure numbering can be specified using the measure-numbering element. Measure width is specified in tenths. These are the global tenths specified in the scaling element, not local tenths as modified by the staff-size element. The width covers the entire measure from barline or system start to barline or system end. + + - + In either partwise or timewise format, the part element has an id attribute that is an IDREF back to a score-part in the part-list. - + The part-name-text attribute group is used by the part-name and part-abbreviation elements. The print-style and justify attribute groups are deprecated in MusicXML 2.0 in favor of the new part-name-display and part-abbreviation-display elements. @@ -1974,7 +2262,7 @@ Measure width is specified in tenths. These are the global tenths specified in t - + @@ -1984,14 +2272,24 @@ Measure width is specified in tenths. These are the global tenths specified in t + + + + The coda type is the visual indicator of a coda sign. The exact glyph can be specified with the smufl attribute. A sound element is also needed to guide playback applications reliably. + + + + + + Dynamics can be associated either with a note or a general musical direction. To avoid inconsistencies between and amongst the letter abbreviations for dynamics (what is sf vs. sfz, standing alone or with a trailing dynamic that is not always piano), we use the actual letters as the names of these dynamic elements. The other-dynamics element allows other dynamic marks that are not covered here, but many of those should perhaps be included in a more general musical direction element. Dynamics elements may also be combined to create marks not covered by a single element, such as sfmp. - + These letter dynamic symbols are separated from crescendo, decrescendo, and wedge indications. Dynamic representation is inconsistent in scores. Many things are assumed by the composer and left out, such as returns to original dynamics. Systematic representations are quite complex: for example, Humdrum has at least 3 representation formats related to dynamics. The MusicXML format captures what is in the score, but does not try to be optimal for analysis or synthesis of dynamics. @@ -2018,20 +2316,24 @@ These letter dynamic symbols are separated from crescendo, decrescendo, and wedg - + + + + + - + The empty type represents an empty element with no attributes. - + The empty-placement type represents an empty element with print-style and placement attributes. @@ -2039,21 +2341,38 @@ These letter dynamic symbols are separated from crescendo, decrescendo, and wedg - + + + + The empty-placement-smufl type represents an empty element with print-style, placement, and smufl attributes. + + + + + + The empty-print-style type represents an empty element with print-style attribute group. - + The empty-print-style-align type represents an empty element with print-style-align attribute group. - + + + + The empty-print-style-align-id type represents an empty element with print-style-align and optional-unique-id attribute groups. + + + + + The empty-print-style-align-object type represents an empty element with print-object and print-style-align attribute groups. @@ -2061,7 +2380,7 @@ These letter dynamic symbols are separated from crescendo, decrescendo, and wedg - + The empty-trill-sound type represents an empty element with print-style, placement, and trill-sound attributes. @@ -2070,7 +2389,7 @@ These letter dynamic symbols are separated from crescendo, decrescendo, and wedg - + The horizontal-turn type represents turn elements that are horizontal rather than vertical. These are empty elements with print-style, placement, trill-sound, and slash attributes. If the slash attribute is yes, then a vertical line is used to slash the turn; it is no by default. @@ -2080,7 +2399,7 @@ These letter dynamic symbols are separated from crescendo, decrescendo, and wedg - + The fermata text content represents the shape of the fermata sign. An empty fermata element represents a normal fermata. The fermata type is upright if not specified. @@ -2089,6 +2408,7 @@ These letter dynamic symbols are separated from crescendo, decrescendo, and wedg + @@ -2107,6 +2427,29 @@ These letter dynamic symbols are separated from crescendo, decrescendo, and wedg + + + The formatted-symbol type represents a SMuFL musical symbol element with formatting attributes. + + + + + + + + + + + The formatted-symbol-id type represents a SMuFL musical symbol element with formatting and id attributes. + + + + + + + + + The formatted-text type represents a text element with text-formatting attributes. @@ -2117,7 +2460,19 @@ These letter dynamic symbols are separated from crescendo, decrescendo, and wedg - + + + + The formatted-text-id type represents a text element with text-formatting and id attributes. + + + + + + + + + The fret element is used with tablature notation and chord diagrams. Fret numbers start with 0 for an open string and 1 for the first fret. @@ -2141,7 +2496,7 @@ These letter dynamic symbols are separated from crescendo, decrescendo, and wedg - + The midi-device type corresponds to the DeviceName meta event in Standard MIDI Files. The optional port attribute is a number from 1 to 16 that can be used with the unofficial MIDI port (or cable) meta event. Unlike the DeviceName meta event, there can be multiple midi-device elements per MusicXML part starting in MusicXML 3.0. The optional id attribute refers to the score-instrument assigned to this device. If missing, the device assignment affects all score-instrument elements in the score-part. @@ -2215,7 +2570,7 @@ These letter dynamic symbols are separated from crescendo, decrescendo, and wedg - + The other-play element represents other types of playback. The required type attribute indicates the type of playback to which the element content applies. @@ -2226,7 +2581,7 @@ These letter dynamic symbols are separated from crescendo, decrescendo, and wedg - + The play type, new in Version 3.0, specifies playback techniques to be used in conjunction with the instrument-sound element. When used as part of a sound element, it applies to all notes going forward in score order. In multi-instrument parts, the affected instrument should be specified using the id attribute. When used as part of a note element, it applies to the current note only. @@ -2245,10 +2600,19 @@ These letter dynamic symbols are separated from crescendo, decrescendo, and wedg - + + + + The segno type is the visual indicator of a segno sign. The exact glyph can be specified with the smufl attribute. A sound element is also needed to guide playback applications reliably. + + + + + + - The string type is used with tablature notation, regular notation (where it is often circled), and chord diagrams. String numbers start with 1 for the highest string. + The string type is used with tablature notation, regular notation (where it is often circled), and chord diagrams. String numbers start with 1 for the highest pitched full-length string. @@ -2257,7 +2621,7 @@ These letter dynamic symbols are separated from crescendo, decrescendo, and wedg - + The typed-text type represents a text element with a type attributes. @@ -2268,10 +2632,10 @@ These letter dynamic symbols are separated from crescendo, decrescendo, and wedg - + - Wavy lines are one way to indicate trills. When used with a measure element, they should always have type="continue" set. + Wavy lines are one way to indicate trills. When used with a barline element, they should always have type="continue" set. @@ -2282,7 +2646,7 @@ These letter dynamic symbols are separated from crescendo, decrescendo, and wedg - + The attributes element contains musical information that typically changes on measure boundaries. This includes key and time signatures, clefs, transpositions, and staving. When attributes are changed mid-measure, it affects the music in score order, not in MusicXML document order. @@ -2301,7 +2665,7 @@ These letter dynamic symbols are separated from crescendo, decrescendo, and wedg The key element represents a key signature. Both traditional and non-traditional key signatures are supported. The optional number attribute refers to staff numbers. If absent, the key signature applies to all staves in the part. - + Time signatures are represented by the beats element for the numerator and the beat-type element for the denominator. @@ -2370,7 +2734,7 @@ These letter dynamic symbols are separated from crescendo, decrescendo, and wedg The beat-repeat type is used to indicate that a single beat (but possibly many notes) is repeated. Both the start and stop of the beat being repeated should be specified. The slashes attribute specifies the number of slashes to use in the symbol. The use-dots attribute indicates whether or not to use dots as well (for instance, with mixed rhythm patterns). By default, the value for slashes is 1 and the value for use-dots is no. - + The beat-repeat element specifies a notation style for repetitions. The actual music being repeated needs to be repeated within the MusicXML file. This element specifies the notation that indicates the repeat. @@ -2381,7 +2745,7 @@ The beat-repeat element specifies a notation style for repetitions. The actual m - A cancel element indicates that the old key signature should be cancelled before the new one appears. This will always happen when changing to C major or A minor and need not be specified then. The cancel value matches the fifths value of the cancelled key signature (e.g., a cancel of -2 will provide an explicit cancellation for changing from B flat major to F major). The optional location attribute indicates whether the cancellation appears relative to the new key signature. + A cancel element indicates that the old key signature should be cancelled before the new one appears. This will always happen when changing to C major or A minor and need not be specified then. The cancel value matches the fifths value of the cancelled key signature (e.g., a cancel of -2 will provide an explicit cancellation for changing from B flat major to F major). The optional location attribute indicates where the cancellation appears relative to the new key signature. @@ -2423,11 +2787,12 @@ Clefs appear at the start of each system unless the print-object attribute has b + - The interchangeable type is used to represent the second in a pair of interchangeable dual time signatures, such as the 6/8 in 3/4 (6/8). A separate symbol attribute value is available compared to the time element's symbol attribute, which applies to the first of the dual time signatures. The parentheses attribute value is yes by default. + The interchangeable type is used to represent the second in a pair of interchangeable dual time signatures, such as the 6/8 in 3/4 (6/8). A separate symbol attribute value is available compared to the time element's symbol attribute, which applies to the first of the dual time signatures. @@ -2455,11 +2820,23 @@ Clefs appear at the start of each system unless the print-object attribute has b + - + + + + The key-accidental type indicates the accidental to be displayed in a non-traditional key signature, represented in the same manner as the accidental type without the formatting attributes. + + + + + + + + - The key-octave element specifies in which octave an element of a key signature appears. The content specifies the octave value using the same values as the display-octave element. The number attribute is a positive integer that refers to the key signature element in left-to-right order. If the cancel attribute is set to yes, then this number refers to an element specified by the cancel element. It is no by default. + The key-octave element specifies in which octave an element of a key signature appears. The content specifies the octave value using the same values as the display-octave element. The number attribute is a positive integer that refers to the key signature element in left-to-right order. If the cancel attribute is set to yes, then this number refers to the canceling key signature specified by the cancel element in the parent key element. The cancel attribute cannot be set to yes if there is no corresponding cancel element within the parent key element. It is no by default. @@ -2472,7 +2849,7 @@ Clefs appear at the start of each system unless the print-object attribute has b The measure-repeat type is used for both single and multiple measure repeats. The text of the element indicates the number of measures to be repeated in a single pattern. The slashes attribute specifies the number of slashes to use in the repeat sign. It is 1 if not specified. Both the start and the stop of the measure-repeat must be specified. The text of the element is ignored when the type is stop. - + The measure-repeat element specifies a notation style for repetitions. The actual music being repeated needs to be repeated within the MusicXML file. This element specifies the notation that indicates the repeat. @@ -2498,11 +2875,12 @@ The multiple-rest and measure-repeat symbols indicate the number of measures cov + - The text of the multiple-rest type indicates the number of measures in the multiple rest. Multiple rests may use the 1-bar / 2-bar / 4-bar rest symbols, or a single shape. The use-symbols attribute indicates which to use; it is no if not specified. The element text is ignored when the type is stop. + The text of the multiple-rest type indicates the number of measures in the multiple rest. Multiple rests may use the 1-bar / 2-bar / 4-bar rest symbols, or a single shape. The use-symbols attribute indicates which to use; it is no if not specified. @@ -2594,6 +2972,7 @@ The print-object attribute allows a time signature to be specified but not print + @@ -2623,8 +3002,9 @@ The print-object attribute allows a time signature to be specified but not print + - + @@ -2641,15 +3021,15 @@ The print-object attribute allows a time signature to be specified but not print If a barline is other than a normal single barline, it should be represented by a barline type that describes it. This includes information about repeats and multiple endings, as well as line style. Barline data is on the same level as the other musical data in a score - a child of a measure in a partwise score, or a part in a timewise score. This allows for barlines within measures, as in dotted barlines that subdivide measures in complex meters. The two fermata elements allow for fermatas on both sides of the barline (the lower one inverted). - + Barlines have a location attribute to make it easier to process barlines independently of the other musical data in a score. It is often easier to set up measures separately from entering notes. The location attribute must match where the barline element occurs within the rest of the musical data in the score. If location is left, it should be the first element in the measure, aside from the print, bookmark, and link elements. If location is right, it should be the last element, again with the possible exception of the print, bookmark, and link elements. If no location is specified, the right barline is the default. The segno, coda, and divisions attributes work the same way as in the sound element. They are used for playback when barline elements contain segno or coda child elements. - - + + @@ -2658,12 +3038,13 @@ Barlines have a location attribute to make it easier to process barlines indepen + - + The ending type represents multiple (e.g. first and second) endings. Typically, the start type is associated with the left barline of the first measure in an ending. The stop and discontinue types are associated with the right barline of the last measure in an ending. Stop is used when the ending mark concludes with a downward jog, as is typical for first endings. Discontinue is used when there is no downward jog, as is typical for second endings that do not conclude a piece. The length of the jog can be specified using the end-length attribute. The text-x and text-y attributes are offsets that specify where the baseline of the start of the ending text appears, relative to the start of the ending line. - + The number attribute reflects the numeric values of what is under the ending line. Single endings such as "1" or comma-separated multiple endings such as "1,2" may be used. The ending element text is used when the text displayed in the ending is different than what appears in the number attribute. The print-object element is used to indicate when an ending is present but not printed, as is often the case for many parts in a full score. @@ -2689,7 +3070,7 @@ The number attribute reflects the numeric values of what is under the ending lin - + The accord type represents the tuning of a single string in the scordatura element. It uses the same group of elements as the staff-tuning element. Strings are numbered from high to low. @@ -2705,21 +3086,22 @@ The number attribute reflects the numeric values of what is under the ending lin - The accordion-high element indicates the presence of a dot in the high (4') section of the registration symbol. + The accordion-high element indicates the presence of a dot in the high (4') section of the registration symbol. This element is omitted if no dot is present. - The accordion-middle element indicates the presence of 1 to 3 dots in the middle (8') section of the registration symbol. + The accordion-middle element indicates the presence of 1 to 3 dots in the middle (8') section of the registration symbol. This element is omitted if no dots are present. - The accordion-low element indicates the presence of a dot in the low (16') section of the registration symbol. + The accordion-low element indicates the presence of a dot in the low (16') section of the registration symbol. This element is omitted if no dot is present. + @@ -2729,7 +3111,7 @@ The number attribute reflects the numeric values of what is under the ending lin - + The bass type is used to indicate a bass note in popular music chord symbols, e.g. G/C. It is generally not used in functional harmony, as inversion is generally not used in pop chord symbols. As with root, it is divided into step and alter elements, similar to pitches. @@ -2776,6 +3158,13 @@ The number attribute reflects the numeric values of what is under the ending lin + + + The beat-unit-tied type indicates a beat-unit within a metronome mark that is tied to the preceding beat-unit. This allows or two or more tied notes to be associated with a per-minute value in a metronome mark, whereas the metronome-tied element is restricted to metric relationship marks. + + + + Brackets are combined with words in a variety of modern directions. The line-end attribute specifies if there is a jog up or down (or both), an arrow, or nothing at the start or end of the bracket. If the line-end is up or down, the length of the jog can be specified using the end-length attribute. The line-type is solid by default. @@ -2788,6 +3177,7 @@ The number attribute reflects the numeric values of what is under the ending lin + @@ -2799,12 +3189,13 @@ The number attribute reflects the numeric values of what is under the ending lin + The degree type is used to add, alter, or subtract individual notes in the chord. The print-object attribute can be used to keep the degree from printing separately when it has already taken into account in the text attribute of the kind element. The degree-value and degree-type text attributes specify how the value and type of the degree should be displayed. - + A harmony of kind "other" can be spelled explicitly by using a series of degree elements together with a root. @@ -2854,8 +3245,8 @@ A harmony of kind "other" can be spelled explicitly by using a series of degree - A direction is a musical indication that is not attached to a specific note. Two or more may be combined to indicate starts and stops of wedges, dashes, etc. - + A direction is a musical indication that is not necessarily attached to a specific note. Two or more may be combined to indicate starts and stops of wedges, dashes, etc. For applications where a specific direction is indeed attached to a specific note, the direction element can be associated with the note element that follows it in score order that is not in a different voice. + By default, a series of direction-type elements and a series of child elements of a direction-type within a single direction element follow one another in sequence visually. For a series of direction-type children, non-positional formatting attributes are carried over from the previous element by default. @@ -2867,33 +3258,33 @@ By default, a series of direction-type elements and a series of child elements o + - + Textual direction types may have more than 1 component due to multiple fonts. The dynamics element may also be used in the notations element. Attribute groups related to print suggestions apply to the individual direction-type, not to the overall direction. - + The rehearsal type specifies a rehearsal mark. Language is Italian ("it") by default. Enclosure is square by default. Left justification is assumed if not specified. - - - The segno element is the visual indicator of a segno sign. A sound element is needed to guide playback applications reliably. - - - - - The words element specifies a standard text direction. Left justification is assumed if not specified. Language is Italian ("it") by default. Enclosure is none by default. - - - - - The coda element is the visual indicator of a coda sign. A sound element is needed to guide playback applications reliably. - - + + + + + + The words element specifies a standard text direction. Left justification is assumed if not specified. Language is Italian ("it") by default. Enclosure is none by default. + + + + + The symbol element specifies a musical symbol using a canonical SMuFL glyph name. It is used when an occasional musical symbol is interspersed into text. It should not be used in place of semantic markup, such as metronome marks that mix text and symbols. Left justification is assumed if not specified. Enclosure is none by default. + + + @@ -2902,17 +3293,17 @@ By default, a series of direction-type elements and a series of child elements o - + The damp element specifies a harp damping mark. - + The damp-all element specifies a harp damping mark for all strings. - + The eyeglasses element specifies the eyeglasses symbol, common in commercial music. @@ -2921,10 +3312,12 @@ By default, a series of direction-type elements and a series of child elements o - + + + @@ -2975,6 +3368,7 @@ By default, a series of direction-type elements and a series of child elements o + @@ -2989,10 +3383,21 @@ By default, a series of direction-type elements and a series of child elements o + + + The glass type represents pictograms for glass percussion instruments. The smufl attribute is used to distinguish different SMuFL glyphs for wind chimes in the chimes pictograms range, including those made of materials other than glass. + + + + + + + + The grouping type is used for musical analysis. When the type attribute is "start" or "single", it usually contains one or more feature elements. The number attribute is used for distinguishing between overlapping and hierarchical groupings. The member-of attribute allows for easy distinguishing of what grouping elements are in what hierarchy. Feature elements contained within a "stop" type of grouping may be ignored. - + This element is flexible to allow for different types of analyses. Future versions of the MusicXML format may add elements that can represent more standardized categories of analysis data, allowing for easier data sharing. @@ -3001,14 +3406,15 @@ This element is flexible to allow for different types of analyses. Future versio + The harmony type is based on Humdrum's **harm encoding, extended to support chord symbols in popular music as well as functional harmony analysis in classical music. - -If there are alternate harmonies possible, this can be specified using multiple harmony elements differentiated by type. Explicit harmonies have all note present in the music; implied have some notes missing but implied; alternate represents alternate analyses. - + +If there are alternate harmonies possible, this can be specified using multiple harmony elements differentiated by type. Explicit harmonies have all note present in the music; implied have some notes missing but implied; alternate represents alternate analyses. + The harmony object may be used for analysis or for chord symbols. The print-object attribute controls whether or not anything is printed due to the harmony element. The print-frame attribute controls printing of a frame or fretboard diagram. The print-style attribute group sets the default for the harmony, but individual elements can override this with their own print-style values. @@ -3023,6 +3429,7 @@ The harmony object may be used for analysis or for chord symbols. The print-obje + @@ -3033,6 +3440,7 @@ The harmony object may be used for analysis or for chord symbols. The print-obje + @@ -3040,6 +3448,7 @@ The harmony object may be used for analysis or for chord symbols. The print-obje The image type is used to include graphical images in a score. + @@ -3056,17 +3465,17 @@ The harmony object may be used for analysis or for chord symbols. The print-obje Kind indicates the type of chord. Degree elements can then add, subtract, or alter from these starting points - + The attributes are used to indicate the formatting of the symbol. Since the kind element is the constant in all the harmony-chord groups that can make up a polychord, many formatting attributes are here. - + The use-symbols attribute is yes if the kind should be represented when possible with harmony symbols rather than letters and numbers. These symbols include: - + major: a triangle, like Unicode 25B3 minor: -, like Unicode 002D augmented: +, like Unicode 002B diminished: °, like Unicode 00B0 half-diminished: ø, like Unicode 00F8 - + For the major-minor kind, only the minor symbol is used when use-symbols is yes. The major symbol is set using the symbol attribute in the degree-value element. The corresponding degree-alter value will usually be 0 in this case. The text attribute describes how the kind should be spelled in a score. If use-symbols is yes, the value of the text attribute follows the symbol. The stack-degrees attribute is yes if the degree elements should be stacked above each other. The parentheses-degrees attribute is yes if all the degrees should be in parentheses. The bracket-degrees attribute is yes if all the degrees should be in a bracket. If not specified, these values are implementation-specific. The alignment attributes are for the entire harmony-chord group of which this kind element is a part. @@ -3098,17 +3507,26 @@ The text attribute describes how the kind should be spelled in a score. If use-s - The metronome type represents metronome marks and other metric relationships. The beat-unit group and per-minute element specify regular metronome marks. The metronome-note and metronome-relation elements allow for the specification of more complicated metric relationships, such as swing tempo marks where two eighths are equated to a quarter note / eighth note triplet. The parentheses attribute indicates whether or not to put the metronome mark in parentheses; its value is no if not specified. + The metronome type represents metronome marks and other metric relationships. The beat-unit group and per-minute element specify regular metronome marks. The metronome-note and metronome-relation elements allow for the specification of metric modulations and other metric relationships, such as swing tempo marks where two eighths are equated to a quarter note / eighth note triplet. Tied notes can be represented in both types of metronome marks by using the beat-unit-tied and metronome-tied elements. The parentheses attribute indicates whether or not to put the metronome mark in parentheses; its value is no if not specified. + - + + + + + + + If the metronome-arrows element is present, it indicates that metric modulation arrows are displayed on both sides of the metronome mark. + + @@ -3123,6 +3541,7 @@ The text attribute describes how the kind should be spelled in a score. If use-s + @@ -3152,10 +3571,18 @@ The text attribute describes how the kind should be spelled in a score. If use-s + - + + + + The metronome-tied indicates the presence of a tie within a metric relationship mark. As with the tied element, both the start and stop of the tie should be specified, in this case within separate metronome-note elements. + + + + The metronome-tuplet type uses the same element structure as the time-modification element along with some attributes from the tuplet element. @@ -3178,6 +3605,7 @@ The text attribute describes how the kind should be spelled in a score. If use-s + @@ -3193,24 +3621,31 @@ The text attribute describes how the kind should be spelled in a score. If use-s - The other-direction type is used to define any direction symbols not yet in the current version of the MusicXML format. This allows extended representation, though without application interoperability. + The other-direction type is used to define any direction symbols not yet in the MusicXML format. The smufl attribute can be used to specify a particular direction symbol, allowing application interoperability without requiring every SMuFL glyph to have a MusicXML element equivalent. Using the other-direction type without the smufl attribute allows for extended representation, though without application interoperability. + + - The pedal type represents piano pedal marks. The line attribute is yes if pedal lines are used. The sign attribute is yes if Ped and * signs are used. For MusicXML 2.0 compatibility, the sign attribute is yes by default if the line attribute is no, and is no by default if the line attribute is yes. The change and continue types are used when the line attribute is yes. The change type indicates a pedal lift and retake indicated with an inverted V marking. The continue type allows more precise formatting across system breaks and for more complex pedaling lines. The alignment attributes are ignored if the line attribute is yes. + The pedal type represents piano pedal marks. In MusicXML 3.1 this includes sostenuto as well as damper pedal marks. The line attribute is yes if pedal lines are used. The sign attribute is yes if Ped, Sost, and * signs are used. For MusicXML 2.0 compatibility, the sign attribute is yes by default if the line attribute is no, and is no by default if the line attribute is yes. If the sign attribute is set to yes and the type is start or sostenuto, the abbreviated attribute is yes if the short P and S signs are used, and no if the full Ped and Sost signs are used. It is no by default. Otherwise the abbreviated attribute is ignored. + +The change and continue types are used when the line attribute is yes. The change type indicates a pedal lift and retake indicated with an inverted V marking. The continue type allows more precise formatting across system breaks and for more complex pedaling lines. The alignment attributes are ignored if the line attribute is yes. - + + + + @@ -3257,10 +3692,22 @@ The text attribute describes how the kind should be spelled in a score. If use-s - + + + + + + + The pitched-value type represents pictograms for pitched percussion instruments. The smufl attribute is used to distinguish different SMuFL glyphs for a particular pictogram within the tuned mallet percussion pictograms range. + + + + + + @@ -3272,6 +3719,7 @@ The text attribute describes how the kind should be spelled in a score. If use-s + @@ -3279,7 +3727,7 @@ The text attribute describes how the kind should be spelled in a score. If use-s The print type contains general printing parameters, including the layout elements defined in the layout.mod file. The part-name-display and part-abbreviation-display elements used in the score.mod file may also be used here to change how a part name or abbreviation is displayed over the course of a piece. They take effect when the current measure or a succeeding measure starts a new system. - + Layout elements in a print statement only apply to the current page, system, staff, or measure. Music that follows continues to take the default values from the layout included in the defaults element. @@ -3290,6 +3738,7 @@ Layout elements in a print statement only apply to the current page, system, sta + @@ -3334,34 +3783,35 @@ Layout elements in a print statement only apply to the current page, system, sta + The sound element contains general playback parameters. They can stand alone within a part/measure, or be a component element within a direction. - + Tempo is expressed in quarter notes per minute. If 0, the sound-generating program should prompt the user at the time of compiling a sound (MIDI) file. - + Dynamics (or MIDI velocity) are expressed as a percentage of the default forte value (90 for MIDI 1.0). - + Dacapo indicates to go back to the beginning of the movement. When used it always has the value "yes". - + Segno and dalsegno are used for backwards jumps to a segno sign; coda and tocoda are used for forward jumps to a coda sign. If there are multiple jumps, the value of these parameters can be used to name and distinguish them. If segno or coda is used, the divisions attribute can also be used to indicate the number of divisions per quarter note. Otherwise sound and MIDI generating programs may have to recompute this. - + By default, a dalsegno or dacapo attribute indicates that the jump should occur the first time through, while a tocoda attribute indicates the jump should occur the second time through. The time that jumps occur can be changed by using the time-only attribute. - + Forward-repeat is used when a forward repeat sign is implied, and usually follows a bar line. When used it always has the value of "yes". - + The fine attribute follows the final note or rest in a movement with a da capo or dal segno direction. If numeric, the value represents the actual duration of the final note or rest, which can be ambiguous in written notation and different among parts and voices. The value may also be "yes" to indicate no change to the final duration. - + If the sound element applies only particular times through a repeat, the time-only attribute indicates which times to apply the sound element. - + Pizzicato in a sound element effects all following notes. Yes indicates pizzicato, no indicates arco. The pan and elevation attributes are deprecated in Version 2.0. The pan and elevation elements in the midi-instrument element should be used instead. The meaning of the pan and elevation attributes is the same as for the pan and elevation elements. If both are present, the mid-instrument elements take priority. - + The damper-pedal, soft-pedal, and sostenuto-pedal attributes effect playback of the three common piano pedals and their MIDI controller equivalents. The yes value indicates the pedal is depressed; no indicates the pedal is released. A numeric value from 0 to 100 may also be used for half pedaling. This value is the percentage that the pedal is depressed. A value of 0 is equivalent to no, and a value of 100 is equivalent to yes. - + MIDI devices, MIDI instruments, and playback techniques are changed using the midi-device, midi-instrument, and play elements. When there are multiple instances of these elements, they should be grouped together by instrument using the id attribute values. The offset element is used to indicate that the sound takes place offset from the current score position. If the sound element is a child of a direction element, the sound offset element overrides the direction offset element if both elements are present. Note that the offset reflects the intended musical position for the change in sound. It should not be used to compensate for latency issues in particular hardware configurations. @@ -3391,17 +3841,29 @@ The offset element is used to indicate that the sound takes place offset from th + - + + + + The staff-divide element represents the staff division arrow symbols found at SMuFL code points U+E00B, U+E00C, and U+E00D. + + + + + + - The stick type represents pictograms where the material of the stick, mallet, or beater is included. + The stick type represents pictograms where the material of the stick, mallet, or beater is included.The parentheses and dashed-circle attributes indicate the presence of these marks around the round beater part of a pictogram. Values for these attributes are "no" if not present. + + @@ -3410,8 +3872,9 @@ The offset element is used to indicate that the sound takes place offset from th + - + The wedge type represents crescendo and diminuendo wedge symbols. The type attribute is crescendo for the start of a wedge that is closed at the left side, and diminuendo for the start of a wedge that is closed on the right side. Spread values are measured in tenths; those at the start of a crescendo wedge or end of a diminuendo wedge are ignored. The niente attribute is yes if a circle appears at the point of the wedge, indicating a crescendo from nothing or diminuendo to nothing. It is no by default, and used only when the type is crescendo, or the type is stop for a wedge that began with a diminuendo type. The line-type is solid by default. @@ -3424,6 +3887,7 @@ The offset element is used to indicate that the sound takes place offset from th + @@ -3511,6 +3975,7 @@ The offset element is used to indicate that the sound takes place offset from th + @@ -3526,6 +3991,17 @@ The offset element is used to indicate that the sound takes place offset from th + + + The glyph element represents what SMuFL glyph should be used for different variations of symbols that are semantically identical. The type attribute specifies what type of glyph is being defined. The element value specifies what SMuFL glyph to use, including recommended stylistic alternates. The SMuFL glyph name should match the type. For instance, a type of quarter-rest would use values restQuarter, restQuarterOld, or restQuarterZ. A type of g-clef-ottava-bassa would use values gClef8vb, gClef8vbOld, or gClef8vbCClef. A type of octave-shift-up-8 would use values ottava, ottavaBassa, ottavaBassaBa, ottavaBassaVb, or octaveBassa. + + + + + + + + The line-width type indicates the width of a line type in tenths. The type attribute defines what type of line is being defined. Values include beam, bracket, dashes, enclosure, ending, extend, heavy barline, leger, light barline, octave shift, pedal, slur middle, slur tip, staff, stem, tie middle, tie tip, tuplet bracket, and wedge. The text content is expressed in tenths. @@ -3592,7 +4068,7 @@ The offset element is used to indicate that the sound takes place offset from th - + Margins, page sizes, and distances are all measured in tenths to keep MusicXML data in a consistent coordinate system as much as possible. The translation to absolute units is done with the scaling type, which specifies how many millimeters are equal to how many tenths. For a staff height of 7 mm, millimeters would be set to 7 while tenths is set to 40. The ability to set a formula rather than a single scaling factor helps avoid roundoff errors. @@ -3628,7 +4104,7 @@ When used in the print element, the system-dividers element affects the dividers A system is a group of staves that are read and played simultaneously. System layout includes left and right margins and the vertical distance from the previous system. The system distance is measured from the bottom line of the previous system to the top line of the current system. It is ignored for the first system on a page. The top system distance is measured from the page's top margin to the top line of the first system. It is ignored for all but the first system on a page. - + Sometimes the sum of measure widths in a system may not equal the system width specified by the layout elements due to roundoff or other errors. The behavior when reading MusicXML files in these cases is application-dependent. For instance, applications may find that the system layout data is more reliable than the sum of the measure widths, and adjust the measure widths accordingly. @@ -3668,7 +4144,7 @@ Sometimes the sum of measure widths in a system may not equal the system width s - + The accidental type represents actual notated accidentals. Editorial and cautionary indications are indicated by attributes. Values for these attributes are "no" if not present. Specific graphic display such as parentheses, brackets, and size are controlled by the level-display attribute group. @@ -3679,6 +4155,7 @@ Sometimes the sum of measure widths in a system may not equal the system width s + @@ -3689,8 +4166,11 @@ Sometimes the sum of measure widths in a system may not equal the system width s + + + @@ -3704,6 +4184,7 @@ Sometimes the sum of measure widths in a system may not equal the system width s + @@ -3763,15 +4244,11 @@ Sometimes the sum of measure widths in a system may not equal the system width s - The falloff element is an indeterminate slide attached to a single note. The falloff element appears before the main note and goes below the main pitch. + The falloff element is an indeterminate slide attached to a single note. The falloff element appears after the main note and goes below the main pitch. - - - The caesura element indicates a slight pause. It is notated using a "railroad tracks" symbol. - - + The stress element indicates a stressed note. @@ -3782,27 +4259,35 @@ Sometimes the sum of measure widths in a system may not equal the system width s The unstress element indicates an unstressed note. It is often notated using a u-shaped symbol. - + - The other-articulation element is used to define any articulations not yet in the MusicXML format. This allows extended representation, though without application interoperability. + The soft-accent element indicates a soft accent that is not as heavy as a normal accent. It is often notated as <>. It can be combined with other articulations to implement the entire SMuFL Articulation Supplement range. + + + + + The other-articulation element is used to define any articulations not yet in the MusicXML format. The smufl attribute can be used to specify a particular articulation, allowing application interoperability without requiring every SMuFL articulation to have a MusicXML element equivalent. Using the other-articulation element without the smufl attribute allows for extended representation, though without application interoperability. + - The arrow element represents an arrow used for a musical technical indication.. + The arrow element represents an arrow used for a musical technical indication. It can represent both Unicode and SMuFL arrows. The presence of an arrowhead element indicates that only the arrowhead is displayed, not the arrow stem. The smufl attribute distinguishes different SMuFL glyphs that have an arrow appearance such as arrowBlackUp, guitarStrumUp, or handbellsSwingUp. The specified glyph should match the descriptive representation. + + @@ -3822,7 +4307,7 @@ Sometimes the sum of measure widths in a system may not equal the system width s Note that the beam number does not distinguish sets of beams that overlap, as it does for slur and other elements. Beaming groups are distinguished by being in different voices and/or the presence or absence of grace and cue elements. Beams that have a begin value can also have a fan attribute to indicate accelerandos and ritardandos using fanned beams. The fan attribute may also be used with a continue value if the fanning direction changes on that note. The value is "none" if not specified. - + The repeater attribute has been deprecated in MusicXML 3.0. Formerly used for tremolos, it needs to be specified with a "yes" value for each beam using it. @@ -3831,6 +4316,7 @@ The repeater attribute has been deprecated in MusicXML 3.0. Formerly used for tr + @@ -3859,7 +4345,7 @@ The repeater attribute has been deprecated in MusicXML 3.0. Formerly used for tr - The with-bar element indicates that the bend is to be done at the bridge with a whammy or vibrato bar. The content of the element indicates how this should be notated. + The with-bar element indicates that the bend is to be done at the bridge with a whammy or vibrato bar. The content of the element indicates how this should be notated. Content values of "scoop" and "dip" refer to the SMuFL guitarVibratoBarScoop and guitarVibratoBarDip glyphs. @@ -3879,23 +4365,50 @@ The repeater attribute has been deprecated in MusicXML 3.0. Formerly used for tr + + + The caesura element indicates a slight pause. It is notated using a "railroad tracks" symbol or other variations specified in the element content. + + + + + + + + + + + + The elision type represents an elision between lyric syllables. The text content specifies the symbol used to display the elision. Common values are a no-break space (Unicode 00A0), an underscore (Unicode 005F), or an undertie (Unicode 203F). If the text content is empty, the smufl attribute is used to specify the symbol to use. Its value is a SMuFL canonical glyph name that starts with lyrics. The SMuFL attribute is ignored if the elision glyph is already specified by the text content. If neither text content nor a smufl attribute are present, the elision glyph is application-specific. + + + + + + + + + + - The empty-line type represents an empty element with line-shape, line-type, dashed-formatting, print-style and placement attributes. + The empty-line type represents an empty element with line-shape, line-type, line-length, dashed-formatting, print-style and placement attributes. + - + The extend type represents lyric word extension / melisma lines as well as figured bass extensions. The optional type and position attributes are added in Version 3.0 to provide better formatting control. - + + @@ -3905,7 +4418,7 @@ The repeater attribute has been deprecated in MusicXML 3.0. Formerly used for tr - Values for the prefix element include the accidental values sharp, flat, natural, double-sharp, flat-flat, and sharp-sharp. The prefix element may contain additional values for symbols specific to particular figured bass styles. + Values for the prefix element include plus and the accidental values sharp, flat, natural, double-sharp, flat-flat, and sharp-sharp. The prefix element may contain additional values for symbols specific to particular figured bass styles. @@ -3915,17 +4428,18 @@ The repeater attribute has been deprecated in MusicXML 3.0. Formerly used for tr - Values for the suffix element include the accidental values sharp, flat, natural, double-sharp, flat-flat, and sharp-sharp. Suffixes include both symbols that come after the figure number and those that overstrike the figure number. The suffix value slash is used for slashed numbers indicating chromatic alteration. The orientation and display of the slash usually depends on the figure number. The suffix element may contain additional values for symbols specific to particular figured bass styles. + Values for the suffix element include plus and the accidental values sharp, flat, natural, double-sharp, flat-flat, and sharp-sharp. Suffixes include both symbols that come after the figure number and those that overstrike the figure number. The suffix values slash, back-slash, and vertical are used for slashed numbers indicating chromatic alteration. The orientation and display of the slash usually depends on the figure number. The suffix element may contain additional values for symbols specific to particular figured bass styles. + The figured-bass element represents figured bass notation. Figured bass elements take their position from the first regular note (not a grace note or chord note) that follows in score order. The optional duration element is used to indicate changes of figures under a note. - + Figures are ordered from top to bottom. The value of parentheses is "no" if not present. @@ -3936,6 +4450,7 @@ Figures are ordered from top to bottom. The value of parentheses is "no" if not + @@ -3960,6 +4475,7 @@ Figures are ordered from top to bottom. The value of parentheses is "no" if not + @@ -4000,6 +4516,28 @@ Figures are ordered from top to bottom. The value of parentheses is "no" if not + + + The harmon-closed type represents whether the harmon mute is closed, open, or half-open. The optional location attribute indicates which portion of the symbol is filled in when the element value is half. + + + + + + + + + + + The harmon-mute type represents the symbols used for harmon mutes in brass notation. + + + + + + + + The harmonic type indicates natural and artificial harmonics. Allowing the type of pitch to be specified, combined with controls for appearance/playback differences, allows both the notation and the sound to be represented. Artificial harmonics can add a notated touching-pitch; artificial pinch harmonics will usually not notate a touching pitch. The attributes for the harmonic element refer to the use of the circular harmonic symbol, typically but not always used with natural harmonics. @@ -4071,7 +4609,7 @@ Figures are ordered from top to bottom. The value of parentheses is "no" if not - + The hole-closed type represents whether the hole is closed, open, or half-open. The optional location attribute indicates which portion of the hole is filled in when the element value is half. @@ -4082,7 +4620,7 @@ Figures are ordered from top to bottom. The value of parentheses is "no" if not - + The instrument type distinguishes between score-instrument elements in a score-part. The id attribute is an IDREF back to the score-instrument ID. If multiple score-instruments are specified on a score-part, there should be an instrument element for each note in the part. @@ -4092,7 +4630,9 @@ Figures are ordered from top to bottom. The value of parentheses is "no" if not - The lyric type represents text underlays for lyrics, based on Humdrum with support for other formats. Two text elements that are not separated by an elision element are part of the same syllable, but may have different text formatting. The MusicXML 2.0 XSD is more strict than the 2.0 DTD in enforcing this by disallowing a second syllabic element unless preceded by an elision element. The lyric number indicates multiple lines, though a name can be used as well (as in Finale's verse / chorus / section specification). Justification is center by default; placement is below by default. The content of the elision type is used to specify the symbol used to display the elision. Common values are a no-break space (Unicode 00A0), an underscore (Unicode 005F), or an undertie (Unicode 203F). + The lyric type represents text underlays for lyrics, based on Humdrum with support for other formats. Two text elements that are not separated by an elision element are part of the same syllable, but may have different text formatting. The MusicXML XSD is more strict than the DTD in enforcing this by disallowing a second syllabic element unless preceded by an elision element. The lyric number indicates multiple lines, though a name can be used as well (as in Finale's verse / chorus / section specification). + +Justification is center by default; placement is below by default. The print-object attribute can override a note's print-lyric attribute in cases where only some lyrics on a note are printed, as when lyrics for later verses are printed in a block of text rather than with each note. The time-only attribute precisely specifies which lyrics are to be sung which time through a repeated section. @@ -4101,7 +4641,7 @@ Figures are ordered from top to bottom. The value of parentheses is "no" if not - + @@ -4139,6 +4679,8 @@ Figures are ordered from top to bottom. The value of parentheses is "no" if not + + @@ -4163,6 +4705,7 @@ Figures are ordered from top to bottom. The value of parentheses is "no" if not + @@ -4189,25 +4732,42 @@ Figures are ordered from top to bottom. The value of parentheses is "no" if not + - Notes are the most common type of MusicXML data. The MusicXML format keeps the MuseData distinction between elements used for sound information and elements used for notation information (e.g., tie is used for sound, tied for notation). Thus grace notes do not have a duration element. Cue notes have a duration element, as do forward elements, but no tie elements. Having these two types of information available can make interchange considerably easier, as some programs handle one type of information much more readily than the other. - -The dynamics and end-dynamics attributes correspond to MIDI 1.0's Note On and Note Off velocities, respectively. They are expressed in terms of percentages of the default forte value (90 for MIDI 1.0). The attack and release attributes are used to alter the starting and stopping time of the note from when it would otherwise occur based on the flow of durations - information that is specific to a performance. They are expressed in terms of divisions, either positive or negative. A note that starts a tie should not have a release attribute, and a note that stops a tie should not have an attack attribute. If a note is played only particular times through a repeat, the time-only attribute shows which times to play the note. The pizzicato attribute is used when just this note is sounded pizzicato, vs. the pizzicato element which changes overall playback between pizzicato and arco. + Notes are the most common type of MusicXML data. The MusicXML format keeps the MuseData distinction between elements used for sound information and elements used for notation information (e.g., tie is used for sound, tied for notation). Thus grace notes do not have a duration element. Cue notes have a duration element, as do forward elements, but no tie elements. Having these two types of information available can make interchange considerably easier, as some programs handle one type of information much more readily than the other. + +The print-leger attribute is used to indicate whether leger lines are printed. Notes without leger lines are used to indicate indeterminate high and low notes. By default, it is set to yes. If print-object is set to no, print-leger is interpreted to also be set to no if not present. This attribute is ignored for rests. + +The dynamics and end-dynamics attributes correspond to MIDI 1.0's Note On and Note Off velocities, respectively. They are expressed in terms of percentages of the default forte value (90 for MIDI 1.0). + +The attack and release attributes are used to alter the starting and stopping time of the note from when it would otherwise occur based on the flow of durations - information that is specific to a performance. They are expressed in terms of divisions, either positive or negative. A note that starts a tie should not have a release attribute, and a note that stops a tie should not have an attack attribute. The attack and release attributes are independent of each other. The attack attribute only changes the starting time of a note, and the release attribute only changes the stopping time of a note. + +If a note is played only particular times through a repeat, the time-only attribute shows which times to play the note. + +The pizzicato attribute is used when just this note is sounded pizzicato, vs. the pizzicato element which changes overall playback between pizzicato and arco. - - + + + + + + + + + + - The cue element indicates the presence of a cue note. + The cue element indicates the presence of a cue note. In MusicXML, a cue note is a silent note with no playback. Normal notes that play can be specified as cue size using the type element. A cue note that is specified as full size using the type element will still remain silent. @@ -4242,17 +4802,19 @@ The dynamics and end-dynamics attributes correspond to MIDI 1.0's Note On and No + + - The note-type type indicates the graphic note type. Values range from 256th to long. The size attribute indicates full, cue, or large size, with full the default for regular notes and cue the default for cue and grace notes. + The note-type type indicates the graphic note type. Values range from 1024th to maxima. The size attribute indicates full, cue, grace-cue, or large size. The default is full for regular notes, grace-cue for notes that contain both grace and cue elements, and cue for notes that contain either a cue or a grace element, but not both. @@ -4263,10 +4825,12 @@ The dynamics and end-dynamics attributes correspond to MIDI 1.0's Note On and No - The notehead element indicates shapes other than the open and closed ovals associated with note durations. - + The notehead type indicates shapes other than the open and closed ovals associated with note durations. + +The smufl attribute can be used to specify a particular notehead, allowing application interoperability without requiring every SMuFL glyph to have a MusicXML element equivalent. This attribute can be used either with the "other" value, or to refine a specific notehead value such as "cluster". Noteheads in the SMuFL "Note name noteheads" range (U+E150–U+E1AF) should not use the smufl attribute or the "other" value, but instead use the notehead-text element. + For the enclosed shapes, the default is to be hollow for half notes and longer, and filled otherwise. The filled attribute can be set to change this if needed. - + If the parentheses attribute is set to yes, the notehead is parenthesized. It is no by default. @@ -4275,6 +4839,7 @@ If the parentheses attribute is set to yes, the notehead is parenthesized. It is + @@ -4290,7 +4855,7 @@ If the parentheses attribute is set to yes, the notehead is parenthesized. It is - + Ornaments can be any of several types, followed optionally by accidentals. The accidental-mark element's content is represented the same as an accidental element, but with a different name to reflect the different musical meaning. @@ -4327,6 +4892,11 @@ If the parentheses attribute is set to yes, the notehead is parenthesized. It is The vertical-turn element has the turn symbol shape arranged vertically going from upper left to lower right. + + + The inverted-vertical-turn element has the turn symbol shape arranged vertically going from upper right to lower left. + + The shake element has a similar appearance to an inverted-mordent element. @@ -4335,12 +4905,12 @@ If the parentheses attribute is set to yes, the notehead is parenthesized. It is - The mordent element represents the sign with the vertical line. The long attribute is "no" by default. + The mordent element represents the sign with the vertical line. The choice of which mordent sign is inverted differs between MusicXML and SMuFL. The long attribute is "no" by default. - The inverted-mordent element represents the sign without the vertical line. The long attribute is "no" by default. + The inverted-mordent element represents the sign without the vertical line. The choice of which mordent is inverted differs between MusicXML and SMuFL. The long attribute is "no" by default. @@ -4349,19 +4919,25 @@ If the parentheses attribute is set to yes, the notehead is parenthesized. It is - + + + The haydn element represents the Haydn ornament. This is defined in SMuFL as ornamentHaydn. + + + - The other-ornament element is used to define any ornaments not yet in the MusicXML format. This allows extended representation, though without application interoperability. + The other-ornament element is used to define any ornaments not yet in the MusicXML format. The smufl attribute can be used to specify a particular ornament, allowing application interoperability without requiring every SMuFL ornament to have a MusicXML element equivalent. Using the other-ornament element without the smufl attribute allows for extended representation, though without application interoperability. + - The other-notation type is used to define any notations not yet in the MusicXML format. This allows extended representation, though without application interoperability. It handles notations where more specific extension elements such as other-dynamics and other-technical are not appropriate. + The other-notation type is used to define any notations not yet in the MusicXML format. It handles notations where more specific extension elements such as other-dynamics and other-technical are not appropriate. The smufl attribute can be used to specify a particular notation, allowing application interoperability without requiring every SMuFL glyph to have a MusicXML element equivalent. Using the other-notation type without the smufl attribute allows for extended representation, though without application interoperability. @@ -4370,6 +4946,32 @@ If the parentheses attribute is set to yes, the notehead is parenthesized. It is + + + + + + + + + The other-placement-text type represents a text element with print-style, placement, and smufl attribute groups. This type is used by MusicXML notation extension elements to allow specification of specific SMuFL glyphs without needed to add every glyph as a MusicXML element. + + + + + + + + + + + + + The other-text type represents a text element with a smufl attribute group. This type is used by MusicXML direction extension elements to allow specification of specific SMuFL glyphs without needed to add every glyph as a MusicXML element. + + + + @@ -4396,7 +4998,7 @@ If the parentheses attribute is set to yes, the notehead is parenthesized. It is - + The rest element indicates notated rests or silences. Rest elements are usually empty, but placement on the staff can be specified using display-step and display-octave elements. If the measure attribute is set to yes, this indicates this is a complete measure rest. @@ -4406,7 +5008,7 @@ If the parentheses attribute is set to yes, the notehead is parenthesized. It is - + Glissando and slide types both indicate rapidly moving from one pitch to the other so that individual notes are not discerned. The distinction is similar to that between NIFF's glissando and portamento elements. A slide is continuous between two notes and defaults to a solid line. The optional text for a is printed alongside the line. @@ -4419,6 +5021,7 @@ If the parentheses attribute is set to yes, the notehead is parenthesized. It is + @@ -4436,6 +5039,7 @@ If the parentheses attribute is set to yes, the notehead is parenthesized. It is + @@ -4471,7 +5075,20 @@ If the parentheses attribute is set to yes, the notehead is parenthesized. It is - + + + + The tap type indicates a tap on the fretboard. The text content allows specification of the notation; + and T are common choices. If the element is empty, the hand attribute is used to specify the symbol to use. The hand attribute is ignored if the tap glyph is already specified by the text content. If neither text content nor the hand attribute are present, the display is application-specific. + + + + + + + + + + Technical indications give performance information for individual instruments. @@ -4514,14 +5131,14 @@ If the parentheses attribute is set to yes, the notehead is parenthesized. It is The triple-tongue element represents the triple tongue symbol (three dots arranged horizontally). - + - The stopped element represents the stopped symbol, which looks like a plus sign. + The stopped element represents the stopped symbol, which looks like a plus sign. The smufl attribute distinguishes different SMuFL glyphs that have a similar appearance such as handbellsMalletBellSuspended and guitarClosePedal. If not present, the default glyph is brassMuteClosed. - The snap-pizzicato element represents the snap pizzicato symbol. This is a circle with a line, where the line comes inside the circle. It is distinct from the thumb-position symbol, where the line does not come inside the circle. + The snap-pizzicato element represents the snap pizzicato symbol. This is a circle with a line, where the line comes inside the circle. It is distinct from the thumb-position symbol, where the line does not come inside the circle. @@ -4529,11 +5146,7 @@ If the parentheses attribute is set to yes, the notehead is parenthesized. It is - - - The tap element indicates a tap on the fretboard. The element content allows specification of the notation; + and T are common choices. If empty, the display is application-specific. - - + @@ -4544,12 +5157,44 @@ If the parentheses attribute is set to yes, the notehead is parenthesized. It is - + + + The brass-bend element represents the u-shaped bend symbol used in brass notation, distinct from the bend element used in guitar music. + + + + + The flip element represents the flip symbol used in brass notation. + + + + + The smear element represents the tilde-shaped smear symbol used in brass notation. + + + + + The open element represents the open symbol, which looks like a circle. The smufl attribute can be used to distinguish different SMuFL glyphs that have a similar appearance such as brassMuteOpen and guitarOpenPedal. If not present, the default glyph is brassMuteOpen. + + + + + The half-muted element represents the half-muted symbol, which looks like a circle with a plus sign inside. The smufl attribute can be used to distinguish different SMuFL glyphs that have a similar appearance such as brassMuteHalfClosed and guitarHalfOpenPedal. If not present, the default glyph is brassMuteHalfClosed. + + + + + + The golpe element represents the golpe symbol that is used for tapping the pick guard in guitar music. + + + - The other-technical element is used to define any technical indications not yet in the MusicXML format. This allows extended representation, though without application interoperability. + The other-technical element is used to define any technical indications not yet in the MusicXML format. The smufl attribute can be used to specify a particular glyph, allowing application interoperability without requiring every SMuFL technical indication to have a MusicXML element equivalent. Using the other-technical element without the smufl attribute allows for extended representation, though without application interoperability. + @@ -4569,23 +5214,6 @@ If the parentheses attribute is set to yes, the notehead is parenthesized. It is - - - The text-font-color type represents text with optional font and color information. It is used for the elision element. - - - - - - - - - - - - - - The tie element indicates that a tie begins or ends with this note. If the tie element applies only particular times through a repeat, the time-only attribute indicates which times to apply it. The tie element indicates sound; the tied element indicates notation. @@ -4596,11 +5224,17 @@ If the parentheses attribute is set to yes, the notehead is parenthesized. It is - The tied type represents the notated tie. The tie element represents the tie sound. + The tied element represents the notated tie. The tie element represents the tie sound. -The number attribute is rarely needed to disambiguate ties, since note pitches will usually suffice. The attribute is implied rather than defaulting to 1 as with most elements. It is available for use in more complex tied notation situations. +The number attribute is rarely needed to disambiguate ties, since note pitches will usually suffice. The attribute is implied rather than defaulting to 1 as with most elements. It is available for use in more complex tied notation situations. + +Ties that join two notes of the same pitch together should be represented with a tied element on the first note with type="start" and a tied element on the second note with type="stop". This can also be done if the two notes being tied are enharmonically equivalent, but have different step values. It is not recommended to use tied elements to join two notes with enharmonically inequivalent pitches. + +Ties that indicate that an instrument should be undamped are specified with a single tied element with type="let-ring". + +Ties that are visually attached to only one note, other than undamped ties, should be specified with two tied elements on the same note, first type="start" then type="stop". This can be used to represent ties into or out of repeated sections or codas. - + @@ -4609,6 +5243,7 @@ The number attribute is rarely needed to disambiguate ties, since note pitches w + @@ -4643,17 +5278,20 @@ The number attribute is rarely needed to disambiguate ties, since note pitches w - The tremolo ornament can be used to indicate either single-note or double-note tremolos. Single-note tremolos use the single type, while double-note tremolos use the start and stop types. The default is "single" for compatibility with Version 1.1. The text of the element indicates the number of tremolo marks and is an integer from 0 to 8. Note that the number of attached beams is not included in this value, but is represented separately using the beam element. - -When using double-note tremolos, the duration of each note in the tremolo should correspond to half of the notated type value. A time-modification element should also be added with an actual-notes value of 2 and a normal-notes value of 1. If used within a tuplet, this 2/1 ratio should be multiplied by the existing tuplet ratio. - -Using repeater beams for indicating tremolos is deprecated as of MusicXML 3.0. + The tremolo ornament can be used to indicate single-note, double-note, or unmeasured tremolos. Single-note tremolos use the single type, double-note tremolos use the start and stop types, and unmeasured tremolos use the unmeasured type. The default is "single" for compatibility with Version 1.1. The text of the element indicates the number of tremolo marks and is an integer from 0 to 8. Note that the number of attached beams is not included in this value, but is represented separately using the beam element. The value should be 0 for unmeasured tremolos. + + When using double-note tremolos, the duration of each note in the tremolo should correspond to half of the notated type value. A time-modification element should also be added with an actual-notes value of 2 and a normal-notes value of 1. If used within a tuplet, this 2/1 ratio should be multiplied by the existing tuplet ratio. + + The smufl attribute specifies the glyph to use from the SMuFL tremolos range for an unmeasured tremolo. It is ignored for other tremolo types. The SMuFL buzzRoll glyph is used by default if the attribute is missing. + + Using repeater beams for indicating tremolos is deprecated as of MusicXML 3.0. - + + @@ -4661,9 +5299,9 @@ Using repeater beams for indicating tremolos is deprecated as of MusicXML 3.0. A tuplet element is present when a tuplet is to be displayed graphically, in addition to the sound data provided by the time-modification elements. The number attribute is used to distinguish nested tuplets. The bracket attribute is used to indicate the presence of a bracket. If unspecified, the results are implementation-dependent. The line-shape attribute is used to specify whether the bracket is straight or in the older curved or slurred style. It is straight by default. - -Whereas a time-modification element shows how the cumulative, sounding effect of tuplets and double-note tremolos compare to the written note type, the tuplet element describes how this is displayed. The tuplet element also provides more detailed representation information than the time-modification element, and is needed to represent nested tuplets and other complex tuplets accurately. - + +Whereas a time-modification element shows how the cumulative, sounding effect of tuplets and double-note tremolos compare to the written note type, the tuplet element describes how this is displayed. The tuplet element also provides more detailed representation information than the time-modification element, and is needed to represent nested tuplets and other complex tuplets accurately. + The show-number attribute is used to display either the number of actual notes, the number of both actual and normal notes, or neither. It is actual by default. The show-type attribute is used to display either the actual type, both the actual and normal types, or neither. It is none by default. @@ -4686,6 +5324,7 @@ The show-number attribute is used to display either the number of actual notes, + @@ -4718,7 +5357,7 @@ The show-number attribute is used to display either the number of actual notes, - + The tuplet-type type indicates the graphical note type of the notes for this portion of the tuplet. @@ -4739,18 +5378,18 @@ The show-number attribute is used to display either the number of actual notes, - + - The credit type represents the appearance of the title, composer, arranger, lyricist, copyright, dedication, and other text and graphics that commonly appears on the first page of a score. The credit-words and credit-image elements are similar to the words and image elements for directions. However, since the credit is not part of a measure, the default-x and default-y attributes adjust the origin relative to the bottom left-hand corner of the first page. The enclosure for credit-words is none by default. - -By default, a series of credit-words elements within a single credit element follow one another in sequence visually. Non-positional formatting attributes are carried over from the previous element by default. - -The page attribute for the credit element, new in Version 2.0, specifies the page number where the credit should appear. This is an integer value that starts with 1 for the first page. Its value is 1 by default. Since credits occur before the music, these page numbers do not refer to the page numbering specified by the print element's page-number attribute. + The credit type represents the appearance of the title, composer, arranger, lyricist, copyright, dedication, and other text, symbols, and graphics that commonly appear on the first page of a score. The credit-words, credit-symbol, and credit-image elements are similar to the words, symbol, and image elements for directions. However, since the credit is not part of a measure, the default-x and default-y attributes adjust the origin relative to the bottom left-hand corner of the page. The enclosure for credit-words and credit-symbol is none by default. + +By default, a series of credit-words and credit-symbol elements within a single credit element follow one another in sequence visually. Non-positional formatting attributes are carried over from the previous element by default. -The credit-type element, new in Version 3.0, indicates the purpose behind a credit. Multiple types of data may be combined in a single credit, so multiple elements may be used. Standard values include page number, title, subtitle, composer, arranger, lyricist, and rights. +The page attribute for the credit element specifies the page number where the credit should appear. This is an integer value that starts with 1 for the first page. Its value is 1 by default. Since credits occur before the music, these page numbers do not refer to the page numbering specified by the print element's page-number attribute. + +The credit-type element indicates the purpose behind a credit. Multiple types of data may be combined in a single credit, so multiple elements may be used. Standard values include page number, title, subtitle, composer, arranger, lyricist, and rights. @@ -4760,16 +5399,23 @@ The credit-type element, new in Version 3.0, indicates the purpose behind a cred - + + + + - + + + + + @@ -4856,9 +5502,9 @@ The credit-type element, new in Version 3.0, indicates the purpose behind a cred The part-group element indicates groupings of parts in the score, usually indicated by braces and brackets. Braces that are used for multi-staff parts should be defined in the attributes element for that part. The part-group start element appears before the first score-part in the group. The part-group stop element appears after the last score-part in the group. - -The number attribute is used to distinguish overlapping and nested part-groups, not the sequence of groups. As with parts, groups can have a name and abbreviation. Values for the child elements are ignored at the stop of a group. - + +The number attribute is used to distinguish overlapping and nested part-groups, not the sequence of groups. As with parts, groups can have a name and abbreviation. Values for the child elements are ignored at the stop of a group. + A part-group element is not needed for a single multi-staff part. By default, multi-staff parts include a brace symbol and (if appropriate given the bar-style) common barlines. The symbol formatting for a multi-staff part can be more fully specified using the part-symbol element. @@ -4900,7 +5546,7 @@ A part-group element is not needed for a single multi-staff part. By default, mu - + The part-name type describes the name or abbreviation of a score-part element. Formatting attributes for the part-name element are deprecated in Version 2.0 in favor of the new part-name-display and part-abbreviation-display elements. @@ -4915,7 +5561,7 @@ A part-group element is not needed for a single multi-staff part. By default, mu The score-instrument type represents a single instrument within a score-part. As with the score-part type, each score-instrument has a required ID attribute, a name, and an optional abbreviation. - + A score-instrument type is also required if the score specifies MIDI 1.0 channels, banks, or programs. An initial midi-instrument assignment can also be made here. MusicXML software should be able to automatically assign reasonable channels and instruments without these elements in simple cases, such as where part names match General MIDI instrument names. @@ -5013,7 +5659,7 @@ A score-instrument type is also required if the score specifies MIDI 1.0 channel - + The editorial group specifies editorial information for a musical element. @@ -5126,7 +5772,7 @@ A score-instrument type is also required if the score specifies MIDI 1.0 channel Non-traditional key signatures can be represented using the Humdrum/Scot concept of a list of altered tones. The key-alter element represents the alteration for a given pitch step, represented with semitones in the same manner as the alter element. - + Non-traditional key signatures can be represented using the Humdrum/Scot concept of a list of altered tones. The key-accidental element indicates the accidental to be displayed in the key signature, represented in the same manner as the accidental element. It is used for disambiguating microtonal accidentals. @@ -5139,14 +5785,21 @@ A score-instrument type is also required if the score specifies MIDI 1.0 channel The slash group combines elements used for more complete specification of the slash and beat-repeat measure-style elements. They have the same values as the type and dot elements, and define what the beat is for the display of repetition marks. If not present, the beat is based on the current time signature. - - - The slash-type element indicates the graphical note type to use for the display of repetition marks. - - - + + + + The slash-type element indicates the graphical note type to use for the display of repetition marks. + + + + + The slash-dot element is used to specify any augmentation dots in the note type used to display repetition marks. + + + + - The slash-dot element is used to specify any augmentation dots in the note type used to display repetition marks. + The except-voice element is used to specify a combination of slash notation and regular notation. Any note elements that are in voices specified by the except-voice elements are displayed in normal notation, in addition to the slash notation that is always displayed. @@ -5204,7 +5857,7 @@ A score-instrument type is also required if the score specifies MIDI 1.0 channel A harmony element can contain many stacked chords (e.g. V of II). A sequence of harmony-chord groups is used for this type of secondary function, where V of II would be represented by a harmony-chord with a V function followed by a harmony-chord with a II function. - + A root is a pitch name like C, D, E, where a function is an indication like I, II, III. It is an either/or choice to avoid data inconsistency. @@ -5313,7 +5966,7 @@ A root is a pitch name like C, D, E, where a function is an indication like I, I - + diff --git a/tests/test_xml.py b/tests/test_xml.py index e25f6ae5..434a7538 100644 --- a/tests/test_xml.py +++ b/tests/test_xml.py @@ -4,50 +4,37 @@ import ly.musicxml from lxml import etree import os -import io +import re +import ly.pkginfo -def test_glissando(): - compare_output('glissando') - - -def test_tie(): - compare_output('tie') - - -def test_merge_voice(): - compare_output('merge_voice') - - -def test_variable(): - compare_output('variable') - - -def test_dynamics(): - compare_output('dynamics') - - -def test_tuplet(): - compare_output('tuplet') +def test_all(): + """Test all files in test_xml_files""" + test_list = ['glissando', 'tie', 'merge_voice', 'variable', 'dynamics', 'tuplet', 'pickup', 'lyrics', 'barlines'] + for test in test_list: + print("Testing {}.ly...".format(test)) + compare_output(test) + print(test + " test passed.\n") def ly_to_xml(filename): """Read Lilypond file and return XML string.""" writer = ly.musicxml.writer() - with open(filename, 'r') as lyfile: + with open(filename, 'r', encoding='utf-8') as lyfile: writer.parse_text(lyfile.read()) xml = writer.musicxml() - sio = io.StringIO() - xml.write(sio, "utf-8") - return sio.getvalue() + return (ly.musicxml.create_musicxml.xml_decl_txt.format(encoding='utf-8') + "\n" + + ly.musicxml.create_musicxml.doctype_txt + "\n" + + xml.tostring(encoding='unicode')) def read_expected_xml(filename): """Return string with expected XML from file.""" with open(filename, 'r') as xmlfile: output = xmlfile.read() - # Replace date in XML file with today's date - output = output.replace("2016-03-28", str(datetime.date.today())) + # Replace date and python-ly version in XML file with today's date and current version + output = re.sub(r'\d{4}-\d{2}-\d{2}', str(datetime.date.today()), output) + output = re.sub(r'python-ly \d*\.\d*\.\d*', "python-ly " + ly.pkginfo.version, output) return output @@ -57,7 +44,7 @@ def compare_output(filename): filename) output = ly_to_xml(filebase + '.ly') - expected_output = read_expected_xml(filebase + '.xml') + expected_output = read_expected_xml(filebase + '.musicxml') assert_multi_line_equal(expected_output, output) validate_xml(output) @@ -65,14 +52,15 @@ def compare_output(filename): def validate_xml(xml): """Validate XML against XSD file.""" + # see https://www.w3.org/2011/prov/track/issues/480 + # and https://stackoverflow.com/questions/49534700/how-to-use-xlink-data-types-in-xsd + # and https://stackoverflow.com/questions/15830421/xml-unicode-strings-with-encoding-declaration-are-not-supported + xml = xml.encode('utf-8') xsdname = os.path.join(os.path.dirname(__file__), 'musicxml.xsd') - xsdfile = open(xsdname, 'r') - xmlschema_doc = etree.parse(xsdfile) - xsdfile.close() - xmlschema = etree.XMLSchema(xmlschema_doc) - parser = etree.XMLParser(schema=xmlschema) + xmlschema = etree.XMLSchema(file=xsdname) + parser = etree.XMLParser(schema=xmlschema, encoding='utf-8') # Raises Exception if not valid: - etree.fromstring(xml, parser) + etree.fromstring(xml, parser=parser) def assert_multi_line_equal(first, second, msg=None): @@ -89,3 +77,8 @@ def assert_multi_line_equal(first, second, msg=None): if msg: message += " : " + msg assert False, "Multi-line strings are unequal:\n" + message + + +if __name__ == "__main__": + #sys.exit(main(sys.argv)) + test_all() diff --git a/tests/test_xml_files/barlines.ly b/tests/test_xml_files/barlines.ly new file mode 100644 index 00000000..5217efe0 --- /dev/null +++ b/tests/test_xml_files/barlines.ly @@ -0,0 +1,72 @@ +\version "2.18.2" + +\language "english" + +keyTime = { + \time 4/4 + \numericTimeSignature +} + +Soprano = \relative { + \voiceOne + \keyTime + g4 g \bar "'" g g \bar "||" + | g g \bar "" g g \bar "!" + | g g \bar "|" g g \bar "." + | g g \bar ".|" g g \bar ".." + | g g \bar ";" g g + \bar "|." +} + +Alto = \relative { + \voiceTwo + \keyTime + e4 e e e + | e e e e + | e e e e + | e e e e + | e e e e +} + +Tenor = \relative { + \voiceOne + \keyTime + c4 c c c + | c c c c + | c c c c + | c c c c + | c c c c +} + +Bass = \relative { + \voiceTwo + \keyTime + a4 a a a + | a a a a + | a a a a + | a a a a + | a a a a +} + +\score +{ + << + \new Staff = "treble" \with { + } + << + \clef "treble" + \new Voice = "SopranoVoice" \Soprano + \new Voice = "AltoVoice" \Alto + >> + + \new Staff = "bass" \with { + } + << + \clef "bass" + \new Voice = "TenorVoice" \Tenor + \new Voice = "BassVoice" \Bass + >> + + >> + +} \ No newline at end of file diff --git a/tests/test_xml_files/barlines.musicxml b/tests/test_xml_files/barlines.musicxml new file mode 100644 index 00000000..7dd19e16 --- /dev/null +++ b/tests/test_xml_files/barlines.musicxml @@ -0,0 +1,1026 @@ + + + + + + python-ly 0.9.5 + 2019-06-11 + + + + + + + + + + + + + + 1 + + + G + 2 + + + + + G + 3 + + 1 + 1 + quarter + + + + G + 3 + + 1 + 1 + quarter + + + 2 + + + + E + 3 + + 1 + 2 + quarter + + + + E + 3 + + 1 + 2 + quarter + + + + tick + + + + + + G + 3 + + 1 + 1 + quarter + + + + G + 3 + + 1 + 1 + quarter + + + 2 + + + + E + 3 + + 1 + 2 + quarter + + + + E + 3 + + 1 + 2 + quarter + + + 2 + + + + light-light + + + + + + G + 3 + + 1 + 1 + quarter + + + + G + 3 + + 1 + 1 + quarter + + + 2 + + + + E + 3 + + 1 + 2 + quarter + + + + E + 3 + + 1 + 2 + quarter + + + 2 + + + + none + + + + + + G + 3 + + 1 + 1 + quarter + + + + G + 3 + + 1 + 1 + quarter + + + 2 + + + + E + 3 + + 1 + 2 + quarter + + + + E + 3 + + 1 + 2 + quarter + + + 2 + + + + dashed + + + + + + G + 3 + + 1 + 1 + quarter + + + + G + 3 + + 1 + 1 + quarter + + + 2 + + + + E + 3 + + 1 + 2 + quarter + + + + E + 3 + + 1 + 2 + quarter + + + 2 + + + + regular + + + + + + G + 3 + + 1 + 1 + quarter + + + + G + 3 + + 1 + 1 + quarter + + + 2 + + + + E + 3 + + 1 + 2 + quarter + + + + E + 3 + + 1 + 2 + quarter + + + 2 + + + + heavy + + + + + + G + 3 + + 1 + 1 + quarter + + + + G + 3 + + 1 + 1 + quarter + + + 2 + + + + E + 3 + + 1 + 2 + quarter + + + + E + 3 + + 1 + 2 + quarter + + + 2 + + + + heavy-light + + + + + + G + 3 + + 1 + 1 + quarter + + + + G + 3 + + 1 + 1 + quarter + + + 2 + + + + E + 3 + + 1 + 2 + quarter + + + + E + 3 + + 1 + 2 + quarter + + + 2 + + + + heavy-heavy + + + + + + G + 3 + + 1 + 1 + quarter + + + + G + 3 + + 1 + 1 + quarter + + + 2 + + + + E + 3 + + 1 + 2 + quarter + + + + E + 3 + + 1 + 2 + quarter + + + 2 + + + + dotted + + + + + + G + 3 + + 1 + 1 + quarter + + + + G + 3 + + 1 + 1 + quarter + + + 2 + + + + E + 3 + + 1 + 2 + quarter + + + + E + 3 + + 1 + 2 + quarter + + + 2 + + + + light-heavy + + + + + + + 1 + + + F + 4 + + + + + C + 3 + + 1 + 1 + quarter + + + + C + 3 + + 1 + 1 + quarter + + + 2 + + + + A + 3 + + 1 + 2 + quarter + + + + A + 3 + + 1 + 2 + quarter + + + + tick + + + + + + C + 3 + + 1 + 1 + quarter + + + + C + 3 + + 1 + 1 + quarter + + + 2 + + + + A + 3 + + 1 + 2 + quarter + + + + A + 3 + + 1 + 2 + quarter + + + 2 + + + 2 + + + + light-light + + + + + + C + 3 + + 1 + 1 + quarter + + + + C + 3 + + 1 + 1 + quarter + + + 2 + + + + A + 3 + + 1 + 2 + quarter + + + + A + 3 + + 1 + 2 + quarter + + + 2 + + + 2 + + + + none + + + + + + C + 3 + + 1 + 1 + quarter + + + + C + 3 + + 1 + 1 + quarter + + + 2 + + + + A + 3 + + 1 + 2 + quarter + + + + A + 3 + + 1 + 2 + quarter + + + 2 + + + 2 + + + + dashed + + + + + + C + 3 + + 1 + 1 + quarter + + + + C + 3 + + 1 + 1 + quarter + + + 2 + + + + A + 3 + + 1 + 2 + quarter + + + + A + 3 + + 1 + 2 + quarter + + + 2 + + + 2 + + + + regular + + + + + + C + 3 + + 1 + 1 + quarter + + + + C + 3 + + 1 + 1 + quarter + + + 2 + + + + A + 3 + + 1 + 2 + quarter + + + + A + 3 + + 1 + 2 + quarter + + + 2 + + + 2 + + + + heavy + + + + + + C + 3 + + 1 + 1 + quarter + + + + C + 3 + + 1 + 1 + quarter + + + 2 + + + + A + 3 + + 1 + 2 + quarter + + + + A + 3 + + 1 + 2 + quarter + + + 2 + + + 2 + + + + heavy-light + + + + + + C + 3 + + 1 + 1 + quarter + + + + C + 3 + + 1 + 1 + quarter + + + 2 + + + + A + 3 + + 1 + 2 + quarter + + + + A + 3 + + 1 + 2 + quarter + + + 2 + + + 2 + + + + heavy-heavy + + + + + + C + 3 + + 1 + 1 + quarter + + + + C + 3 + + 1 + 1 + quarter + + + 2 + + + + A + 3 + + 1 + 2 + quarter + + + + A + 3 + + 1 + 2 + quarter + + + 2 + + + 2 + + + + dotted + + + + + + C + 3 + + 1 + 1 + quarter + + + + C + 3 + + 1 + 1 + quarter + + + 2 + + + + A + 3 + + 1 + 2 + quarter + + + + A + 3 + + 1 + 2 + quarter + + + 2 + + + 2 + + + + light-heavy + + + + diff --git a/tests/test_xml_files/dynamics.xml b/tests/test_xml_files/dynamics.musicxml similarity index 100% rename from tests/test_xml_files/dynamics.xml rename to tests/test_xml_files/dynamics.musicxml diff --git a/tests/test_xml_files/glissando.xml b/tests/test_xml_files/glissando.musicxml similarity index 100% rename from tests/test_xml_files/glissando.xml rename to tests/test_xml_files/glissando.musicxml diff --git a/tests/test_xml_files/lyrics.ly b/tests/test_xml_files/lyrics.ly new file mode 100644 index 00000000..7291e30c --- /dev/null +++ b/tests/test_xml_files/lyrics.ly @@ -0,0 +1,95 @@ +\version "2.18.2" + +slurOff = { \set ignoreMelismata = ##t } +slurOn = { \unset ignoreMelismata } + +StanzaOne = \lyricmode { + \set stanza = "1." + La _ di __ \slurOff la di \slurOn da + Ba dum dun + Li -- del -- li zap +} + +StanzaTwo = \lyricmode { + \set stanza = "2." + \slurOn This is a __ song for + cool peo -- ple + \slurOff Just a test for us \slurOn +} + +StanzaThree = \lyricmode { + \set stanza = "3." + \slurOn This is a \slurOff tune for \slurOn + some peo -- ple + Just a test for us +} + +\language "english" + +keyTime = { + \time 4/4 + \numericTimeSignature + \key ef \major +} + +Soprano = \relative c'' { + \voiceOne + \keyTime + bf4 cs( d ef) + | gf( af) b( c) + | g2 a + | f8 g c a( c) b g f +} + +Alto = \relative c' { + \voiceTwo + \keyTime + g4 g ef ef + | f d ef e + | g2 a + | f8 g c a( c) b g f +} + +Tenor = \relative c' { + \voiceOne + \keyTime + af4 bf af bf + | bf af bf af + | g2 a + | f8 g c a( c) b g f +} + +Bass = \relative c { + \voiceTwo + \keyTime + cf4 g af8 gf gf gf + | ds4 bf ds bf + | g2 a + | f8 g c a( c) b g f +} + +\score +{ + << + \new Staff = "treble" \with { + } + << + \clef "treble" + \new Voice = "SopranoVoice" \Soprano + \new Voice = "AltoVoice" \Alto + \lyricsto SopranoVoice \new Lyrics \StanzaOne + \lyricsto SopranoVoice \new Lyrics \StanzaTwo + \lyricsto SopranoVoice \new Lyrics \StanzaThree + >> + + \new Staff = "bass" \with { + } + << + \clef "bass" + \new Voice = "TenorVoice" \Tenor + \new Voice = "BassVoice" \Bass + >> + + >> + +} \ No newline at end of file diff --git a/tests/test_xml_files/lyrics.musicxml b/tests/test_xml_files/lyrics.musicxml new file mode 100644 index 00000000..0cceed6a --- /dev/null +++ b/tests/test_xml_files/lyrics.musicxml @@ -0,0 +1,969 @@ + + + + + + python-ly 0.9.5 + 2019-06-10 + + + + + + + + + + + + + + 2 + + -3 + major + + + + G + 2 + + + + + B + -1 + 4 + + 2 + 1 + quarter + flat + + single + La + + + single + This + + + single + This + + + + + C + 1 + 5 + + 2 + 1 + quarter + sharp + + + + + single + is + + + single + is + + + + + D + 5 + + 2 + 1 + quarter + + + + E + -1 + 5 + + 2 + 1 + quarter + flat + + + + + + 8 + + + + G + 3 + + 2 + 2 + quarter + + + + G + 3 + + 2 + 2 + quarter + + + + E + -1 + 3 + + 2 + 2 + quarter + flat + + + + E + -1 + 3 + + 2 + 2 + quarter + flat + + + + + + G + -1 + 5 + + 2 + 1 + quarter + flat + + + + + single + di + + + + single + a + + + + single + a + + + + + A + -1 + 5 + + 2 + 1 + quarter + flat + + + + + + + B + 5 + + 2 + 1 + quarter + + + + + single + la + + + single + song + + + single + tune + + + + + C + 6 + + 2 + 1 + quarter + + + + + single + di + + + single + for + + + + 8 + + + + F + 3 + + 2 + 2 + quarter + + + + D + 3 + + 2 + 2 + quarter + + + + E + -1 + 3 + + 2 + 2 + quarter + flat + + + + E + 3 + + 2 + 2 + quarter + + + + + + G + 5 + + 4 + 1 + half + + single + da + + + single + for + + + single + some + + + + + A + 5 + + 4 + 1 + half + + single + Ba + + + single + cool + + + begin + peo + + + + 8 + + + + G + 3 + + 4 + 2 + half + + + + A + 3 + + 4 + 2 + half + + + + + + F + 5 + + 1 + 1 + eighth + + single + dum + + + begin + peo + + + end + ple + + + + + G + 5 + + 1 + 1 + eighth + + single + dun + + + end + ple + + + single + Just + + + + + C + 6 + + 1 + 1 + eighth + + begin + Li + + + single + Just + + + single + a + + + + + A + 5 + + 1 + 1 + eighth + + + + + middle + del + + + single + a + + + single + test + + + + + C + 6 + + 1 + 1 + eighth + + + + + single + test + + + + + B + 5 + + 1 + 1 + eighth + + end + li + + + single + for + + + single + for + + + + + G + 5 + + 1 + 1 + eighth + + single + zap + + + single + us + + + single + us + + + + 7 + + + + F + 3 + + 1 + 2 + eighth + + + + G + 3 + + 1 + 2 + eighth + + + + C + 4 + + 1 + 2 + eighth + + + + A + 3 + + 1 + 2 + eighth + + + + + + + C + 4 + + 1 + 2 + eighth + + + + + + + B + 3 + + 1 + 2 + eighth + + + + G + 3 + + 1 + 2 + eighth + + + + + + + 2 + + -3 + major + + + + F + 4 + + + + + A + -1 + 3 + + 2 + 1 + quarter + flat + + + + B + -1 + 3 + + 2 + 1 + quarter + flat + + + + A + -1 + 3 + + 2 + 1 + quarter + flat + + + + B + -1 + 3 + + 2 + 1 + quarter + flat + + + 8 + + + + C + -1 + 3 + + 2 + 2 + quarter + flat + + + + G + 2 + + 2 + 2 + quarter + + + + A + -1 + 2 + + 1 + 2 + eighth + flat + + + + G + -1 + 2 + + 1 + 2 + eighth + flat + + + + G + -1 + 2 + + 1 + 2 + eighth + flat + + + + G + -1 + 2 + + 1 + 2 + eighth + flat + + + + + + B + -1 + 3 + + 2 + 1 + quarter + flat + + + + A + -1 + 3 + + 2 + 1 + quarter + flat + + + + B + -1 + 3 + + 2 + 1 + quarter + flat + + + + A + -1 + 3 + + 2 + 1 + quarter + flat + + + 8 + + + + D + 1 + 2 + + 2 + 2 + quarter + sharp + + + + B + -1 + 1 + + 2 + 2 + quarter + flat + + + + D + 1 + 2 + + 2 + 2 + quarter + sharp + + + + B + -1 + 1 + + 2 + 2 + quarter + flat + + + + + + G + 3 + + 4 + 1 + half + + + + A + 3 + + 4 + 1 + half + + + 8 + + + + G + 1 + + 4 + 2 + half + + + + A + 1 + + 4 + 2 + half + + + + + + F + 3 + + 1 + 1 + eighth + + + + G + 3 + + 1 + 1 + eighth + + + + C + 4 + + 1 + 1 + eighth + + + + A + 3 + + 1 + 1 + eighth + + + + + + + C + 4 + + 1 + 1 + eighth + + + + + + + B + 3 + + 1 + 1 + eighth + + + + G + 3 + + 1 + 1 + eighth + + + 7 + + + + F + 1 + + 1 + 2 + eighth + + + + G + 1 + + 1 + 2 + eighth + + + + C + 2 + + 1 + 2 + eighth + + + + A + 1 + + 1 + 2 + eighth + + + + + + + C + 2 + + 1 + 2 + eighth + + + + + + + B + 1 + + 1 + 2 + eighth + + + + G + 1 + + 1 + 2 + eighth + + + + diff --git a/tests/test_xml_files/merge_voice.xml b/tests/test_xml_files/merge_voice.musicxml similarity index 100% rename from tests/test_xml_files/merge_voice.xml rename to tests/test_xml_files/merge_voice.musicxml diff --git a/tests/test_xml_files/pickup.ly b/tests/test_xml_files/pickup.ly new file mode 100644 index 00000000..2da20c76 --- /dev/null +++ b/tests/test_xml_files/pickup.ly @@ -0,0 +1,58 @@ +\version "2.18.2" + +keyTime = { + \time 4/4 + \numericTimeSignature + \partial 4 +} + +Soprano = \relative c'' { + \voiceOne + \keyTime + g4 + | g g g g +} + +Alto = \relative c' { + \voiceTwo + \keyTime + g4 + | g g g g +} + +Tenor = \relative c' { + \voiceOne + \keyTime + g4 + | g g g g +} + +Bass = \relative c { + \voiceTwo + \keyTime + g4 + | g g g g +} + +\score +{ + << + \new Staff = "treble" \with { + } + << + \clef "treble" + \new Voice = "SopranoVoice" \Soprano + \new Voice = "AltoVoice" \Alto + >> + + \new Staff = "bass" \with { + } + << + \clef "bass" + \new Voice = "TenorVoice" \Tenor + \new Voice = "BassVoice" \Bass + >> + + >> + +} \ No newline at end of file diff --git a/tests/test_xml_files/pickup.musicxml b/tests/test_xml_files/pickup.musicxml new file mode 100644 index 00000000..d75fb450 --- /dev/null +++ b/tests/test_xml_files/pickup.musicxml @@ -0,0 +1,245 @@ + + + + + + python-ly 0.9.5 + 2019-06-10 + + + + + + + + + + + + + + 1 + + + G + 2 + + + + + G + 4 + + 1 + 1 + quarter + + + 1 + + + + G + 3 + + 1 + 2 + quarter + + + + + + G + 4 + + 1 + 1 + quarter + + + + G + 4 + + 1 + 1 + quarter + + + + G + 4 + + 1 + 1 + quarter + + + + G + 4 + + 1 + 1 + quarter + + + 4 + + + + G + 3 + + 1 + 2 + quarter + + + + G + 3 + + 1 + 2 + quarter + + + + G + 3 + + 1 + 2 + quarter + + + + G + 3 + + 1 + 2 + quarter + + + + + + + 1 + + + F + 4 + + + + + G + 3 + + 1 + 1 + quarter + + + 1 + + + + G + 2 + + 1 + 2 + quarter + + + + + + G + 3 + + 1 + 1 + quarter + + + + G + 3 + + 1 + 1 + quarter + + + + G + 3 + + 1 + 1 + quarter + + + + G + 3 + + 1 + 1 + quarter + + + 4 + + + + G + 2 + + 1 + 2 + quarter + + + + G + 2 + + 1 + 2 + quarter + + + + G + 2 + + 1 + 2 + quarter + + + + G + 2 + + 1 + 2 + quarter + + + + diff --git a/tests/test_xml_files/tie.xml b/tests/test_xml_files/tie.musicxml similarity index 100% rename from tests/test_xml_files/tie.xml rename to tests/test_xml_files/tie.musicxml diff --git a/tests/test_xml_files/tuplet.xml b/tests/test_xml_files/tuplet.musicxml similarity index 100% rename from tests/test_xml_files/tuplet.xml rename to tests/test_xml_files/tuplet.musicxml diff --git a/tests/test_xml_files/variable.xml b/tests/test_xml_files/variable.musicxml similarity index 100% rename from tests/test_xml_files/variable.xml rename to tests/test_xml_files/variable.musicxml From 261ad15fbb4d46d46ed93b6b60807c1a01b5c8e5 Mon Sep 17 00:00:00 2001 From: Bryant Date: Wed, 12 Jun 2019 14:05:49 -0400 Subject: [PATCH 009/171] - ly2xml Lyrics: Remove todo --- ly/musicxml/xml_objs.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ly/musicxml/xml_objs.py b/ly/musicxml/xml_objs.py index d3ca7de2..3aa0c6eb 100644 --- a/ly/musicxml/xml_objs.py +++ b/ly/musicxml/xml_objs.py @@ -315,7 +315,6 @@ def merge_voice(self, voice, override=False): if len(voice.barlist) > bl_len: self.barlist += voice.barlist[bl_len:] - ##TODO def merge_lyrics(self, lyrics): """Merge in lyrics in music section.""" i = 0 From 9372877ce45b35eaf4a7acba67f96b60623d0b12 Mon Sep 17 00:00:00 2001 From: Bryant Date: Wed, 12 Jun 2019 15:05:57 -0400 Subject: [PATCH 010/171] * ly2xml: Prevent empty final measure --- ly/musicxml/xml_objs.py | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/ly/musicxml/xml_objs.py b/ly/musicxml/xml_objs.py index 1b4536e1..54fc1e48 100644 --- a/ly/musicxml/xml_objs.py +++ b/ly/musicxml/xml_objs.py @@ -102,21 +102,22 @@ def iterate_part(self, part): def iterate_bar(self, bar): """The objects in the bar are output to the xml-file.""" - self.musxml.create_measure() - for obj in bar.obj_list: - if isinstance(obj, BarAttr): - self.new_xml_bar_attr(obj) - elif isinstance(obj, BarMus): - self.before_note(obj) - if isinstance(obj, BarNote): - self.new_xml_note(obj) - elif isinstance(obj, BarRest): - self.new_xml_rest(obj) - self.gener_xml_mus(obj) - self.after_note(obj) - elif isinstance(obj, BarBackup): - divdur = self.count_duration(obj.duration, self.divisions) - self.musxml.add_backup(divdur) + if len(bar.obj_list) > 1: # Prevents empty measures from being made + self.musxml.create_measure() + for obj in bar.obj_list: + if isinstance(obj, BarAttr): + self.new_xml_bar_attr(obj) + elif isinstance(obj, BarMus): + self.before_note(obj) + if isinstance(obj, BarNote): + self.new_xml_note(obj) + elif isinstance(obj, BarRest): + self.new_xml_rest(obj) + self.gener_xml_mus(obj) + self.after_note(obj) + elif isinstance(obj, BarBackup): + divdur = self.count_duration(obj.duration, self.divisions) + self.musxml.add_backup(divdur) def new_xml_bar_attr(self, obj): """Create bar attribute xml-nodes.""" From acb38adaf140bf15a36a8ca524e13f2e0095f68a Mon Sep 17 00:00:00 2001 From: Bryant Date: Wed, 12 Jun 2019 15:43:00 -0400 Subject: [PATCH 011/171] * ly2xml: Fix final note lengths --- ly/music/read.py | 7 ++++--- ly/musicxml/lymus2musxml.py | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ly/music/read.py b/ly/music/read.py index 50b3526d..30f8499d 100644 --- a/ly/music/read.py +++ b/ly/music/read.py @@ -164,9 +164,10 @@ def add_duration(self, item, token=None, source=None): self.source.pushback() break if tokens: - d = self.factory(Duration, tokens[0]) - d.tokens = tuple(tokens[1:]) - item.append(d) + if not isinstance(item, ly.music.items.Partial): # prevents \partial commands from changing the duration of notes + d = self.factory(Duration, tokens[0]) + d.tokens = tuple(tokens[1:]) + item.append(d) item.duration = self.prev_duration = ly.duration.base_scaling(tokens) else: item.duration = self.prev_duration diff --git a/ly/musicxml/lymus2musxml.py b/ly/musicxml/lymus2musxml.py index c16d1c3d..0e6d4873 100644 --- a/ly/musicxml/lymus2musxml.py +++ b/ly/musicxml/lymus2musxml.py @@ -433,6 +433,10 @@ def Postfix(self, postfix): def Beam(self, beam): pass + def Partial(self, partial): + r""" \partial # """ + pass + def Slur(self, slur): """ Slur, '(' = start, ')' = stop. """ if slur.token == '(': From c5df381b96ca18dddd421b2700304a61d46ecf2d Mon Sep 17 00:00:00 2001 From: Bryant Date: Thu, 13 Jun 2019 08:24:11 -0400 Subject: [PATCH 012/171] * ly2xml Tests: Fix tests with backup elements --- tests/test_xml_files/merge_voice.musicxml | 7 ++----- tests/test_xml_files/pickup.musicxml | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/test_xml_files/merge_voice.musicxml b/tests/test_xml_files/merge_voice.musicxml index 4a638647..08ece9bb 100644 --- a/tests/test_xml_files/merge_voice.musicxml +++ b/tests/test_xml_files/merge_voice.musicxml @@ -5,8 +5,8 @@ Somebody to love - python-ly 0.9.4 - 2016-03-28 + python-ly 0.9.5 + 2019-06-13 @@ -149,9 +149,6 @@ 4 - - 4 - diff --git a/tests/test_xml_files/pickup.musicxml b/tests/test_xml_files/pickup.musicxml index d75fb450..17f1601c 100644 --- a/tests/test_xml_files/pickup.musicxml +++ b/tests/test_xml_files/pickup.musicxml @@ -39,7 +39,7 @@ quarter - 1 + 1 @@ -152,7 +152,7 @@ quarter - 1 + 1 From af3eae2d7550136952b06f59e68dea3c9cd30945 Mon Sep 17 00:00:00 2001 From: Bryant George Date: Fri, 14 Jun 2019 08:58:02 -0400 Subject: [PATCH 013/171] Update xml_objs.py This is because I merged into 9 instead of stable --- ly/musicxml/xml_objs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ly/musicxml/xml_objs.py b/ly/musicxml/xml_objs.py index 8882e26b..208ff21a 100644 --- a/ly/musicxml/xml_objs.py +++ b/ly/musicxml/xml_objs.py @@ -352,6 +352,7 @@ def merge_lyrics(self, lyrics): elif l[-1] == "slurOn" or l[-2] == "slurOn": slurOn = True if l != 'skip': + l[0] = l[0].replace('~', chr(0x203f)) # Turns ~ into undertie obj.add_lyric(l) i += 1 From 55865aaa961eaef9bbf67b4feaed1dcb5fe01cfd Mon Sep 17 00:00:00 2001 From: Bryant Date: Fri, 14 Jun 2019 10:08:37 -0400 Subject: [PATCH 014/171] * ly2xml Tests: Prevent outdated lyric warning --- ly/musicxml/lymus2musxml.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ly/musicxml/lymus2musxml.py b/ly/musicxml/lymus2musxml.py index 0e6d4873..75981169 100644 --- a/ly/musicxml/lymus2musxml.py +++ b/ly/musicxml/lymus2musxml.py @@ -246,6 +246,8 @@ def check_context(self, context, context_id=None, token=""): self.mediator.new_section('voice') elif context == 'Devnull': self.mediator.new_section('devnull', True) + elif context == 'Lyrics': + pass # The way lyrics are implemented, they don't need a new section here (prevents irrelevant warning) else: print("Context not implemented:", context) From 2dafcafb29a9c79e973c66eff2c8b99830715715 Mon Sep 17 00:00:00 2001 From: Bryant Date: Fri, 14 Jun 2019 10:12:02 -0400 Subject: [PATCH 015/171] * ly2xml Tests: Search folder for new test files --- tests/test_xml.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_xml.py b/tests/test_xml.py index 434a7538..68ef0f59 100644 --- a/tests/test_xml.py +++ b/tests/test_xml.py @@ -6,11 +6,15 @@ import os import re import ly.pkginfo +import glob def test_all(): """Test all files in test_xml_files""" - test_list = ['glissando', 'tie', 'merge_voice', 'variable', 'dynamics', 'tuplet', 'pickup', 'lyrics', 'barlines'] + filebase = os.path.join(os.path.dirname(__file__), 'test_xml_files') + # Help from https://www.mkyong.com/python/python-how-to-list-all-files-in-a-directory/ + # Searches test_xml_files directory for all lilypond files and extracts their name (without .ly) + test_list = [re.search(r'([^/]*)\.ly', f).group(1) for f in glob.glob(filebase + "/*.ly")] for test in test_list: print("Testing {}.ly...".format(test)) compare_output(test) From 9992b18bae7ad9e572078eab4147585604b7c21e Mon Sep 17 00:00:00 2001 From: Bryant Date: Fri, 14 Jun 2019 10:14:00 -0400 Subject: [PATCH 016/171] * ly2xml Tests: Update and add test files --- tests/test_xml_files/barlines.ly | 8 +- tests/test_xml_files/barlines.musicxml | 203 +++++++-------------- tests/test_xml_files/last_measure.ly | 58 ++++++ tests/test_xml_files/last_measure.musicxml | 149 +++++++++++++++ tests/test_xml_files/lyric_ties.ly | 27 +++ tests/test_xml_files/lyric_ties.musicxml | 85 +++++++++ tests/test_xml_files/lyrics.ly | 18 +- tests/test_xml_files/lyrics.musicxml | 100 +++++----- 8 files changed, 436 insertions(+), 212 deletions(-) create mode 100644 tests/test_xml_files/last_measure.ly create mode 100644 tests/test_xml_files/last_measure.musicxml create mode 100644 tests/test_xml_files/lyric_ties.ly create mode 100644 tests/test_xml_files/lyric_ties.musicxml diff --git a/tests/test_xml_files/barlines.ly b/tests/test_xml_files/barlines.ly index 5217efe0..f2e66746 100644 --- a/tests/test_xml_files/barlines.ly +++ b/tests/test_xml_files/barlines.ly @@ -7,7 +7,7 @@ keyTime = { \numericTimeSignature } -Soprano = \relative { +Soprano = \relative c'' { \voiceOne \keyTime g4 g \bar "'" g g \bar "||" @@ -18,7 +18,7 @@ Soprano = \relative { \bar "|." } -Alto = \relative { +Alto = \relative c'' { \voiceTwo \keyTime e4 e e e @@ -28,7 +28,7 @@ Alto = \relative { | e e e e } -Tenor = \relative { +Tenor = \relative c { \voiceOne \keyTime c4 c c c @@ -38,7 +38,7 @@ Tenor = \relative { | c c c c } -Bass = \relative { +Bass = \relative c { \voiceTwo \keyTime a4 a a a diff --git a/tests/test_xml_files/barlines.musicxml b/tests/test_xml_files/barlines.musicxml index 7dd19e16..ac3c165d 100644 --- a/tests/test_xml_files/barlines.musicxml +++ b/tests/test_xml_files/barlines.musicxml @@ -5,7 +5,7 @@ python-ly 0.9.5 - 2019-06-11 + 2019-06-14 @@ -32,7 +32,7 @@ G - 3 + 4 1 1 @@ -41,7 +41,7 @@ G - 3 + 4 1 1 @@ -53,7 +53,7 @@ E - 3 + 5 1 2 @@ -62,7 +62,7 @@ E - 3 + 5 1 2 @@ -77,7 +77,7 @@ G - 3 + 4 1 1 @@ -86,7 +86,7 @@ G - 3 + 4 1 1 @@ -98,7 +98,7 @@ E - 3 + 5 1 2 @@ -107,15 +107,12 @@ E - 3 + 5 1 2 quarter - - 2 - light-light @@ -125,7 +122,7 @@ G - 3 + 4 1 1 @@ -134,7 +131,7 @@ G - 3 + 4 1 1 @@ -146,7 +143,7 @@ E - 3 + 5 1 2 @@ -155,15 +152,12 @@ E - 3 + 5 1 2 quarter - - 2 - none @@ -173,7 +167,7 @@ G - 3 + 4 1 1 @@ -182,7 +176,7 @@ G - 3 + 4 1 1 @@ -194,7 +188,7 @@ E - 3 + 5 1 2 @@ -203,15 +197,12 @@ E - 3 + 5 1 2 quarter - - 2 - dashed @@ -221,7 +212,7 @@ G - 3 + 4 1 1 @@ -230,7 +221,7 @@ G - 3 + 4 1 1 @@ -242,7 +233,7 @@ E - 3 + 5 1 2 @@ -251,15 +242,12 @@ E - 3 + 5 1 2 quarter - - 2 - regular @@ -269,7 +257,7 @@ G - 3 + 4 1 1 @@ -278,7 +266,7 @@ G - 3 + 4 1 1 @@ -290,7 +278,7 @@ E - 3 + 5 1 2 @@ -299,15 +287,12 @@ E - 3 + 5 1 2 quarter - - 2 - heavy @@ -317,7 +302,7 @@ G - 3 + 4 1 1 @@ -326,7 +311,7 @@ G - 3 + 4 1 1 @@ -338,7 +323,7 @@ E - 3 + 5 1 2 @@ -347,15 +332,12 @@ E - 3 + 5 1 2 quarter - - 2 - heavy-light @@ -365,7 +347,7 @@ G - 3 + 4 1 1 @@ -374,7 +356,7 @@ G - 3 + 4 1 1 @@ -386,7 +368,7 @@ E - 3 + 5 1 2 @@ -395,15 +377,12 @@ E - 3 + 5 1 2 quarter - - 2 - heavy-heavy @@ -413,7 +392,7 @@ G - 3 + 4 1 1 @@ -422,7 +401,7 @@ G - 3 + 4 1 1 @@ -434,7 +413,7 @@ E - 3 + 5 1 2 @@ -443,15 +422,12 @@ E - 3 + 5 1 2 quarter - - 2 - dotted @@ -461,7 +437,7 @@ G - 3 + 4 1 1 @@ -470,7 +446,7 @@ G - 3 + 4 1 1 @@ -482,7 +458,7 @@ E - 3 + 5 1 2 @@ -491,15 +467,12 @@ E - 3 + 5 1 2 quarter - - 2 - light-heavy @@ -543,7 +516,7 @@ A - 3 + 2 1 2 @@ -552,7 +525,7 @@ A - 3 + 2 1 2 @@ -588,7 +561,7 @@ A - 3 + 2 1 2 @@ -597,18 +570,12 @@ A - 3 + 2 1 2 quarter - - 2 - - - 2 - light-light @@ -639,7 +606,7 @@ A - 3 + 2 1 2 @@ -648,18 +615,12 @@ A - 3 + 2 1 2 quarter - - 2 - - - 2 - none @@ -690,7 +651,7 @@ A - 3 + 2 1 2 @@ -699,18 +660,12 @@ A - 3 + 2 1 2 quarter - - 2 - - - 2 - dashed @@ -741,7 +696,7 @@ A - 3 + 2 1 2 @@ -750,18 +705,12 @@ A - 3 + 2 1 2 quarter - - 2 - - - 2 - regular @@ -792,7 +741,7 @@ A - 3 + 2 1 2 @@ -801,18 +750,12 @@ A - 3 + 2 1 2 quarter - - 2 - - - 2 - heavy @@ -843,7 +786,7 @@ A - 3 + 2 1 2 @@ -852,18 +795,12 @@ A - 3 + 2 1 2 quarter - - 2 - - - 2 - heavy-light @@ -894,7 +831,7 @@ A - 3 + 2 1 2 @@ -903,18 +840,12 @@ A - 3 + 2 1 2 quarter - - 2 - - - 2 - heavy-heavy @@ -945,7 +876,7 @@ A - 3 + 2 1 2 @@ -954,18 +885,12 @@ A - 3 + 2 1 2 quarter - - 2 - - - 2 - dotted @@ -996,7 +921,7 @@ A - 3 + 2 1 2 @@ -1005,18 +930,12 @@ A - 3 + 2 1 2 quarter - - 2 - - - 2 - light-heavy diff --git a/tests/test_xml_files/last_measure.ly b/tests/test_xml_files/last_measure.ly new file mode 100644 index 00000000..3995a347 --- /dev/null +++ b/tests/test_xml_files/last_measure.ly @@ -0,0 +1,58 @@ +\version "2.18.2" + +keyTime = { + \time 4/4 + \numericTimeSignature + \partial 4 +} + +Soprano = \relative c'' { + \voiceOne + \keyTime + g4 + | g2. \bar "|." +} + +Alto = \relative c' { + \voiceTwo + \keyTime + g4 + | g2. +} + +Tenor = \relative c' { + \voiceOne + \keyTime + g4 + | g2. +} + +Bass = \relative c { + \voiceTwo + \keyTime + g4 + | g2. +} + +\score +{ + << + \new Staff = "treble" \with { + } + << + \clef "treble" + \new Voice = "SopranoVoice" \Soprano + \new Voice = "AltoVoice" \Alto + >> + + \new Staff = "bass" \with { + } + << + \clef "bass" + \new Voice = "TenorVoice" \Tenor + \new Voice = "BassVoice" \Bass + >> + + >> + +} \ No newline at end of file diff --git a/tests/test_xml_files/last_measure.musicxml b/tests/test_xml_files/last_measure.musicxml new file mode 100644 index 00000000..d8f08a85 --- /dev/null +++ b/tests/test_xml_files/last_measure.musicxml @@ -0,0 +1,149 @@ + + + + + + python-ly 0.9.5 + 2019-06-13 + + + + + + + + + + + + + + 1 + + + G + 2 + + + + + G + 4 + + 1 + 1 + quarter + + + 1 + + + + G + 3 + + 1 + 2 + quarter + + + + + + G + 4 + + 3 + 1 + half + + + + 3 + + + + G + 3 + + 3 + 2 + half + + + + + light-heavy + + + + + + + 1 + + + F + 4 + + + + + G + 3 + + 1 + 1 + quarter + + + 1 + + + + G + 2 + + 1 + 2 + quarter + + + + + + G + 3 + + 3 + 1 + half + + + + 3 + + + + G + 2 + + 3 + 2 + half + + + + + light-heavy + + + + diff --git a/tests/test_xml_files/lyric_ties.ly b/tests/test_xml_files/lyric_ties.ly new file mode 100644 index 00000000..dac65f2b --- /dev/null +++ b/tests/test_xml_files/lyric_ties.ly @@ -0,0 +1,27 @@ +\version "2.18.2" + +StanzaOne = \lyricmode { + La di la~ah di~aa~ah +} + +\language "english" + +Soprano = \relative c'' { + \voiceOne + g2 g + | g2 g +} + +\score +{ + << + \new Staff = "treble" \with { + } + << + \clef "treble" + \new Voice = "SopranoVoice" \Soprano + \lyricsto SopranoVoice \new Lyrics \StanzaOne + >> + >> + +} \ No newline at end of file diff --git a/tests/test_xml_files/lyric_ties.musicxml b/tests/test_xml_files/lyric_ties.musicxml new file mode 100644 index 00000000..d077b160 --- /dev/null +++ b/tests/test_xml_files/lyric_ties.musicxml @@ -0,0 +1,85 @@ + + + + + + python-ly 0.9.5 + 2019-06-11 + + + + + + + + + + + 1 + + + G + 2 + + + + + G + 4 + + 2 + 1 + half + + single + La + + + + + G + 4 + + 2 + 1 + half + + single + di + + + + + + + G + 4 + + 2 + 1 + half + + single + la‿ah + + + + + G + 4 + + 2 + 1 + half + + single + di‿aa‿ah + + + + + diff --git a/tests/test_xml_files/lyrics.ly b/tests/test_xml_files/lyrics.ly index 7291e30c..9b90b114 100644 --- a/tests/test_xml_files/lyrics.ly +++ b/tests/test_xml_files/lyrics.ly @@ -29,14 +29,14 @@ StanzaThree = \lyricmode { keyTime = { \time 4/4 \numericTimeSignature - \key ef \major + \key c \major } Soprano = \relative c'' { \voiceOne \keyTime - bf4 cs( d ef) - | gf( af) b( c) + b4 c( d e) + | g( a) b( c) | g2 a | f8 g c a( c) b g f } @@ -44,8 +44,8 @@ Soprano = \relative c'' { Alto = \relative c' { \voiceTwo \keyTime - g4 g ef ef - | f d ef e + g4 g e e + | f d e e | g2 a | f8 g c a( c) b g f } @@ -53,8 +53,8 @@ Alto = \relative c' { Tenor = \relative c' { \voiceOne \keyTime - af4 bf af bf - | bf af bf af + a4 b a b + | b a b a | g2 a | f8 g c a( c) b g f } @@ -62,8 +62,8 @@ Tenor = \relative c' { Bass = \relative c { \voiceTwo \keyTime - cf4 g af8 gf gf gf - | ds4 bf ds bf + c4 g a8 g g g + | d4 b d b | g2 a | f8 g c a( c) b g f } diff --git a/tests/test_xml_files/lyrics.musicxml b/tests/test_xml_files/lyrics.musicxml index 0cceed6a..23b17856 100644 --- a/tests/test_xml_files/lyrics.musicxml +++ b/tests/test_xml_files/lyrics.musicxml @@ -5,7 +5,7 @@ python-ly 0.9.5 - 2019-06-10 + 2019-06-14 @@ -21,7 +21,7 @@ 2 - -3 + 0 major