Skip to content

Commit ffe05e6

Browse files
Depend on (and install during setup) converter21.
1 parent 077ea70 commit ffe05e6

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ musicdiff is derived from: [music-score-diff](https://github.com/fosfrancesco/mu
77
by [Francesco Foscarin](https://github.com/fosfrancesco).
88

99
## Setup
10-
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).
10+
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).
1111

1212
## Usage
1313
On the command line:

musicdiff/__main__.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@
1818
from musicdiff import diff
1919
from musicdiff import DetailLevel
2020

21-
# To use the new Humdrum importer from converter21 in place of the one in music21:
22-
# pip install converter21
23-
# Then uncomment all lines in this file marked "# c21"
24-
# import music21 as m21 # c21
25-
# from converter21 import HumdrumConverter # c21
21+
import music21 as m21
22+
from converter21 import HumdrumConverter
2623

2724
# ------------------------------------------------------------------------------
2825

@@ -31,10 +28,10 @@
3128
'''
3229
if __name__ == "__main__":
3330

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

3936
parser = argparse.ArgumentParser(
4037
prog='python3 -m musicdiff',

pypi_README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ musicdiff is derived from: [music-score-diff](https://github.com/fosfrancesco/mu
77
by [Francesco Foscarin](https://github.com/fosfrancesco).
88

99
## Setup
10-
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).
10+
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).
1111

1212
## Usage
1313
On the command line:

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from setuptools import setup, find_packages
1414
import pathlib
1515

16-
musicdiffversion = '1.2.0'
16+
musicdiffversion = '1.3.0'
1717

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

@@ -61,6 +61,7 @@
6161
install_requires=[
6262
'music21>=7.2',
6363
'numpy',
64+
'converter21>=1.2'
6465
],
6566

6667
project_urls={

0 commit comments

Comments
 (0)