musescore/MuseScore — pull request #378 by MarcSabatella (2013-06-02 01:19:59+00:00)
Title: Support MUsicXML import/export for unrecognized chords

Currently, both import and export of MusicXML rely on matching against the exhaustive chord id list in chords.xml. This pull request allows MuseScore to generate chordnames directly from the MusicXML on import and to generate MusicXML tags directly from chordnames on export. No chord list is needed at all, although if a chord list is present, MuseScore will continue to try match chords against it as before..

The "meat" of the change is in ParsedChord::parse for generating MusicXML export tags from a chordname and ParsedChord::fromXml for generating a chordname from imported MusicXML. Both functions reside in chordlist.cpp. The "soul" of the change, however, is the refactoring that occurs elsewhere in chordlist.cpp and harmony.cpp. This refactoring allows all valid Harmony objects (recognized from the chord list or not, entered directly or imported) to have a valid ChordDescription object. This in turn allows export, rendering, and other "back end" functions to work independently of how the chords were created, and vice versa.

In merging my changes onto the master branch, there will be a potential conflict with Tony's pending pull request for capo chords (#371), in Harmony::render. I would be happy to resolve this myself manually once his changes are merged (assuming his are merged first).