Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MusicXML Parser for Magenta #214

Merged
merged 30 commits into from
Nov 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7c7989d
Initial commit of MusicXML importer
Sep 7, 2016
c512958
Fix how score-parts are associated with parts. Remove redundant time …
Sep 8, 2016
012a669
Read all voices from a MusicXML files, not just the first voice
Sep 13, 2016
2daad43
Add unit tests to MusicXML parser
Sep 15, 2016
b7e18e9
Add modified MusicXML parser and BUILD files
Sep 15, 2016
5fd89d6
Set default MIDI info for each part. Set default key signature to C. …
Sep 23, 2016
e24e072
Remove debug code
Sep 23, 2016
fe7252c
Rename BPM to QPM. Move files from magenta/lib/ to magenta/music/
Sep 28, 2016
4355f10
Update musicxml_parser.py to conform with pylint
Oct 4, 2016
819ea21
Fix bazel tests for updated musicxml_parser
Oct 4, 2016
f348b62
Fix pylint errors in musicxml_reader.py and musicxml_parser_test.py
Oct 5, 2016
05d8bf0
Update changes requested by cghawthorne
Oct 5, 2016
720753b
Begin refactoring of MusicXML parser to replace global variables with…
Oct 12, 2016
8e6473a
Add large MusicXML file
Oct 17, 2016
57996f3
Update MusicXML parser to rebase with master, remove some global vari…
Oct 25, 2016
81b673d
Remove globals from musicxml_parser.py
Oct 25, 2016
b4c3eec
Add support for note.numerator and note.denominator in sequence notes…
Oct 26, 2016
afd42eb
Update comments and naming conventions in parser
Oct 31, 2016
222d0f2
Prepend private methods in musicxml_parser.py with double underscores
Oct 31, 2016
855c0f6
Remove backslash continuation for long lines
Oct 31, 2016
14e55a1
Move duration typeratiomap to class level constant in musicxml_parser.py
Oct 31, 2016
71ecca7
Uncomment unit tests
Oct 31, 2016
7040c4c
Remove Part.transposes property from musicxml_parser
Nov 1, 2016
66a66e7
Remove Measure.transpose property from musicxml_parser
Nov 1, 2016
e39588c
Add additional branches to parser to handle MusicXML tags ignored by …
Nov 1, 2016
3c1c21d
Remove pylint command from musicxml_reader.py
Nov 1, 2016
3a585d7
Add try/except when parsing XML using ElementTree
Nov 1, 2016
5afa30c
Add unit tests for transposition. Add MusicXMLParseException class to…
Nov 2, 2016
fa38cb8
Add support for compressed MXL files with multiple rootfiles and asso…
Nov 2, 2016
4989b4d
Raise MusicXMLParseException if multiple MusicXML files found within …
Nov 2, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
42 changes: 42 additions & 0 deletions magenta/music/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,50 @@ py_test(
srcs_version = "PY2AND3",
deps = [
":midi_io",
# tensorflow dep
],
)

py_library(
name = "musicxml_parser",
srcs = ["musicxml_parser.py"],
srcs_version = "PY2AND3",
deps = [
"//magenta/music:constants",
"//magenta/protobuf:music_py_pb2"
],
)

py_library(
name = "musicxml_reader",
srcs = ["musicxml_reader.py"],
srcs_version = "PY2AND3",
deps = [
"//magenta/music:musicxml_parser",
"//magenta/protobuf:music_py_pb2"
],
)

py_test(
name = "musicxml_parser_test",
srcs = ["musicxml_parser_test.py"],
data = [
"testdata/clarinet_scale.xml",
"testdata/el_capitan.xml",
"testdata/flute_scale.xml",
"testdata/flute_scale.mxl",
"testdata/flute_scale_with_png.mxl",
"testdata/rhythm_durations.xml",
],
srcs_version = "PY2AND3",
deps = [
":musicxml_parser",
":musicxml_reader",
"@mido//:mido",
"@pretty_midi//:pretty_midi",
":sequences_lib",
":testing_lib",
"//magenta/common:testing_lib",
# tensorflow dep
],
)
Expand Down