chords imported from MusicXML render with no root or bass

• Jun 29, 2013 - 16:56
Type
Functional
Severity
S4 - Minor
Status
closed
Project

I assume this was introduced with the fix the the inherited chordlist bug. Now, MusicXML scores get no chordlist at all, so chords cannot be rendered properly. They should default to chords_std.xml like other new scores, unless you've customized the import option in edit / preferences.

Steps to reproduce:

1) load the attached xmlchords2.xml

Expected result: chords render as "Cmaj7" & "G7"
Actual result: chords render as "maj7" & "7"

I'll try to fix this myself unless someone else wants it badly...

Attachment Size
xmlchords2.xml 1.51 KB

Comments

Update: I see a number of things going on, but am not sure about best way to proceed. I've been out more than in the last couple of days and that continues today, so I'm unassigning myself for now in case someone else wants to go from here.

It appears some (most?) of the various score import functions relied on the on-demand load of the chordlist. Since that was removed and the chordlist loading moved to style::load, only "native" scores will load a chord list unless the import routine explicitly loads a chord list (as importBB does). Maybe there's a better / more central place to load the chord list? Or put the on-demand code back to handle imports? Or just add explicit loads to each import function.

Another thing I haven't really tested but have concerns about: an empty chordlist isn't the same as a non-existent one. There are places in the code where we test for an empty chordlist and may assume that means one hasn't been loaded, but that is not the case at all - it may mean the chordlist contains no chord id's yet. This would be the default state of new scores until a chord has been entered. Maybe class chordlist needs to overload isEmpty to distinguish "nothing has been loaded yet" from "chord description file loaded, but no chord id's defined yet".