You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading a chord symbol from MusicXML that contains both the bass tag and inversion tag, the bass is removed from _overrides. When writing it out as MusicXML again, the resulting XML file does not contain the bass tag but only the inversion tag, causing the slash chord to be lost.
I am not sure if this is intentional. I've dug into decades of music21 commit history, issues, and PRs, but couldn't find anything that explicitly state this is intended behavior.
Steps to reproduce
Below is a chord symbol in MusicXML that is triggering this problem:
Not sure what the expected behavior should be. It looks like MusicXML spec doesn't say whether bass or inversion should take precedence. The chord symbol MusicXML in question was generated by Finale, and it does not always produce a slash chord MusicXML with both tags present.
More information
OS: macOS, Linux
The text was updated successfully, but these errors were encountered:
Thanks for the excellent problem statement -- in MusicXML if a Harmony object contains a <root> object, then the <bass> object is all that is necessary and <inversion> normally should not be given:
The <bass>element is used to indicate a bass note in popular music chord symbols, e.g. G/C. It is generally not used in functional harmony, as inversion is generally not used in pop chord symbols. As with <root>, it is divided into step and alter elements, similar to pitches.
So music21 should only give a <bass> with pop/jazz Chord Symbols. It can optionally also give an <inversion> but it definitely shouldn't give an <inversion> alone.
music21 version
9.5.0
Problem summary
When reading a chord symbol from MusicXML that contains both the
bass
tag andinversion
tag, the bass is removed from_overrides
. When writing it out as MusicXML again, the resulting XML file does not contain thebass
tag but only theinversion
tag, causing the slash chord to be lost.I am not sure if this is intentional. I've dug into decades of music21 commit history, issues, and PRs, but couldn't find anything that explicitly state this is intended behavior.
Steps to reproduce
Below is a chord symbol in MusicXML that is triggering this problem:
Just simply parsing and writing it out will cause it to lost the bass:
Expected vs. actual behavior
Not sure what the expected behavior should be. It looks like MusicXML spec doesn't say whether bass or inversion should take precedence. The chord symbol MusicXML in question was generated by Finale, and it does not always produce a slash chord MusicXML with both tags present.
More information
OS: macOS, Linux
The text was updated successfully, but these errors were encountered: