Plugin API: annotations in MusicXML file have blank text

• May 24, 2020 - 23:49
Reported version
3.4
Type
Plugins
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
active
Regression
No
Workaround
Yes
Project
  1. launch MuseScore 3.4
  2. open attached file "Amazing Grace.musicxml"
  3. open the Plugin Creator and load the attached plugin "test5.qml". This is a tiny plugin that finds all the Harmony annotations and prints them to the console.
  4. run the plugin

Actual Result: all the Harmony annotations have blank text. The console says:
Debug: 1440
Debug: 2880
Debug: 4320
... etc

Expected Result: the Harmony annotations have non-blank text. The console says:
Debug: 1440 G
Debug: 2880 Bm
Debug: 4320 C
... etc

Workaround: after opening the MusicXML file, save it as an MSCZ file, then close it and re-open it. Now the plugin gives the expected result.

OS: macOS 10.15, Arch.: x86_64, MuseScore version (64-bit): 3.4.2.25137, revision: 148e43f

Attachment Size
Amazing.Grace_.musicxml 54.28 KB
test5.qml 522 bytes

Comments

This is not related to the plugin API, the Harmony element's internal state is slightly different for a chord imported from MusicXML and from MuseScore files.