Why are the pitches not showing in musescore for this MusicXML file?

• Mar 5, 2015 - 11:07

I am working on a project that will read in a musicXML file generated by musescore and then output a slightly modified one (it will be implemented as a plugin later on).

To test my output/parser, I read in the file, and printed it.

However, it comes up really strange in musescore.

I don't think any of the original file has changed, other then added spaces/enters within the tags. Could this cause the problem?

I have attached the original prelude and my modified version. Any ideas why the pitches seem to dissapear in musescore?

Thanks,
Dorien

Attachment Size
output.xml 329.67 KB
Prelude_C_Major_-_Bach.xml 296.38 KB

Comments

Which version of MuseScore do you have this problem with? Have you tried other notation software and see if they give some error output on the MusicXML file?

In reply to by Thomas

Yes I tried noteedit, it didn't work properly either. I realise it's more of a musicxml problem, but I thought people here might quickly know what could cause it.

Could it be the the added enters/spaces? That's the only difference I see:

18.00

0.00

303.15

100.00

4

0

major

4

4

2

G

2

F

4

C

major

1

In reply to by dorien

It's definitelya good start to remove this line break. The musicxml file is not valid if not. If you load it in MuseScore 2.0b2 or a nightly it will complain that the sign of the first clef can be read because it's not known (it needs to be F or G etc... but no /nG/n). From there, not knowing the clef, musescore can't hardly find the right pitch.

Not sure what you are using as a MusicXML reader/writer but it could be good to use an existing one instead of writing your own maybe?

In reply to by Thomas

Thanks! Actually, I created a musicXML parser, based on JSoup. It is available here: http://dorienherremans.com/content/easy-way-parse-musicxml-files-java

The parser works great and it was very useful to be able to read the file and get start durations etc for all notes. Now I am just ironing out the "writing a modified file back" part.

I'll let you know if I can figure out how to remove the extra spaces with JSoup.

Do you still have an unanswered question? Please log in first to post your question.