Skip to main content

A music21-extending score converter package, and command line tool (adds Humdrum writer, replaces Humdrum parser)

Project description

converter21

A music21-extending converter package, and score conversion command line tool. Contains an alternate music21 humdrum converter that adds a humdrum writer and replaces music21's humdrum parser.

The Humdrum portion of this software is derived/translated from the C++ code in humlib, by Craig Stuart Sapp.

Setup

Depends on music21, which should also be configured (instructions here) to display a musical score (e.g. with Musescore). Some of the tests depend on musicdiff, but converter21 itself does not.

Command line tool usage:

python3 -m converter21 [-h]
                       [-f from_format]
                       -t to_format
                       [-c]
                       input_file output_file

Positional arguments:
  input_file            input music file to convert from (extension is used to determine input
                        format if --input-from/-f is not specified)
  output_file           output music file to convert to (extension is NOT used to determine or
                        validate output format, so if you're not careful you'll end up with
                        contents not matching the extension)

Named arguments:
  -h, --help            show help message and exit
  -f, --input-from {humdrum,musicxml,mei,abc...}
                        format of the input file (only necessary if input file has unsupported or
                        incorrect extension)
  -t, --output-to {humdrum,musicxml,lilypond,braille...}
                        format of the output file (required)
  -c, --cached-parse-ok
                        use music21's cached parse of the input file if it exists

API usage:

See converter21/__main__.py (the source code for the command line tool) for an example of how to get music21 to use converter21's alternate Humdrum converter in your own code.

License

The MIT License (MIT) Copyright (c) 2021-2022 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.

The Humdrum parsing portion of this software is derived/translated from the C++ code in humlib, which uses the BSD 2-Clause License:

Copyright (c) 2015-2021 Craig Stuart Sapp All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

converter21-1.3.1.tar.gz (272.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

converter21-1.3.1-py3-none-any.whl (293.4 kB view details)

Uploaded Python 3

File details

Details for the file converter21-1.3.1.tar.gz.

File metadata

  • Download URL: converter21-1.3.1.tar.gz
  • Upload date:
  • Size: 272.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

File hashes

Hashes for converter21-1.3.1.tar.gz
Algorithm Hash digest
SHA256 c094827df1724a4edde6157f5500c1ea1d7450a63853b8484593d0304546b814
MD5 5da9e8db899a850587ba7c7ae9592f71
BLAKE2b-256 a5a79bfe2d5110c1c9811905c8b47b7871a9e8633cfeb896758eafd1479b86d6

See more details on using hashes here.

File details

Details for the file converter21-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: converter21-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 293.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

File hashes

Hashes for converter21-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 368bd5a3fa86e3c7dc164a3bbb3bb1111ea52035b95141c7bc74ef83f3dbab7b
MD5 9ebbf08329e832e2d46270897c5db30a
BLAKE2b-256 b2a879d6876beea123c615d9bc4d26b2179510d14f9f5e9321ed606ba8ec45a0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page