Skip to content

Reclassify first instrument in MusicXML import#1056

Merged
mscuthbert merged 5 commits into
cuthbertLab:masterfrom
jacobtylerwalls:instrument-reclassify
Aug 8, 2021
Merged

Reclassify first instrument in MusicXML import#1056
mscuthbert merged 5 commits into
cuthbertLab:masterfrom
jacobtylerwalls:instrument-reclassify

Conversation

@jacobtylerwalls
Copy link
Copy Markdown
Member

Reclassify first instrument of part in MusicXML import

Previously
Previously, every first instrument was imported as an instrument.Instrument. The test updated here to check for oboe, clarinet, and horn instruments fails on master.

Now
Rely on the MIDI program rather than, say, a fromString() operation on the name, although this could be added later (for instance to change Piano to Soprano when a file used piano sounds rather than Choir Aahs).

Fixes #988

Future
import all instruments from part

@jacobtylerwalls jacobtylerwalls changed the title Reclassify instruments in MusicXML import Reclassify first instrument in MusicXML import Jul 4, 2021
@coveralls
Copy link
Copy Markdown

coveralls commented Jul 4, 2021

Coverage Status

Coverage increased (+0.7%) to 93.019% when pulling f3366c6 on jacobtylerwalls:instrument-reclassify into cb7df63 on cuthbertLab:master.

Copy link
Copy Markdown
Member

@mscuthbert mscuthbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One-staff pianos are unlikely to be correct -- need to look at instrument name a bit more to get more plausible instruments.

Comment thread music21/_version.py Outdated
Comment thread music21/converter/subConverters.py Outdated
Comment thread music21/musicxml/xmlToM21.py
Comment thread music21/musicxml/xmlToM21.py
Comment thread music21/stream/base.py Outdated
Comment thread music21/midi/translate.py
@mscuthbert mscuthbert merged commit b2902df into cuthbertLab:master Aug 8, 2021
@jacobtylerwalls jacobtylerwalls deleted the instrument-reclassify branch August 11, 2021 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create more specific instruments from MusicXML import

3 participants