musicdiff


Namemusicdiff JSON
Version 4.0.0 PyPI version JSON
download
home_pagehttps://github.com/gregchapman-dev/musicdiff
SummaryA music score notation diff package
upload_time2024-08-09 20:05:37
maintainerNone
docs_urlNone
authorGreg Chapman
requires_python>=3.10
licenseNone
keywords music score notation diff compare omr optical music recognition assess assessment comparison music21
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # musicdiff
A Python3 package (and command-line tool) for computing and visualizing (or describing) the notation differences between two music scores.

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.

musicdiff is derived from: [music-score-diff](https://github.com/fosfrancesco/music-score-diff.git)
    by [Francesco Foscarin](https://github.com/fosfrancesco).

## Setup
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+.

## Usage
On the command line:

    python3 -m musicdiff -i decoratednotesandrests lyrics style -x beams -- file1.musicxml file2.krn

    arguments:
      -i/--include  one or more named details to include in comparison (the default is allobjects,
                    a.k.a. decoratednotesandrests and otherobjects). Can be decoratednotesandrests,
                    otherobjects, allobjects, or any combination of those and/or the following:
                    notesandrests; the aforementioned note decorations: beams, tremolos, ornaments,
                    articulations, ties, slurs; the other objects: signatures, directions,
                    barlines, staffdetails, chordsymbols, ottavas, arpeggios, and lyrics; and
                    a final few details that are not found in allobjects: style, metadata, and
                    voicing.  voicing compares how notes are included in voices and chords (by
                    default this is ignored).
      -x/--exclude  one or more named details to exclude from comparison.  Can be any of the
                    named details accepted by -i/--include.
      -o/--output   one or both of two output formats: text (or t) or visual (or v); the default
                    is visual). visual (or v) requests production of marked-up score PDFs; text
                    (or t) requests production of diff-like text output.

      file1         first music score file to compare (any format music21 or converter21 can parse)
      file2         second music score file to compare (any format music21 or converter21 can parse)

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.

## Documentation
You can find the musicdiff API documentation [here](https://gregchapman-dev.github.io/musicdiff).

## Citing
If you use this work in any research, please cite the relevant paper:

```
@inproceedings{foscarin2019diff,
  title={A diff procedure for music score files},
  author={Foscarin, Francesco and Jacquemard, Florent and Fournier-S’niehotta, Raphael},
  booktitle={6th International Conference on Digital Libraries for Musicology},
  pages={58--64},
  year={2019}
}
```

The paper is freely available [here](https://hal.inria.fr/hal-02267454v2/document).

## Acknowledgment
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.

## License
The MIT License (MIT)
Copyright (c) 2022-2024 Francesco Foscarin, Greg Chapman

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:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

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.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gregchapman-dev/musicdiff",
    "name": "musicdiff",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "music, score, notation, diff, compare, OMR, Optical Music Recognition, assess, assessment, comparison, music21",
    "author": "Greg Chapman",
    "author_email": "gregc@mac.com",
    "download_url": "https://files.pythonhosted.org/packages/9b/6c/03870d4944b1ab6f543ad3391848ea025f2fa84e723d73ecbf5e218a2d12/musicdiff-4.0.0.tar.gz",
    "platform": null,
    "description": "# musicdiff\nA Python3 package (and command-line tool) for computing and visualizing (or describing) the notation differences between two music scores.\n\nmusicdiff 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.\n\nmusicdiff is derived from: [music-score-diff](https://github.com/fosfrancesco/music-score-diff.git)\n    by [Francesco Foscarin](https://github.com/fosfrancesco).\n\n## Setup\nDepends 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+.\n\n## Usage\nOn the command line:\n\n    python3 -m musicdiff -i decoratednotesandrests lyrics style -x beams -- file1.musicxml file2.krn\n\n    arguments:\n      -i/--include  one or more named details to include in comparison (the default is allobjects,\n                    a.k.a. decoratednotesandrests and otherobjects). Can be decoratednotesandrests,\n                    otherobjects, allobjects, or any combination of those and/or the following:\n                    notesandrests; the aforementioned note decorations: beams, tremolos, ornaments,\n                    articulations, ties, slurs; the other objects: signatures, directions,\n                    barlines, staffdetails, chordsymbols, ottavas, arpeggios, and lyrics; and\n                    a final few details that are not found in allobjects: style, metadata, and\n                    voicing.  voicing compares how notes are included in voices and chords (by\n                    default this is ignored).\n      -x/--exclude  one or more named details to exclude from comparison.  Can be any of the\n                    named details accepted by -i/--include.\n      -o/--output   one or both of two output formats: text (or t) or visual (or v); the default\n                    is visual). visual (or v) requests production of marked-up score PDFs; text\n                    (or t) requests production of diff-like text output.\n\n      file1         first music score file to compare (any format music21 or converter21 can parse)\n      file2         second music score file to compare (any format music21 or converter21 can parse)\n\nmusicdiff 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.\n\n## Documentation\nYou can find the musicdiff API documentation [here](https://gregchapman-dev.github.io/musicdiff).\n\n## Citing\nIf you use this work in any research, please cite the relevant paper:\n\n```\n@inproceedings{foscarin2019diff,\n  title={A diff procedure for music score files},\n  author={Foscarin, Francesco and Jacquemard, Florent and Fournier-S\u2019niehotta, Raphael},\n  booktitle={6th International Conference on Digital Libraries for Musicology},\n  pages={58--64},\n  year={2019}\n}\n```\n\nThe paper is freely available [here](https://hal.inria.fr/hal-02267454v2/document).\n\n## Acknowledgment\nMany 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.\n\n## License\nThe MIT License (MIT)\nCopyright (c) 2022-2024 Francesco Foscarin, Greg Chapman\n\nPermission 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE 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.\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A music score notation diff package",
    "version": "4.0.0",
    "project_urls": {
        "Bug Reports": "https://github.com/gregchapman-dev/musicdiff/issues",
        "Documentation": "https://gregchapman-dev.github.io/musicdiff",
        "Homepage": "https://github.com/gregchapman-dev/musicdiff",
        "Source": "https://github.com/gregchapman-dev/musicdiff"
    },
    "split_keywords": [
        "music",
        " score",
        " notation",
        " diff",
        " compare",
        " omr",
        " optical music recognition",
        " assess",
        " assessment",
        " comparison",
        " music21"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "41e1fef2829b958c6f49a486231342fb4d3fd7d1ecfffb880250efd4d554c69c",
                "md5": "0ed6179bb0ac264a17e7d4e6862332f7",
                "sha256": "a445eea04c17c8705287160c381a7990d8523ff8590c16e249af238808fa276f"
            },
            "downloads": -1,
            "filename": "musicdiff-4.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0ed6179bb0ac264a17e7d4e6862332f7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 58292,
            "upload_time": "2024-08-09T20:05:36",
            "upload_time_iso_8601": "2024-08-09T20:05:36.429744Z",
            "url": "https://files.pythonhosted.org/packages/41/e1/fef2829b958c6f49a486231342fb4d3fd7d1ecfffb880250efd4d554c69c/musicdiff-4.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9b6c03870d4944b1ab6f543ad3391848ea025f2fa84e723d73ecbf5e218a2d12",
                "md5": "7e4eb3dacff6473d3fdaafdf5366cc72",
                "sha256": "ca820172025eb7fed0c1007a3f6545710949e4a0bf57343a9653fb27cc5aa35b"
            },
            "downloads": -1,
            "filename": "musicdiff-4.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7e4eb3dacff6473d3fdaafdf5366cc72",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 60506,
            "upload_time": "2024-08-09T20:05:37",
            "upload_time_iso_8601": "2024-08-09T20:05:37.611439Z",
            "url": "https://files.pythonhosted.org/packages/9b/6c/03870d4944b1ab6f543ad3391848ea025f2fa84e723d73ecbf5e218a2d12/musicdiff-4.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-09 20:05:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gregchapman-dev",
    "github_project": "musicdiff",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "musicdiff"
}
        
Elapsed time: 0.26684s