├── .flake8 ├── .gitignore ├── .pylintrc ├── LICENSE ├── MANIFEST.in ├── README.md ├── ReleaseNotes_3.0.0.txt ├── ReleaseNotes_3.1.0.txt ├── ReleaseNotes_4.0.0.txt ├── ReleaseNotes_4.1.0.txt ├── ReleaseNotes_4.2.0.txt ├── best_output.csv ├── build_dist.commands ├── docs ├── index.html ├── musicdiff.html ├── musicdiff │ ├── annotation.html │ ├── comparison.html │ ├── detaillevel.html │ └── visualization.html └── search.js ├── examples └── musicdiff_demo.ipynb ├── generateDocs.commands ├── musicdiff ├── __init__.py ├── __main__.py ├── annotation.py ├── comparison.py ├── detaillevel.py ├── m21utils.py ├── py.typed └── visualization.py ├── py.typed ├── pypi_README.md ├── setup.py ├── symbols.txt └── tests ├── expected_cmd_line_output.txt ├── generate_cmd_line_test_results ├── test_cmd_line ├── test_ml_training_evaluation.sh ├── test_nl.py ├── test_results ├── cmd_line_results_allobjects.txt ├── cmd_line_results_allobjects_no_lyrics.txt ├── cmd_line_results_allobjects_no_lyrics_barlines.txt ├── cmd_line_results_allobjects_style.txt ├── cmd_line_results_allobjects_style_metadata.txt ├── cmd_line_results_allobjects_style_metadata_secr.txt ├── cmd_line_results_allobjects_style_no_lyrics.txt ├── cmd_line_results_decoratednotesandrests.txt ├── cmd_line_results_decoratednotesandrests_no_ties.txt ├── cmd_line_results_decoratednotesandrests_no_ties_beams.txt ├── cmd_line_results_decoratednotesandrests_no_ties_beams_slurs.txt ├── cmd_line_results_decoratednotesandrests_voicing.txt ├── cmd_line_results_lyrics.txt ├── cmd_line_results_metadata.txt ├── cmd_line_results_notesandrests.txt ├── cmd_line_results_notesandrests_articulations.txt ├── cmd_line_results_notesandrests_articulations_ornaments.txt ├── cmd_line_results_notesandrests_barlines.txt ├── cmd_line_results_notesandrests_barlines_directions.txt ├── cmd_line_results_notesandrests_directions.txt ├── cmd_line_results_notesandrests_secr.txt ├── cmd_line_results_otherobjects.txt └── cmd_line_results_otherobjects_style.txt ├── test_scl.py ├── test_score_visualization.py ├── test_scores ├── chord_score_1a.mei ├── chord_score_1b.mei ├── chord_score_2a.mei ├── chord_score_2b.mei ├── chord_score_3a.mei ├── chord_score_3b.mei ├── humdrum │ ├── Haydn_-_Symphony_No._44_in_E_minor.krn │ └── Nimrod_for_string_quartet.krn ├── monophonic_score_1a.mei ├── monophonic_score_1b.mei ├── multivoice_score_1a.mei ├── multivoice_score_1b.mei ├── musicxml │ ├── Haydn_-_Symphony_No._44_in_E_minor.musicxml │ ├── Nimrod_for_string_quartet.musicxml │ ├── articulation_score_1a.xml │ ├── articulation_score_1b.xml │ ├── chord_score_1a.xml │ ├── chord_score_1b.xml │ ├── chord_score_2a.xml │ ├── chord_score_2b.xml │ ├── chord_score_3a.xml │ ├── chord_score_3b.xml │ ├── longHaydn_a.musicxml │ ├── longHaydn_b.musicxml │ ├── monophonic_score_1a.xml │ ├── monophonic_score_1b.xml │ ├── multivoice_score_1a.xml │ ├── multivoice_score_1b.xml │ ├── polyphonic_score_2a.xml │ ├── polyphonic_score_2b.xml │ ├── tie_score_1a.xml │ ├── tie_score_1b.xml │ ├── tie_score_2a.xml │ ├── tie_score_2b.xml │ ├── tuplet_score_1a.xml │ └── tuplet_score_1b.xml ├── polyphonic_score_1a.mei ├── polyphonic_score_1b.mei ├── polyphonic_score_2a.mei ├── polyphonic_score_2b.mei ├── test_all_details_1a.mei ├── test_all_details_1b.mei ├── tie_score_1a.mei ├── tie_score_1b.mei ├── tie_score_2a.mei ├── tie_score_2b.mei ├── tuplet_score_1a.mei ├── tuplet_score_1b.mei └── xml2.xml └── test_utils.py /.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | ignore= 3 | E127, 4 | E128, 5 | E301, 6 | E302, 7 | E303, 8 | E501, 9 | E722, 10 | E731, 11 | F401, 12 | F405, 13 | F821, 14 | F841, 15 | W391, 16 | W503, 17 | 18 | # E127, # over indented 19 | # E128, # under indented 20 | # E301, # 0 blank lines -- good test but something going wrong in new algorithm 21 | # E302, # blank lines 22 | # E303, # blank lines 23 | # E501, # let pylint check line length 24 | # E722, # let pylint check bare except 25 | # E731, # do not assign a lambda 26 | # F401, # let pylint check for imported but unused (wildcards and exports trigger) 27 | # F405, # __all__ is okay to get from wildcard. 28 | # F821, # let pylint check for undefined (del at end of module makes undefined) 29 | # F841, # let pylint check for unused 30 | # W391, # extra blank lines at end of file 31 | # W503, # line break BEFORE binary operator 32 | 33 | exclude= 34 | .git, 35 | __pycache__, 36 | *.pyc, 37 | ext, 38 | 39 | # F403 = from module import * 40 | 41 | per-file-ignores = 42 | music21/chord/tables.py:E122,E124,E201,E202,E203,E221,E231,E241 43 | music21/common/__init__.py:F403 44 | music21/features/__init__.py:F403 45 | music21/search/__init__.py:F403 46 | 47 | max-line-length=100 48 | 49 | inline-quotes = single 50 | multiline-quotes = ''' 51 | docstring-quotes = ''' 52 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .coverage 2 | .idea 3 | htmlcov 4 | __pycache__ 5 | musicdiff.egg-info 6 | .DS_Store 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | Copyright (c) 2022-2025 Francesco Foscarin, Greg Chapman 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | musicdiff is derived from https://github.com/fosfrancesco/music-score-diff.git which also uses the MIT license: 12 | 13 | The MIT License (MIT) 14 | Copyright (c) 2019, Francesco Foscarin 15 | 16 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 17 | 18 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include pypi_README.md 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # musicdiff 2 | A Python3 package (and command-line tool) for computing and visualizing (or describing) the notation differences between two music scores. 3 | 4 | musicdiff is focused on visible notation differences, not only on audible musical differences. For example, two tied eighth notes are considered different from a single quarter note. And two beamed 16th notes are considered different from two unbeamed 16th notes. This makes musicdiff particularly useful for assessing the results of Optical Music Recognition software. 5 | 6 | musicdiff is derived from: [music-score-diff](https://github.com/fosfrancesco/music-score-diff.git) 7 | by [Francesco Foscarin](https://github.com/fosfrancesco). 8 | 9 | ## Setup 10 | Depends on [music21](https://pypi.org/project/music21) (version 9.1+), [numpy](https://pypi.org/project/numpy), and [converter21](https://pypi.org/project/converter21) (version 3.4+). You also will need to configure music21 (instructions [here](https://web.mit.edu/music21/doc/usersGuide/usersGuide_01_installing.html)) to display a musical score (e.g. with MuseScore). Requires Python 3.10+. 11 | 12 | ## Usage 13 | On the command line: 14 | 15 | python3 -m musicdiff -i decoratednotesandrests lyrics style -x beams -- file1.musicxml file2.krn 16 | 17 | arguments: 18 | -i/--include one or more named details to include in comparison (the default is allobjects, 19 | a.k.a. decoratednotesandrests and otherobjects). Can be decoratednotesandrests, 20 | otherobjects, allobjects, or any combination of those and/or the following: 21 | notesandrests; the aforementioned note decorations: beams, tremolos, ornaments, 22 | articulations, ties, slurs; the other objects: signatures, directions, 23 | barlines, staffdetails, chordsymbols, ottavas, arpeggios, and lyrics; and 24 | a final few details that are not found in allobjects: style, metadata, and 25 | voicing. voicing compares how notes are included in voices and chords (by 26 | default this is ignored). 27 | -x/--exclude one or more named details to exclude from comparison. Can be any of the 28 | named details accepted by -i/--include. 29 | -o/--output one or more of three output formats: text (or t) or visual (or v) or ser (or s); 30 | the default is visual). visual (or v) requests production of marked-up score 31 | PDFs; text (or t) requests production of diff-like text output; ser (or s) 32 | requests a JSON text output containing Symbolic Error Ratio information. 33 | 34 | file1 first music score file to compare (any format music21 or converter21 can parse) 35 | file2 second music score file to compare (any format music21 or converter21 can parse) 36 | 37 | The source for that command-line tool, which calls musicdiff's high-level diff() API, can be seen [here](musicdiff/__main__.py). You can use it as example code for adding musicdiff capabilities to your own code. See the documentation [here](https://gregchapman-dev.github.io/musicdiff) to find out how to customize diff()'s behavior beyond what the command line tool does. 38 | 39 | A google colab notebook is available [here](examples/musicdiff_demo.ipynb). 40 | 41 | If you are interested in calling lower-level musicdiff APIs to do more complicated things than just visualization in PDFs or diff-like text output, the source for musicdiff's high-level diff() API (found [here](musicdiff/__init__.py)) is good example code to read. Note particularly how diff() calls converter21.register() to register converter21's Humdrum and MEI parsers for use by music21. If you call lower-level APIs than diff(), you will need to do this yourself. 42 | 43 | ## Documentation 44 | You can find the musicdiff API documentation [here](https://gregchapman-dev.github.io/musicdiff). 45 | 46 | ## Citing 47 | If you use this work in any research, please cite the relevant paper: 48 | 49 | ``` 50 | @inproceedings{foscarin2019diff, 51 | title={A diff procedure for music score files}, 52 | author={Foscarin, Francesco and Jacquemard, Florent and Fournier-S’niehotta, Raphael}, 53 | booktitle={6th International Conference on Digital Libraries for Musicology}, 54 | pages={58--64}, 55 | year={2019} 56 | } 57 | ``` 58 | 59 | The paper is freely available [here](https://hal.inria.fr/hal-02267454v2/document). 60 | 61 | ## License 62 | Licensed under the [MIT License](LICENSE). 63 | 64 | ## Acknowledgment 65 | Many thanks to [Francesco Foscarin](https://github.com/fosfrancesco) for allowing me to use his [music-score-diff](https://github.com/fosfrancesco/music-score-diff.git) code, and for continuing to advise me on this project. 66 | -------------------------------------------------------------------------------- /ReleaseNotes_3.0.0.txt: -------------------------------------------------------------------------------- 1 | Changes since 2.0.1: 2 | - Require music21 v9 (for several features/fixes) and converter21 v3 3 | (for improved Humdrum and MEI import) 4 | - Remove all checks for music21 features (they're all there in v9) 5 | - compare Mordent/Trill/Turn better, to include ornament accidentals 6 | (newly supported in music21 v9) 7 | - Compare metadata if requested (e.g. AllObjectsAndMetadata) 8 | - compare StaffLayout.staffLines and StaffLayout.staffSize 9 | - support tuplet.type = 'startStop' 10 | - fix tie annotation 11 | - finish tremolo annotation: 12 | notice fingered tremolos (TremoloSpanner) 13 | annotate tremolos as 'bTrem' (Tremolo, a.k.a. bowed tremolo, a.k.a. one note tremolo) 14 | vs. 'fTrem' (TremoloSpanner, a.k.a. fingered tremolo, a.k.a. two note tremolo) 15 | - compare rest positioning 16 | - better comparison of RepeatBrackets (support .overrideDisplay) 17 | - compare placement (above/below) of articulations and expressions (AllObjectsWithStyle) 18 | - support comparison of StaffGroups as part of AllObjects. 19 | StaffGroup bracket shape is relegated to AllObjectsWithStyle. 20 | - compare (and fill and transpose) Ottavas, maintaining accidental display status 21 | (newly possible in music21 v9) 22 | - compare delayed turns (new in music21 v9) 23 | - ignore redundant clefs during comparison 24 | - compare tuplet number/bracket visibility and format (and placement if diffing WithStyle) 25 | -------------------------------------------------------------------------------- /ReleaseNotes_3.1.0.txt: -------------------------------------------------------------------------------- 1 | Changes since 3.0.0: 2 | 3 | Feature-level changes: 4 | - Move lyrics diff from GeneralNotesOnly detail level to AllObjects detail level. 5 | - Compare GeneralNote offsets (visually, this is horizontal position in measure). 6 | - compare tuplet_info (num and numBase, num format/visibility, bracket visibility), 7 | not just tuplet (start/continue/stop). This is technically a bugfix, but tuplet 8 | comparisons were pretty much not working at all, so I'm calling it a new feature. 9 | - Add py.typed, so clients can do mypy against musicdiff APIs. 10 | 11 | Bugfixes: 12 | Metadata: 13 | - Contributor might not have any names. Deal with it. 14 | - skip more metadata keys (that are specific to a particular file, so shouldn't 15 | be compared against another file): 'EMD', 'EST', 'VTS', 'RLN', 'PUB'. 16 | - html-unescape during annotation of metadata items. 17 | Style: 18 | - Ignore some style stuff we don't care about (e.g. absX/absY). 19 | - Ignore fontSize, and regularize how 'bold' is represented. 20 | Lyrics: 21 | - Don't annotate lyric style if it is empty (hasStyleInformation could still be True). 22 | - Consider lyric.syllabic == None and 'single' to be the same. 23 | - Better comparison of lyrics, treat style.absoluteY as placement fallback when 24 | placement is None. 25 | - For lyrics, ignore placement=='below' and justify=='left', as equivalent to not 26 | specifying. 27 | - Ignore empty lyrics. 28 | MetronomeMarks: 29 | - Ignore playback-only MetronomeMarks (they're not marked invisible, but they are 30 | not printed). 31 | - Treat MetronomeMark with explicit number and no explicit text the same as one with no 32 | explicit number and explicit text saying "x = NNN" (where x is a SMUFL note code 33 | followed by 1-4 SMUFL dots). They are printed identically, so they are the same. 34 | Barlines: 35 | - no specified barline is the same as normal barline (at start and end of measure, 36 | that is). 37 | - ignore invisible ('none') barlines. 38 | Other fixes: 39 | - Fix crash when diff is visualized between note with accidental and unpitched note/rest 40 | - Ignore redundant system and page breaks 41 | - Grace vs Appoggiatura is more complex (in music21) than I thought. 42 | - Skip over non-realized ChordSymbols (realized ChordSymbols get treated as Chords) 43 | - Skip over StaffGroup that contains all the staves and has neither barTogether nor 44 | symbol. Some file formats have one (MEI), and some file formats imply/don't need 45 | it (MusicXML). 46 | 47 | -------------------------------------------------------------------------------- /ReleaseNotes_4.0.0.txt: -------------------------------------------------------------------------------- 1 | Changes since 3.1.1: 2 | New command line and API that allows fine-grained setting of requested details. 3 | New output option that prints a diff-like text description of the differences to stdout. 4 | New comparison algorithm that ignores voicing and chording, just comparing all the notes, 5 | wherever they are in the measure. 6 | Support comparison of slurs. 7 | Support comparison of chord symbols. 8 | Better comparison of tuplets. 9 | Better comparison of lyrics. 10 | Ignore leading and trailing whitespace in directions, lyrics, and metadata. 11 | Fix random crashes and long-term memory growth when doing multiple comparisons in one run. 12 | -------------------------------------------------------------------------------- /ReleaseNotes_4.1.0.txt: -------------------------------------------------------------------------------- 1 | Changes since 4.0.0: 2 | Add new output option that prints JSON containing the symbolic error rate (SER = 3 | numSymbolErrors / numSymbolsInGroundTruth) to stdout (the JSON actually 4 | contains all three numbers). Ground truth is assumed to be the second file. 5 | If numSymbolsInGroundTruth == 0, SER will be numSymbolErrors, to avoid divide 6 | by zero. 7 | Add new API Visualization.get_ser_output() that returns a dict containing the 8 | symbolic error rate. 9 | In support of SER, notation_sizes (a.k.a. symbol counts) and diff costs (a.k.a. 10 | symbolic error counts) have been reviewed and updated: 11 | AnnNote.notation_size(): add 1 symbol for slash on grace note 12 | AnnExtra.notation_size(): len(text) for the text, add 1 symbol if there is any 13 | style specified 14 | AnnExtra diff error count: text diff is Levenshtein distance, offset diff is 15 | 1 symbol error, duration diff is 1 symbol error, style diff is 1 symbol error 16 | AnnLyric.notation_size(): use len(text) as symbol count instead of 1; 17 | add 1 symbol if there's a verse number; 18 | add 1 symbol if there's a verse identifier different from the number; 19 | add 1 symbol if styled 20 | AnnLyric diff cost: text diff symbol error count is the Levenshtein distance, 21 | verse number diff is 1 symbol error, verse identifier diff is 1 symbol 22 | error, offset diff is 1 symbol error, style diff is 1 symbol error 23 | AnnMeasure.notation_size(): not just notes' symbols and extras' symbols, add in 24 | the lyrics' symbols 25 | AnnScore.notation_size(): not just parts' symbols, add in staff_groups' symbols 26 | and metadata_items' symbols 27 | Add support for comparing scores that have different number of parts (this previously 28 | caused a failure). The existing parts are assumed to line up by index (as before, 29 | score1 part 0 is compared with score2 part 0), and then we generate edits that 30 | either delete the extra parts in score1, or add the extra parts in score2. The 31 | number of symbol errors for those edits is simply the notation_size of (the 32 | number of symbols in) the added or deleted parts. 33 | Several smallish bugfixes. 34 | 35 | -------------------------------------------------------------------------------- /ReleaseNotes_4.2.0.txt: -------------------------------------------------------------------------------- 1 | Changes since 4.1.0: 2 | Add new extra (non-note/rest) annotation/comparison algorithm, using set distance. 3 | -------------------------------------------------------------------------------- /build_dist.commands: -------------------------------------------------------------------------------- 1 | # git checkout main 2 | # git merge develop 3 | # Fix any conflicts, add, commit, push to origin 4 | 5 | # Edit setup.py to change version number and maybe dependencies. 6 | # MAYBE README and pypi_README, too, if dependencies changed. 7 | # git add setup.py README etc 8 | # git commit 9 | # git push origin 10 | 11 | # Clean up previous stuff: 12 | rm -r __pycache__ 13 | rm -r musicdiff/__pycache__ 14 | rm -r tests/__pycache__ 15 | rm -r musicdiff.egg-info 16 | rm -r dist build 17 | 18 | # Build dist and wheel: 19 | python3 -m build 20 | 21 | # Check for malformed README URLs: 22 | python3 -m twine check dist/* 23 | 24 | # Test-publish to testpypi (__token__/password for pypi): 25 | python3 -m twine upload --repository testpypi dist/* 26 | 27 | # If all looks good, then publish on pypi proper (no password needed): 28 | python3 -m twine upload dist/* 29 | 30 | # Go to github and make a release there as well (tag=vN.n.n) 31 | 32 | # Make develop "catch up with" main, so we can easily merge again later 33 | # git checkout develop 34 | # git merge --squash main 35 | # git commit 36 | # git push origin 37 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/musicdiff_demo.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "nbformat": 4, 3 | "nbformat_minor": 0, 4 | "metadata": { 5 | "colab": { 6 | "name": "musicdiff Demo", 7 | "provenance": [], 8 | "authorship_tag": "ABX9TyOXa8bylkmkC18sJjvlpSBC", 9 | "include_colab_link": true 10 | }, 11 | "kernelspec": { 12 | "name": "python3", 13 | "display_name": "Python 3" 14 | }, 15 | "language_info": { 16 | "name": "python" 17 | } 18 | }, 19 | "cells": [ 20 | { 21 | "cell_type": "markdown", 22 | "metadata": { 23 | "id": "view-in-github", 24 | "colab_type": "text" 25 | }, 26 | "source": [ 27 | "\"Open" 28 | ] 29 | }, 30 | { 31 | "cell_type": "code", 32 | "execution_count": null, 33 | "metadata": { 34 | "id": "Xs5PXxMtwcoH" 35 | }, 36 | "outputs": [], 37 | "source": [ 38 | "!pip install --upgrade music21\n", 39 | "!pip install musicdiff" 40 | ] 41 | }, 42 | { 43 | "cell_type": "code", 44 | "source": [ 45 | "# install musescore for the visualization\n", 46 | "!yes | add-apt-repository ppa:mscore-ubuntu/mscore3-stable\n", 47 | "!apt update\n", 48 | "!apt install musescore3" 49 | ], 50 | "metadata": { 51 | "id": "bzrSzL22yu2T" 52 | }, 53 | "execution_count": null, 54 | "outputs": [] 55 | }, 56 | { 57 | "cell_type": "code", 58 | "source": [ 59 | "# clone repo, only to get some example musical scores.\n", 60 | "# This is not necessary if you are running it on your scores\n", 61 | "\n", 62 | "!git clone https://github.com/gregchapman-dev/musicdiff" 63 | ], 64 | "metadata": { 65 | "id": "QNg2z_pFwfK3" 66 | }, 67 | "execution_count": null, 68 | "outputs": [] 69 | }, 70 | { 71 | "cell_type": "markdown", 72 | "source": [ 73 | "Import libraries and set the correct pat for musescore3." 74 | ], 75 | "metadata": { 76 | "id": "6dAGTq79yuJz" 77 | } 78 | }, 79 | { 80 | "cell_type": "code", 81 | "source": [ 82 | "import musicdiff\n", 83 | "import music21\n", 84 | "from pathlib import Path\n", 85 | "us = music21.environment.UserSettings()\n", 86 | "us['musescoreDirectPNGPath'] = '/usr/bin/mscore3'" 87 | ], 88 | "metadata": { 89 | "id": "8pHLzGTgxft0" 90 | }, 91 | "execution_count": null, 92 | "outputs": [] 93 | }, 94 | { 95 | "cell_type": "markdown", 96 | "source": [ 97 | "Everything is ready, we can compute and display the differences." 98 | ], 99 | "metadata": { 100 | "id": "IJV_MwcSGX5k" 101 | } 102 | }, 103 | { 104 | "cell_type": "code", 105 | "source": [ 106 | "path_score1 = \"/content/musicdiff/tests/test_scores/musicxml/chord_score_1a.xml\"\n", 107 | "path_score2 = \"/content/musicdiff/tests/test_scores/musicxml/chord_score_1b.xml\"\n", 108 | "out_pdf_path1 = \"/content/score1.pdf\"\n", 109 | "out_pdf_path2 = \"/content/score2.pdf\"\n", 110 | "musicdiff.diff(path_score1,path_score2, out_pdf_path1, out_pdf_path2)" 111 | ], 112 | "metadata": { 113 | "id": "BvEXOlDqxuww" 114 | }, 115 | "execution_count": null, 116 | "outputs": [] 117 | }, 118 | { 119 | "cell_type": "markdown", 120 | "source": [ 121 | "The two score pdfs are saved in score1.pdf and score2.pdf. You can download them!\n", 122 | "\n", 123 | "Google colab does not support the visualization of pdf files, but we can visualize them by importing the temporary musicxml files and calling music21 show() function." 124 | ], 125 | "metadata": { 126 | "id": "J3z4ILeSGm19" 127 | } 128 | }, 129 | { 130 | "cell_type": "code", 131 | "source": [ 132 | "music21.converter.parse(\"/content/score1.musicxml\").show()" 133 | ], 134 | "metadata": { 135 | "id": "RAXSmKpNIEVA" 136 | }, 137 | "execution_count": null, 138 | "outputs": [] 139 | }, 140 | { 141 | "cell_type": "code", 142 | "source": [ 143 | "music21.converter.parse(\"/content/score2.musicxml\").show()" 144 | ], 145 | "metadata": { 146 | "id": "y7y3sJM4Kt5U" 147 | }, 148 | "execution_count": null, 149 | "outputs": [] 150 | } 151 | ] 152 | } -------------------------------------------------------------------------------- /generateDocs.commands: -------------------------------------------------------------------------------- 1 | # Clean out in case some files will no longer be there 2 | rm -r docs 3 | 4 | # Generate docs website in ./docs, from current sources: 5 | python3 -m pdoc musicdiff \!musicdiff.m21utils -o docs 6 | -------------------------------------------------------------------------------- /musicdiff/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gregchapman-dev/musicdiff/c770d3750113e222e8b6ad6de1d8b5f2c4ae47ed/musicdiff/py.typed -------------------------------------------------------------------------------- /py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gregchapman-dev/musicdiff/c770d3750113e222e8b6ad6de1d8b5f2c4ae47ed/py.typed -------------------------------------------------------------------------------- /pypi_README.md: -------------------------------------------------------------------------------- 1 | # musicdiff 2 | A Python3 package (and command-line tool) for computing and visualizing (or describing) the notation differences between two music scores. 3 | 4 | musicdiff is focused on visible notation differences, not only on audible musical differences. For example, two tied eighth notes are considered different from a single quarter note. And two beamed 16th notes are considered different from two unbeamed 16th notes. This makes musicdiff particularly useful for assessing the results of Optical Music Recognition software. 5 | 6 | musicdiff is derived from: [music-score-diff](https://github.com/fosfrancesco/music-score-diff.git) 7 | by [Francesco Foscarin](https://github.com/fosfrancesco). 8 | 9 | ## Setup 10 | Depends on [music21](https://pypi.org/project/music21) (version 9.1+), [numpy](https://pypi.org/project/numpy), and [converter21](https://pypi.org/project/converter21) (version 3.4+). You also will need to configure music21 (instructions [here](https://web.mit.edu/music21/doc/usersGuide/usersGuide_01_installing.html)) to display a musical score (e.g. with MuseScore). Requires Python 3.10+. 11 | 12 | ## Usage 13 | On the command line: 14 | 15 | python3 -m musicdiff -i decoratednotesandrests lyrics style -x beams -- file1.musicxml file2.krn 16 | 17 | arguments: 18 | -i/--include one or more named details to include in comparison (the default is allobjects, 19 | a.k.a. decoratednotesandrests and otherobjects). Can be decoratednotesandrests, 20 | otherobjects, allobjects, or any combination of those and/or the following: 21 | notesandrests; the aforementioned note decorations: beams, tremolos, ornaments, 22 | articulations, ties, slurs; the other objects: signatures, directions, 23 | barlines, staffdetails, chordsymbols, ottavas, arpeggios, and lyrics; and 24 | a final few details that are not found in allobjects: style, metadata, and 25 | voicing. voicing compares how notes are included in voices and chords (by 26 | default this is ignored). 27 | -x/--exclude one or more named details to exclude from comparison. Can be any of the 28 | named details accepted by -i/--include. 29 | -o/--output one or more of three output formats: text (or t) or visual (or v) or ser (or s); 30 | the default is visual). visual (or v) requests production of marked-up score 31 | PDFs; text (or t) requests production of diff-like text output; ser (or s) 32 | requests a JSON text output containing Symbolic Error Ratio information. 33 | 34 | file1 first music score file to compare (any format music21 or converter21 can parse) 35 | file2 second music score file to compare (any format music21 or converter21 can parse) 36 | 37 | musicdiff is also a package, with APIs you can call in your own code. There is a high-level diff() API that the command-line tool uses (that you can tweak the behavior of), and there are also lower level APIs that you can use in projects that perhaps want to do something more complicated than just visualization in PDFs or diff-like text output. 38 | 39 | ## Documentation 40 | You can find the musicdiff API documentation [here](https://gregchapman-dev.github.io/musicdiff). 41 | 42 | ## Citing 43 | If you use this work in any research, please cite the relevant paper: 44 | 45 | ``` 46 | @inproceedings{foscarin2019diff, 47 | title={A diff procedure for music score files}, 48 | author={Foscarin, Francesco and Jacquemard, Florent and Fournier-S’niehotta, Raphael}, 49 | booktitle={6th International Conference on Digital Libraries for Musicology}, 50 | pages={58--64}, 51 | year={2019} 52 | } 53 | ``` 54 | 55 | The paper is freely available [here](https://hal.inria.fr/hal-02267454v2/document). 56 | 57 | ## Acknowledgment 58 | Many thanks to [Francesco Foscarin](https://github.com/fosfrancesco) for allowing me to use his [music-score-diff](https://github.com/fosfrancesco/music-score-diff.git) code, and for continuing to work with and advise me on this project. 59 | 60 | ## License 61 | The MIT License (MIT) 62 | Copyright (c) 2022-2025 Francesco Foscarin, Greg Chapman 63 | 64 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 65 | 66 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 67 | 68 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 69 | 70 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Purpose: musicdiff is a package for comparing music scores using music21. 3 | # 4 | # Authors: Greg Chapman 5 | # musicdiff is derived from: 6 | # https://github.com/fosfrancesco/music-score-diff.git 7 | # by Francesco Foscarin 8 | # 9 | # Copyright: (c) 2022-2025 Francesco Foscarin, Greg Chapman 10 | # License: MIT, see LICENSE 11 | # ------------------------------------------------------------------------------ 12 | 13 | from setuptools import setup, find_packages 14 | import pathlib 15 | 16 | musicdiffversion = '4.2.0' 17 | 18 | here = pathlib.Path(__file__).parent.resolve() 19 | 20 | long_description = (here / 'pypi_README.md').read_text(encoding='utf-8') 21 | 22 | if __name__ == '__main__': 23 | setup( 24 | name='musicdiff', 25 | version=musicdiffversion, 26 | 27 | description='A music score notation diff package', 28 | long_description=long_description, 29 | long_description_content_type='text/markdown', 30 | 31 | url='https://github.com/gregchapman-dev/musicdiff', 32 | 33 | author='Greg Chapman', 34 | author_email='gregc@mac.com', 35 | 36 | classifiers=[ 37 | 'Development Status :: 5 - Production/Stable', 38 | 'License :: OSI Approved :: MIT License', 39 | 'Programming Language :: Python :: 3 :: Only', 40 | 'Operating System :: OS Independent', 41 | 'Natural Language :: English', 42 | ], 43 | 44 | keywords=[ 45 | 'music', 46 | 'score', 47 | 'notation', 48 | 'diff', 49 | 'compare', 50 | 'OMR', 51 | 'Optical Music Recognition', 52 | 'assess', 53 | 'assessment', 54 | 'comparison', 55 | 'music21', 56 | ], 57 | 58 | packages=find_packages(), 59 | 60 | python_requires='>=3.10', 61 | 62 | install_requires=[ 63 | 'music21>=9.1', 64 | 'numpy', 65 | 'converter21>=3.4' 66 | ], 67 | 68 | project_urls={ 69 | 'Documentation': 'https://gregchapman-dev.github.io/musicdiff', 70 | 'Source': 'https://github.com/gregchapman-dev/musicdiff', 71 | 'Bug Reports': 'https://github.com/gregchapman-dev/musicdiff/issues', 72 | } 73 | ) 74 | -------------------------------------------------------------------------------- /tests/generate_cmd_line_test_results: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | mkresults() { 4 | name=$1 5 | shift 1 6 | python -m musicdiff --output text $@ -- tests/test_scores/test_all_details_1a.mei tests/test_scores/test_all_details_1b.mei > tests/test_results/cmd_line_results_$name.txt >& /dev/null 7 | } 8 | 9 | rm tests/test_results/*.txt 10 | 11 | # simple includes (and some simple excludes that just remove something we included) 12 | mkresults notesandrests --include notesandrests 13 | mkresults notesandrests_barlines -i notesandrests barlines 14 | mkresults notesandrests_barlines_directions -i notesandrests barlines directions 15 | mkresults notesandrests_directions -i notesandrests barlines directions -x barlines 16 | mkresults notesandrests_barlines_directions -i notesandrests barlines directions 17 | mkresults notesandrests_ser ser --include notesandrests 18 | 19 | # combo include: decoratednotesandrests (with various excludes) 20 | mkresults decoratednotesandrests --include decoratednotesandrests 21 | mkresults decoratednotesandrests_no_ties --include decoratednotesandrests --exclude ties 22 | mkresults decoratednotesandrests_no_ties_beams --include decoratednotesandrests --exclude beams ties 23 | mkresults decoratednotesandrests_no_ties_beams_slurs --include decoratednotesandrests --exclude beams ties slurs 24 | mkresults notesandrests_articulations_ornaments --include decoratednotesandrests --exclude beams ties slurs tremolos 25 | mkresults notesandrests_articulations --include decoratednotesandrests --exclude beams ties slurs tremolos ornaments 26 | 27 | # voicing adds a bunch of chord and voice diffs 28 | mkresults decoratednotesandrests_voicing --include decoratednotesandrests voicing 29 | 30 | # Check interactions of voicing and lyrics. voicing (or not) should not affect lyrics diffs. 31 | # Lack of notes should not affect lyrics diffs, either. 32 | mkresults lyrics --include lyrics 33 | mkresults lyrics --include voicing lyrics 34 | 35 | # otherobjects, with and without style 36 | mkresults otherobjects -i otherobjects 37 | mkresults otherobjects_style -i otherobjects style 38 | 39 | # allobjects (a.k.a. otherobjects and decoratednotesandrests), with and without style 40 | mkresults allobjects -i allobjects 41 | mkresults allobjects_style -i allobjects style 42 | 43 | mkresults allobjects_no_lyrics -i allobjects -x lyrics 44 | mkresults allobjects_no_lyrics_barlines -i allobjects -x lyrics barlines 45 | mkresults allobjects_style_no_lyrics -i allobjects style -x lyrics 46 | 47 | mkresults metadata -i metadata 48 | mkresults allobjects_style_metadata -i metadata style allobjects 49 | mkresults allobjects_style_metadata_ser ser -i metadata style allobjects 50 | -------------------------------------------------------------------------------- /tests/test_cmd_line: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | fails=0 4 | 5 | run_test() { 6 | name=$1 7 | shift 1 8 | python -m musicdiff --output text $@ -- tests/test_scores/test_all_details_1a.mei tests/test_scores/test_all_details_1b.mei > /tmp/results.txt >& /dev/null 9 | diff -q /tmp/results.txt tests/test_results/cmd_line_results_$name.txt >/dev/null 2>&1 10 | if [[ $? -ne 0 ]]; then 11 | # bbdiff /tmp/results.txt tests/test_results/cmd_line_results_$name.txt 12 | # exit(0) 13 | print "Test failure: musicdiff $@" 14 | ((fails+=1)) 15 | else 16 | print "Test success: musicdiff $@" 17 | fi 18 | } 19 | 20 | # simple includes with simple excludes that just remove something we included 21 | run_test notesandrests_barlines -i notesandrests barlines directions -x directions 22 | run_test notesandrests_barlines -i notesandrests barlines voicing -x voicing 23 | run_test notesandrests_barlines -i notesandrests barlines metadata -x metadata 24 | run_test notesandrests_barlines -i notesandrests barlines 25 | run_test notesandrests_directions -i notesandrests barlines directions -x barlines 26 | run_test notesandrests_barlines_directions -i notesandrests barlines directions 27 | run_test notesandrests_articulations -i notesandrests articulations 28 | run_test notesandrests_articulations_ornaments -i notesandrests articulations ornaments 29 | run_test decoratednotesandrests_no_ties_beams_slurs --include notesandrests articulations ornaments tremolos 30 | 31 | 32 | # test all the simple decorated notes includes (without excludes) 33 | run_test notesandrests --include notesandrests 34 | # repeat with ser 35 | run_test notesandrests_secr secr --include notesandrests 36 | 37 | # simple includes (notesandrests barlines) + combo include (otherobjects), then exclude 38 | # otherobjects (which removes barlines, too), leaving notesandrests 39 | run_test notesandrests -i notesandrests barlines otherobjects style -x style otherobjects 40 | 41 | # combo include: decoratednotesandrests (with various excludes) 42 | run_test decoratednotesandrests --include decoratednotesandrests 43 | run_test decoratednotesandrests_no_ties --include decoratednotesandrests --exclude ties 44 | run_test decoratednotesandrests_no_ties_beams --include decoratednotesandrests --exclude beams ties 45 | run_test decoratednotesandrests_no_ties_beams_slurs --include decoratednotesandrests --exclude beams ties slurs 46 | run_test notesandrests_articulations_ornaments --include decoratednotesandrests --exclude beams ties slurs tremolos 47 | run_test notesandrests_articulations --include decoratednotesandrests --exclude beams ties slurs tremolos ornaments 48 | # excluding all the decorations leaves only notesandrests 49 | run_test notesandrests --include decoratednotesandrests --exclude beams ties slurs tremolos ornaments articulations 50 | 51 | # voicing adds a bunch of chord and voice diffs 52 | run_test decoratednotesandrests_voicing --include decoratednotesandrests voicing 53 | 54 | # Check interactions of voicing and lyrics. voicing (or not) should not affect lyrics diffs. 55 | # Lack of notes should not affect lyrics diffs, either. 56 | run_test lyrics --include lyrics 57 | run_test lyrics --include voicing lyrics 58 | 59 | # OtherObjects only 60 | run_test otherobjects -i otherobjects 61 | run_test otherobjects_style -i otherobjects style 62 | 63 | run_test allobjects -i otherobjects decoratednotesandrests 64 | run_test allobjects_style -i otherobjects decoratednotesandrests style 65 | run_test allobjects_style_no_lyrics -i otherobjects decoratednotesandrests style --exclude lyrics 66 | run_test allobjects -i allobjects 67 | run_test allobjects_style -i style allobjects 68 | 69 | run_test allobjects_no_lyrics -i otherobjects decoratednotesandrests -x lyrics 70 | run_test allobjects_no_lyrics_barlines -i otherobjects decoratednotesandrests -x lyrics barlines 71 | 72 | run_test metadata --include metadata 73 | 74 | run_test allobjects_style_metadata -i metadata style allobjects 75 | run_test allobjects_style_metadata_secr secr -i metadata style allobjects 76 | 77 | 78 | print Total failures: ${fails} 79 | exit ${fails} 80 | -------------------------------------------------------------------------------- /tests/test_ml_training_evaluation.sh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | python -m musicdiff -i allobjects style metadata --ml_training_evaluation --ground_truth_folder ~/Documents/test/greg_results/gt --predicted_folder ~/Documents/test/greg_results/pred --output_folder . 3 | 4 | bbdiff ./output.csv ./best_output.csv 5 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_allobjects.txt: -------------------------------------------------------------------------------- 1 | --- tests/test_scores/test_all_details_1a.mei 2 | +++ tests/test_scores/test_all_details_1b.mei 3 | @@ measure 1, staff 1, beat 1.0 @@ 4 | +(Slur) dur=7.5 5 | @@ measure 1, staff 1, beat 1.0 @@ 6 | -(Lyric) "lyric2", num=2 7 | @@ measure 1, staff 1, beat 1.0 @@ 8 | -(Lyric) "lyric1", num=1 9 | @@ measure 2, staff 1, beat 2.5 @@ 10 | -(Note:tie) C4 (eighth note), tied 11 | +(Note:tie) C4 (eighth note), not tied 12 | @@ measure 2, staff 1, beat 2.5 @@ 13 | -(Dynamic) mp 14 | @@ measure 2, staff 1, beat 3.0 @@ 15 | -(Note:flagsbeams) C4 (eighth note), 1 beam=start 16 | +(Note:flagsbeams) C4 (eighth note), 1 flag 17 | @@ measure 2, staff 1, beat 3.5 @@ 18 | -(Note:flagsbeams) A3 (eighth note), 1 beam=stop 19 | +(Note:flagsbeams) A3 (eighth note), 1 flag 20 | @@ measure 2, staff 1, beat 5.0 @@ 21 | -(Barline:symbolic) final 22 | +(Barline:symbolic) double 23 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_allobjects_no_lyrics.txt: -------------------------------------------------------------------------------- 1 | --- tests/test_scores/test_all_details_1a.mei 2 | +++ tests/test_scores/test_all_details_1b.mei 3 | @@ measure 1, staff 1, beat 1.0 @@ 4 | +(Slur) dur=7.5 5 | @@ measure 2, staff 1, beat 2.5 @@ 6 | -(Note:tie) C4 (eighth note), tied 7 | +(Note:tie) C4 (eighth note), not tied 8 | @@ measure 2, staff 1, beat 2.5 @@ 9 | -(Dynamic) mp 10 | @@ measure 2, staff 1, beat 3.0 @@ 11 | -(Note:flagsbeams) C4 (eighth note), 1 beam=start 12 | +(Note:flagsbeams) C4 (eighth note), 1 flag 13 | @@ measure 2, staff 1, beat 3.5 @@ 14 | -(Note:flagsbeams) A3 (eighth note), 1 beam=stop 15 | +(Note:flagsbeams) A3 (eighth note), 1 flag 16 | @@ measure 2, staff 1, beat 5.0 @@ 17 | -(Barline:symbolic) final 18 | +(Barline:symbolic) double 19 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_allobjects_no_lyrics_barlines.txt: -------------------------------------------------------------------------------- 1 | --- tests/test_scores/test_all_details_1a.mei 2 | +++ tests/test_scores/test_all_details_1b.mei 3 | @@ measure 1, staff 1, beat 1.0 @@ 4 | +(Slur) dur=7.5 5 | @@ measure 2, staff 1, beat 2.5 @@ 6 | -(Note:tie) C4 (eighth note), tied 7 | +(Note:tie) C4 (eighth note), not tied 8 | @@ measure 2, staff 1, beat 2.5 @@ 9 | -(Dynamic) mp 10 | @@ measure 2, staff 1, beat 3.0 @@ 11 | -(Note:flagsbeams) C4 (eighth note), 1 beam=start 12 | +(Note:flagsbeams) C4 (eighth note), 1 flag 13 | @@ measure 2, staff 1, beat 3.5 @@ 14 | -(Note:flagsbeams) A3 (eighth note), 1 beam=stop 15 | +(Note:flagsbeams) A3 (eighth note), 1 flag 16 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_allobjects_style.txt: -------------------------------------------------------------------------------- 1 | --- tests/test_scores/test_all_details_1a.mei 2 | +++ tests/test_scores/test_all_details_1b.mei 3 | @@ measure 1, staff 1, beat 1.0 @@ 4 | +(Slur) dur=7.5 5 | @@ measure 1, staff 1, beat 1.0 @@ 6 | -(Dynamic:placement) p changedStyle={placement:below} 7 | +(Dynamic:placement) p changedStyle={placement:above} 8 | @@ measure 1, staff 1, beat 1.0 @@ 9 | -(Lyric) "lyric2", num=2 10 | @@ measure 1, staff 1, beat 1.0 @@ 11 | -(Lyric) "lyric1", num=1 12 | @@ measure 2, staff 1, beat 1.0 @@ 13 | -(Note:stemdir) G3 (eighth note), stemDirection=down 14 | +(Note:stemdir) G3 (eighth note), stemDirection=up 15 | @@ measure 2, staff 1, beat 1.5 @@ 16 | -(Note:stemdir) A3 (eighth note), stemDirection=down 17 | +(Note:stemdir) A3 (eighth note), stemDirection=up 18 | @@ measure 2, staff 1, beat 2.0 @@ 19 | -(Note:stemdir) B3 (eighth note), stemDirection=down 20 | +(Note:stemdir) B3 (eighth note), stemDirection=up 21 | @@ measure 2, staff 1, beat 2.5 @@ 22 | -(Note:tie) C4 (eighth note), tied 23 | +(Note:tie) C4 (eighth note), not tied 24 | @@ measure 2, staff 1, beat 2.5 @@ 25 | -(Note:stemdir) C4 (eighth note), stemDirection=down 26 | +(Note:stemdir) C4 (eighth note), stemDirection=up 27 | @@ measure 2, staff 1, beat 2.5 @@ 28 | -(Dynamic) mp 29 | @@ measure 2, staff 1, beat 3.0 @@ 30 | -(Note:flagsbeams) C4 (eighth note), 1 beam=start 31 | +(Note:flagsbeams) C4 (eighth note), 1 flag 32 | @@ measure 2, staff 1, beat 3.0 @@ 33 | -(Note:stemdir) C4 (eighth note), stemDirection=down 34 | +(Note:stemdir) C4 (eighth note), stemDirection=up 35 | @@ measure 2, staff 1, beat 3.5 @@ 36 | -(Note:flagsbeams) A3 (eighth note), 1 beam=stop 37 | +(Note:flagsbeams) A3 (eighth note), 1 flag 38 | @@ measure 2, staff 1, beat 3.5 @@ 39 | -(Note:stemdir) A3 (eighth note), stemDirection=down 40 | +(Note:stemdir) A3 (eighth note), stemDirection=up 41 | @@ measure 2, staff 1, beat 4.0 @@ 42 | -(Note:stemdir) G3 (eighth note), stemDirection=down 43 | +(Note:stemdir) G3 (eighth note), stemDirection=up 44 | @@ measure 2, staff 1, beat 5.0 @@ 45 | -(Barline:symbolic) final 46 | +(Barline:symbolic) double 47 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_allobjects_style_metadata.txt: -------------------------------------------------------------------------------- 1 | --- tests/test_scores/test_all_details_1a.mei 2 | +++ tests/test_scores/test_all_details_1b.mei 3 | @@ measure 0, staff 0, beat 0.0 @@ 4 | -(metadata:value) title:Test file 1a for command line detail options(language=None) 5 | +(metadata:value) title:Test file 1b for command line detail options(language=None) 6 | @@ measure 1, staff 1, beat 1.0 @@ 7 | +(Slur) dur=7.5 8 | @@ measure 1, staff 1, beat 1.0 @@ 9 | -(Dynamic:placement) p changedStyle={placement:below} 10 | +(Dynamic:placement) p changedStyle={placement:above} 11 | @@ measure 1, staff 1, beat 1.0 @@ 12 | -(Lyric) "lyric2", num=2 13 | @@ measure 1, staff 1, beat 1.0 @@ 14 | -(Lyric) "lyric1", num=1 15 | @@ measure 2, staff 1, beat 1.0 @@ 16 | -(Note:stemdir) G3 (eighth note), stemDirection=down 17 | +(Note:stemdir) G3 (eighth note), stemDirection=up 18 | @@ measure 2, staff 1, beat 1.5 @@ 19 | -(Note:stemdir) A3 (eighth note), stemDirection=down 20 | +(Note:stemdir) A3 (eighth note), stemDirection=up 21 | @@ measure 2, staff 1, beat 2.0 @@ 22 | -(Note:stemdir) B3 (eighth note), stemDirection=down 23 | +(Note:stemdir) B3 (eighth note), stemDirection=up 24 | @@ measure 2, staff 1, beat 2.5 @@ 25 | -(Note:tie) C4 (eighth note), tied 26 | +(Note:tie) C4 (eighth note), not tied 27 | @@ measure 2, staff 1, beat 2.5 @@ 28 | -(Note:stemdir) C4 (eighth note), stemDirection=down 29 | +(Note:stemdir) C4 (eighth note), stemDirection=up 30 | @@ measure 2, staff 1, beat 2.5 @@ 31 | -(Dynamic) mp 32 | @@ measure 2, staff 1, beat 3.0 @@ 33 | -(Note:flagsbeams) C4 (eighth note), 1 beam=start 34 | +(Note:flagsbeams) C4 (eighth note), 1 flag 35 | @@ measure 2, staff 1, beat 3.0 @@ 36 | -(Note:stemdir) C4 (eighth note), stemDirection=down 37 | +(Note:stemdir) C4 (eighth note), stemDirection=up 38 | @@ measure 2, staff 1, beat 3.5 @@ 39 | -(Note:flagsbeams) A3 (eighth note), 1 beam=stop 40 | +(Note:flagsbeams) A3 (eighth note), 1 flag 41 | @@ measure 2, staff 1, beat 3.5 @@ 42 | -(Note:stemdir) A3 (eighth note), stemDirection=down 43 | +(Note:stemdir) A3 (eighth note), stemDirection=up 44 | @@ measure 2, staff 1, beat 4.0 @@ 45 | -(Note:stemdir) G3 (eighth note), stemDirection=down 46 | +(Note:stemdir) G3 (eighth note), stemDirection=up 47 | @@ measure 2, staff 1, beat 5.0 @@ 48 | -(Barline:symbolic) final 49 | +(Barline:symbolic) double 50 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_allobjects_style_metadata_secr.txt: -------------------------------------------------------------------------------- 1 | { 2 | "symbolEditCost": "39", 3 | "numSymbolsInPredicted": "143", 4 | "numSymbolsInGroundTruth": "126", 5 | "numSymbolsInBoth": "269", 6 | "SECR": "0.1449814126394052" 7 | } 8 | 9 | --- tests/test_scores/test_all_details_1a.mei 10 | +++ tests/test_scores/test_all_details_1b.mei 11 | @@ measure 0, staff 0, beat 0.0 @@ 12 | -(metadata:value) title:Test file 1a for command line detail options(language=None) 13 | +(metadata:value) title:Test file 1b for command line detail options(language=None) 14 | @@ measure 1, staff 1, beat 1.0 @@ 15 | +(Slur) dur=7.5 16 | @@ measure 1, staff 1, beat 1.0 @@ 17 | -(Dynamic:placement) p changedStyle={placement:below} 18 | +(Dynamic:placement) p changedStyle={placement:above} 19 | @@ measure 1, staff 1, beat 1.0 @@ 20 | -(Lyric) "lyric2", num=2 21 | @@ measure 1, staff 1, beat 1.0 @@ 22 | -(Lyric) "lyric1", num=1 23 | @@ measure 2, staff 1, beat 1.0 @@ 24 | -(Note:stemdir) G3 (eighth note), stemDirection=down 25 | +(Note:stemdir) G3 (eighth note), stemDirection=up 26 | @@ measure 2, staff 1, beat 1.5 @@ 27 | -(Note:stemdir) A3 (eighth note), stemDirection=down 28 | +(Note:stemdir) A3 (eighth note), stemDirection=up 29 | @@ measure 2, staff 1, beat 2.0 @@ 30 | -(Note:stemdir) B3 (eighth note), stemDirection=down 31 | +(Note:stemdir) B3 (eighth note), stemDirection=up 32 | @@ measure 2, staff 1, beat 2.5 @@ 33 | -(Note:tie) C4 (eighth note), tied 34 | +(Note:tie) C4 (eighth note), not tied 35 | @@ measure 2, staff 1, beat 2.5 @@ 36 | -(Note:stemdir) C4 (eighth note), stemDirection=down 37 | +(Note:stemdir) C4 (eighth note), stemDirection=up 38 | @@ measure 2, staff 1, beat 2.5 @@ 39 | -(Dynamic) mp 40 | @@ measure 2, staff 1, beat 3.0 @@ 41 | -(Note:flagsbeams) C4 (eighth note), 1 beam=start 42 | +(Note:flagsbeams) C4 (eighth note), 1 flag 43 | @@ measure 2, staff 1, beat 3.0 @@ 44 | -(Note:stemdir) C4 (eighth note), stemDirection=down 45 | +(Note:stemdir) C4 (eighth note), stemDirection=up 46 | @@ measure 2, staff 1, beat 3.5 @@ 47 | -(Note:flagsbeams) A3 (eighth note), 1 beam=stop 48 | +(Note:flagsbeams) A3 (eighth note), 1 flag 49 | @@ measure 2, staff 1, beat 3.5 @@ 50 | -(Note:stemdir) A3 (eighth note), stemDirection=down 51 | +(Note:stemdir) A3 (eighth note), stemDirection=up 52 | @@ measure 2, staff 1, beat 4.0 @@ 53 | -(Note:stemdir) G3 (eighth note), stemDirection=down 54 | +(Note:stemdir) G3 (eighth note), stemDirection=up 55 | @@ measure 2, staff 1, beat 5.0 @@ 56 | -(Barline:symbolic) final 57 | +(Barline:symbolic) double 58 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_allobjects_style_no_lyrics.txt: -------------------------------------------------------------------------------- 1 | --- tests/test_scores/test_all_details_1a.mei 2 | +++ tests/test_scores/test_all_details_1b.mei 3 | @@ measure 1, staff 1, beat 1.0 @@ 4 | +(Slur) dur=7.5 5 | @@ measure 1, staff 1, beat 1.0 @@ 6 | -(Dynamic:placement) p changedStyle={placement:below} 7 | +(Dynamic:placement) p changedStyle={placement:above} 8 | @@ measure 2, staff 1, beat 1.0 @@ 9 | -(Note:stemdir) G3 (eighth note), stemDirection=down 10 | +(Note:stemdir) G3 (eighth note), stemDirection=up 11 | @@ measure 2, staff 1, beat 1.5 @@ 12 | -(Note:stemdir) A3 (eighth note), stemDirection=down 13 | +(Note:stemdir) A3 (eighth note), stemDirection=up 14 | @@ measure 2, staff 1, beat 2.0 @@ 15 | -(Note:stemdir) B3 (eighth note), stemDirection=down 16 | +(Note:stemdir) B3 (eighth note), stemDirection=up 17 | @@ measure 2, staff 1, beat 2.5 @@ 18 | -(Note:tie) C4 (eighth note), tied 19 | +(Note:tie) C4 (eighth note), not tied 20 | @@ measure 2, staff 1, beat 2.5 @@ 21 | -(Note:stemdir) C4 (eighth note), stemDirection=down 22 | +(Note:stemdir) C4 (eighth note), stemDirection=up 23 | @@ measure 2, staff 1, beat 2.5 @@ 24 | -(Dynamic) mp 25 | @@ measure 2, staff 1, beat 3.0 @@ 26 | -(Note:flagsbeams) C4 (eighth note), 1 beam=start 27 | +(Note:flagsbeams) C4 (eighth note), 1 flag 28 | @@ measure 2, staff 1, beat 3.0 @@ 29 | -(Note:stemdir) C4 (eighth note), stemDirection=down 30 | +(Note:stemdir) C4 (eighth note), stemDirection=up 31 | @@ measure 2, staff 1, beat 3.5 @@ 32 | -(Note:flagsbeams) A3 (eighth note), 1 beam=stop 33 | +(Note:flagsbeams) A3 (eighth note), 1 flag 34 | @@ measure 2, staff 1, beat 3.5 @@ 35 | -(Note:stemdir) A3 (eighth note), stemDirection=down 36 | +(Note:stemdir) A3 (eighth note), stemDirection=up 37 | @@ measure 2, staff 1, beat 4.0 @@ 38 | -(Note:stemdir) G3 (eighth note), stemDirection=down 39 | +(Note:stemdir) G3 (eighth note), stemDirection=up 40 | @@ measure 2, staff 1, beat 5.0 @@ 41 | -(Barline:symbolic) final 42 | +(Barline:symbolic) double 43 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_decoratednotesandrests.txt: -------------------------------------------------------------------------------- 1 | --- tests/test_scores/test_all_details_1a.mei 2 | +++ tests/test_scores/test_all_details_1b.mei 3 | @@ measure 1, staff 1, beat 1.0 @@ 4 | +(Slur) dur=7.5 5 | @@ measure 2, staff 1, beat 2.5 @@ 6 | -(Note:tie) C4 (eighth note), tied 7 | +(Note:tie) C4 (eighth note), not tied 8 | @@ measure 2, staff 1, beat 3.0 @@ 9 | -(Note:flagsbeams) C4 (eighth note), 1 beam=start 10 | +(Note:flagsbeams) C4 (eighth note), 1 flag 11 | @@ measure 2, staff 1, beat 3.5 @@ 12 | -(Note:flagsbeams) A3 (eighth note), 1 beam=stop 13 | +(Note:flagsbeams) A3 (eighth note), 1 flag 14 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_decoratednotesandrests_no_ties.txt: -------------------------------------------------------------------------------- 1 | --- tests/test_scores/test_all_details_1a.mei 2 | +++ tests/test_scores/test_all_details_1b.mei 3 | @@ measure 1, staff 1, beat 1.0 @@ 4 | +(Slur) dur=7.5 5 | @@ measure 2, staff 1, beat 3.0 @@ 6 | -(Note:flagsbeams) C4 (eighth note), 1 beam=start 7 | +(Note:flagsbeams) C4 (eighth note), 1 flag 8 | @@ measure 2, staff 1, beat 3.5 @@ 9 | -(Note:flagsbeams) A3 (eighth note), 1 beam=stop 10 | +(Note:flagsbeams) A3 (eighth note), 1 flag 11 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_decoratednotesandrests_no_ties_beams.txt: -------------------------------------------------------------------------------- 1 | --- tests/test_scores/test_all_details_1a.mei 2 | +++ tests/test_scores/test_all_details_1b.mei 3 | @@ measure 1, staff 1, beat 1.0 @@ 4 | +(Slur) dur=7.5 5 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_decoratednotesandrests_no_ties_beams_slurs.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gregchapman-dev/musicdiff/c770d3750113e222e8b6ad6de1d8b5f2c4ae47ed/tests/test_results/cmd_line_results_decoratednotesandrests_no_ties_beams_slurs.txt -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_decoratednotesandrests_voicing.txt: -------------------------------------------------------------------------------- 1 | --- tests/test_scores/test_all_details_1a.mei 2 | +++ tests/test_scores/test_all_details_1b.mei 3 | @@ measure 1, staff 1, beat 1.0 @@ 4 | -(voice) [G5 (half note),F5 (half note)] 5 | @@ measure 1, staff 1, beat 1.0 @@ 6 | +(Note:pitch) [G4,B4] (quarter chord), pitch[1]=B4 7 | @@ measure 1, staff 1, beat 1.0 @@ 8 | -(voice) [B4 (quarter note),G4 (quarter note),D5 (quarter note),B4 (quarter note)] 9 | @@ measure 1, staff 1, beat 1.0 @@ 10 | +(Slur) dur=7.5 11 | @@ measure 1, staff 1, beat 2.0 @@ 12 | +(Note:pitch) [E4,G4] (quarter chord), pitch[1]=G4 13 | @@ measure 1, staff 1, beat 3.0 @@ 14 | +(Note:pitch) [G4,D5] (quarter chord), pitch[1]=D5 15 | @@ measure 1, staff 1, beat 4.0 @@ 16 | +(Note:pitch) [E4,B4] (quarter chord), pitch[1]=B4 17 | @@ measure 2, staff 1, beat 1.0 @@ 18 | +(Note:pitch) [C5,G5] (half chord), pitch[1]=G5 19 | @@ measure 2, staff 1, beat 2.5 @@ 20 | -(Note:tie) C4 (eighth note), tied 21 | +(Note:tie) C4 (eighth note), not tied 22 | @@ measure 2, staff 1, beat 3.0 @@ 23 | -(Note:flagsbeams) C4 (eighth note), 1 beam=start 24 | +(Note:flagsbeams) C4 (eighth note), 1 flag 25 | @@ measure 2, staff 1, beat 3.0 @@ 26 | +(Note:pitch) [D5,F5] (half chord), pitch[1]=F5 27 | @@ measure 2, staff 1, beat 3.5 @@ 28 | -(Note:flagsbeams) A3 (eighth note), 1 beam=stop 29 | +(Note:flagsbeams) A3 (eighth note), 1 flag 30 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_lyrics.txt: -------------------------------------------------------------------------------- 1 | --- tests/test_scores/test_all_details_1a.mei 2 | +++ tests/test_scores/test_all_details_1b.mei 3 | @@ measure 1, staff 1, beat 1.0 @@ 4 | -(measure) measure 1 5 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_metadata.txt: -------------------------------------------------------------------------------- 1 | --- tests/test_scores/test_all_details_1a.mei 2 | +++ tests/test_scores/test_all_details_1b.mei 3 | @@ measure 0, staff 0, beat 0.0 @@ 4 | -(metadata:value) title:Test file 1a for command line detail options(language=None) 5 | +(metadata:value) title:Test file 1b for command line detail options(language=None) 6 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_notesandrests.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gregchapman-dev/musicdiff/c770d3750113e222e8b6ad6de1d8b5f2c4ae47ed/tests/test_results/cmd_line_results_notesandrests.txt -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_notesandrests_articulations.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gregchapman-dev/musicdiff/c770d3750113e222e8b6ad6de1d8b5f2c4ae47ed/tests/test_results/cmd_line_results_notesandrests_articulations.txt -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_notesandrests_articulations_ornaments.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gregchapman-dev/musicdiff/c770d3750113e222e8b6ad6de1d8b5f2c4ae47ed/tests/test_results/cmd_line_results_notesandrests_articulations_ornaments.txt -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_notesandrests_barlines.txt: -------------------------------------------------------------------------------- 1 | --- tests/test_scores/test_all_details_1a.mei 2 | +++ tests/test_scores/test_all_details_1b.mei 3 | @@ measure 2, staff 1, beat 5.0 @@ 4 | -(Barline:symbolic) final 5 | +(Barline:symbolic) double 6 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_notesandrests_barlines_directions.txt: -------------------------------------------------------------------------------- 1 | --- tests/test_scores/test_all_details_1a.mei 2 | +++ tests/test_scores/test_all_details_1b.mei 3 | @@ measure 2, staff 1, beat 2.5 @@ 4 | -(Dynamic) mp 5 | @@ measure 2, staff 1, beat 5.0 @@ 6 | -(Barline:symbolic) final 7 | +(Barline:symbolic) double 8 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_notesandrests_directions.txt: -------------------------------------------------------------------------------- 1 | --- tests/test_scores/test_all_details_1a.mei 2 | +++ tests/test_scores/test_all_details_1b.mei 3 | @@ measure 2, staff 1, beat 2.5 @@ 4 | -(Dynamic) mp 5 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_notesandrests_secr.txt: -------------------------------------------------------------------------------- 1 | { 2 | "symbolEditCost": "0", 3 | "numSymbolsInPredicted": "47", 4 | "numSymbolsInGroundTruth": "47", 5 | "numSymbolsInBoth": "94", 6 | "SECR": "0.0" 7 | } 8 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_otherobjects.txt: -------------------------------------------------------------------------------- 1 | --- tests/test_scores/test_all_details_1a.mei 2 | +++ tests/test_scores/test_all_details_1b.mei 3 | @@ measure 1, staff 1, beat 1.0 @@ 4 | -(Lyric) "lyric2", num=2 5 | @@ measure 1, staff 1, beat 1.0 @@ 6 | -(Lyric) "lyric1", num=1 7 | @@ measure 2, staff 1, beat 1.0 @@ 8 | +(measure) measure 2 9 | @@ measure 2, staff 1, beat 1.0 @@ 10 | -(measure) measure 2 11 | -------------------------------------------------------------------------------- /tests/test_results/cmd_line_results_otherobjects_style.txt: -------------------------------------------------------------------------------- 1 | --- tests/test_scores/test_all_details_1a.mei 2 | +++ tests/test_scores/test_all_details_1b.mei 3 | @@ measure 1, staff 1, beat 1.0 @@ 4 | -(Dynamic:placement) p changedStyle={placement:below} 5 | +(Dynamic:placement) p changedStyle={placement:above} 6 | @@ measure 1, staff 1, beat 1.0 @@ 7 | -(Lyric) "lyric2", num=2 8 | @@ measure 1, staff 1, beat 1.0 @@ 9 | -(Lyric) "lyric1", num=1 10 | @@ measure 2, staff 1, beat 1.0 @@ 11 | +(measure) measure 2 12 | @@ measure 2, staff 1, beat 1.0 @@ 13 | -(measure) measure 2 14 | -------------------------------------------------------------------------------- /tests/test_score_visualization.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | 3 | import music21 as m21 4 | import converter21 5 | 6 | from musicdiff.annotation import AnnScore 7 | from musicdiff import Comparison 8 | from musicdiff import Visualization 9 | 10 | class TestScoreVisualization: 11 | converter21.register() 12 | 13 | def test_scorevis1(self): 14 | score1_path = Path("tests/test_scores/tie_score_2a.mei") 15 | score1 = m21.converter.parse(str(score1_path)) 16 | score2_path = Path("tests/test_scores/tie_score_2b.mei") 17 | score2 = m21.converter.parse(str(score2_path)) 18 | # build ScoreTrees 19 | score_lin1 = AnnScore(score1) 20 | score_lin2 = AnnScore(score2) 21 | # compute the complete score diff 22 | op_list, _ = Comparison.annotated_scores_diff(score_lin1, score_lin2) 23 | Visualization.mark_diffs(score1, score2, op_list) 24 | # Visualization.show_diffs(score1, score2) 25 | 26 | 27 | def test_scorevis2(self): 28 | score1_path = Path("tests/test_scores/polyphonic_score_2a.mei") 29 | score1 = m21.converter.parse(str(score1_path)) 30 | score2_path = Path("tests/test_scores/polyphonic_score_2b.mei") 31 | score2 = m21.converter.parse(str(score2_path)) 32 | # build ScoreTrees 33 | score_lin1 = AnnScore(score1) 34 | score_lin2 = AnnScore(score2) 35 | # compute the complete score diff 36 | op_list, _ = Comparison.annotated_scores_diff(score_lin1, score_lin2) 37 | Visualization.mark_diffs(score1, score2, op_list) 38 | # Visualization.show_diffs(score1, score2) 39 | 40 | 41 | def test_scorevis3(self): 42 | score1_path = Path("tests/test_scores/musicxml/articulation_score_1a.xml") 43 | score1 = m21.converter.parse(str(score1_path)) 44 | score2_path = Path("tests/test_scores/musicxml/articulation_score_1b.xml") 45 | score2 = m21.converter.parse(str(score2_path)) 46 | # build ScoreTrees 47 | score_lin1 = AnnScore(score1) 48 | score_lin2 = AnnScore(score2) 49 | # compute the complete score diff 50 | op_list, _ = Comparison.annotated_scores_diff(score_lin1, score_lin2) 51 | Visualization.mark_diffs(score1, score2, op_list) 52 | # Visualization.show_diffs(score1, score2) 53 | 54 | -------------------------------------------------------------------------------- /tests/test_scores/chord_score_1a.mei: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | </titleStmt> 11 | <pubStmt/> 12 | <sourceDesc> 13 | <source> 14 | <titleStmt> 15 | <title/> 16 | </titleStmt> 17 | <pubStmt/> 18 | <notesStmt> 19 | <annot>Source MusicXML file created using Finale 2014 for Windows and Dolet Light for Finale 2014 on <date>2019-11-11</date>.</annot> 20 | </notesStmt> 21 | </source> 22 | </sourceDesc> 23 | </fileDesc> 24 | <encodingDesc> 25 | <editorialDecl> 26 | <normalization> 27 | <p>Calculation of @tstamp and @tstamp2 values on control events, such as dir, dynam, 28 | hairpin, etc., includes MusicXML offset values.</p> 29 | <p>The parameters for musicxml2mei.xsl were set as follows: <list> 30 | <li>accidStyle: "attr", </li> 31 | <li>articStyle: "elem", </li> 32 | <li>formeWork: "strip", </li> 33 | <li>generateMIDI: "false", </li> 34 | <li>keepAttributes: "false", </li> 35 | <li>keepRights: "false", </li> 36 | <li>labelStyle: "attr", </li> 37 | <li>layout: "strip", </li> 38 | <li>tieStyle: "attr"</li> 39 | </list> 40 | </p> 41 | </normalization> 42 | </editorialDecl> 43 | </encodingDesc> 44 | <revisionDesc> 45 | <change n="1"> 46 | <respStmt/> 47 | <changeDesc> 48 | <p>Transcoded from a MusicXML version 1.1 file using an XSLT stylesheet (musicxml2mei v. 3.0).</p> 49 | </changeDesc> 50 | <date>2019-11-11</date> 51 | </change> 52 | </revisionDesc> 53 | </meiHead> 54 | <music> 55 | <body> 56 | <mdiv> 57 | <score> 58 | <scoreDef meter.count="4" meter.unit="4" key.sig="0" key.mode="major"> 59 | <staffGrp> 60 | <staffDef n="1" xml:id="P1" label="MusicXML Part" lines="5" clef.line="2" clef.shape="G"/> 61 | </staffGrp> 62 | </scoreDef> 63 | <section> 64 | <measure n="1" xml:id="d1e62" right="end"> 65 | <staff n="1"> 66 | <layer n="1"> 67 | <chord xml:id="d13e1" dur="4" stem.dir="up"> 68 | <note xml:id="d1e92" pname="c" oct="4"/> 69 | <note xml:id="d1e106" pname="e" oct="4"/> 70 | </chord> 71 | <chord xml:id="d19e1" dur="4" stem.dir="up"> 72 | <note xml:id="d1e121" pname="d" oct="4"/> 73 | <note xml:id="d1e135" pname="f" oct="4"/> 74 | </chord> 75 | <beam> 76 | <note xml:id="d1e150" pname="g" oct="4" dur="8" stem.dir="up"/> 77 | <note xml:id="d1e166" pname="f" oct="4" dur="8" stem.dir="up"/> 78 | <rest xml:id="d1e182" dur="8"/> 79 | <chord xml:id="d29e1" dur="8" stem.dir="up"> 80 | <note xml:id="d1e190" pname="b" oct="3"/> 81 | <note xml:id="d1e207" pname="e" oct="4"/> 82 | <note xml:id="d1e222" pname="g" oct="4"/> 83 | </chord> 84 | </beam> 85 | </layer> 86 | </staff> 87 | <tempo tstamp="1" staff="1"/> 88 | </measure> 89 | </section> 90 | </score> 91 | </mdiv> 92 | </body> 93 | </music> 94 | </mei> 95 | -------------------------------------------------------------------------------- /tests/test_scores/chord_score_1b.mei: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> 3 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> 4 | <mei xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.music-encoding.org/ns/mei" 5 | meiversion="4.0.0"> 6 | <meiHead> 7 | <fileDesc> 8 | <titleStmt> 9 | <title/> 10 | </titleStmt> 11 | <pubStmt/> 12 | <sourceDesc> 13 | <source> 14 | <titleStmt> 15 | <title/> 16 | </titleStmt> 17 | <pubStmt/> 18 | <notesStmt> 19 | <annot>Source MusicXML file created using Finale 2014 for Windows and Dolet Light for Finale 2014 on <date>2019-11-11</date>.</annot> 20 | </notesStmt> 21 | </source> 22 | </sourceDesc> 23 | </fileDesc> 24 | <encodingDesc> 25 | <editorialDecl> 26 | <normalization> 27 | <p>Calculation of @tstamp and @tstamp2 values on control events, such as dir, dynam, 28 | hairpin, etc., includes MusicXML offset values.</p> 29 | <p>The parameters for musicxml2mei.xsl were set as follows: <list> 30 | <li>accidStyle: "attr", </li> 31 | <li>articStyle: "elem", </li> 32 | <li>formeWork: "strip", </li> 33 | <li>generateMIDI: "false", </li> 34 | <li>keepAttributes: "false", </li> 35 | <li>keepRights: "false", </li> 36 | <li>labelStyle: "attr", </li> 37 | <li>layout: "strip", </li> 38 | <li>tieStyle: "attr"</li> 39 | </list> 40 | </p> 41 | </normalization> 42 | </editorialDecl> 43 | </encodingDesc> 44 | <revisionDesc> 45 | <change n="1"> 46 | <respStmt/> 47 | <changeDesc> 48 | <p>Transcoded from a MusicXML version 1.1 file using an XSLT stylesheet (musicxml2mei v. 3.0).</p> 49 | </changeDesc> 50 | <date>2019-11-11</date> 51 | </change> 52 | </revisionDesc> 53 | </meiHead> 54 | <music> 55 | <body> 56 | <mdiv> 57 | <score> 58 | <scoreDef meter.count="4" meter.unit="4" key.sig="0" key.mode="major"> 59 | <staffGrp> 60 | <staffDef n="1" xml:id="P1" label="MusicXML Part" lines="5" clef.line="2" clef.shape="G"/> 61 | </staffGrp> 62 | </scoreDef> 63 | <section> 64 | <measure n="1" xml:id="d1e62" right="end"> 65 | <staff n="1"> 66 | <layer n="1"> 67 | <chord xml:id="d13e1" dur="4" stem.dir="up"> 68 | <note xml:id="d1e92" pname="c" oct="4"/> 69 | <note xml:id="d1e106" pname="e" oct="4"/> 70 | </chord> 71 | <chord xml:id="d19e1" dur="4" stem.dir="up"> 72 | <note xml:id="d1e121" pname="d" oct="4"/> 73 | <note xml:id="d1e135" pname="g" oct="4"/> 74 | </chord> 75 | <beam> 76 | <note xml:id="d1e150" pname="g" oct="4" dur="8" stem.dir="up"/> 77 | <note xml:id="d1e166" pname="f" oct="4" dur="8" stem.dir="up"/> 78 | <rest xml:id="d1e182" dur="8"/> 79 | <chord xml:id="d29e1" dur="8" stem.dir="up"> 80 | <note xml:id="d1e190" pname="b" oct="3"/> 81 | <note xml:id="d1e207" pname="g" oct="4"/> 82 | </chord> 83 | </beam> 84 | </layer> 85 | </staff> 86 | <tempo tstamp="1" staff="1"/> 87 | </measure> 88 | </section> 89 | </score> 90 | </mdiv> 91 | </body> 92 | </music> 93 | </mei> 94 | -------------------------------------------------------------------------------- /tests/test_scores/chord_score_2a.mei: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> 3 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> 4 | <mei xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.music-encoding.org/ns/mei" 5 | meiversion="4.0.0"> 6 | <meiHead> 7 | <fileDesc> 8 | <titleStmt> 9 | <title/> 10 | </titleStmt> 11 | <pubStmt/> 12 | <sourceDesc> 13 | <source> 14 | <titleStmt> 15 | <title/> 16 | </titleStmt> 17 | <pubStmt/> 18 | <notesStmt> 19 | <annot>Source MusicXML file created using Finale 2014 for Windows and Dolet Light for Finale 2014 on <date>2019-11-20</date>.</annot> 20 | </notesStmt> 21 | </source> 22 | </sourceDesc> 23 | </fileDesc> 24 | <encodingDesc> 25 | <editorialDecl> 26 | <normalization> 27 | <p>Calculation of @tstamp and @tstamp2 values on control events, such as dir, dynam, 28 | hairpin, etc., includes MusicXML offset values.</p> 29 | <p>The parameters for musicxml2mei.xsl were set as follows: <list> 30 | <li>accidStyle: "attr", </li> 31 | <li>articStyle: "elem", </li> 32 | <li>formeWork: "strip", </li> 33 | <li>generateMIDI: "false", </li> 34 | <li>keepAttributes: "false", </li> 35 | <li>keepRights: "false", </li> 36 | <li>labelStyle: "attr", </li> 37 | <li>layout: "strip", </li> 38 | <li>tieStyle: "attr"</li> 39 | </list> 40 | </p> 41 | </normalization> 42 | </editorialDecl> 43 | </encodingDesc> 44 | <revisionDesc> 45 | <change n="1"> 46 | <respStmt/> 47 | <changeDesc> 48 | <p>Transcoded from a MusicXML version 3.0 file using an XSLT stylesheet (musicxml2mei v. 3.0).</p> 49 | </changeDesc> 50 | <date>2019-11-20</date> 51 | </change> 52 | </revisionDesc> 53 | </meiHead> 54 | <music> 55 | <body> 56 | <mdiv> 57 | <score> 58 | <scoreDef meter.count="4" meter.unit="4" key.sig="0" key.mode="major"> 59 | <staffGrp> 60 | <staffDef n="1" xml:id="P1" label="MusicXML Part" lines="5" clef.line="2" clef.shape="G"/> 61 | </staffGrp> 62 | </scoreDef> 63 | <section> 64 | <measure n="1" xml:id="d1e94" right="end"> 65 | <staff n="1"> 66 | <layer n="1"> 67 | <chord xml:id="d15e1" dur="4" stem.dir="up"> 68 | <note xml:id="d1e126" pname="c" oct="4"/> 69 | <note xml:id="d1e140" pname="e" oct="4"/> 70 | </chord> 71 | <chord xml:id="d21e1" dur="4" stem.dir="up"> 72 | <note xml:id="d1e155" pname="d" oct="4"/> 73 | <note xml:id="d1e169" pname="f" oct="4"/> 74 | </chord> 75 | <beam> 76 | <note xml:id="d1e184" pname="g" oct="4" dur="8" stem.dir="up"/> 77 | <note xml:id="d1e200" pname="f" oct="4" dur="8" stem.dir="up"/> 78 | <rest xml:id="d1e216" dur="8"/> 79 | <chord xml:id="d31e1" dur="8" stem.dir="up"> 80 | <note xml:id="d1e224" pname="b" accid="f" oct="3"/> 81 | <note xml:id="d1e245" pname="e" oct="4"/> 82 | <note xml:id="d1e260" pname="g" oct="4"/> 83 | </chord> 84 | </beam> 85 | </layer> 86 | </staff> 87 | <tempo tstamp="1" staff="1"/> 88 | </measure> 89 | </section> 90 | </score> 91 | </mdiv> 92 | </body> 93 | </music> 94 | </mei> 95 | -------------------------------------------------------------------------------- /tests/test_scores/chord_score_2b.mei: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> 3 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> 4 | <mei xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.music-encoding.org/ns/mei" 5 | meiversion="4.0.0"> 6 | <meiHead> 7 | <fileDesc> 8 | <titleStmt> 9 | <title/> 10 | </titleStmt> 11 | <pubStmt/> 12 | <sourceDesc> 13 | <source> 14 | <titleStmt> 15 | <title/> 16 | </titleStmt> 17 | <pubStmt/> 18 | <notesStmt> 19 | <annot>Source MusicXML file created using Finale 2014 for Windows and Dolet Light for Finale 2014 on <date>2019-11-20</date>.</annot> 20 | </notesStmt> 21 | </source> 22 | </sourceDesc> 23 | </fileDesc> 24 | <encodingDesc> 25 | <editorialDecl> 26 | <normalization> 27 | <p>Calculation of @tstamp and @tstamp2 values on control events, such as dir, dynam, 28 | hairpin, etc., includes MusicXML offset values.</p> 29 | <p>The parameters for musicxml2mei.xsl were set as follows: <list> 30 | <li>accidStyle: "attr", </li> 31 | <li>articStyle: "elem", </li> 32 | <li>formeWork: "strip", </li> 33 | <li>generateMIDI: "false", </li> 34 | <li>keepAttributes: "false", </li> 35 | <li>keepRights: "false", </li> 36 | <li>labelStyle: "attr", </li> 37 | <li>layout: "strip", </li> 38 | <li>tieStyle: "attr"</li> 39 | </list> 40 | </p> 41 | </normalization> 42 | </editorialDecl> 43 | </encodingDesc> 44 | <revisionDesc> 45 | <change n="1"> 46 | <respStmt/> 47 | <changeDesc> 48 | <p>Transcoded from a MusicXML version 3.0 file using an XSLT stylesheet (musicxml2mei v. 3.0).</p> 49 | </changeDesc> 50 | <date>2019-11-20</date> 51 | </change> 52 | </revisionDesc> 53 | </meiHead> 54 | <music> 55 | <body> 56 | <mdiv> 57 | <score> 58 | <scoreDef meter.count="4" meter.unit="4" key.sig="0" key.mode="major"> 59 | <staffGrp> 60 | <staffDef n="1" xml:id="P1" label="MusicXML Part" lines="5" clef.line="2" clef.shape="G"/> 61 | </staffGrp> 62 | </scoreDef> 63 | <section> 64 | <measure n="1" xml:id="d1e94" right="end"> 65 | <staff n="1"> 66 | <layer n="1"> 67 | <chord xml:id="d15e1" dur="4" stem.dir="up"> 68 | <note xml:id="d1e126" pname="c" accid="s" oct="4"/> 69 | <note xml:id="d1e144" pname="e" oct="4"/> 70 | </chord> 71 | <chord xml:id="d21e1" dur="4" stem.dir="up"> 72 | <note xml:id="d1e159" pname="d" oct="4"/> 73 | <note xml:id="d1e173" pname="g" oct="4"/> 74 | </chord> 75 | <beam> 76 | <note xml:id="d1e188" pname="g" oct="4" dur="8" stem.dir="up"/> 77 | <note xml:id="d1e204" pname="f" oct="4" dur="8" stem.dir="up"/> 78 | <rest xml:id="d1e220" dur="8"/> 79 | <chord xml:id="d31e1" dur="8" stem.dir="up"> 80 | <note xml:id="d1e228" pname="b" oct="3"/> 81 | <note xml:id="d1e245" pname="g" oct="4"/> 82 | </chord> 83 | </beam> 84 | </layer> 85 | </staff> 86 | <tempo tstamp="1" staff="1"/> 87 | </measure> 88 | </section> 89 | </score> 90 | </mdiv> 91 | </body> 92 | </music> 93 | </mei> 94 | -------------------------------------------------------------------------------- /tests/test_scores/chord_score_3a.mei: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> 3 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> 4 | <mei xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.music-encoding.org/ns/mei" 5 | meiversion="4.0.0"> 6 | <meiHead> 7 | <fileDesc> 8 | <titleStmt> 9 | <title/> 10 | </titleStmt> 11 | <pubStmt/> 12 | <sourceDesc> 13 | <source> 14 | <titleStmt> 15 | <title/> 16 | </titleStmt> 17 | <pubStmt/> 18 | <notesStmt> 19 | <annot>Source MusicXML file created using Finale 2014 for Windows and Dolet Light for Finale 2014 on <date>2019-11-20</date>.</annot> 20 | </notesStmt> 21 | </source> 22 | </sourceDesc> 23 | </fileDesc> 24 | <encodingDesc> 25 | <editorialDecl> 26 | <normalization> 27 | <p>Calculation of @tstamp and @tstamp2 values on control events, such as dir, dynam, 28 | hairpin, etc., includes MusicXML offset values.</p> 29 | <p>The parameters for musicxml2mei.xsl were set as follows: <list> 30 | <li>accidStyle: "attr", </li> 31 | <li>articStyle: "elem", </li> 32 | <li>formeWork: "strip", </li> 33 | <li>generateMIDI: "false", </li> 34 | <li>keepAttributes: "false", </li> 35 | <li>keepRights: "false", </li> 36 | <li>labelStyle: "attr", </li> 37 | <li>layout: "strip", </li> 38 | <li>tieStyle: "attr"</li> 39 | </list> 40 | </p> 41 | </normalization> 42 | </editorialDecl> 43 | </encodingDesc> 44 | <revisionDesc> 45 | <change n="1"> 46 | <respStmt/> 47 | <changeDesc> 48 | <p>Transcoded from a MusicXML version 3.0 file using an XSLT stylesheet (musicxml2mei v. 3.0).</p> 49 | </changeDesc> 50 | <date>2019-11-20</date> 51 | </change> 52 | </revisionDesc> 53 | </meiHead> 54 | <music> 55 | <body> 56 | <mdiv> 57 | <score> 58 | <scoreDef meter.count="4" meter.unit="4" key.sig="0" key.mode="major"> 59 | <staffGrp> 60 | <staffDef n="1" xml:id="P1" label="MusicXML Part" lines="5" clef.line="2" clef.shape="G"/> 61 | </staffGrp> 62 | </scoreDef> 63 | <section> 64 | <measure n="1" xml:id="d1e94" right="end"> 65 | <staff n="1"> 66 | <layer n="1"> 67 | <chord xml:id="d15e1" dur="4" stem.dir="up"> 68 | <note xml:id="d1e126" pname="c" oct="4"/> 69 | <note xml:id="d1e140" pname="e" oct="4"/> 70 | </chord> 71 | <chord xml:id="d21e1" dur="4" stem.dir="up"> 72 | <note xml:id="d1e155" pname="d" oct="4"/> 73 | <note xml:id="d1e169" pname="f" oct="4"/> 74 | </chord> 75 | <beam> 76 | <note xml:id="d1e184" pname="g" oct="4" dur="8" stem.dir="up"/> 77 | <note xml:id="d1e200" pname="f" oct="4" dur="8" stem.dir="up"/> 78 | </beam> 79 | <rest xml:id="d1e216" dur="8"/> 80 | <chord xml:id="d31e1" dur="32" dots="2" stem.dir="up"> 81 | <note xml:id="d1e224" pname="b" accid="f" oct="3"/> 82 | <note xml:id="d1e245" pname="e" oct="4"/> 83 | <note xml:id="d1e262" pname="g" oct="4"/> 84 | </chord> 85 | <rest xml:id="d1e279" dur="128"/> 86 | <rest xml:id="d1e287" dur="16"/> 87 | </layer> 88 | </staff> 89 | <tempo tstamp="1" staff="1"/> 90 | </measure> 91 | </section> 92 | </score> 93 | </mdiv> 94 | </body> 95 | </music> 96 | </mei> 97 | -------------------------------------------------------------------------------- /tests/test_scores/chord_score_3b.mei: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> 3 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> 4 | <mei xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.music-encoding.org/ns/mei" 5 | meiversion="4.0.0"> 6 | <meiHead> 7 | <fileDesc> 8 | <titleStmt> 9 | <title/> 10 | </titleStmt> 11 | <pubStmt/> 12 | <sourceDesc> 13 | <source> 14 | <titleStmt> 15 | <title/> 16 | </titleStmt> 17 | <pubStmt/> 18 | <notesStmt> 19 | <annot>Source MusicXML file created using Finale 2014 for Windows and Dolet Light for Finale 2014 on <date>2019-11-20</date>.</annot> 20 | </notesStmt> 21 | </source> 22 | </sourceDesc> 23 | </fileDesc> 24 | <encodingDesc> 25 | <editorialDecl> 26 | <normalization> 27 | <p>Calculation of @tstamp and @tstamp2 values on control events, such as dir, dynam, 28 | hairpin, etc., includes MusicXML offset values.</p> 29 | <p>The parameters for musicxml2mei.xsl were set as follows: <list> 30 | <li>accidStyle: "attr", </li> 31 | <li>articStyle: "elem", </li> 32 | <li>formeWork: "strip", </li> 33 | <li>generateMIDI: "false", </li> 34 | <li>keepAttributes: "false", </li> 35 | <li>keepRights: "false", </li> 36 | <li>labelStyle: "attr", </li> 37 | <li>layout: "strip", </li> 38 | <li>tieStyle: "attr"</li> 39 | </list> 40 | </p> 41 | </normalization> 42 | </editorialDecl> 43 | </encodingDesc> 44 | <revisionDesc> 45 | <change n="1"> 46 | <respStmt/> 47 | <changeDesc> 48 | <p>Transcoded from a MusicXML version 3.0 file using an XSLT stylesheet (musicxml2mei v. 3.0).</p> 49 | </changeDesc> 50 | <date>2019-11-20</date> 51 | </change> 52 | </revisionDesc> 53 | </meiHead> 54 | <music> 55 | <body> 56 | <mdiv> 57 | <score> 58 | <scoreDef meter.count="4" meter.unit="4" key.sig="0" key.mode="major"> 59 | <staffGrp> 60 | <staffDef n="1" xml:id="P1" label="MusicXML Part" lines="5" clef.line="2" clef.shape="G"/> 61 | </staffGrp> 62 | </scoreDef> 63 | <section> 64 | <measure n="1" xml:id="d1e94" right="end"> 65 | <staff n="1"> 66 | <layer n="1"> 67 | <chord xml:id="d15e1" dur="4" stem.dir="up"> 68 | <note xml:id="d1e126" pname="c" accid="s" oct="4"/> 69 | <note xml:id="d1e144" pname="e" oct="4"/> 70 | </chord> 71 | <chord xml:id="d21e1" dur="4" dots="1" stem.dir="up"> 72 | <note xml:id="d1e159" pname="d" oct="4"/> 73 | <note xml:id="d1e174" pname="g" oct="4"/> 74 | </chord> 75 | <note xml:id="d1e190" pname="f" oct="4" dur="8" stem.dir="up"/> 76 | <rest xml:id="d1e204" dur="8"/> 77 | <chord xml:id="d30e1" dur="8" stem.dir="up"> 78 | <note xml:id="d1e212" pname="b" oct="3"/> 79 | <note xml:id="d1e226" pname="g" oct="4"/> 80 | </chord> 81 | </layer> 82 | </staff> 83 | <tempo tstamp="1" staff="1"/> 84 | </measure> 85 | </section> 86 | </score> 87 | </mdiv> 88 | </body> 89 | </music> 90 | </mei> 91 | -------------------------------------------------------------------------------- /tests/test_scores/multivoice_score_1a.mei: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> 3 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> 4 | <mei xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.music-encoding.org/ns/mei" 5 | meiversion="4.0.0"> 6 | <meiHead> 7 | <fileDesc> 8 | <titleStmt> 9 | <title/> 10 | </titleStmt> 11 | <pubStmt/> 12 | <sourceDesc> 13 | <source> 14 | <titleStmt> 15 | <title/> 16 | </titleStmt> 17 | <pubStmt/> 18 | <notesStmt> 19 | <annot>Source MusicXML file created using Finale 2014 for Windows and Dolet Light for Finale 2014 on <date>2019-11-18</date>.</annot> 20 | </notesStmt> 21 | </source> 22 | </sourceDesc> 23 | </fileDesc> 24 | <encodingDesc> 25 | <editorialDecl> 26 | <normalization> 27 | <p>Calculation of @tstamp and @tstamp2 values on control events, such as dir, dynam, 28 | hairpin, etc., includes MusicXML offset values.</p> 29 | <p>The parameters for musicxml2mei.xsl were set as follows: <list> 30 | <li>accidStyle: "attr", </li> 31 | <li>articStyle: "elem", </li> 32 | <li>formeWork: "strip", </li> 33 | <li>generateMIDI: "false", </li> 34 | <li>keepAttributes: "false", </li> 35 | <li>keepRights: "false", </li> 36 | <li>labelStyle: "attr", </li> 37 | <li>layout: "strip", </li> 38 | <li>tieStyle: "attr"</li> 39 | </list> 40 | </p> 41 | </normalization> 42 | </editorialDecl> 43 | </encodingDesc> 44 | <revisionDesc> 45 | <change n="1"> 46 | <respStmt/> 47 | <changeDesc> 48 | <p>Transcoded from a MusicXML version 1.1 file using an XSLT stylesheet (musicxml2mei v. 3.0).</p> 49 | </changeDesc> 50 | <date>2019-11-19</date> 51 | </change> 52 | </revisionDesc> 53 | </meiHead> 54 | <music> 55 | <body> 56 | <mdiv> 57 | <score> 58 | <scoreDef meter.count="4" meter.unit="4" key.sig="0" key.mode="major"> 59 | <staffGrp> 60 | <staffDef n="1" xml:id="P1" label="MusicXML Part" lines="5" clef.line="2" clef.shape="G"/> 61 | </staffGrp> 62 | </scoreDef> 63 | <section> 64 | <measure n="1" xml:id="d1e62"> 65 | <staff n="1"> 66 | <layer n="1"> 67 | <note xml:id="d1e92" pname="b" oct="4" dur="4" stem.dir="up"/> 68 | <note xml:id="d1e106" pname="g" oct="4" dur="4" stem.dir="up"/> 69 | <note xml:id="d1e120" pname="d" oct="5" dur="4" stem.dir="up"/> 70 | <note xml:id="d1e134" pname="b" oct="4" dur="4" stem.dir="up"/> 71 | </layer> 72 | <layer n="2"> 73 | <note xml:id="d1e151" pname="g" oct="4" dur="2" stem.dir="down"/> 74 | <note xml:id="d1e165" pname="e" oct="4" dur="2" stem.dir="down"/> 75 | </layer> 76 | </staff> 77 | <tempo tstamp="1" staff="1"/> 78 | </measure> 79 | <measure n="2" xml:id="d1e179" right="end"> 80 | <staff n="1"> 81 | <layer n="1"> 82 | <beam> 83 | <note xml:id="d1e181" pname="g" oct="4" dur="8" stem.dir="up"/> 84 | <note xml:id="d1e197" pname="a" oct="4" dur="8" stem.dir="up"/> 85 | <note xml:id="d1e213" pname="b" oct="4" dur="8" stem.dir="up"/> 86 | <note xml:id="d1e229" pname="c" oct="5" dur="8" tie="i" stem.dir="up"/> 87 | </beam> 88 | <beam> 89 | <note xml:id="d1e248" pname="c" oct="5" dur="8" tie="t" stem.dir="down"/> 90 | <note xml:id="d1e267" pname="a" oct="4" dur="8" stem.dir="down"/> 91 | </beam> 92 | <note xml:id="d1e283" pname="g" oct="4" dur="8" stem.dir="up"/> 93 | <rest xml:id="d1e297" dur="8"/> 94 | </layer> 95 | </staff> 96 | </measure> 97 | </section> 98 | </score> 99 | </mdiv> 100 | </body> 101 | </music> 102 | </mei> 103 | -------------------------------------------------------------------------------- /tests/test_scores/multivoice_score_1b.mei: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> 3 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> 4 | <mei xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.music-encoding.org/ns/mei" 5 | meiversion="4.0.0"> 6 | <meiHead> 7 | <fileDesc> 8 | <titleStmt> 9 | <title/> 10 | </titleStmt> 11 | <pubStmt/> 12 | <sourceDesc> 13 | <source> 14 | <titleStmt> 15 | <title/> 16 | </titleStmt> 17 | <pubStmt/> 18 | <notesStmt> 19 | <annot>Source MusicXML file created using Finale 2014 for Windows and Dolet Light for Finale 2014 on <date>2019-11-19</date>.</annot> 20 | </notesStmt> 21 | </source> 22 | </sourceDesc> 23 | </fileDesc> 24 | <encodingDesc> 25 | <editorialDecl> 26 | <normalization> 27 | <p>Calculation of @tstamp and @tstamp2 values on control events, such as dir, dynam, 28 | hairpin, etc., includes MusicXML offset values.</p> 29 | <p>The parameters for musicxml2mei.xsl were set as follows: <list> 30 | <li>accidStyle: "attr", </li> 31 | <li>articStyle: "elem", </li> 32 | <li>formeWork: "strip", </li> 33 | <li>generateMIDI: "false", </li> 34 | <li>keepAttributes: "false", </li> 35 | <li>keepRights: "false", </li> 36 | <li>labelStyle: "attr", </li> 37 | <li>layout: "strip", </li> 38 | <li>tieStyle: "attr"</li> 39 | </list> 40 | </p> 41 | </normalization> 42 | </editorialDecl> 43 | </encodingDesc> 44 | <revisionDesc> 45 | <change n="1"> 46 | <respStmt/> 47 | <changeDesc> 48 | <p>Transcoded from a MusicXML version 1.1 file using an XSLT stylesheet (musicxml2mei v. 3.0).</p> 49 | </changeDesc> 50 | <date>2019-11-19</date> 51 | </change> 52 | </revisionDesc> 53 | </meiHead> 54 | <music> 55 | <body> 56 | <mdiv> 57 | <score> 58 | <scoreDef meter.count="4" meter.unit="4" key.sig="0" key.mode="major"> 59 | <staffGrp> 60 | <staffDef n="1" xml:id="P1" label="MusicXML Part" lines="5" clef.line="2" clef.shape="G"/> 61 | </staffGrp> 62 | </scoreDef> 63 | <section> 64 | <measure n="1" xml:id="d1e62"> 65 | <staff n="1"> 66 | <layer n="1"> 67 | <note xml:id="d1e92" pname="b" oct="4" dur="4" stem.dir="down"/> 68 | <note xml:id="d1e106" pname="g" oct="4" dur="4" stem.dir="up"/> 69 | <note xml:id="d1e120" pname="d" oct="5" dur="4" stem.dir="down"/> 70 | <note xml:id="d1e134" pname="b" oct="4" dur="4" stem.dir="down"/> 71 | </layer> 72 | </staff> 73 | <tempo tstamp="1" staff="1"/> 74 | </measure> 75 | <measure n="2" xml:id="d1e148" right="end"> 76 | <staff n="1"> 77 | <layer n="1"> 78 | <note xml:id="d1e150" pname="g" oct="5" dur="2" stem.dir="up"/> 79 | <note xml:id="d1e164" pname="f" oct="5" dur="2" stem.dir="up"/> 80 | </layer> 81 | <layer n="2"> 82 | <beam> 83 | <note xml:id="d1e181" pname="g" oct="4" dur="8" stem.dir="down"/> 84 | <note xml:id="d1e197" pname="a" oct="4" dur="8" stem.dir="down"/> 85 | <note xml:id="d1e213" pname="b" oct="4" dur="8" stem.dir="down"/> 86 | <note xml:id="d1e229" pname="c" oct="5" dur="8" tie="i" stem.dir="down"/> 87 | </beam> 88 | <beam> 89 | <note xml:id="d1e248" pname="c" oct="5" dur="8" tie="t" stem.dir="down"/> 90 | <note xml:id="d1e267" pname="a" oct="4" dur="8" stem.dir="down"/> 91 | </beam> 92 | <note xml:id="d1e283" pname="g" oct="4" dur="4" stem.dir="down"/> 93 | </layer> 94 | <layer n="3"> 95 | <note xml:id="d1e301" pname="c" oct="3" dur="1"/> 96 | </layer> 97 | </staff> 98 | </measure> 99 | </section> 100 | </score> 101 | </mdiv> 102 | </body> 103 | </music> 104 | </mei> 105 | -------------------------------------------------------------------------------- /tests/test_scores/musicxml/articulation_score_1b.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd"> 3 | <score-partwise version="3.0"> 4 | <identification> 5 | <encoding> 6 | <software>Finale 2014 for Windows</software> 7 | <software>Dolet Light for Finale 2014</software> 8 | <encoding-date>2021-05-19</encoding-date> 9 | <supports attribute="new-system" element="print" type="yes" value="yes"/> 10 | <supports attribute="new-page" element="print" type="yes" value="yes"/> 11 | <supports element="accidental" type="yes"/> 12 | <supports element="beam" type="yes"/> 13 | <supports element="stem" type="yes"/> 14 | </encoding> 15 | </identification> 16 | <defaults> 17 | <scaling> 18 | <millimeters>7.2319</millimeters> 19 | <tenths>40</tenths> 20 | </scaling> 21 | <page-layout> 22 | <page-height>1545</page-height> 23 | <page-width>1194</page-width> 24 | <page-margins type="both"> 25 | <left-margin>70</left-margin> 26 | <right-margin>70</right-margin> 27 | <top-margin>88</top-margin> 28 | <bottom-margin>88</bottom-margin> 29 | </page-margins> 30 | </page-layout> 31 | <system-layout> 32 | <system-margins> 33 | <left-margin>0</left-margin> 34 | <right-margin>0</right-margin> 35 | </system-margins> 36 | <system-distance>121</system-distance> 37 | <top-system-distance>70</top-system-distance> 38 | </system-layout> 39 | <appearance> 40 | <line-width type="stem">0.7487</line-width> 41 | <line-width type="beam">5</line-width> 42 | <line-width type="staff">0.7487</line-width> 43 | <line-width type="light barline">0.7487</line-width> 44 | <line-width type="heavy barline">5</line-width> 45 | <line-width type="leger">0.7487</line-width> 46 | <line-width type="ending">0.7487</line-width> 47 | <line-width type="wedge">0.7487</line-width> 48 | <line-width type="enclosure">0.7487</line-width> 49 | <line-width type="tuplet bracket">0.7487</line-width> 50 | <note-size type="grace">60</note-size> 51 | <note-size type="cue">60</note-size> 52 | <distance type="hyphen">120</distance> 53 | <distance type="beam">8</distance> 54 | </appearance> 55 | <music-font font-family="Maestro,engraved" font-size="20.5"/> 56 | <word-font font-family="Times New Roman" font-size="10.25"/> 57 | </defaults> 58 | <credit page="1"> 59 | <credit-words default-x="70" default-y="1453" font-size="12" valign="top">Score</credit-words> 60 | </credit> 61 | <part-list> 62 | <score-part id="P1"> 63 | <part-name print-object="no">MusicXML Part</part-name> 64 | <score-instrument id="P1-I1"> 65 | <instrument-name>SmartMusic SoftSynth 1</instrument-name> 66 | </score-instrument> 67 | <midi-instrument id="P1-I1"> 68 | <midi-channel>1</midi-channel> 69 | <midi-bank>15489</midi-bank> 70 | <midi-program>1</midi-program> 71 | <volume>80</volume> 72 | <pan>0</pan> 73 | </midi-instrument> 74 | </score-part> 75 | </part-list> 76 | <!--=========================================================--> 77 | <part id="P1"> 78 | <measure number="1" width="551"> 79 | <print> 80 | <system-layout> 81 | <system-margins> 82 | <left-margin>70</left-margin> 83 | <right-margin>0</right-margin> 84 | </system-margins> 85 | <top-system-distance>211</top-system-distance> 86 | </system-layout> 87 | <measure-numbering>system</measure-numbering> 88 | </print> 89 | <attributes> 90 | <divisions>2</divisions> 91 | <key> 92 | <fifths>0</fifths> 93 | <mode>major</mode> 94 | </key> 95 | <time> 96 | <beats>4</beats> 97 | <beat-type>4</beat-type> 98 | </time> 99 | <clef> 100 | <sign>G</sign> 101 | <line>2</line> 102 | </clef> 103 | </attributes> 104 | <sound tempo="120"/> 105 | <note default-x="87"> 106 | <pitch> 107 | <step>C</step> 108 | <octave>4</octave> 109 | </pitch> 110 | <duration>2</duration> 111 | <voice>1</voice> 112 | <type>quarter</type> 113 | <stem default-y="-14.5">up</stem> 114 | </note> 115 | <note default-x="196"> 116 | <pitch> 117 | <step>E</step> 118 | <octave>4</octave> 119 | </pitch> 120 | <duration>2</duration> 121 | <voice>1</voice> 122 | <type>quarter</type> 123 | <stem default-y="-5">up</stem> 124 | </note> 125 | <note default-x="305"> 126 | <pitch> 127 | <step>G</step> 128 | <octave>4</octave> 129 | </pitch> 130 | <duration>2</duration> 131 | <voice>1</voice> 132 | <type>quarter</type> 133 | <stem default-y="5.5">up</stem> 134 | </note> 135 | <note default-x="415"> 136 | <pitch> 137 | <step>F</step> 138 | <octave>4</octave> 139 | </pitch> 140 | <duration>1</duration> 141 | <voice>1</voice> 142 | <type>eighth</type> 143 | <stem default-y="-5">up</stem> 144 | <beam number="1">begin</beam> 145 | </note> 146 | <note default-x="482"> 147 | <pitch> 148 | <step>E</step> 149 | <octave>4</octave> 150 | </pitch> 151 | <duration>1</duration> 152 | <voice>1</voice> 153 | <type>eighth</type> 154 | <stem default-y="-7.5">up</stem> 155 | <beam number="1">end</beam> 156 | </note> 157 | </measure> 158 | <!--=======================================================--> 159 | <measure number="2" width="433"> 160 | <note default-x="13"> 161 | <pitch> 162 | <step>D</step> 163 | <octave>4</octave> 164 | </pitch> 165 | <duration>1</duration> 166 | <voice>1</voice> 167 | <type>eighth</type> 168 | <stem default-y="-10">up</stem> 169 | <beam number="1">begin</beam> 170 | </note> 171 | <note default-x="79"> 172 | <pitch> 173 | <step>E</step> 174 | <octave>4</octave> 175 | </pitch> 176 | <duration>1</duration> 177 | <voice>1</voice> 178 | <type>eighth</type> 179 | <stem default-y="-7.5">up</stem> 180 | <beam number="1">end</beam> 181 | </note> 182 | <note default-x="145"> 183 | <pitch> 184 | <step>F</step> 185 | <octave>4</octave> 186 | </pitch> 187 | <duration>4</duration> 188 | <voice>1</voice> 189 | <type>half</type> 190 | <stem default-y="0">up</stem> 191 | </note> 192 | <note default-x="316"> 193 | <pitch> 194 | <step>G</step> 195 | <octave>4</octave> 196 | </pitch> 197 | <duration>2</duration> 198 | <voice>1</voice> 199 | <type>quarter</type> 200 | <stem default-y="5.5">up</stem> 201 | <notations> 202 | <ornaments> 203 | <inverted-mordent default-x="-3" default-y="-55" placement="below"/> 204 | </ornaments> 205 | </notations> 206 | </note> 207 | <barline location="right"> 208 | <bar-style>light-heavy</bar-style> 209 | </barline> 210 | </measure> 211 | </part> 212 | <!--=========================================================--> 213 | </score-partwise> 214 | -------------------------------------------------------------------------------- /tests/test_scores/musicxml/chord_score_1a.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.1 Partwise//EN" "http://www.musicxml.org/dtds/1.1/partwise.dtd"> 3 | <score-partwise version="1.1"> 4 | <identification> 5 | <encoding> 6 | <software>Finale 2014 for Windows</software> 7 | <software>Dolet Light for Finale 2014</software> 8 | <encoding-date>2019-11-11</encoding-date> 9 | <supports element="accidental" type="yes"/> 10 | <supports element="beam" type="yes"/> 11 | <supports element="stem" type="yes"/> 12 | </encoding> 13 | </identification> 14 | <defaults> 15 | <scaling> 16 | <millimeters>7.2319</millimeters> 17 | <tenths>40</tenths> 18 | </scaling> 19 | <page-layout> 20 | <page-height>1545</page-height> 21 | <page-width>1194</page-width> 22 | <page-margins type="both"> 23 | <left-margin>70</left-margin> 24 | <right-margin>70</right-margin> 25 | <top-margin>88</top-margin> 26 | <bottom-margin>88</bottom-margin> 27 | </page-margins> 28 | </page-layout> 29 | <system-layout> 30 | <system-margins> 31 | <left-margin>0</left-margin> 32 | <right-margin>0</right-margin> 33 | </system-margins> 34 | <system-distance>121</system-distance> 35 | <top-system-distance>70</top-system-distance> 36 | </system-layout> 37 | <music-font font-family="Maestro,music" font-size="20.5"/> 38 | <word-font font-family="Times New Roman" font-size="10.25"/> 39 | </defaults> 40 | <credit> 41 | <credit-words default-x="70" default-y="1453" font-size="12" valign="top">Score</credit-words> 42 | </credit> 43 | <part-list> 44 | <score-part id="P1"> 45 | <part-name print-object="no">MusicXML Part</part-name> 46 | <score-instrument id="P1-I1"> 47 | <instrument-name>SmartMusic SoftSynth 1</instrument-name> 48 | </score-instrument> 49 | <midi-instrument id="P1-I1"> 50 | <midi-channel>1</midi-channel> 51 | <midi-bank>15489</midi-bank> 52 | <midi-program>1</midi-program> 53 | </midi-instrument> 54 | </score-part> 55 | </part-list> 56 | <!--=========================================================--> 57 | <part id="P1"> 58 | <measure number="1" width="983"> 59 | <print> 60 | <system-layout> 61 | <system-margins> 62 | <left-margin>70</left-margin> 63 | <right-margin>0</right-margin> 64 | </system-margins> 65 | <top-system-distance>211</top-system-distance> 66 | </system-layout> 67 | </print> 68 | <attributes> 69 | <divisions>2</divisions> 70 | <key> 71 | <fifths>0</fifths> 72 | <mode>major</mode> 73 | </key> 74 | <time> 75 | <beats>4</beats> 76 | <beat-type>4</beat-type> 77 | </time> 78 | <clef> 79 | <sign>G</sign> 80 | <line>2</line> 81 | </clef> 82 | </attributes> 83 | <sound tempo="120"/> 84 | <note default-x="87"> 85 | <pitch> 86 | <step>C</step> 87 | <octave>4</octave> 88 | </pitch> 89 | <duration>2</duration> 90 | <voice>1</voice> 91 | <type>quarter</type> 92 | <stem default-y="-5">up</stem> 93 | </note> 94 | <note default-x="87"> 95 | <chord/> 96 | <pitch> 97 | <step>E</step> 98 | <octave>4</octave> 99 | </pitch> 100 | <duration>2</duration> 101 | <voice>1</voice> 102 | <type>quarter</type> 103 | <stem>up</stem> 104 | </note> 105 | <note default-x="284"> 106 | <pitch> 107 | <step>D</step> 108 | <octave>4</octave> 109 | </pitch> 110 | <duration>2</duration> 111 | <voice>1</voice> 112 | <type>quarter</type> 113 | <stem default-y="0">up</stem> 114 | </note> 115 | <note default-x="284"> 116 | <chord/> 117 | <pitch> 118 | <step>F</step> 119 | <octave>4</octave> 120 | </pitch> 121 | <duration>2</duration> 122 | <voice>1</voice> 123 | <type>quarter</type> 124 | <stem>up</stem> 125 | </note> 126 | <note default-x="483"> 127 | <pitch> 128 | <step>G</step> 129 | <octave>4</octave> 130 | </pitch> 131 | <duration>1</duration> 132 | <voice>1</voice> 133 | <type>eighth</type> 134 | <stem default-y="5">up</stem> 135 | <beam number="1">begin</beam> 136 | </note> 137 | <note default-x="605"> 138 | <pitch> 139 | <step>F</step> 140 | <octave>4</octave> 141 | </pitch> 142 | <duration>1</duration> 143 | <voice>1</voice> 144 | <type>eighth</type> 145 | <stem default-y="5">up</stem> 146 | <beam number="1">continue</beam> 147 | </note> 148 | <note default-x="728"> 149 | <rest/> 150 | <duration>1</duration> 151 | <voice>1</voice> 152 | <type>eighth</type> 153 | </note> 154 | <note default-x="851"> 155 | <pitch> 156 | <step>B</step> 157 | <octave>3</octave> 158 | </pitch> 159 | <duration>1</duration> 160 | <voice>1</voice> 161 | <type>eighth</type> 162 | <stem default-y="5">up</stem> 163 | <beam number="1">end</beam> 164 | </note> 165 | <note default-x="851"> 166 | <chord/> 167 | <pitch> 168 | <step>E</step> 169 | <octave>4</octave> 170 | </pitch> 171 | <duration>1</duration> 172 | <voice>1</voice> 173 | <type>eighth</type> 174 | <stem>up</stem> 175 | </note> 176 | <note default-x="851"> 177 | <chord/> 178 | <pitch> 179 | <step>G</step> 180 | <octave>4</octave> 181 | </pitch> 182 | <duration>1</duration> 183 | <voice>1</voice> 184 | <type>eighth</type> 185 | <stem>up</stem> 186 | </note> 187 | <barline location="right"> 188 | <bar-style>light-heavy</bar-style> 189 | </barline> 190 | </measure> 191 | </part> 192 | <!--=========================================================--> 193 | </score-partwise> 194 | -------------------------------------------------------------------------------- /tests/test_scores/musicxml/chord_score_1b.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.1 Partwise//EN" "http://www.musicxml.org/dtds/1.1/partwise.dtd"> 3 | <score-partwise version="1.1"> 4 | <identification> 5 | <encoding> 6 | <software>Finale 2014 for Windows</software> 7 | <software>Dolet Light for Finale 2014</software> 8 | <encoding-date>2019-11-11</encoding-date> 9 | <supports element="accidental" type="yes"/> 10 | <supports element="beam" type="yes"/> 11 | <supports element="stem" type="yes"/> 12 | </encoding> 13 | </identification> 14 | <defaults> 15 | <scaling> 16 | <millimeters>7.2319</millimeters> 17 | <tenths>40</tenths> 18 | </scaling> 19 | <page-layout> 20 | <page-height>1545</page-height> 21 | <page-width>1194</page-width> 22 | <page-margins type="both"> 23 | <left-margin>70</left-margin> 24 | <right-margin>70</right-margin> 25 | <top-margin>88</top-margin> 26 | <bottom-margin>88</bottom-margin> 27 | </page-margins> 28 | </page-layout> 29 | <system-layout> 30 | <system-margins> 31 | <left-margin>0</left-margin> 32 | <right-margin>0</right-margin> 33 | </system-margins> 34 | <system-distance>121</system-distance> 35 | <top-system-distance>70</top-system-distance> 36 | </system-layout> 37 | <music-font font-family="Maestro,music" font-size="20.5"/> 38 | <word-font font-family="Times New Roman" font-size="10.25"/> 39 | </defaults> 40 | <credit> 41 | <credit-words default-x="70" default-y="1453" font-size="12" valign="top">Score</credit-words> 42 | </credit> 43 | <part-list> 44 | <score-part id="P1"> 45 | <part-name print-object="no">MusicXML Part</part-name> 46 | <score-instrument id="P1-I1"> 47 | <instrument-name>SmartMusic SoftSynth 1</instrument-name> 48 | </score-instrument> 49 | <midi-instrument id="P1-I1"> 50 | <midi-channel>1</midi-channel> 51 | <midi-bank>15489</midi-bank> 52 | <midi-program>1</midi-program> 53 | </midi-instrument> 54 | </score-part> 55 | </part-list> 56 | <!--=========================================================--> 57 | <part id="P1"> 58 | <measure number="1" width="983"> 59 | <print> 60 | <system-layout> 61 | <system-margins> 62 | <left-margin>70</left-margin> 63 | <right-margin>0</right-margin> 64 | </system-margins> 65 | <top-system-distance>211</top-system-distance> 66 | </system-layout> 67 | </print> 68 | <attributes> 69 | <divisions>2</divisions> 70 | <key> 71 | <fifths>0</fifths> 72 | <mode>major</mode> 73 | </key> 74 | <time> 75 | <beats>4</beats> 76 | <beat-type>4</beat-type> 77 | </time> 78 | <clef> 79 | <sign>G</sign> 80 | <line>2</line> 81 | </clef> 82 | </attributes> 83 | <sound tempo="120"/> 84 | <note default-x="87"> 85 | <pitch> 86 | <step>C</step> 87 | <octave>4</octave> 88 | </pitch> 89 | <duration>2</duration> 90 | <voice>1</voice> 91 | <type>quarter</type> 92 | <stem default-y="-5">up</stem> 93 | </note> 94 | <note default-x="87"> 95 | <chord/> 96 | <pitch> 97 | <step>E</step> 98 | <octave>4</octave> 99 | </pitch> 100 | <duration>2</duration> 101 | <voice>1</voice> 102 | <type>quarter</type> 103 | <stem>up</stem> 104 | </note> 105 | <note default-x="284"> 106 | <pitch> 107 | <step>D</step> 108 | <octave>4</octave> 109 | </pitch> 110 | <duration>2</duration> 111 | <voice>1</voice> 112 | <type>quarter</type> 113 | <stem default-y="5.5">up</stem> 114 | </note> 115 | <note default-x="284"> 116 | <chord/> 117 | <pitch> 118 | <step>G</step> 119 | <octave>4</octave> 120 | </pitch> 121 | <duration>2</duration> 122 | <voice>1</voice> 123 | <type>quarter</type> 124 | <stem>up</stem> 125 | </note> 126 | <note default-x="483"> 127 | <pitch> 128 | <step>G</step> 129 | <octave>4</octave> 130 | </pitch> 131 | <duration>1</duration> 132 | <voice>1</voice> 133 | <type>eighth</type> 134 | <stem default-y="5">up</stem> 135 | <beam number="1">begin</beam> 136 | </note> 137 | <note default-x="605"> 138 | <pitch> 139 | <step>F</step> 140 | <octave>4</octave> 141 | </pitch> 142 | <duration>1</duration> 143 | <voice>1</voice> 144 | <type>eighth</type> 145 | <stem default-y="5">up</stem> 146 | <beam number="1">continue</beam> 147 | </note> 148 | <note default-x="728"> 149 | <rest/> 150 | <duration>1</duration> 151 | <voice>1</voice> 152 | <type>eighth</type> 153 | </note> 154 | <note default-x="851"> 155 | <pitch> 156 | <step>B</step> 157 | <octave>3</octave> 158 | </pitch> 159 | <duration>1</duration> 160 | <voice>1</voice> 161 | <type>eighth</type> 162 | <stem default-y="5">up</stem> 163 | <beam number="1">end</beam> 164 | </note> 165 | <note default-x="851"> 166 | <chord/> 167 | <pitch> 168 | <step>G</step> 169 | <octave>4</octave> 170 | </pitch> 171 | <duration>1</duration> 172 | <voice>1</voice> 173 | <type>eighth</type> 174 | <stem>up</stem> 175 | </note> 176 | <barline location="right"> 177 | <bar-style>light-heavy</bar-style> 178 | </barline> 179 | </measure> 180 | </part> 181 | <!--=========================================================--> 182 | </score-partwise> 183 | -------------------------------------------------------------------------------- /tests/test_scores/musicxml/chord_score_2a.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd"> 3 | <score-partwise version="3.0"> 4 | <identification> 5 | <encoding> 6 | <software>Finale 2014 for Windows</software> 7 | <software>Dolet Light for Finale 2014</software> 8 | <encoding-date>2019-11-20</encoding-date> 9 | <supports attribute="new-system" element="print" type="yes" value="yes"/> 10 | <supports attribute="new-page" element="print" type="yes" value="yes"/> 11 | <supports element="accidental" type="yes"/> 12 | <supports element="beam" type="yes"/> 13 | <supports element="stem" type="yes"/> 14 | </encoding> 15 | </identification> 16 | <defaults> 17 | <scaling> 18 | <millimeters>7.1967</millimeters> 19 | <tenths>40</tenths> 20 | </scaling> 21 | <page-layout> 22 | <page-height>1553</page-height> 23 | <page-width>1200</page-width> 24 | <page-margins type="both"> 25 | <left-margin>70</left-margin> 26 | <right-margin>70</right-margin> 27 | <top-margin>88</top-margin> 28 | <bottom-margin>88</bottom-margin> 29 | </page-margins> 30 | </page-layout> 31 | <system-layout> 32 | <system-margins> 33 | <left-margin>0</left-margin> 34 | <right-margin>0</right-margin> 35 | </system-margins> 36 | <system-distance>121</system-distance> 37 | <top-system-distance>70</top-system-distance> 38 | </system-layout> 39 | <appearance> 40 | <line-width type="stem">0.7487</line-width> 41 | <line-width type="beam">5</line-width> 42 | <line-width type="staff">0.7487</line-width> 43 | <line-width type="light barline">0.7487</line-width> 44 | <line-width type="heavy barline">5</line-width> 45 | <line-width type="leger">0.7487</line-width> 46 | <line-width type="ending">0.7487</line-width> 47 | <line-width type="wedge">0.7487</line-width> 48 | <line-width type="enclosure">0.7487</line-width> 49 | <line-width type="tuplet bracket">0.7487</line-width> 50 | <note-size type="grace">60</note-size> 51 | <note-size type="cue">60</note-size> 52 | <distance type="hyphen">120</distance> 53 | <distance type="beam">8</distance> 54 | </appearance> 55 | <music-font font-family="Maestro,engraved" font-size="20.4"/> 56 | <word-font font-family="Times New Roman" font-size="10.2"/> 57 | </defaults> 58 | <credit page="1"> 59 | <credit-words default-x="71" default-y="1460" font-size="12" valign="top">Score</credit-words> 60 | </credit> 61 | <part-list> 62 | <score-part id="P1"> 63 | <part-name print-object="no">MusicXML Part</part-name> 64 | <score-instrument id="P1-I1"> 65 | <instrument-name>SmartMusic SoftSynth 1</instrument-name> 66 | </score-instrument> 67 | <midi-instrument id="P1-I1"> 68 | <midi-channel>1</midi-channel> 69 | <midi-bank>15489</midi-bank> 70 | <midi-program>1</midi-program> 71 | </midi-instrument> 72 | </score-part> 73 | </part-list> 74 | <!--=========================================================--> 75 | <part id="P1"> 76 | <measure number="1" width="990"> 77 | <print> 78 | <system-layout> 79 | <system-margins> 80 | <left-margin>70</left-margin> 81 | <right-margin>0</right-margin> 82 | </system-margins> 83 | <top-system-distance>211</top-system-distance> 84 | </system-layout> 85 | <measure-numbering>system</measure-numbering> 86 | </print> 87 | <attributes> 88 | <divisions>2</divisions> 89 | <key> 90 | <fifths>0</fifths> 91 | <mode>major</mode> 92 | </key> 93 | <time> 94 | <beats>4</beats> 95 | <beat-type>4</beat-type> 96 | </time> 97 | <clef> 98 | <sign>G</sign> 99 | <line>2</line> 100 | </clef> 101 | </attributes> 102 | <sound tempo="120"/> 103 | <note default-x="86"> 104 | <pitch> 105 | <step>C</step> 106 | <octave>4</octave> 107 | </pitch> 108 | <duration>2</duration> 109 | <voice>1</voice> 110 | <type>quarter</type> 111 | <stem default-y="-4.5">up</stem> 112 | </note> 113 | <note default-x="86"> 114 | <chord/> 115 | <pitch> 116 | <step>E</step> 117 | <octave>4</octave> 118 | </pitch> 119 | <duration>2</duration> 120 | <voice>1</voice> 121 | <type>quarter</type> 122 | <stem>up</stem> 123 | </note> 124 | <note default-x="286"> 125 | <pitch> 126 | <step>D</step> 127 | <octave>4</octave> 128 | </pitch> 129 | <duration>2</duration> 130 | <voice>1</voice> 131 | <type>quarter</type> 132 | <stem default-y="0">up</stem> 133 | </note> 134 | <note default-x="286"> 135 | <chord/> 136 | <pitch> 137 | <step>F</step> 138 | <octave>4</octave> 139 | </pitch> 140 | <duration>2</duration> 141 | <voice>1</voice> 142 | <type>quarter</type> 143 | <stem>up</stem> 144 | </note> 145 | <note default-x="485"> 146 | <pitch> 147 | <step>G</step> 148 | <octave>4</octave> 149 | </pitch> 150 | <duration>1</duration> 151 | <voice>1</voice> 152 | <type>eighth</type> 153 | <stem default-y="5">up</stem> 154 | <beam number="1">begin</beam> 155 | </note> 156 | <note default-x="609"> 157 | <pitch> 158 | <step>F</step> 159 | <octave>4</octave> 160 | </pitch> 161 | <duration>1</duration> 162 | <voice>1</voice> 163 | <type>eighth</type> 164 | <stem default-y="5">up</stem> 165 | <beam number="1">continue</beam> 166 | </note> 167 | <note default-x="733"> 168 | <rest/> 169 | <duration>1</duration> 170 | <voice>1</voice> 171 | <type>eighth</type> 172 | </note> 173 | <note default-x="856"> 174 | <pitch> 175 | <step>B</step> 176 | <alter>-1</alter> 177 | <octave>3</octave> 178 | </pitch> 179 | <duration>1</duration> 180 | <voice>1</voice> 181 | <type>eighth</type> 182 | <accidental>flat</accidental> 183 | <stem default-y="5">up</stem> 184 | <beam number="1">end</beam> 185 | </note> 186 | <note default-x="856"> 187 | <chord/> 188 | <pitch> 189 | <step>E</step> 190 | <octave>4</octave> 191 | </pitch> 192 | <duration>1</duration> 193 | <voice>1</voice> 194 | <type>eighth</type> 195 | <stem>up</stem> 196 | </note> 197 | <note default-x="856"> 198 | <chord/> 199 | <pitch> 200 | <step>G</step> 201 | <octave>4</octave> 202 | </pitch> 203 | <duration>1</duration> 204 | <voice>1</voice> 205 | <type>eighth</type> 206 | <stem>up</stem> 207 | </note> 208 | <barline location="right"> 209 | <bar-style>light-heavy</bar-style> 210 | </barline> 211 | </measure> 212 | </part> 213 | <!--=========================================================--> 214 | </score-partwise> 215 | -------------------------------------------------------------------------------- /tests/test_scores/musicxml/chord_score_2b.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd"> 3 | <score-partwise version="3.0"> 4 | <identification> 5 | <encoding> 6 | <software>Finale 2014 for Windows</software> 7 | <software>Dolet Light for Finale 2014</software> 8 | <encoding-date>2019-11-20</encoding-date> 9 | <supports attribute="new-system" element="print" type="yes" value="yes"/> 10 | <supports attribute="new-page" element="print" type="yes" value="yes"/> 11 | <supports element="accidental" type="yes"/> 12 | <supports element="beam" type="yes"/> 13 | <supports element="stem" type="yes"/> 14 | </encoding> 15 | </identification> 16 | <defaults> 17 | <scaling> 18 | <millimeters>7.1967</millimeters> 19 | <tenths>40</tenths> 20 | </scaling> 21 | <page-layout> 22 | <page-height>1553</page-height> 23 | <page-width>1200</page-width> 24 | <page-margins type="both"> 25 | <left-margin>70</left-margin> 26 | <right-margin>70</right-margin> 27 | <top-margin>88</top-margin> 28 | <bottom-margin>88</bottom-margin> 29 | </page-margins> 30 | </page-layout> 31 | <system-layout> 32 | <system-margins> 33 | <left-margin>0</left-margin> 34 | <right-margin>0</right-margin> 35 | </system-margins> 36 | <system-distance>121</system-distance> 37 | <top-system-distance>70</top-system-distance> 38 | </system-layout> 39 | <appearance> 40 | <line-width type="stem">0.7487</line-width> 41 | <line-width type="beam">5</line-width> 42 | <line-width type="staff">0.7487</line-width> 43 | <line-width type="light barline">0.7487</line-width> 44 | <line-width type="heavy barline">5</line-width> 45 | <line-width type="leger">0.7487</line-width> 46 | <line-width type="ending">0.7487</line-width> 47 | <line-width type="wedge">0.7487</line-width> 48 | <line-width type="enclosure">0.7487</line-width> 49 | <line-width type="tuplet bracket">0.7487</line-width> 50 | <note-size type="grace">60</note-size> 51 | <note-size type="cue">60</note-size> 52 | <distance type="hyphen">120</distance> 53 | <distance type="beam">8</distance> 54 | </appearance> 55 | <music-font font-family="Maestro,engraved" font-size="20.4"/> 56 | <word-font font-family="Times New Roman" font-size="10.2"/> 57 | </defaults> 58 | <credit page="1"> 59 | <credit-words default-x="71" default-y="1460" font-size="12" valign="top">Score</credit-words> 60 | </credit> 61 | <part-list> 62 | <score-part id="P1"> 63 | <part-name print-object="no">MusicXML Part</part-name> 64 | <score-instrument id="P1-I1"> 65 | <instrument-name>SmartMusic SoftSynth 1</instrument-name> 66 | </score-instrument> 67 | <midi-instrument id="P1-I1"> 68 | <midi-channel>1</midi-channel> 69 | <midi-bank>15489</midi-bank> 70 | <midi-program>1</midi-program> 71 | </midi-instrument> 72 | </score-part> 73 | </part-list> 74 | <!--=========================================================--> 75 | <part id="P1"> 76 | <measure number="1" width="990"> 77 | <print> 78 | <system-layout> 79 | <system-margins> 80 | <left-margin>70</left-margin> 81 | <right-margin>0</right-margin> 82 | </system-margins> 83 | <top-system-distance>211</top-system-distance> 84 | </system-layout> 85 | <measure-numbering>system</measure-numbering> 86 | </print> 87 | <attributes> 88 | <divisions>2</divisions> 89 | <key> 90 | <fifths>0</fifths> 91 | <mode>major</mode> 92 | </key> 93 | <time> 94 | <beats>4</beats> 95 | <beat-type>4</beat-type> 96 | </time> 97 | <clef> 98 | <sign>G</sign> 99 | <line>2</line> 100 | </clef> 101 | </attributes> 102 | <sound tempo="120"/> 103 | <note default-x="96"> 104 | <pitch> 105 | <step>C</step> 106 | <alter>1</alter> 107 | <octave>4</octave> 108 | </pitch> 109 | <duration>2</duration> 110 | <voice>1</voice> 111 | <type>quarter</type> 112 | <accidental>sharp</accidental> 113 | <stem default-y="-4.5">up</stem> 114 | </note> 115 | <note default-x="96"> 116 | <chord/> 117 | <pitch> 118 | <step>E</step> 119 | <octave>4</octave> 120 | </pitch> 121 | <duration>2</duration> 122 | <voice>1</voice> 123 | <type>quarter</type> 124 | <stem>up</stem> 125 | </note> 126 | <note default-x="294"> 127 | <pitch> 128 | <step>D</step> 129 | <octave>4</octave> 130 | </pitch> 131 | <duration>2</duration> 132 | <voice>1</voice> 133 | <type>quarter</type> 134 | <stem default-y="6">up</stem> 135 | </note> 136 | <note default-x="294"> 137 | <chord/> 138 | <pitch> 139 | <step>G</step> 140 | <octave>4</octave> 141 | </pitch> 142 | <duration>2</duration> 143 | <voice>1</voice> 144 | <type>quarter</type> 145 | <stem>up</stem> 146 | </note> 147 | <note default-x="491"> 148 | <pitch> 149 | <step>G</step> 150 | <octave>4</octave> 151 | </pitch> 152 | <duration>1</duration> 153 | <voice>1</voice> 154 | <type>eighth</type> 155 | <stem default-y="5">up</stem> 156 | <beam number="1">begin</beam> 157 | </note> 158 | <note default-x="613"> 159 | <pitch> 160 | <step>F</step> 161 | <octave>4</octave> 162 | </pitch> 163 | <duration>1</duration> 164 | <voice>1</voice> 165 | <type>eighth</type> 166 | <stem default-y="5">up</stem> 167 | <beam number="1">continue</beam> 168 | </note> 169 | <note default-x="735"> 170 | <rest/> 171 | <duration>1</duration> 172 | <voice>1</voice> 173 | <type>eighth</type> 174 | </note> 175 | <note default-x="858"> 176 | <pitch> 177 | <step>B</step> 178 | <octave>3</octave> 179 | </pitch> 180 | <duration>1</duration> 181 | <voice>1</voice> 182 | <type>eighth</type> 183 | <stem default-y="5">up</stem> 184 | <beam number="1">end</beam> 185 | </note> 186 | <note default-x="858"> 187 | <chord/> 188 | <pitch> 189 | <step>G</step> 190 | <octave>4</octave> 191 | </pitch> 192 | <duration>1</duration> 193 | <voice>1</voice> 194 | <type>eighth</type> 195 | <stem>up</stem> 196 | </note> 197 | <barline location="right"> 198 | <bar-style>light-heavy</bar-style> 199 | </barline> 200 | </measure> 201 | </part> 202 | <!--=========================================================--> 203 | </score-partwise> 204 | -------------------------------------------------------------------------------- /tests/test_scores/musicxml/chord_score_3a.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd"> 3 | <score-partwise version="3.0"> 4 | <identification> 5 | <encoding> 6 | <software>Finale 2014 for Windows</software> 7 | <software>Dolet Light for Finale 2014</software> 8 | <encoding-date>2019-11-20</encoding-date> 9 | <supports attribute="new-system" element="print" type="yes" value="yes"/> 10 | <supports attribute="new-page" element="print" type="yes" value="yes"/> 11 | <supports element="accidental" type="yes"/> 12 | <supports element="beam" type="yes"/> 13 | <supports element="stem" type="yes"/> 14 | </encoding> 15 | </identification> 16 | <defaults> 17 | <scaling> 18 | <millimeters>7.1967</millimeters> 19 | <tenths>40</tenths> 20 | </scaling> 21 | <page-layout> 22 | <page-height>1553</page-height> 23 | <page-width>1200</page-width> 24 | <page-margins type="both"> 25 | <left-margin>70</left-margin> 26 | <right-margin>70</right-margin> 27 | <top-margin>88</top-margin> 28 | <bottom-margin>88</bottom-margin> 29 | </page-margins> 30 | </page-layout> 31 | <system-layout> 32 | <system-margins> 33 | <left-margin>0</left-margin> 34 | <right-margin>0</right-margin> 35 | </system-margins> 36 | <system-distance>121</system-distance> 37 | <top-system-distance>70</top-system-distance> 38 | </system-layout> 39 | <appearance> 40 | <line-width type="stem">0.7487</line-width> 41 | <line-width type="beam">5</line-width> 42 | <line-width type="staff">0.7487</line-width> 43 | <line-width type="light barline">0.7487</line-width> 44 | <line-width type="heavy barline">5</line-width> 45 | <line-width type="leger">0.7487</line-width> 46 | <line-width type="ending">0.7487</line-width> 47 | <line-width type="wedge">0.7487</line-width> 48 | <line-width type="enclosure">0.7487</line-width> 49 | <line-width type="tuplet bracket">0.7487</line-width> 50 | <note-size type="grace">60</note-size> 51 | <note-size type="cue">60</note-size> 52 | <distance type="hyphen">120</distance> 53 | <distance type="beam">8</distance> 54 | </appearance> 55 | <music-font font-family="Maestro,engraved" font-size="20.4"/> 56 | <word-font font-family="Times New Roman" font-size="10.2"/> 57 | </defaults> 58 | <credit page="1"> 59 | <credit-words default-x="71" default-y="1460" font-size="12" valign="top">Score</credit-words> 60 | </credit> 61 | <part-list> 62 | <score-part id="P1"> 63 | <part-name print-object="no">MusicXML Part</part-name> 64 | <score-instrument id="P1-I1"> 65 | <instrument-name>SmartMusic SoftSynth 1</instrument-name> 66 | </score-instrument> 67 | <midi-instrument id="P1-I1"> 68 | <midi-channel>1</midi-channel> 69 | <midi-bank>15489</midi-bank> 70 | <midi-program>1</midi-program> 71 | </midi-instrument> 72 | </score-part> 73 | </part-list> 74 | <!--=========================================================--> 75 | <part id="P1"> 76 | <measure number="1" width="990"> 77 | <print> 78 | <system-layout> 79 | <system-margins> 80 | <left-margin>70</left-margin> 81 | <right-margin>0</right-margin> 82 | </system-margins> 83 | <top-system-distance>211</top-system-distance> 84 | </system-layout> 85 | <measure-numbering>system</measure-numbering> 86 | </print> 87 | <attributes> 88 | <divisions>32</divisions> 89 | <key> 90 | <fifths>0</fifths> 91 | <mode>major</mode> 92 | </key> 93 | <time> 94 | <beats>4</beats> 95 | <beat-type>4</beat-type> 96 | </time> 97 | <clef> 98 | <sign>G</sign> 99 | <line>2</line> 100 | </clef> 101 | </attributes> 102 | <sound tempo="120"/> 103 | <note default-x="86"> 104 | <pitch> 105 | <step>C</step> 106 | <octave>4</octave> 107 | </pitch> 108 | <duration>32</duration> 109 | <voice>1</voice> 110 | <type>quarter</type> 111 | <stem default-y="-4.5">up</stem> 112 | </note> 113 | <note default-x="86"> 114 | <chord/> 115 | <pitch> 116 | <step>E</step> 117 | <octave>4</octave> 118 | </pitch> 119 | <duration>32</duration> 120 | <voice>1</voice> 121 | <type>quarter</type> 122 | <stem>up</stem> 123 | </note> 124 | <note default-x="277"> 125 | <pitch> 126 | <step>D</step> 127 | <octave>4</octave> 128 | </pitch> 129 | <duration>32</duration> 130 | <voice>1</voice> 131 | <type>quarter</type> 132 | <stem default-y="0">up</stem> 133 | </note> 134 | <note default-x="277"> 135 | <chord/> 136 | <pitch> 137 | <step>F</step> 138 | <octave>4</octave> 139 | </pitch> 140 | <duration>32</duration> 141 | <voice>1</voice> 142 | <type>quarter</type> 143 | <stem>up</stem> 144 | </note> 145 | <note default-x="468"> 146 | <pitch> 147 | <step>G</step> 148 | <octave>4</octave> 149 | </pitch> 150 | <duration>16</duration> 151 | <voice>1</voice> 152 | <type>eighth</type> 153 | <stem default-y="5">up</stem> 154 | <beam number="1">begin</beam> 155 | </note> 156 | <note default-x="586"> 157 | <pitch> 158 | <step>F</step> 159 | <octave>4</octave> 160 | </pitch> 161 | <duration>16</duration> 162 | <voice>1</voice> 163 | <type>eighth</type> 164 | <stem default-y="0">up</stem> 165 | <beam number="1">end</beam> 166 | </note> 167 | <note default-x="705"> 168 | <rest/> 169 | <duration>16</duration> 170 | <voice>1</voice> 171 | <type>eighth</type> 172 | </note> 173 | <note default-x="823"> 174 | <pitch> 175 | <step>B</step> 176 | <alter>-1</alter> 177 | <octave>3</octave> 178 | </pitch> 179 | <duration>7</duration> 180 | <voice>1</voice> 181 | <type>32nd</type> 182 | <dot/> 183 | <dot/> 184 | <accidental>flat</accidental> 185 | <stem default-y="14">up</stem> 186 | </note> 187 | <note default-x="823"> 188 | <chord/> 189 | <pitch> 190 | <step>E</step> 191 | <octave>4</octave> 192 | </pitch> 193 | <duration>7</duration> 194 | <voice>1</voice> 195 | <type>32nd</type> 196 | <dot/> 197 | <dot/> 198 | <stem>up</stem> 199 | </note> 200 | <note default-x="823"> 201 | <chord/> 202 | <pitch> 203 | <step>G</step> 204 | <octave>4</octave> 205 | </pitch> 206 | <duration>7</duration> 207 | <voice>1</voice> 208 | <type>32nd</type> 209 | <dot/> 210 | <dot/> 211 | <stem>up</stem> 212 | </note> 213 | <note default-x="889"> 214 | <rest/> 215 | <duration>1</duration> 216 | <voice>1</voice> 217 | <type>128th</type> 218 | </note> 219 | <note default-x="907"> 220 | <rest/> 221 | <duration>8</duration> 222 | <voice>1</voice> 223 | <type>16th</type> 224 | </note> 225 | <barline location="right"> 226 | <bar-style>light-heavy</bar-style> 227 | </barline> 228 | </measure> 229 | </part> 230 | <!--=========================================================--> 231 | </score-partwise> 232 | -------------------------------------------------------------------------------- /tests/test_scores/musicxml/chord_score_3b.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd"> 3 | <score-partwise version="3.0"> 4 | <identification> 5 | <encoding> 6 | <software>Finale 2014 for Windows</software> 7 | <software>Dolet Light for Finale 2014</software> 8 | <encoding-date>2019-11-20</encoding-date> 9 | <supports attribute="new-system" element="print" type="yes" value="yes"/> 10 | <supports attribute="new-page" element="print" type="yes" value="yes"/> 11 | <supports element="accidental" type="yes"/> 12 | <supports element="beam" type="yes"/> 13 | <supports element="stem" type="yes"/> 14 | </encoding> 15 | </identification> 16 | <defaults> 17 | <scaling> 18 | <millimeters>7.1967</millimeters> 19 | <tenths>40</tenths> 20 | </scaling> 21 | <page-layout> 22 | <page-height>1553</page-height> 23 | <page-width>1200</page-width> 24 | <page-margins type="both"> 25 | <left-margin>70</left-margin> 26 | <right-margin>70</right-margin> 27 | <top-margin>88</top-margin> 28 | <bottom-margin>88</bottom-margin> 29 | </page-margins> 30 | </page-layout> 31 | <system-layout> 32 | <system-margins> 33 | <left-margin>0</left-margin> 34 | <right-margin>0</right-margin> 35 | </system-margins> 36 | <system-distance>121</system-distance> 37 | <top-system-distance>70</top-system-distance> 38 | </system-layout> 39 | <appearance> 40 | <line-width type="stem">0.7487</line-width> 41 | <line-width type="beam">5</line-width> 42 | <line-width type="staff">0.7487</line-width> 43 | <line-width type="light barline">0.7487</line-width> 44 | <line-width type="heavy barline">5</line-width> 45 | <line-width type="leger">0.7487</line-width> 46 | <line-width type="ending">0.7487</line-width> 47 | <line-width type="wedge">0.7487</line-width> 48 | <line-width type="enclosure">0.7487</line-width> 49 | <line-width type="tuplet bracket">0.7487</line-width> 50 | <note-size type="grace">60</note-size> 51 | <note-size type="cue">60</note-size> 52 | <distance type="hyphen">120</distance> 53 | <distance type="beam">8</distance> 54 | </appearance> 55 | <music-font font-family="Maestro,engraved" font-size="20.4"/> 56 | <word-font font-family="Times New Roman" font-size="10.2"/> 57 | </defaults> 58 | <credit page="1"> 59 | <credit-words default-x="71" default-y="1460" font-size="12" valign="top">Score</credit-words> 60 | </credit> 61 | <part-list> 62 | <score-part id="P1"> 63 | <part-name print-object="no">MusicXML Part</part-name> 64 | <score-instrument id="P1-I1"> 65 | <instrument-name>SmartMusic SoftSynth 1</instrument-name> 66 | </score-instrument> 67 | <midi-instrument id="P1-I1"> 68 | <midi-channel>1</midi-channel> 69 | <midi-bank>15489</midi-bank> 70 | <midi-program>1</midi-program> 71 | </midi-instrument> 72 | </score-part> 73 | </part-list> 74 | <!--=========================================================--> 75 | <part id="P1"> 76 | <measure number="1" width="990"> 77 | <print> 78 | <system-layout> 79 | <system-margins> 80 | <left-margin>70</left-margin> 81 | <right-margin>0</right-margin> 82 | </system-margins> 83 | <top-system-distance>211</top-system-distance> 84 | </system-layout> 85 | <measure-numbering>system</measure-numbering> 86 | </print> 87 | <attributes> 88 | <divisions>2</divisions> 89 | <key> 90 | <fifths>0</fifths> 91 | <mode>major</mode> 92 | </key> 93 | <time> 94 | <beats>4</beats> 95 | <beat-type>4</beat-type> 96 | </time> 97 | <clef> 98 | <sign>G</sign> 99 | <line>2</line> 100 | </clef> 101 | </attributes> 102 | <sound tempo="120"/> 103 | <note default-x="96"> 104 | <pitch> 105 | <step>C</step> 106 | <alter>1</alter> 107 | <octave>4</octave> 108 | </pitch> 109 | <duration>2</duration> 110 | <voice>1</voice> 111 | <type>quarter</type> 112 | <accidental>sharp</accidental> 113 | <stem default-y="-4.5">up</stem> 114 | </note> 115 | <note default-x="96"> 116 | <chord/> 117 | <pitch> 118 | <step>E</step> 119 | <octave>4</octave> 120 | </pitch> 121 | <duration>2</duration> 122 | <voice>1</voice> 123 | <type>quarter</type> 124 | <stem>up</stem> 125 | </note> 126 | <note default-x="308"> 127 | <pitch> 128 | <step>D</step> 129 | <octave>4</octave> 130 | </pitch> 131 | <duration>3</duration> 132 | <voice>1</voice> 133 | <type>quarter</type> 134 | <dot/> 135 | <stem default-y="6">up</stem> 136 | </note> 137 | <note default-x="308"> 138 | <chord/> 139 | <pitch> 140 | <step>G</step> 141 | <octave>4</octave> 142 | </pitch> 143 | <duration>3</duration> 144 | <voice>1</voice> 145 | <type>quarter</type> 146 | <dot/> 147 | <stem>up</stem> 148 | </note> 149 | <note default-x="587"> 150 | <pitch> 151 | <step>F</step> 152 | <octave>4</octave> 153 | </pitch> 154 | <duration>1</duration> 155 | <voice>1</voice> 156 | <type>eighth</type> 157 | <stem default-y="0">up</stem> 158 | </note> 159 | <note default-x="718"> 160 | <rest/> 161 | <duration>1</duration> 162 | <voice>1</voice> 163 | <type>eighth</type> 164 | </note> 165 | <note default-x="849"> 166 | <pitch> 167 | <step>B</step> 168 | <octave>3</octave> 169 | </pitch> 170 | <duration>1</duration> 171 | <voice>1</voice> 172 | <type>eighth</type> 173 | <stem default-y="6">up</stem> 174 | </note> 175 | <note default-x="849"> 176 | <chord/> 177 | <pitch> 178 | <step>G</step> 179 | <octave>4</octave> 180 | </pitch> 181 | <duration>1</duration> 182 | <voice>1</voice> 183 | <type>eighth</type> 184 | <stem>up</stem> 185 | </note> 186 | <barline location="right"> 187 | <bar-style>light-heavy</bar-style> 188 | </barline> 189 | </measure> 190 | </part> 191 | <!--=========================================================--> 192 | </score-partwise> 193 | -------------------------------------------------------------------------------- /tests/test_scores/musicxml/multivoice_score_1a.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.1 Partwise//EN" "http://www.musicxml.org/dtds/1.1/partwise.dtd"> 3 | <score-partwise version="1.1"> 4 | <identification> 5 | <encoding> 6 | <software>Finale 2014 for Windows</software> 7 | <software>Dolet Light for Finale 2014</software> 8 | <encoding-date>2019-11-18</encoding-date> 9 | <supports element="accidental" type="yes"/> 10 | <supports element="beam" type="yes"/> 11 | <supports element="stem" type="yes"/> 12 | </encoding> 13 | </identification> 14 | <defaults> 15 | <scaling> 16 | <millimeters>7.2319</millimeters> 17 | <tenths>40</tenths> 18 | </scaling> 19 | <page-layout> 20 | <page-height>1545</page-height> 21 | <page-width>1194</page-width> 22 | <page-margins type="both"> 23 | <left-margin>70</left-margin> 24 | <right-margin>70</right-margin> 25 | <top-margin>88</top-margin> 26 | <bottom-margin>88</bottom-margin> 27 | </page-margins> 28 | </page-layout> 29 | <system-layout> 30 | <system-margins> 31 | <left-margin>0</left-margin> 32 | <right-margin>0</right-margin> 33 | </system-margins> 34 | <system-distance>121</system-distance> 35 | <top-system-distance>70</top-system-distance> 36 | </system-layout> 37 | <music-font font-family="Maestro,music" font-size="20.5"/> 38 | <word-font font-family="Times New Roman" font-size="10.25"/> 39 | </defaults> 40 | <credit> 41 | <credit-words default-x="70" default-y="1453" font-size="12" valign="top">Score</credit-words> 42 | </credit> 43 | <part-list> 44 | <score-part id="P1"> 45 | <part-name print-object="no">MusicXML Part</part-name> 46 | <score-instrument id="P1-I1"> 47 | <instrument-name>SmartMusic SoftSynth 1</instrument-name> 48 | </score-instrument> 49 | <midi-instrument id="P1-I1"> 50 | <midi-channel>1</midi-channel> 51 | <midi-bank>15489</midi-bank> 52 | <midi-program>1</midi-program> 53 | </midi-instrument> 54 | </score-part> 55 | </part-list> 56 | <!--=========================================================--> 57 | <part id="P1"> 58 | <measure number="1" width="463"> 59 | <print> 60 | <system-layout> 61 | <system-margins> 62 | <left-margin>70</left-margin> 63 | <right-margin>0</right-margin> 64 | </system-margins> 65 | <top-system-distance>211</top-system-distance> 66 | </system-layout> 67 | </print> 68 | <attributes> 69 | <divisions>2</divisions> 70 | <key> 71 | <fifths>0</fifths> 72 | <mode>major</mode> 73 | </key> 74 | <time> 75 | <beats>4</beats> 76 | <beat-type>4</beat-type> 77 | </time> 78 | <clef> 79 | <sign>G</sign> 80 | <line>2</line> 81 | </clef> 82 | </attributes> 83 | <sound tempo="120"/> 84 | <note default-x="84"> 85 | <pitch> 86 | <step>B</step> 87 | <octave>4</octave> 88 | </pitch> 89 | <duration>2</duration> 90 | <voice>1</voice> 91 | <type>quarter</type> 92 | <stem default-y="15">up</stem> 93 | </note> 94 | <note default-x="179"> 95 | <pitch> 96 | <step>G</step> 97 | <octave>4</octave> 98 | </pitch> 99 | <duration>2</duration> 100 | <voice>1</voice> 101 | <type>quarter</type> 102 | <stem default-y="5.5">up</stem> 103 | </note> 104 | <note default-x="273"> 105 | <pitch> 106 | <step>D</step> 107 | <octave>5</octave> 108 | </pitch> 109 | <duration>2</duration> 110 | <voice>1</voice> 111 | <type>quarter</type> 112 | <stem default-y="19">up</stem> 113 | </note> 114 | <note default-x="368"> 115 | <pitch> 116 | <step>B</step> 117 | <octave>4</octave> 118 | </pitch> 119 | <duration>2</duration> 120 | <voice>1</voice> 121 | <type>quarter</type> 122 | <stem default-y="15">up</stem> 123 | </note> 124 | <backup> 125 | <duration>8</duration> 126 | </backup> 127 | <note default-x="84"> 128 | <pitch> 129 | <step>G</step> 130 | <octave>4</octave> 131 | </pitch> 132 | <duration>4</duration> 133 | <voice>2</voice> 134 | <type>half</type> 135 | <stem default-y="-59">down</stem> 136 | </note> 137 | <note default-x="273"> 138 | <pitch> 139 | <step>E</step> 140 | <octave>4</octave> 141 | </pitch> 142 | <duration>4</duration> 143 | <voice>2</voice> 144 | <type>half</type> 145 | <stem default-y="-68.5">down</stem> 146 | </note> 147 | </measure> 148 | <!--=======================================================--> 149 | <measure number="2" width="520"> 150 | <note default-x="13"> 151 | <pitch> 152 | <step>G</step> 153 | <octave>4</octave> 154 | </pitch> 155 | <duration>1</duration> 156 | <voice>2</voice> 157 | <type>eighth</type> 158 | <stem default-y="15">up</stem> 159 | <beam number="1">begin</beam> 160 | </note> 161 | <note default-x="75"> 162 | <pitch> 163 | <step>A</step> 164 | <octave>4</octave> 165 | </pitch> 166 | <duration>1</duration> 167 | <voice>2</voice> 168 | <type>eighth</type> 169 | <stem default-y="17">up</stem> 170 | <beam number="1">continue</beam> 171 | </note> 172 | <note default-x="138"> 173 | <pitch> 174 | <step>B</step> 175 | <octave>4</octave> 176 | </pitch> 177 | <duration>1</duration> 178 | <voice>2</voice> 179 | <type>eighth</type> 180 | <stem default-y="18">up</stem> 181 | <beam number="1">continue</beam> 182 | </note> 183 | <note default-x="200"> 184 | <pitch> 185 | <step>C</step> 186 | <octave>5</octave> 187 | </pitch> 188 | <duration>1</duration> 189 | <tie type="start"/> 190 | <voice>2</voice> 191 | <type>eighth</type> 192 | <stem default-y="20">up</stem> 193 | <beam number="1">end</beam> 194 | <notations> 195 | <tied type="start"/> 196 | </notations> 197 | </note> 198 | <note default-x="262"> 199 | <pitch> 200 | <step>C</step> 201 | <octave>5</octave> 202 | </pitch> 203 | <duration>1</duration> 204 | <tie type="stop"/> 205 | <voice>2</voice> 206 | <type>eighth</type> 207 | <stem default-y="-55">down</stem> 208 | <beam number="1">begin</beam> 209 | <notations> 210 | <tied type="stop"/> 211 | </notations> 212 | </note> 213 | <note default-x="324"> 214 | <pitch> 215 | <step>A</step> 216 | <octave>4</octave> 217 | </pitch> 218 | <duration>1</duration> 219 | <voice>2</voice> 220 | <type>eighth</type> 221 | <stem default-y="-60">down</stem> 222 | <beam number="1">end</beam> 223 | </note> 224 | <note default-x="386"> 225 | <pitch> 226 | <step>G</step> 227 | <octave>4</octave> 228 | </pitch> 229 | <duration>1</duration> 230 | <voice>2</voice> 231 | <type>eighth</type> 232 | <stem default-y="5.5">up</stem> 233 | </note> 234 | <note default-x="448"> 235 | <rest/> 236 | <duration>1</duration> 237 | <voice>2</voice> 238 | <type>eighth</type> 239 | </note> 240 | <barline location="right"> 241 | <bar-style>light-heavy</bar-style> 242 | </barline> 243 | </measure> 244 | </part> 245 | <!--=========================================================--> 246 | </score-partwise> 247 | -------------------------------------------------------------------------------- /tests/test_scores/musicxml/multivoice_score_1b.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.1 Partwise//EN" "http://www.musicxml.org/dtds/1.1/partwise.dtd"> 3 | <score-partwise version="1.1"> 4 | <identification> 5 | <encoding> 6 | <software>Finale 2014 for Windows</software> 7 | <software>Dolet Light for Finale 2014</software> 8 | <encoding-date>2019-11-19</encoding-date> 9 | <supports element="accidental" type="yes"/> 10 | <supports element="beam" type="yes"/> 11 | <supports element="stem" type="yes"/> 12 | </encoding> 13 | </identification> 14 | <defaults> 15 | <scaling> 16 | <millimeters>7.2319</millimeters> 17 | <tenths>40</tenths> 18 | </scaling> 19 | <page-layout> 20 | <page-height>1545</page-height> 21 | <page-width>1194</page-width> 22 | <page-margins type="both"> 23 | <left-margin>70</left-margin> 24 | <right-margin>70</right-margin> 25 | <top-margin>88</top-margin> 26 | <bottom-margin>88</bottom-margin> 27 | </page-margins> 28 | </page-layout> 29 | <system-layout> 30 | <system-margins> 31 | <left-margin>0</left-margin> 32 | <right-margin>0</right-margin> 33 | </system-margins> 34 | <system-distance>121</system-distance> 35 | <top-system-distance>70</top-system-distance> 36 | </system-layout> 37 | <music-font font-family="Maestro,music" font-size="20.5"/> 38 | <word-font font-family="Times New Roman" font-size="10.25"/> 39 | </defaults> 40 | <credit> 41 | <credit-words default-x="70" default-y="1453" font-size="12" valign="top">Score</credit-words> 42 | </credit> 43 | <part-list> 44 | <score-part id="P1"> 45 | <part-name print-object="no">MusicXML Part</part-name> 46 | <score-instrument id="P1-I1"> 47 | <instrument-name>SmartMusic SoftSynth 1</instrument-name> 48 | </score-instrument> 49 | <midi-instrument id="P1-I1"> 50 | <midi-channel>1</midi-channel> 51 | <midi-bank>15489</midi-bank> 52 | <midi-program>1</midi-program> 53 | </midi-instrument> 54 | </score-part> 55 | </part-list> 56 | <!--=========================================================--> 57 | <part id="P1"> 58 | <measure number="1" width="476"> 59 | <print> 60 | <system-layout> 61 | <system-margins> 62 | <left-margin>70</left-margin> 63 | <right-margin>0</right-margin> 64 | </system-margins> 65 | <top-system-distance>211</top-system-distance> 66 | </system-layout> 67 | </print> 68 | <attributes> 69 | <divisions>2</divisions> 70 | <key> 71 | <fifths>0</fifths> 72 | <mode>major</mode> 73 | </key> 74 | <time> 75 | <beats>4</beats> 76 | <beat-type>4</beat-type> 77 | </time> 78 | <clef> 79 | <sign>G</sign> 80 | <line>2</line> 81 | </clef> 82 | </attributes> 83 | <sound tempo="120"/> 84 | <note default-x="84"> 85 | <pitch> 86 | <step>B</step> 87 | <octave>4</octave> 88 | </pitch> 89 | <duration>2</duration> 90 | <voice>1</voice> 91 | <type>quarter</type> 92 | <stem default-y="-55">down</stem> 93 | </note> 94 | <note default-x="182"> 95 | <pitch> 96 | <step>G</step> 97 | <octave>4</octave> 98 | </pitch> 99 | <duration>2</duration> 100 | <voice>1</voice> 101 | <type>quarter</type> 102 | <stem default-y="5.5">up</stem> 103 | </note> 104 | <note default-x="280"> 105 | <pitch> 106 | <step>D</step> 107 | <octave>5</octave> 108 | </pitch> 109 | <duration>2</duration> 110 | <voice>1</voice> 111 | <type>quarter</type> 112 | <stem default-y="-45">down</stem> 113 | </note> 114 | <note default-x="378"> 115 | <pitch> 116 | <step>B</step> 117 | <octave>4</octave> 118 | </pitch> 119 | <duration>2</duration> 120 | <voice>1</voice> 121 | <type>quarter</type> 122 | <stem default-y="-55">down</stem> 123 | </note> 124 | </measure> 125 | <!--=======================================================--> 126 | <measure number="2" width="507"> 127 | <note default-x="17"> 128 | <pitch> 129 | <step>G</step> 130 | <octave>5</octave> 131 | </pitch> 132 | <duration>4</duration> 133 | <voice>1</voice> 134 | <type>half</type> 135 | <stem default-y="34">up</stem> 136 | </note> 137 | <note default-x="269"> 138 | <pitch> 139 | <step>F</step> 140 | <octave>5</octave> 141 | </pitch> 142 | <duration>4</duration> 143 | <voice>1</voice> 144 | <type>half</type> 145 | <stem default-y="29">up</stem> 146 | </note> 147 | <backup> 148 | <duration>8</duration> 149 | </backup> 150 | <note default-x="16"> 151 | <pitch> 152 | <step>G</step> 153 | <octave>4</octave> 154 | </pitch> 155 | <duration>1</duration> 156 | <voice>2</voice> 157 | <type>eighth</type> 158 | <stem default-y="-65">down</stem> 159 | <beam number="1">begin</beam> 160 | </note> 161 | <note default-x="79"> 162 | <pitch> 163 | <step>A</step> 164 | <octave>4</octave> 165 | </pitch> 166 | <duration>1</duration> 167 | <voice>2</voice> 168 | <type>eighth</type> 169 | <stem default-y="-63">down</stem> 170 | <beam number="1">continue</beam> 171 | </note> 172 | <note default-x="142"> 173 | <pitch> 174 | <step>B</step> 175 | <octave>4</octave> 176 | </pitch> 177 | <duration>1</duration> 178 | <voice>2</voice> 179 | <type>eighth</type> 180 | <stem default-y="-62">down</stem> 181 | <beam number="1">continue</beam> 182 | </note> 183 | <note default-x="206"> 184 | <pitch> 185 | <step>C</step> 186 | <octave>5</octave> 187 | </pitch> 188 | <duration>1</duration> 189 | <tie type="start"/> 190 | <voice>2</voice> 191 | <type>eighth</type> 192 | <stem default-y="-60">down</stem> 193 | <beam number="1">end</beam> 194 | <notations> 195 | <tied orientation="under" type="start"/> 196 | </notations> 197 | </note> 198 | <note default-x="269"> 199 | <pitch> 200 | <step>C</step> 201 | <octave>5</octave> 202 | </pitch> 203 | <duration>1</duration> 204 | <tie type="stop"/> 205 | <voice>2</voice> 206 | <type>eighth</type> 207 | <stem default-y="-55">down</stem> 208 | <beam number="1">begin</beam> 209 | <notations> 210 | <tied type="stop"/> 211 | </notations> 212 | </note> 213 | <note default-x="332"> 214 | <pitch> 215 | <step>A</step> 216 | <octave>4</octave> 217 | </pitch> 218 | <duration>1</duration> 219 | <voice>2</voice> 220 | <type>eighth</type> 221 | <stem default-y="-60">down</stem> 222 | <beam number="1">end</beam> 223 | </note> 224 | <note default-x="395"> 225 | <pitch> 226 | <step>G</step> 227 | <octave>4</octave> 228 | </pitch> 229 | <duration>2</duration> 230 | <voice>2</voice> 231 | <type>quarter</type> 232 | <stem default-y="-59">down</stem> 233 | </note> 234 | <backup> 235 | <duration>8</duration> 236 | </backup> 237 | <note default-x="16"> 238 | <pitch> 239 | <step>C</step> 240 | <octave>3</octave> 241 | </pitch> 242 | <duration>8</duration> 243 | <voice>3</voice> 244 | <type>whole</type> 245 | </note> 246 | <barline location="right"> 247 | <bar-style>light-heavy</bar-style> 248 | </barline> 249 | </measure> 250 | </part> 251 | <!--=========================================================--> 252 | </score-partwise> 253 | -------------------------------------------------------------------------------- /tests/test_scores/musicxml/tie_score_1b.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd"> 3 | <score-partwise version="3.0"> 4 | <identification> 5 | <encoding> 6 | <software>Finale 2014 for Windows</software> 7 | <software>Dolet Light for Finale 2014</software> 8 | <encoding-date>2019-11-12</encoding-date> 9 | <supports attribute="new-system" element="print" type="yes" value="yes"/> 10 | <supports attribute="new-page" element="print" type="yes" value="yes"/> 11 | <supports element="accidental" type="yes"/> 12 | <supports element="beam" type="yes"/> 13 | <supports element="stem" type="yes"/> 14 | </encoding> 15 | </identification> 16 | <defaults> 17 | <scaling> 18 | <millimeters>7.2319</millimeters> 19 | <tenths>40</tenths> 20 | </scaling> 21 | <page-layout> 22 | <page-height>1545</page-height> 23 | <page-width>1194</page-width> 24 | <page-margins type="both"> 25 | <left-margin>70</left-margin> 26 | <right-margin>70</right-margin> 27 | <top-margin>88</top-margin> 28 | <bottom-margin>88</bottom-margin> 29 | </page-margins> 30 | </page-layout> 31 | <system-layout> 32 | <system-margins> 33 | <left-margin>0</left-margin> 34 | <right-margin>0</right-margin> 35 | </system-margins> 36 | <system-distance>121</system-distance> 37 | <top-system-distance>70</top-system-distance> 38 | </system-layout> 39 | <appearance> 40 | <line-width type="stem">0.7487</line-width> 41 | <line-width type="beam">5</line-width> 42 | <line-width type="staff">0.7487</line-width> 43 | <line-width type="light barline">0.7487</line-width> 44 | <line-width type="heavy barline">5</line-width> 45 | <line-width type="leger">0.7487</line-width> 46 | <line-width type="ending">0.7487</line-width> 47 | <line-width type="wedge">0.7487</line-width> 48 | <line-width type="enclosure">0.7487</line-width> 49 | <line-width type="tuplet bracket">0.7487</line-width> 50 | <note-size type="grace">60</note-size> 51 | <note-size type="cue">60</note-size> 52 | <distance type="hyphen">120</distance> 53 | <distance type="beam">8</distance> 54 | </appearance> 55 | <music-font font-family="Maestro,engraved" font-size="20.5"/> 56 | <word-font font-family="Times New Roman" font-size="10.25"/> 57 | </defaults> 58 | <credit page="1"> 59 | <credit-words default-x="70" default-y="1453" font-size="12" valign="top">Score</credit-words> 60 | </credit> 61 | <part-list> 62 | <score-part id="P1"> 63 | <part-name print-object="no">MusicXML Part</part-name> 64 | <score-instrument id="P1-I1"> 65 | <instrument-name>SmartMusic SoftSynth 1</instrument-name> 66 | </score-instrument> 67 | <midi-instrument id="P1-I1"> 68 | <midi-channel>1</midi-channel> 69 | <midi-bank>15489</midi-bank> 70 | <midi-program>1</midi-program> 71 | <volume>80</volume> 72 | <pan>0</pan> 73 | </midi-instrument> 74 | </score-part> 75 | </part-list> 76 | <!--=========================================================--> 77 | <part id="P1"> 78 | <measure number="1" width="983"> 79 | <print> 80 | <system-layout> 81 | <system-margins> 82 | <left-margin>70</left-margin> 83 | <right-margin>0</right-margin> 84 | </system-margins> 85 | <top-system-distance>211</top-system-distance> 86 | </system-layout> 87 | <measure-numbering>system</measure-numbering> 88 | </print> 89 | <attributes> 90 | <divisions>4</divisions> 91 | <key> 92 | <fifths>0</fifths> 93 | <mode>major</mode> 94 | </key> 95 | <time> 96 | <beats>4</beats> 97 | <beat-type>4</beat-type> 98 | </time> 99 | <clef> 100 | <sign>G</sign> 101 | <line>2</line> 102 | </clef> 103 | </attributes> 104 | <sound tempo="120"/> 105 | <note default-x="84"> 106 | <pitch> 107 | <step>E</step> 108 | <octave>4</octave> 109 | </pitch> 110 | <duration>2</duration> 111 | <tie type="start"/> 112 | <voice>1</voice> 113 | <type>eighth</type> 114 | <stem default-y="-5">up</stem> 115 | <beam number="1">begin</beam> 116 | <notations> 117 | <tied type="start"/> 118 | </notations> 119 | </note> 120 | <note default-x="194"> 121 | <pitch> 122 | <step>E</step> 123 | <octave>4</octave> 124 | </pitch> 125 | <duration>1</duration> 126 | <tie type="stop"/> 127 | <voice>1</voice> 128 | <type>16th</type> 129 | <stem default-y="-5">up</stem> 130 | <beam number="1">continue</beam> 131 | <beam number="2">begin</beam> 132 | <notations> 133 | <tied type="stop"/> 134 | </notations> 135 | </note> 136 | <note default-x="261"> 137 | <pitch> 138 | <step>D</step> 139 | <octave>4</octave> 140 | </pitch> 141 | <duration>1</duration> 142 | <voice>1</voice> 143 | <type>16th</type> 144 | <stem default-y="-5">up</stem> 145 | <beam number="1">end</beam> 146 | <beam number="2">end</beam> 147 | </note> 148 | <note default-x="330"> 149 | <pitch> 150 | <step>C</step> 151 | <octave>4</octave> 152 | </pitch> 153 | <duration>2</duration> 154 | <voice>1</voice> 155 | <type>eighth</type> 156 | <stem default-y="-5">up</stem> 157 | <beam number="1">begin</beam> 158 | </note> 159 | <note default-x="330"> 160 | <chord/> 161 | <pitch> 162 | <step>E</step> 163 | <octave>4</octave> 164 | </pitch> 165 | <duration>2</duration> 166 | <voice>1</voice> 167 | <type>eighth</type> 168 | <stem>up</stem> 169 | </note> 170 | <note default-x="439"> 171 | <pitch> 172 | <step>C</step> 173 | <octave>4</octave> 174 | </pitch> 175 | <duration>1</duration> 176 | <voice>1</voice> 177 | <type>16th</type> 178 | <stem default-y="-6.5">up</stem> 179 | <beam number="1">continue</beam> 180 | <beam number="2">begin</beam> 181 | </note> 182 | <note default-x="507"> 183 | <pitch> 184 | <step>D</step> 185 | <octave>4</octave> 186 | </pitch> 187 | <duration>1</duration> 188 | <voice>1</voice> 189 | <type>16th</type> 190 | <stem default-y="-7.5">up</stem> 191 | <beam number="1">end</beam> 192 | <beam number="2">end</beam> 193 | </note> 194 | <note default-x="575"> 195 | <pitch> 196 | <step>E</step> 197 | <octave>4</octave> 198 | </pitch> 199 | <duration>4</duration> 200 | <voice>1</voice> 201 | <type>quarter</type> 202 | <stem default-y="14">up</stem> 203 | </note> 204 | <note default-x="575"> 205 | <chord/> 206 | <pitch> 207 | <step>G</step> 208 | <octave>4</octave> 209 | </pitch> 210 | <duration>4</duration> 211 | <voice>1</voice> 212 | <type>quarter</type> 213 | <stem>up</stem> 214 | </note> 215 | <note default-x="575"> 216 | <chord/> 217 | <pitch> 218 | <step>C</step> 219 | <octave>5</octave> 220 | </pitch> 221 | <duration>4</duration> 222 | <voice>1</voice> 223 | <type>quarter</type> 224 | <stem>up</stem> 225 | </note> 226 | <note default-x="753"> 227 | <pitch> 228 | <step>E</step> 229 | <octave>4</octave> 230 | </pitch> 231 | <duration>2</duration> 232 | <voice>1</voice> 233 | <type>eighth</type> 234 | <stem default-y="-10">up</stem> 235 | <beam number="1">begin</beam> 236 | </note> 237 | <note default-x="863"> 238 | <pitch> 239 | <step>F</step> 240 | <octave>4</octave> 241 | </pitch> 242 | <duration>2</duration> 243 | <voice>1</voice> 244 | <type>eighth</type> 245 | <stem default-y="-7.5">up</stem> 246 | <beam number="1">end</beam> 247 | </note> 248 | <barline location="right"> 249 | <bar-style>light-heavy</bar-style> 250 | </barline> 251 | </measure> 252 | </part> 253 | <!--=========================================================--> 254 | </score-partwise> 255 | -------------------------------------------------------------------------------- /tests/test_scores/musicxml/tuplet_score_1a.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd"> 3 | <score-partwise version="3.0"> 4 | <identification> 5 | <encoding> 6 | <software>Finale 2014 for Windows</software> 7 | <software>Dolet Light for Finale 2014</software> 8 | <encoding-date>2019-11-20</encoding-date> 9 | <supports attribute="new-system" element="print" type="yes" value="yes"/> 10 | <supports attribute="new-page" element="print" type="yes" value="yes"/> 11 | <supports element="accidental" type="yes"/> 12 | <supports element="beam" type="yes"/> 13 | <supports element="stem" type="yes"/> 14 | </encoding> 15 | </identification> 16 | <defaults> 17 | <scaling> 18 | <millimeters>7.2319</millimeters> 19 | <tenths>40</tenths> 20 | </scaling> 21 | <page-layout> 22 | <page-height>1545</page-height> 23 | <page-width>1194</page-width> 24 | <page-margins type="both"> 25 | <left-margin>70</left-margin> 26 | <right-margin>70</right-margin> 27 | <top-margin>88</top-margin> 28 | <bottom-margin>88</bottom-margin> 29 | </page-margins> 30 | </page-layout> 31 | <system-layout> 32 | <system-margins> 33 | <left-margin>0</left-margin> 34 | <right-margin>0</right-margin> 35 | </system-margins> 36 | <system-distance>121</system-distance> 37 | <top-system-distance>70</top-system-distance> 38 | </system-layout> 39 | <appearance> 40 | <line-width type="stem">0.7487</line-width> 41 | <line-width type="beam">5</line-width> 42 | <line-width type="staff">0.7487</line-width> 43 | <line-width type="light barline">0.7487</line-width> 44 | <line-width type="heavy barline">5</line-width> 45 | <line-width type="leger">0.7487</line-width> 46 | <line-width type="ending">0.7487</line-width> 47 | <line-width type="wedge">0.7487</line-width> 48 | <line-width type="enclosure">0.7487</line-width> 49 | <line-width type="tuplet bracket">0.7487</line-width> 50 | <note-size type="grace">60</note-size> 51 | <note-size type="cue">60</note-size> 52 | <distance type="hyphen">120</distance> 53 | <distance type="beam">8</distance> 54 | </appearance> 55 | <music-font font-family="Maestro,engraved" font-size="20.5"/> 56 | <word-font font-family="Times New Roman" font-size="10.25"/> 57 | </defaults> 58 | <credit page="1"> 59 | <credit-words default-x="70" default-y="1453" font-size="12" valign="top">Score</credit-words> 60 | </credit> 61 | <part-list> 62 | <score-part id="P1"> 63 | <part-name print-object="no">MusicXML Part</part-name> 64 | <score-instrument id="P1-I1"> 65 | <instrument-name>SmartMusic SoftSynth 1</instrument-name> 66 | </score-instrument> 67 | <midi-instrument id="P1-I1"> 68 | <midi-channel>1</midi-channel> 69 | <midi-bank>15489</midi-bank> 70 | <midi-program>1</midi-program> 71 | <volume>80</volume> 72 | <pan>0</pan> 73 | </midi-instrument> 74 | </score-part> 75 | </part-list> 76 | <!--=========================================================--> 77 | <part id="P1"> 78 | <measure number="1" width="983"> 79 | <print> 80 | <system-layout> 81 | <system-margins> 82 | <left-margin>70</left-margin> 83 | <right-margin>0</right-margin> 84 | </system-margins> 85 | <top-system-distance>211</top-system-distance> 86 | </system-layout> 87 | <measure-numbering>system</measure-numbering> 88 | </print> 89 | <attributes> 90 | <divisions>6</divisions> 91 | <key> 92 | <fifths>0</fifths> 93 | <mode>major</mode> 94 | </key> 95 | <time> 96 | <beats>4</beats> 97 | <beat-type>4</beat-type> 98 | </time> 99 | <clef> 100 | <sign>G</sign> 101 | <line>2</line> 102 | </clef> 103 | </attributes> 104 | <sound tempo="120"/> 105 | <note default-x="87"> 106 | <pitch> 107 | <step>C</step> 108 | <octave>4</octave> 109 | </pitch> 110 | <duration>4</duration> 111 | <voice>1</voice> 112 | <type>quarter</type> 113 | <time-modification> 114 | <actual-notes>3</actual-notes> 115 | <normal-notes>2</normal-notes> 116 | </time-modification> 117 | <stem default-y="-14.5">up</stem> 118 | <notations> 119 | <tuplet bracket="yes" number="1" type="start"/> 120 | </notations> 121 | </note> 122 | <note default-x="259"> 123 | <pitch> 124 | <step>D</step> 125 | <octave>4</octave> 126 | </pitch> 127 | <duration>4</duration> 128 | <voice>1</voice> 129 | <type>quarter</type> 130 | <time-modification> 131 | <actual-notes>3</actual-notes> 132 | <normal-notes>2</normal-notes> 133 | </time-modification> 134 | <stem default-y="-9.5">up</stem> 135 | </note> 136 | <note default-x="430"> 137 | <pitch> 138 | <step>E</step> 139 | <octave>4</octave> 140 | </pitch> 141 | <duration>4</duration> 142 | <voice>1</voice> 143 | <type>quarter</type> 144 | <time-modification> 145 | <actual-notes>3</actual-notes> 146 | <normal-notes>2</normal-notes> 147 | </time-modification> 148 | <stem default-y="-5">up</stem> 149 | <notations> 150 | <tuplet number="1" type="stop"/> 151 | </notations> 152 | </note> 153 | <note default-x="602"> 154 | <pitch> 155 | <step>G</step> 156 | <octave>4</octave> 157 | </pitch> 158 | <duration>12</duration> 159 | <voice>1</voice> 160 | <type>half</type> 161 | <stem default-y="5.5">up</stem> 162 | </note> 163 | <barline location="right"> 164 | <bar-style>light-heavy</bar-style> 165 | </barline> 166 | </measure> 167 | </part> 168 | <!--=========================================================--> 169 | </score-partwise> 170 | -------------------------------------------------------------------------------- /tests/test_scores/musicxml/tuplet_score_1b.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd"> 3 | <score-partwise version="3.0"> 4 | <identification> 5 | <encoding> 6 | <software>Finale 2014 for Windows</software> 7 | <software>Dolet Light for Finale 2014</software> 8 | <encoding-date>2019-11-20</encoding-date> 9 | <supports attribute="new-system" element="print" type="yes" value="yes"/> 10 | <supports attribute="new-page" element="print" type="yes" value="yes"/> 11 | <supports element="accidental" type="yes"/> 12 | <supports element="beam" type="yes"/> 13 | <supports element="stem" type="yes"/> 14 | </encoding> 15 | </identification> 16 | <defaults> 17 | <scaling> 18 | <millimeters>7.2319</millimeters> 19 | <tenths>40</tenths> 20 | </scaling> 21 | <page-layout> 22 | <page-height>1545</page-height> 23 | <page-width>1194</page-width> 24 | <page-margins type="both"> 25 | <left-margin>70</left-margin> 26 | <right-margin>70</right-margin> 27 | <top-margin>88</top-margin> 28 | <bottom-margin>88</bottom-margin> 29 | </page-margins> 30 | </page-layout> 31 | <system-layout> 32 | <system-margins> 33 | <left-margin>0</left-margin> 34 | <right-margin>0</right-margin> 35 | </system-margins> 36 | <system-distance>121</system-distance> 37 | <top-system-distance>70</top-system-distance> 38 | </system-layout> 39 | <appearance> 40 | <line-width type="stem">0.7487</line-width> 41 | <line-width type="beam">5</line-width> 42 | <line-width type="staff">0.7487</line-width> 43 | <line-width type="light barline">0.7487</line-width> 44 | <line-width type="heavy barline">5</line-width> 45 | <line-width type="leger">0.7487</line-width> 46 | <line-width type="ending">0.7487</line-width> 47 | <line-width type="wedge">0.7487</line-width> 48 | <line-width type="enclosure">0.7487</line-width> 49 | <line-width type="tuplet bracket">0.7487</line-width> 50 | <note-size type="grace">60</note-size> 51 | <note-size type="cue">60</note-size> 52 | <distance type="hyphen">120</distance> 53 | <distance type="beam">8</distance> 54 | </appearance> 55 | <music-font font-family="Maestro,engraved" font-size="20.5"/> 56 | <word-font font-family="Times New Roman" font-size="10.25"/> 57 | </defaults> 58 | <credit page="1"> 59 | <credit-words default-x="70" default-y="1453" font-size="12" valign="top">Score</credit-words> 60 | </credit> 61 | <part-list> 62 | <score-part id="P1"> 63 | <part-name print-object="no">MusicXML Part</part-name> 64 | <score-instrument id="P1-I1"> 65 | <instrument-name>SmartMusic SoftSynth 1</instrument-name> 66 | </score-instrument> 67 | <midi-instrument id="P1-I1"> 68 | <midi-channel>1</midi-channel> 69 | <midi-bank>15489</midi-bank> 70 | <midi-program>1</midi-program> 71 | <volume>80</volume> 72 | <pan>0</pan> 73 | </midi-instrument> 74 | </score-part> 75 | </part-list> 76 | <!--=========================================================--> 77 | <part id="P1"> 78 | <measure number="1" width="983"> 79 | <print> 80 | <system-layout> 81 | <system-margins> 82 | <left-margin>70</left-margin> 83 | <right-margin>0</right-margin> 84 | </system-margins> 85 | <top-system-distance>211</top-system-distance> 86 | </system-layout> 87 | <measure-numbering>system</measure-numbering> 88 | </print> 89 | <attributes> 90 | <divisions>2</divisions> 91 | <key> 92 | <fifths>0</fifths> 93 | <mode>major</mode> 94 | </key> 95 | <time> 96 | <beats>4</beats> 97 | <beat-type>4</beat-type> 98 | </time> 99 | <clef> 100 | <sign>G</sign> 101 | <line>2</line> 102 | </clef> 103 | </attributes> 104 | <sound tempo="120"/> 105 | <note default-x="87"> 106 | <pitch> 107 | <step>C</step> 108 | <octave>4</octave> 109 | </pitch> 110 | <duration>2</duration> 111 | <voice>1</voice> 112 | <type>quarter</type> 113 | <stem default-y="-14.5">up</stem> 114 | </note> 115 | <note default-x="332"> 116 | <pitch> 117 | <step>D</step> 118 | <octave>4</octave> 119 | </pitch> 120 | <duration>2</duration> 121 | <voice>1</voice> 122 | <type>quarter</type> 123 | <stem default-y="-9.5">up</stem> 124 | </note> 125 | <note default-x="577"> 126 | <pitch> 127 | <step>G</step> 128 | <octave>4</octave> 129 | </pitch> 130 | <duration>4</duration> 131 | <voice>1</voice> 132 | <type>half</type> 133 | <stem default-y="5.5">up</stem> 134 | </note> 135 | <barline location="right"> 136 | <bar-style>light-heavy</bar-style> 137 | </barline> 138 | </measure> 139 | </part> 140 | <!--=========================================================--> 141 | </score-partwise> 142 | -------------------------------------------------------------------------------- /tests/test_scores/polyphonic_score_1b.mei: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> 3 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> 4 | <mei xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.music-encoding.org/ns/mei" 5 | meiversion="4.0.0"> 6 | <meiHead> 7 | <fileDesc> 8 | <titleStmt> 9 | <title/> 10 | </titleStmt> 11 | <pubStmt/> 12 | <sourceDesc> 13 | <source> 14 | <titleStmt> 15 | <title/> 16 | </titleStmt> 17 | <pubStmt> 18 | <availability> 19 | <useRestrict>©</useRestrict> 20 | </availability> 21 | </pubStmt> 22 | <notesStmt> 23 | <annot>Source MusicXML file created using Finale 2014 for Windows and Dolet Light for Finale 2014 on <date>2019-08-24</date>.</annot> 24 | </notesStmt> 25 | </source> 26 | </sourceDesc> 27 | </fileDesc> 28 | <encodingDesc> 29 | <editorialDecl> 30 | <normalization> 31 | <p>Calculation of @tstamp and @tstamp2 values on control events, such as dir, dynam, 32 | hairpin, etc., includes MusicXML offset values.</p> 33 | <p>The parameters for musicxml2mei.xsl were set as follows: <list> 34 | <li>accidStyle: "attr", </li> 35 | <li>articStyle: "elem", </li> 36 | <li>formeWork: "strip", </li> 37 | <li>generateMIDI: "false", </li> 38 | <li>keepAttributes: "false", </li> 39 | <li>keepRights: "false", </li> 40 | <li>labelStyle: "attr", </li> 41 | <li>layout: "strip", </li> 42 | <li>tieStyle: "attr"</li> 43 | </list> 44 | </p> 45 | </normalization> 46 | </editorialDecl> 47 | </encodingDesc> 48 | <revisionDesc> 49 | <change n="1"> 50 | <respStmt/> 51 | <changeDesc> 52 | <p>Transcoded from a MusicXML version 3.0 file using an XSLT stylesheet (musicxml2mei v. 3.0).</p> 53 | </changeDesc> 54 | <date>2019-08-27</date> 55 | </change> 56 | </revisionDesc> 57 | </meiHead> 58 | <music> 59 | <body> 60 | <mdiv> 61 | <score> 62 | <scoreDef meter.count="4" meter.unit="4" key.sig="1s" key.mode="major"> 63 | <staffGrp symbol="bracket" barthru="true"> 64 | <staffDef n="1" xml:id="P1" label="MusicXML Part" lines="5" clef.line="2" clef.shape="G"/> 65 | <staffDef n="2" xml:id="P2" label="MusicXML Part" lines="5" clef.line="2" clef.shape="G"/> 66 | </staffGrp> 67 | </scoreDef> 68 | <section> 69 | <measure n="1" xml:id="d1e141"> 70 | <staff n="1"> 71 | <layer n="1"> 72 | <note xml:id="d1e173" pname="g" oct="4" dur="4" stem.dir="up"/> 73 | <beam> 74 | <note xml:id="d1e187" pname="g" oct="4" dur="8" stem.dir="up"/> 75 | <note xml:id="d1e203" pname="a" oct="4" dur="8" stem.dir="up"/> 76 | </beam> 77 | <beam> 78 | <note xml:id="d1e219" pname="b" oct="4" dur="8" stem.dir="down"/> 79 | <note xml:id="d1e235" pname="c" oct="5" dur="16" stem.dir="down"/> 80 | <note xml:id="d1e253" pname="a" oct="4" dur="16" stem.dir="down"/> 81 | </beam> 82 | <note xml:id="d1e271" pname="b" oct="4" dur="4" stem.dir="down"/> 83 | </layer> 84 | </staff> 85 | <staff n="2"> 86 | <layer n="1"> 87 | <note xml:id="d1e308" pname="g" oct="4" dur="1"/> 88 | </layer> 89 | </staff> 90 | <tempo tstamp="1" staff="1"/> 91 | <tempo tstamp="1" staff="2"/> 92 | </measure> 93 | <measure n="2" xml:id="d1e320"> 94 | <staff n="1"> 95 | <layer n="1"> 96 | <note xml:id="d1e322" pname="c" oct="5" dur="4" tie="i" stem.dir="down"/> 97 | <beam> 98 | <note xml:id="d1e339" pname="c" oct="5" dur="8" tie="t" stem.dir="down"/> 99 | <note xml:id="d1e358" pname="b" oct="4" dur="8" stem.dir="down"/> 100 | </beam> 101 | <note xml:id="d1e374" pname="a" oct="4" dur="4" stem.dir="up"/> 102 | <note xml:id="d1e388" pname="g" oct="4" dur="4" stem.dir="up"/> 103 | </layer> 104 | </staff> 105 | <staff n="2"> 106 | <layer n="1"> 107 | <note xml:id="d1e403" pname="a" oct="4" dur="2" stem.dir="up"/> 108 | <note xml:id="d1e417" pname="e" oct="4" dur="2" stem.dir="up"/> 109 | </layer> 110 | </staff> 111 | </measure> 112 | <measure n="3" xml:id="d1e431"> 113 | <staff n="1"> 114 | <layer n="1"> 115 | <note xml:id="d1e433" pname="f" oct="4" dur="2" stem.dir="up" accid.ges="s"/> 116 | <note xml:id="d1e449" pname="a" oct="4" dur="2" stem.dir="up"/> 117 | </layer> 118 | </staff> 119 | <staff n="2"> 120 | <layer n="1"> 121 | <note xml:id="d1e464" pname="d" oct="4" dur="4" stem.dir="up"/> 122 | <beam> 123 | <note xml:id="d1e478" pname="d" oct="4" dur="8" stem.dir="up"/> 124 | <note xml:id="d1e494" pname="e" oct="4" dur="8" stem.dir="up"/> 125 | </beam> 126 | <beam> 127 | <note xml:id="d1e510" pname="f" oct="4" dur="8" stem.dir="up" accid.ges="s"/> 128 | <note xml:id="d1e528" pname="e" oct="4" dur="8" stem.dir="up"/> 129 | <note xml:id="d1e544" pname="d" oct="4" dur="8" stem.dir="up"/> 130 | <note xml:id="d1e560" pname="a" oct="4" dur="8" stem.dir="up"/> 131 | </beam> 132 | </layer> 133 | </staff> 134 | </measure> 135 | <measure n="4" xml:id="d1e576" right="end"> 136 | <staff n="1"> 137 | <layer n="1"> 138 | <note xml:id="d1e578" pname="g" oct="4" dur="1"/> 139 | </layer> 140 | </staff> 141 | <staff n="2"> 142 | <layer n="1"> 143 | <note xml:id="d1e594" pname="g" oct="4" dur="1"/> 144 | </layer> 145 | </staff> 146 | </measure> 147 | </section> 148 | </score> 149 | </mdiv> 150 | </body> 151 | </music> 152 | </mei> 153 | -------------------------------------------------------------------------------- /tests/test_scores/test_all_details_1a.mei: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> 3 | <?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> 4 | <mei xmlns="http://www.music-encoding.org/ns/mei" 5 | xmlns:xlink="http://www.w3.org/1999/xlink" 6 | meiversion="5.0"> 7 | <meiHead> 8 | <fileDesc> 9 | <titleStmt> 10 | <title>Test file 1a for command line detail options 11 | 12 | 13 | 14 | 15 | 16 | 17 | </titleStmt> 18 | <pubStmt/> 19 | </source> 20 | </sourceDesc> 21 | </fileDesc> 22 | </meiHead> 23 | <music> 24 | <body> 25 | <mdiv> 26 | <score> 27 | <scoreDef meter.count="4" meter.unit="4" key.sig="0" key.mode="major"> 28 | <staffGrp> 29 | <staffDef n="1" xml:id="P1" lines="5" clef.line="2" clef.shape="G"/> 30 | </staffGrp> 31 | </scoreDef> 32 | <section> 33 | <measure n="1"> 34 | <staff n="1"> 35 | <layer n="1"> 36 | <note pname="b" oct="4" dur="4"> 37 | <verse n="1"> 38 | <syl>lyric1</syl> 39 | </verse> 40 | <verse n="2"> 41 | <syl>lyric2</syl> 42 | </verse> 43 | </note> 44 | <note pname="g" oct="4" dur="4"/> 45 | <note pname="d" oct="5" dur="4"/> 46 | <note pname="b" oct="4" dur="4"/> 47 | </layer> 48 | <layer n="2"> 49 | <note pname="g" oct="4" dur="4"/> 50 | <note pname="e" oct="4" dur="4"/> 51 | <note pname="g" oct="4" dur="4"/> 52 | <note pname="e" oct="4" dur="4"/> 53 | </layer> 54 | </staff> 55 | <dynam tstamp="1" place="below">p</dynam> 56 | </measure> 57 | <measure n="2" right="end"> 58 | <staff n="1"> 59 | <layer n="1"> 60 | <note pname="g" oct="5" dur="2"/> 61 | <note pname="f" oct="5" dur="2"/> 62 | </layer> 63 | <layer n="2"> 64 | <note pname="c" oct="5" dur="2"/> 65 | <note pname="d" oct="5" dur="2"/> 66 | </layer> 67 | <layer n="3"> 68 | <beam> 69 | <note pname="g" oct="3" dur="8" stem.dir="down"/> 70 | <note pname="a" oct="3" dur="8" stem.dir="down"/> 71 | <note pname="b" oct="3" dur="8" stem.dir="down"/> 72 | <note pname="c" oct="4" dur="8" tie="i" stem.dir="down"/> 73 | </beam> 74 | <beam> 75 | <note pname="c" oct="4" dur="8" tie="t" stem.dir="down"/> 76 | <note pname="a" oct="3" dur="8" stem.dir="down"/> 77 | </beam> 78 | <note pname="g" oct="3" dur="8" stem.dir="down"/> 79 | <rest dur="8" ploc="g" oloc="3"/> 80 | </layer> 81 | </staff> 82 | <dynam tstamp="2.5">mp</dynam> 83 | </measure> 84 | </section> 85 | </score> 86 | </mdiv> 87 | </body> 88 | </music> 89 | </mei> 90 | -------------------------------------------------------------------------------- /tests/test_scores/test_all_details_1b.mei: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> 3 | <?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> 4 | <mei xmlns="http://www.music-encoding.org/ns/mei" 5 | xmlns:xlink="http://www.w3.org/1999/xlink" 6 | meiversion="5.0"> 7 | <meiHead> 8 | <fileDesc> 9 | <titleStmt> 10 | <title>Test file 1b for command line detail options 11 | 12 | 13 | 14 | 15 | 16 | 17 | </titleStmt> 18 | <pubStmt/> 19 | </source> 20 | </sourceDesc> 21 | </fileDesc> 22 | </meiHead> 23 | <music> 24 | <body> 25 | <mdiv> 26 | <score> 27 | <scoreDef meter.count="4" meter.unit="4" key.sig="0" key.mode="major"> 28 | <staffGrp> 29 | <staffDef n="1" xml:id="P1" lines="5" clef.line="2" clef.shape="G"/> 30 | </staffGrp> 31 | </scoreDef> 32 | <section> 33 | <measure n="1"> 34 | <staff n="1"> 35 | <layer n="1"> 36 | <!-- one layer containing all the same notes 37 | as two layers in score 1a (in chords) 38 | --> 39 | <chord xml:id="firstChord" dur="4"> 40 | <note pname="b" oct="4"/> 41 | <note pname="g" oct="4"/> 42 | </chord> 43 | <chord dur="4"> 44 | <note pname="g" oct="4"/> 45 | <note pname="e" oct="4"/> 46 | </chord> 47 | <chord dur="4"> 48 | <note pname="d" oct="5"/> 49 | <note pname="g" oct="4"/> 50 | </chord> 51 | <chord dur="4"> 52 | <note pname="b" oct="4"/> 53 | <note pname="e" oct="4"/> 54 | </chord> 55 | </layer> 56 | </staff> 57 | <dynam tstamp="1" place="above">p</dynam> 58 | <slur startid="firstChord" endid="lastNote"/> 59 | </measure> 60 | <measure n="2" right="dbl"> 61 | <staff n="1"> 62 | <layer n="1"> 63 | <!-- one layer containing all the same notes 64 | as layers 1 & 2 in score 1a (in chords) 65 | --> 66 | <chord dur="2"> 67 | <note pname="g" oct="5"/> 68 | <note pname="c" oct="5"/> 69 | </chord> 70 | <chord dur="2"> 71 | <note pname="f" oct="5"/> 72 | <note pname="d" oct="5"/> 73 | </chord> 74 | </layer> 75 | <layer n="2"> 76 | <!-- this layer is in score 1a as layer 3 77 | --> 78 | <beam> 79 | <note pname="g" oct="3" dur="8" stem.dir="up"/> 80 | <note pname="a" oct="3" dur="8" stem.dir="up"/> 81 | <note pname="b" oct="3" dur="8" stem.dir="up"/> 82 | <note pname="c" oct="4" dur="8" stem.dir="up"/> 83 | </beam> 84 | <note pname="c" oct="4" dur="8" stem.dir="up"/> 85 | <note pname="a" oct="3" dur="8" stem.dir="up"/> 86 | <note xml:id="lastNote" pname="g" oct="3" dur="8" stem.dir="up"/> 87 | <rest dur="8" ploc="g" oloc="3"/> 88 | </layer> 89 | </staff> 90 | </measure> 91 | </section> 92 | </score> 93 | </mdiv> 94 | </body> 95 | </music> 96 | </mei> 97 | -------------------------------------------------------------------------------- /tests/test_scores/tie_score_1a.mei: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> 3 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> 4 | <mei xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.music-encoding.org/ns/mei" 5 | meiversion="4.0.0"> 6 | <meiHead> 7 | <fileDesc> 8 | <titleStmt> 9 | <title/> 10 | </titleStmt> 11 | <pubStmt/> 12 | <sourceDesc> 13 | <source> 14 | <titleStmt> 15 | <title/> 16 | </titleStmt> 17 | <pubStmt/> 18 | <notesStmt> 19 | <annot>Source MusicXML file created using Finale 2014 for Windows and Dolet Light for Finale 2014 on <date>2019-11-12</date>.</annot> 20 | </notesStmt> 21 | </source> 22 | </sourceDesc> 23 | </fileDesc> 24 | <encodingDesc> 25 | <editorialDecl> 26 | <normalization> 27 | <p>Calculation of @tstamp and @tstamp2 values on control events, such as dir, dynam, 28 | hairpin, etc., includes MusicXML offset values.</p> 29 | <p>The parameters for musicxml2mei.xsl were set as follows: <list> 30 | <li>accidStyle: "attr", </li> 31 | <li>articStyle: "elem", </li> 32 | <li>formeWork: "strip", </li> 33 | <li>generateMIDI: "false", </li> 34 | <li>keepAttributes: "false", </li> 35 | <li>keepRights: "false", </li> 36 | <li>labelStyle: "attr", </li> 37 | <li>layout: "strip", </li> 38 | <li>tieStyle: "attr"</li> 39 | </list> 40 | </p> 41 | </normalization> 42 | </editorialDecl> 43 | </encodingDesc> 44 | <revisionDesc> 45 | <change n="1"> 46 | <respStmt/> 47 | <changeDesc> 48 | <p>Transcoded from a MusicXML version 3.0 file using an XSLT stylesheet (musicxml2mei v. 3.0).</p> 49 | </changeDesc> 50 | <date>2019-11-12</date> 51 | </change> 52 | </revisionDesc> 53 | </meiHead> 54 | <music> 55 | <body> 56 | <mdiv> 57 | <score> 58 | <scoreDef meter.count="4" meter.unit="4" key.sig="0" key.mode="major"> 59 | <staffGrp> 60 | <staffDef n="1" xml:id="P1" label="MusicXML Part" lines="5" clef.line="2" clef.shape="G"/> 61 | </staffGrp> 62 | </scoreDef> 63 | <section> 64 | <measure n="1" xml:id="d1e98" right="end"> 65 | <staff n="1"> 66 | <layer n="1"> 67 | <beam> 68 | <note xml:id="d1e130" pname="e" oct="4" dur="8" tie="i" stem.dir="up"/> 69 | <note xml:id="d1e149" pname="e" oct="4" dur="16" tie="t" stem.dir="up"/> 70 | <note xml:id="d1e170" pname="d" oct="4" dur="16" stem.dir="up"/> 71 | </beam> 72 | <beam> 73 | <chord xml:id="d18e1" dur="8" stem.dir="up"> 74 | <note xml:id="d1e188" pname="c" oct="4" tie="i"/> 75 | <note xml:id="d1e207" pname="e" oct="4"/> 76 | </chord> 77 | <note xml:id="d1e222" pname="c" oct="4" dur="16" tie="t" stem.dir="up"/> 78 | <note xml:id="d1e243" pname="d" oct="4" dur="16" stem.dir="up"/> 79 | </beam> 80 | <chord xml:id="d26e1" dur="4" stem.dir="up"> 81 | <note xml:id="d1e261" pname="e" oct="4"/> 82 | <note xml:id="d1e276" pname="g" oct="4"/> 83 | <note xml:id="d1e291" pname="c" oct="5"/> 84 | </chord> 85 | <beam> 86 | <note xml:id="d1e306" pname="e" oct="4" dur="8" stem.dir="up"/> 87 | <note xml:id="d1e322" pname="f" oct="4" dur="8" tie="i" stem.dir="up"/> 88 | </beam> 89 | </layer> 90 | </staff> 91 | <tempo tstamp="1" staff="1"/> 92 | <!--Unterminated tie.--><!--<tie tstamp="4.5" tstamp.ges="14" startid="d1e322" curvedir="below"/>--></measure> 93 | </section> 94 | </score> 95 | </mdiv> 96 | </body> 97 | </music> 98 | </mei> 99 | -------------------------------------------------------------------------------- /tests/test_scores/tie_score_1b.mei: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> 3 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> 4 | <mei xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.music-encoding.org/ns/mei" 5 | meiversion="4.0.0"> 6 | <meiHead> 7 | <fileDesc> 8 | <titleStmt> 9 | <title/> 10 | </titleStmt> 11 | <pubStmt/> 12 | <sourceDesc> 13 | <source> 14 | <titleStmt> 15 | <title/> 16 | </titleStmt> 17 | <pubStmt/> 18 | <notesStmt> 19 | <annot>Source MusicXML file created using Finale 2014 for Windows and Dolet Light for Finale 2014 on <date>2019-11-12</date>.</annot> 20 | </notesStmt> 21 | </source> 22 | </sourceDesc> 23 | </fileDesc> 24 | <encodingDesc> 25 | <editorialDecl> 26 | <normalization> 27 | <p>Calculation of @tstamp and @tstamp2 values on control events, such as dir, dynam, 28 | hairpin, etc., includes MusicXML offset values.</p> 29 | <p>The parameters for musicxml2mei.xsl were set as follows: <list> 30 | <li>accidStyle: "attr", </li> 31 | <li>articStyle: "elem", </li> 32 | <li>formeWork: "strip", </li> 33 | <li>generateMIDI: "false", </li> 34 | <li>keepAttributes: "false", </li> 35 | <li>keepRights: "false", </li> 36 | <li>labelStyle: "attr", </li> 37 | <li>layout: "strip", </li> 38 | <li>tieStyle: "attr"</li> 39 | </list> 40 | </p> 41 | </normalization> 42 | </editorialDecl> 43 | </encodingDesc> 44 | <revisionDesc> 45 | <change n="1"> 46 | <respStmt/> 47 | <changeDesc> 48 | <p>Transcoded from a MusicXML version 3.0 file using an XSLT stylesheet (musicxml2mei v. 3.0).</p> 49 | </changeDesc> 50 | <date>2019-11-12</date> 51 | </change> 52 | </revisionDesc> 53 | </meiHead> 54 | <music> 55 | <body> 56 | <mdiv> 57 | <score> 58 | <scoreDef meter.count="4" meter.unit="4" key.sig="0" key.mode="major"> 59 | <staffGrp> 60 | <staffDef n="1" xml:id="P1" label="MusicXML Part" lines="5" clef.line="2" clef.shape="G"/> 61 | </staffGrp> 62 | </scoreDef> 63 | <section> 64 | <measure n="1" xml:id="d1e98" right="end"> 65 | <staff n="1"> 66 | <layer n="1"> 67 | <beam> 68 | <note xml:id="d1e130" pname="e" oct="4" dur="8" tie="i" stem.dir="up"/> 69 | <note xml:id="d1e149" pname="e" oct="4" dur="16" tie="t" stem.dir="up"/> 70 | <note xml:id="d1e170" pname="d" oct="4" dur="16" stem.dir="up"/> 71 | </beam> 72 | <beam> 73 | <chord xml:id="d18e1" dur="8" stem.dir="up"> 74 | <note xml:id="d1e188" pname="c" oct="4"/> 75 | <note xml:id="d1e204" pname="e" oct="4"/> 76 | </chord> 77 | <note xml:id="d1e219" pname="c" oct="4" dur="16" stem.dir="up"/> 78 | <note xml:id="d1e237" pname="d" oct="4" dur="16" stem.dir="up"/> 79 | </beam> 80 | <chord xml:id="d26e1" dur="4" stem.dir="up"> 81 | <note xml:id="d1e255" pname="e" oct="4"/> 82 | <note xml:id="d1e270" pname="g" oct="4"/> 83 | <note xml:id="d1e285" pname="c" oct="5"/> 84 | </chord> 85 | <beam> 86 | <note xml:id="d1e300" pname="e" oct="4" dur="8" stem.dir="up"/> 87 | <note xml:id="d1e316" pname="f" oct="4" dur="8" stem.dir="up"/> 88 | </beam> 89 | </layer> 90 | </staff> 91 | <tempo tstamp="1" staff="1"/> 92 | </measure> 93 | </section> 94 | </score> 95 | </mdiv> 96 | </body> 97 | </music> 98 | </mei> 99 | -------------------------------------------------------------------------------- /tests/test_scores/tie_score_2a.mei: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> 3 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> 4 | <mei xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.music-encoding.org/ns/mei" 5 | meiversion="4.0.0"> 6 | <meiHead> 7 | <fileDesc> 8 | <titleStmt> 9 | <title/> 10 | </titleStmt> 11 | <pubStmt/> 12 | <sourceDesc> 13 | <source> 14 | <titleStmt> 15 | <title/> 16 | </titleStmt> 17 | <pubStmt/> 18 | <notesStmt> 19 | <annot>Source MusicXML file created using Finale 2014 for Windows and Dolet Light for Finale 2014 on <date>2019-11-21</date>.</annot> 20 | </notesStmt> 21 | </source> 22 | </sourceDesc> 23 | </fileDesc> 24 | <encodingDesc> 25 | <editorialDecl> 26 | <normalization> 27 | <p>Calculation of @tstamp and @tstamp2 values on control events, such as dir, dynam, 28 | hairpin, etc., includes MusicXML offset values.</p> 29 | <p>The parameters for musicxml2mei.xsl were set as follows: <list> 30 | <li>accidStyle: "attr", </li> 31 | <li>articStyle: "elem", </li> 32 | <li>formeWork: "strip", </li> 33 | <li>generateMIDI: "false", </li> 34 | <li>keepAttributes: "false", </li> 35 | <li>keepRights: "false", </li> 36 | <li>labelStyle: "attr", </li> 37 | <li>layout: "strip", </li> 38 | <li>tieStyle: "attr"</li> 39 | </list> 40 | </p> 41 | </normalization> 42 | </editorialDecl> 43 | </encodingDesc> 44 | <revisionDesc> 45 | <change n="1"> 46 | <respStmt/> 47 | <changeDesc> 48 | <p>Transcoded from a MusicXML version 3.0 file using an XSLT stylesheet (musicxml2mei v. 3.0).</p> 49 | </changeDesc> 50 | <date>2019-11-21</date> 51 | </change> 52 | </revisionDesc> 53 | </meiHead> 54 | <music> 55 | <body> 56 | <mdiv> 57 | <score> 58 | <scoreDef meter.count="4" meter.unit="4" key.sig="0" key.mode="major"> 59 | <staffGrp> 60 | <staffDef n="1" xml:id="P1" label="MusicXML Part" lines="5" clef.line="2" clef.shape="G"/> 61 | </staffGrp> 62 | </scoreDef> 63 | <section> 64 | <measure n="1" xml:id="d1e98" right="end"> 65 | <staff n="1"> 66 | <layer n="1"> 67 | <beam> 68 | <note xml:id="d1e130" pname="e" oct="4" dur="8" tie="i" stem.dir="up"/> 69 | <note xml:id="d1e149" pname="e" oct="4" dur="16" tie="t" stem.dir="up"/> 70 | <note xml:id="d1e170" pname="d" oct="4" dur="16" stem.dir="up"/> 71 | </beam> 72 | <beam> 73 | <chord xml:id="d18e1" dur="8" stem.dir="up"> 74 | <note xml:id="d1e188" pname="c" oct="4" tie="i"/> 75 | <note xml:id="d1e207" pname="e" oct="4"/> 76 | </chord> 77 | <note xml:id="d1e222" pname="c" oct="4" dur="16" tie="t" stem.dir="up"/> 78 | <note xml:id="d1e243" pname="d" oct="4" dur="16" stem.dir="up"/> 79 | </beam> 80 | <chord xml:id="d26e1" dur="4" stem.dir="up"> 81 | <note xml:id="d1e261" pname="e" oct="4"/> 82 | <note xml:id="d1e276" pname="g" oct="4"/> 83 | <note xml:id="d1e291" pname="c" oct="5"/> 84 | </chord> 85 | <beam> 86 | <note xml:id="d1e306" pname="e" oct="4" dur="8" stem.dir="up"/> 87 | <note xml:id="d1e322" pname="f" oct="4" dur="8" tie="i" stem.dir="up"/> 88 | </beam> 89 | </layer> 90 | <layer n="2"> 91 | <note xml:id="d1e344" pname="a" oct="3" dur="2" tie="i" stem.dir="down"/> 92 | <note xml:id="d1e361" pname="a" oct="3" dur="2" tie="t" stem.dir="down"/> 93 | </layer> 94 | </staff> 95 | <tempo tstamp="1" staff="1"/> 96 | <!--Unterminated tie.--><!--<tie tstamp="4.5" tstamp.ges="14" startid="d1e322" curvedir="below"/>--></measure> 97 | </section> 98 | </score> 99 | </mdiv> 100 | </body> 101 | </music> 102 | </mei> 103 | -------------------------------------------------------------------------------- /tests/test_scores/tie_score_2b.mei: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> 3 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> 4 | <mei xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.music-encoding.org/ns/mei" 5 | meiversion="4.0.0"> 6 | <meiHead> 7 | <fileDesc> 8 | <titleStmt> 9 | <title/> 10 | </titleStmt> 11 | <pubStmt/> 12 | <sourceDesc> 13 | <source> 14 | <titleStmt> 15 | <title/> 16 | </titleStmt> 17 | <pubStmt/> 18 | <notesStmt> 19 | <annot>Source MusicXML file created using Finale 2014 for Windows and Dolet Light for Finale 2014 on <date>2019-11-21</date>.</annot> 20 | </notesStmt> 21 | </source> 22 | </sourceDesc> 23 | </fileDesc> 24 | <encodingDesc> 25 | <editorialDecl> 26 | <normalization> 27 | <p>Calculation of @tstamp and @tstamp2 values on control events, such as dir, dynam, 28 | hairpin, etc., includes MusicXML offset values.</p> 29 | <p>The parameters for musicxml2mei.xsl were set as follows: <list> 30 | <li>accidStyle: "attr", </li> 31 | <li>articStyle: "elem", </li> 32 | <li>formeWork: "strip", </li> 33 | <li>generateMIDI: "false", </li> 34 | <li>keepAttributes: "false", </li> 35 | <li>keepRights: "false", </li> 36 | <li>labelStyle: "attr", </li> 37 | <li>layout: "strip", </li> 38 | <li>tieStyle: "attr"</li> 39 | </list> 40 | </p> 41 | </normalization> 42 | </editorialDecl> 43 | </encodingDesc> 44 | <revisionDesc> 45 | <change n="1"> 46 | <respStmt/> 47 | <changeDesc> 48 | <p>Transcoded from a MusicXML version 3.0 file using an XSLT stylesheet (musicxml2mei v. 3.0).</p> 49 | </changeDesc> 50 | <date>2019-11-21</date> 51 | </change> 52 | </revisionDesc> 53 | </meiHead> 54 | <music> 55 | <body> 56 | <mdiv> 57 | <score> 58 | <scoreDef meter.count="4" meter.unit="4" key.sig="0" key.mode="major"> 59 | <staffGrp> 60 | <staffDef n="1" xml:id="P1" label="MusicXML Part" lines="5" clef.line="2" clef.shape="G"/> 61 | </staffGrp> 62 | </scoreDef> 63 | <section> 64 | <measure n="1" xml:id="d1e98" right="end"> 65 | <staff n="1"> 66 | <layer n="1"> 67 | <beam> 68 | <note xml:id="d1e130" pname="e" oct="4" dur="8" tie="i" stem.dir="up"/> 69 | <note xml:id="d1e149" pname="e" oct="4" dur="16" tie="t" stem.dir="up"/> 70 | <note xml:id="d1e170" pname="d" oct="4" dur="16" stem.dir="up"/> 71 | </beam> 72 | <beam> 73 | <chord xml:id="d18e1" dur="8" stem.dir="up"> 74 | <note xml:id="d1e188" pname="c" oct="4" tie="i"/> 75 | <note xml:id="d1e207" pname="e" oct="4"/> 76 | </chord> 77 | <note xml:id="d1e222" pname="c" oct="4" dur="16" tie="t" stem.dir="up"/> 78 | <note xml:id="d1e243" pname="d" oct="4" dur="16" stem.dir="up"/> 79 | </beam> 80 | <chord xml:id="d26e1" dur="4" stem.dir="up"> 81 | <note xml:id="d1e261" pname="e" oct="4"/> 82 | <note xml:id="d1e276" pname="g" oct="4"/> 83 | <note xml:id="d1e291" pname="c" oct="5"/> 84 | </chord> 85 | <beam> 86 | <note xml:id="d1e306" pname="e" oct="4" dur="8" stem.dir="up"/> 87 | <note xml:id="d1e322" pname="f" oct="4" dur="8" tie="i" stem.dir="up"/> 88 | </beam> 89 | </layer> 90 | <layer n="2"> 91 | <note xml:id="d1e344" pname="a" oct="3" dur="2" stem.dir="down"/> 92 | <note xml:id="d1e358" pname="a" oct="3" dur="2" stem.dir="down"/> 93 | </layer> 94 | </staff> 95 | <tempo tstamp="1" staff="1"/> 96 | <!--Unterminated tie.--><!--<tie tstamp="4.5" tstamp.ges="14" startid="d1e322" curvedir="below"/>--></measure> 97 | </section> 98 | </score> 99 | </mdiv> 100 | </body> 101 | </music> 102 | </mei> 103 | -------------------------------------------------------------------------------- /tests/test_scores/tuplet_score_1a.mei: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> 3 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> 4 | <mei xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.music-encoding.org/ns/mei" 5 | meiversion="4.0.0"> 6 | <meiHead> 7 | <fileDesc> 8 | <titleStmt> 9 | <title/> 10 | </titleStmt> 11 | <pubStmt/> 12 | <sourceDesc> 13 | <source> 14 | <titleStmt> 15 | <title/> 16 | </titleStmt> 17 | <pubStmt/> 18 | <notesStmt> 19 | <annot>Source MusicXML file created using Finale 2014 for Windows and Dolet Light for Finale 2014 on <date>2019-11-20</date>.</annot> 20 | </notesStmt> 21 | </source> 22 | </sourceDesc> 23 | </fileDesc> 24 | <encodingDesc> 25 | <editorialDecl> 26 | <normalization> 27 | <p>Calculation of @tstamp and @tstamp2 values on control events, such as dir, dynam, 28 | hairpin, etc., includes MusicXML offset values.</p> 29 | <p>The parameters for musicxml2mei.xsl were set as follows: <list> 30 | <li>accidStyle: "attr", </li> 31 | <li>articStyle: "elem", </li> 32 | <li>formeWork: "strip", </li> 33 | <li>generateMIDI: "false", </li> 34 | <li>keepAttributes: "false", </li> 35 | <li>keepRights: "false", </li> 36 | <li>labelStyle: "attr", </li> 37 | <li>layout: "strip", </li> 38 | <li>tieStyle: "attr"</li> 39 | </list> 40 | </p> 41 | </normalization> 42 | </editorialDecl> 43 | </encodingDesc> 44 | <revisionDesc> 45 | <change n="1"> 46 | <respStmt/> 47 | <changeDesc> 48 | <p>Transcoded from a MusicXML version 3.0 file using an XSLT stylesheet (musicxml2mei v. 3.0).</p> 49 | </changeDesc> 50 | <date>2019-11-20</date> 51 | </change> 52 | </revisionDesc> 53 | </meiHead> 54 | <music> 55 | <body> 56 | <mdiv> 57 | <score> 58 | <scoreDef meter.count="4" meter.unit="4" key.sig="0" key.mode="major"> 59 | <staffGrp> 60 | <staffDef n="1" xml:id="P1" label="MusicXML Part" lines="5" clef.line="2" clef.shape="G"/> 61 | </staffGrp> 62 | </scoreDef> 63 | <section> 64 | <measure n="1" xml:id="d1e98" right="end"> 65 | <staff n="1"> 66 | <layer n="1"> 67 | <tuplet num="3" numbase="2" bracket.visible="true"> 68 | <note xml:id="d1e130" pname="c" oct="4" dur="4" stem.dir="up"/> 69 | <note xml:id="d1e151" pname="d" oct="4" dur="4" stem.dir="up"/> 70 | <note xml:id="d1e170" pname="e" oct="4" dur="4" stem.dir="up"/> 71 | </tuplet> 72 | <note xml:id="d1e191" pname="g" oct="4" dur="2" stem.dir="up"/> 73 | </layer> 74 | </staff> 75 | <tempo tstamp="1" staff="1"/> 76 | </measure> 77 | </section> 78 | </score> 79 | </mdiv> 80 | </body> 81 | </music> 82 | </mei> 83 | -------------------------------------------------------------------------------- /tests/test_scores/tuplet_score_1b.mei: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?> 3 | <?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> 4 | <mei xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.music-encoding.org/ns/mei" 5 | meiversion="4.0.0"> 6 | <meiHead> 7 | <fileDesc> 8 | <titleStmt> 9 | <title/> 10 | </titleStmt> 11 | <pubStmt/> 12 | <sourceDesc> 13 | <source> 14 | <titleStmt> 15 | <title/> 16 | </titleStmt> 17 | <pubStmt/> 18 | <notesStmt> 19 | <annot>Source MusicXML file created using Finale 2014 for Windows and Dolet Light for Finale 2014 on <date>2019-11-20</date>.</annot> 20 | </notesStmt> 21 | </source> 22 | </sourceDesc> 23 | </fileDesc> 24 | <encodingDesc> 25 | <editorialDecl> 26 | <normalization> 27 | <p>Calculation of @tstamp and @tstamp2 values on control events, such as dir, dynam, 28 | hairpin, etc., includes MusicXML offset values.</p> 29 | <p>The parameters for musicxml2mei.xsl were set as follows: <list> 30 | <li>accidStyle: "attr", </li> 31 | <li>articStyle: "elem", </li> 32 | <li>formeWork: "strip", </li> 33 | <li>generateMIDI: "false", </li> 34 | <li>keepAttributes: "false", </li> 35 | <li>keepRights: "false", </li> 36 | <li>labelStyle: "attr", </li> 37 | <li>layout: "strip", </li> 38 | <li>tieStyle: "attr"</li> 39 | </list> 40 | </p> 41 | </normalization> 42 | </editorialDecl> 43 | </encodingDesc> 44 | <revisionDesc> 45 | <change n="1"> 46 | <respStmt/> 47 | <changeDesc> 48 | <p>Transcoded from a MusicXML version 3.0 file using an XSLT stylesheet (musicxml2mei v. 3.0).</p> 49 | </changeDesc> 50 | <date>2019-11-20</date> 51 | </change> 52 | </revisionDesc> 53 | </meiHead> 54 | <music> 55 | <body> 56 | <mdiv> 57 | <score> 58 | <scoreDef meter.count="4" meter.unit="4" key.sig="0" key.mode="major"> 59 | <staffGrp> 60 | <staffDef n="1" xml:id="P1" label="MusicXML Part" lines="5" clef.line="2" clef.shape="G"/> 61 | </staffGrp> 62 | </scoreDef> 63 | <section> 64 | <measure n="1" xml:id="d1e98" right="end"> 65 | <staff n="1"> 66 | <layer n="1"> 67 | <note xml:id="d1e130" pname="c" oct="4" dur="4" stem.dir="up"/> 68 | <note xml:id="d1e144" pname="d" oct="4" dur="4" stem.dir="up"/> 69 | <note xml:id="d1e158" pname="g" oct="4" dur="2" stem.dir="up"/> 70 | </layer> 71 | </staff> 72 | <tempo tstamp="1" staff="1"/> 73 | </measure> 74 | </section> 75 | </score> 76 | </mdiv> 77 | </body> 78 | </music> 79 | </mei> 80 | -------------------------------------------------------------------------------- /tests/test_utils.py: -------------------------------------------------------------------------------- 1 | import music21 as m21 2 | from musicdiff import M21Utils 3 | 4 | def test_note2tuple1(): 5 | n = m21.note.Note(nameWithOctave='D#5') 6 | expected_tuple = ("D5","sharp",False) 7 | assert(M21Utils.note2tuple(n) == expected_tuple ) 8 | 9 | def test_note2tuple2(): 10 | n = m21.note.Note(nameWithOctave='D--5') 11 | expected_tuple = ("D5","double-flat",False) 12 | assert(M21Utils.note2tuple(n) == expected_tuple ) 13 | 14 | def test_note2tuple3(): 15 | n = m21.note.Note(nameWithOctave='D--5') 16 | n.tie = m21.tie.Tie('start') 17 | expected_tuple = ("D5","double-flat",True) 18 | assert(M21Utils.note2tuple(n) == expected_tuple ) 19 | 20 | def test_note2tuple4(): 21 | n = m21.note.Note(nameWithOctave='D--5') 22 | n.tie = m21.tie.Tie('stop') 23 | expected_tuple = ("D5","double-flat",False) 24 | assert(M21Utils.note2tuple(n) == expected_tuple ) 25 | --------------------------------------------------------------------------------