Skip to content

Commit

Permalink
Depend on (and install during setup) converter21.
Browse files Browse the repository at this point in the history
  • Loading branch information
gregchapman-dev committed Jul 24, 2022
1 parent 077ea70 commit ffe05e6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ musicdiff is derived from: [music-score-diff](https://github.com/fosfrancesco/mu
by [Francesco Foscarin](https://github.com/fosfrancesco).

## Setup
Depends on [music21](https://pypi.org/project/music21) (version 7.2+) and [numpy](https://pypi.org/project/numpy). 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).
Depends on [music21](https://pypi.org/project/music21) (version 7.2+), [numpy](https://pypi.org/project/numpy), and [converter21](https://pypi.org/project/converter21). 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).

## Usage
On the command line:
Expand Down
15 changes: 6 additions & 9 deletions musicdiff/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@
from musicdiff import diff
from musicdiff import DetailLevel

# To use the new Humdrum importer from converter21 in place of the one in music21:
# pip install converter21
# Then uncomment all lines in this file marked "# c21"
# import music21 as m21 # c21
# from converter21 import HumdrumConverter # c21
import music21 as m21
from converter21 import HumdrumConverter

# ------------------------------------------------------------------------------

Expand All @@ -31,10 +28,10 @@
'''
if __name__ == "__main__":

# to use the new Humdrum importer from converter21 in place of the one in music21...
# m21.converter.unregisterSubconverter(m21.converter.subConverters.ConverterHumdrum) # c21
# m21.converter.registerSubconverter(HumdrumConverter) # c21
# print('registered converter21 humdrum importer', file=sys.stderr) # c21
# Use the new Humdrum importer from converter21 in place of the one in music21...
# Comment out these two lines to go back to music21's built-in Humdrum importer.
m21.converter.unregisterSubconverter(m21.converter.subConverters.ConverterHumdrum)
m21.converter.registerSubconverter(HumdrumConverter)

parser = argparse.ArgumentParser(
prog='python3 -m musicdiff',
Expand Down
2 changes: 1 addition & 1 deletion pypi_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ musicdiff is derived from: [music-score-diff](https://github.com/fosfrancesco/mu
by [Francesco Foscarin](https://github.com/fosfrancesco).

## Setup
Depends on [music21](https://pypi.org/project/music21) (version 7.2+) and [numpy](https://pypi.org/project/numpy). 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).
Depends on [music21](https://pypi.org/project/music21) (version 7.2+), [numpy](https://pypi.org/project/numpy), and [converter21](https://pypi.org/project/converter21). 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).

## Usage
On the command line:
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from setuptools import setup, find_packages
import pathlib

musicdiffversion = '1.2.0'
musicdiffversion = '1.3.0'

here = pathlib.Path(__file__).parent.resolve()

Expand Down Expand Up @@ -61,6 +61,7 @@
install_requires=[
'music21>=7.2',
'numpy',
'converter21>=1.2'
],

project_urls={
Expand Down

0 comments on commit ffe05e6

Please sign in to comment.