You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-8Lines changed: 23 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,43 @@
1
1
# musicdiff
2
-
A Python3 package (and command-line tool) for computing and visualizing the notation differences between two music scores.
2
+
A Python3 package (and command-line tool) for computing and visualizing (or describing) the notation differences between two music scores.
3
3
4
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
5
6
6
musicdiff is derived from: [music-score-diff](https://github.com/fosfrancesco/music-score-diff.git)
7
7
by [Francesco Foscarin](https://github.com/fosfrancesco).
8
8
9
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.1+). 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+.
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.2+). 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+.
file1 first music score file to compare (any format music21 can parse)
19
-
file2 second music score file to compare (any format music21 can parse)
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 both of two output formats: text (or t) or visual (or v); the default
30
+
is visual). visual (or v) requests production of marked-up score PDFs; text
31
+
(or t) requests production of diff-like text output.
32
+
33
+
file1 first music score file to compare (any format music21 or converter21 can parse)
34
+
file2 second music score file to compare (any format music21 or converter21 can parse)
20
35
21
36
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.
22
37
23
38
A google colab notebook is available [here](examples/musicdiff_demo.ipynb).
24
39
25
-
If you are interested in calling lower-level musicdiff APIs to do more complicated things than just visualization in PDFs, 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.
40
+
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.
26
41
27
42
## Documentation
28
43
You can find the musicdiff API documentation [here](https://gregchapman-dev.github.io/musicdiff).
@@ -46,4 +61,4 @@ The paper is freely available [here](https://hal.inria.fr/hal-02267454v2/documen
46
61
Licensed under the [MIT License](LICENSE).
47
62
48
63
## Acknowledgment
49
-
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.
64
+
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.
0 commit comments