Skip to content

Commit f20172a

Browse files
committed
Parse Noteflight .mxl files
Noteflight unsaved scores export mxl as "mxl.mxl" with the main score being just ".xml" inside rather than "file.xml" or something. Patch converter to support this. Fixes #1832
1 parent e461154 commit f20172a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

music21/converter/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,10 @@ def _extractContents(self,
210210
if 'META-INF' in subFp:
211211
continue
212212
# include .mxl to be kind to users who zipped up mislabeled files
213-
if pathlib.Path(subFp).suffix not in ['.musicxml', '.xml', '.mxl']:
213+
if pathlib.Path(subFp).suffix not in ['.musicxml',
214+
'.xml',
215+
'.mxl'] and subFp != '.xml':
216+
# Noteflight bug for untitled files puts filename as just '.xml'
214217
continue
215218

216219
post = f.read(subFp)

0 commit comments

Comments
 (0)