XML Issues
Hi,
I'm currently writing a programme to convert the MusicXML exported by MuseScore into PMW code, so I can print customised key signatures, and a few other things. Hence, anything missing in the xml exported code will mean lost effort; I mean, I use MuseScore during the composition / arrangement phase, but for preparing the ultimate, printable version I need to transfer the whole of what I did into PMW for further processing. That's the whole idea of XML in the first place, isn't it?
Now, I noticed the following (so far...):
1) Accidentals, apart from flats and sharps, are never exported. An empty element is there alright, but with no accidental specification.
2) Clef changes appear where cautionary clefs are put, i.e. at the end of the preceding meaure. It appears that the MusicXML specification does not impose any rules here, but wouldn't it be more logical to put the clef change where it starts to be effective, and leave the cautionary clefs for the importing programme to worry about? So, when a measure starts with a new time signature AND a new clef, why is time signature change put at the stat of the concerned measure, but not the clef change? Shouldn't they be contained within the same element at the start of that measure?
3) Although double tremoloes are displayed on screen, they're never exported to XML; only single tremoloes are.
4) Is there a way in the MusicXML specification to distinguish between system text (like tempo changes) and text that applies to the staff that happens to be at the top of the system? So, for example, a "rall." concerns every staff in the system, but a "sempre pizz" on the Vn I staff of a string quartet should only concern the Vn I player, and should not be replicated on other staves when each of them is extraced.
Note: I only posted this after I found nothing about the above points in the Issue Tracker's xml search results.
Many, many thanks.
Hosam Adeeb Nashed
Comments
Instrument short names are not exported to XMl, though used within the MuseScore file.
In reply to One more point I forgot... by HosAdeeb
Thanks for the bug reports, it will help improving MusicXML output.
But, why making a so big effort to develop musicXML to PMW when MuseScore can export as PDF?
What kind of feature are you missing exactly?
In reply to Thanks for the bug reports, by [DELETED] 5
I can count a few things, relly.
1) Key signatures containing half-flats, or even naturals.
2) Right-to-left music, to suit lyrics in Arbic.
3) EPS out for excerpt enclusion in documents.
On another note, although the coming point might not be relevant here: Cautionary clefs are only of any use if the the new system will start in a new clef, so the last measure on the preceding system would warn the player about the coming clef. But what benefit would there be if, within the same system, on the same line, I would see a clef change just before the bar line? It's even smaller in size!!!
Hosam Adeeb Nashed
In reply to Why PMW? Well, ... by HosAdeeb
1/ The next version will have this ability (without playback)
2/ OK :)
3/ You can cut a PNG. But if you want vector based ok.
Regarding your last remark, I don't get it?
In reply to 1/ The next version will have by [DELETED] 5
All I wanted to say, actually, is: MuseScore consistently puts a new clef to the left of the measure where the change should take place; for example in measure three of an 8-measure system. Now, it doesn't really make sense; it should work exactly like time or key changes; i.e. they are written in the measure they start, possibly with a cautionary measure if that starting measure is the first on a new line.
Hosam Adeeb Nashed
In reply to A calrification by HosAdeeb
I'm not an expert at all on this matter. But I was looking for a published score with this kind of clef change and I find this one.
Here is a part of it:
The clef change is before the barline.
In reply to Clef change and barline by [DELETED] 5
My Experience is that the clef sign is before the bar line.
In reply to My Experience by xavierjazz
In the score the clef change appears before the barline. But in the MusicXML file, clef changes are part of the attributes element, which is generally used at the start of a bar.
MusicXML allows either positioning. In general I think it is better for this type of clef change to go at the start of the bar, rather than the end of the preceding bar. Doing it that way emphasizes the musical structure rather than the typographic layout.
In reply to Clef change and barline by [DELETED] 5
All right. Got the message. But, ...
Judging by the example quoted, it seems that MuseScore should endeavour to support inserting a clef change anywhere within a measure, which is not the current state of affairs.
Hosam Adeeb Nashed
In reply to Touché !!! by HosAdeeb
Clef change anywhere in the measure is supported. Drag the clef you want from the palette onto a mid-measure note.
In reply to 1/ The next version will have by [DELETED] 5
Hi,
I am very glad to hear, that the next version will have the option of non standard (microtonal) key signatures. I must say that microtonal playback would be of great importance - Lilypond can play quarter tones correctly, AFAIK Finale can't play microtones. As contemporary composer I am particularly interested in this feature.
OpenMusic , which is specialised programming environment for composers uses midicent - every half step is divided into 100 steps - so you can use any imaginable tuning. In this system the middle C is 6000, middle C eight-tone higher is 6025, middle C quarter-tone higher is 6050, C# is 6100 etc. In order to get correct microtonal playback it sends pitchbend messages to the midi gear.
Would it be hard to implement this in MS? I haven't got much experience in programming, but if someone could give me some directives I could try to do it.
In reply to Microtonal playback by perotinus
It is already possible to tune on a note-by-note basis by right-clicking on the notehead and choosing "Note Properties...".
I don't remember if it is in 0.9.5 but the Note Properties dialog for 0.9.6 has a "Tuning offset" where you can adjust the cents.
There is a feature request for playback and proper support for quarter note in the issue tracker. See #3807: Quarter tones are not played
However the focus of the upcoming 0.9.6 release has been to get regular sharps/flats/naturals working correctly and transposing without issues.
In reply to It is already possible to by David Bolton
There are also a couple of experiments with the tuning offset and the plugin framework. Like tuning all notes with mesotonic etc ...
See http://musescore.org/en/node/3483
http://musescore.org/fr/node/3469
In reply to There are also a couple of by [DELETED] 5
Ok, thank you for your tips. I will post to these threads.
Best
In reply to There are also a couple of by [DELETED] 5
Hi lasconic,
I was trying to adapt a utility I had written long ago to be used as a plug-in, following your example, but so far it refused to even show within MuseScore... Obviously, I'm doing something completely wrong. Could you please take a look. Don't pay attention to the various buttons, I'll fill their functionality in once the thing takes shape.
Thank you very much in advance.
In reply to Could you please help? by HosAdeeb
Probably it is best to start a new thread for the plugin. When I try to use your plugin using 0.9.6 beta I get the error as quoted below. In the new thread mention whether this is what you mean by "refused to even show within MuseScore".
---------------------------
MuseScore Error
---------------------------
Error loading plugin
"C:/Program Files/MuseScore 0.9/plugins" line 62:
TypeError: Result of expression 'form.allButtons' [undefined] is not an object.
---------------------------
OK
---------------------------
In reply to Probably it is best to start by David Bolton
There is a dedication forum now for plugin discussion & development: http://musescore.org/forum/443
1/ MusicXML supports the following for alteration : sharp, flat, natural, double-sharp, sharp-sharp, flat-flat, natural-sharp, natural-flat, quarter-flat, quarter-sharp, three-quarters-flat, and three-quarters-sharp. If I understood well the discussions about quarter tones music, it's not really define which symbols is a quarter sharp. Am I wrong?
2/ Bug report filed : #4226: [MusicXML] Clef change export on the wrong measure
Short Instrument name is exported at part-abbreviation in r2644
In reply to MusicXML accidentals by [DELETED] 5
MusicXML focuses on Western notation so it assumes western contemporary names for quarter-tone accidentals. See the image at http://en.wikipedia.org/wiki/Accidental_%28music%29#Microtonal_notation
In reply to MusicXML focuses on Western by David Bolton
Here in Egypt, for example, we never use the mirrored flat for the quarter-flat, instead we consistently use a flat with a stroke, which has always been a valid, legitimate alternative.
Hosam Adeeb Nashed
In reply to OK, but... by HosAdeeb
Could you give us a table to match egyptian accidental symbols (images) with MusicXML names (quarter-flat, quarter-sharp,
three-quarters-flat, three-quarters-sharp) ?
In reply to Egyptian accidentals by [DELETED] 5
They are all already supported by MuseScore. The only one that differs than most music notation software is the quarter-flat: whereas Finale, Sibelius and the rest use only the mirrored flat, we use a normal flat with a stroke in its stem. So, the two should actually be considered alternatives.
As used in Egypt, they are the following:
Hosam Adeeb Nashed
In reply to Quarter accidentals as used in Egypt by HosAdeeb
In r. 2649 "flat-slash" and flat-flat-slash" should export to quarter-flat and three-quarter-flat respectively. Obviously this means there is some loss of information (software importing file won't know whether the quarter flats are supposed to be displayed as a mirror flat or a slash flat). If future versions of MusicXML improve micro-tonal support we can review this decision.
In reply to In r. 2649 "flat-slash" and by David Bolton
As a matter of fact, the two are synonymous, and never used together in the same score! So, the importing programme can make the decision on its own. It's merely stylistic. And the importing programme can always have defaults.
Hosam Adeeb Nashed
In reply to MusicXML accidentals by [DELETED] 5
While MusicXML does not define the exact quarter-tone accidental, the most commonly used for interchange are the Tartini quarter-tone accidentals. These are used by Finale and Sibelius. The Braeburn Software site describes them at:
http://www.braeburn.co.uk/qtones.htm
Michael
In reply to Tartini quarter-tone accidentals by musicxml
Hi Michael,
Off topic: I got a question from someone who wanted to create MusicXML from Braeburn score files. To my knowledge, MusicXML is not supported by their software and pdf files created with the software can not be scanned with pdftomusic, nor with photoscore. So you happen to have an idea how to convert them to MusicXML?
In reply to Braeburn to MusicXML by Thomas
As far as I know, you're correct that Braeburn does not support MusicXML, either for export or import. I'm surprised that the PDFs do not work, but that can happen due to things like not using music fonts, or blocking embedding of music fonts. Music Printer Plus and Score have problem with printing usable PDFs as well.
If the PDFs don't work, then it's back to either optical scanning or MIDI transfer.
Michael
In reply to Tartini quarter-tone accidentals by musicxml
Revision 2645 exports the 4 Tartinis quarter tones accidental in MusicXML.
I didn't find my way to add them in MusicXML import.
In reply to Revision 2645 exports the 4 by [DELETED] 5
Please be sure to add the alter element as well as the accidental element - for instance, 0.5 for quarter-sharp, 1.5 for three-quarters-sharp, -0.5 for quarter-flat, and -1.5 for three-quarters-flat. Please let me know if that still does not work for import into Finale (I don't know if Sibelius supports this during import).
Michael
In reply to MusicXML quarter-tones need alter element too by musicxml
Thanks Michael. I added this to the issue tracker: #4474: MusicXML export: quarter tones need alter element too
In reply to Revision 2645 exports the 4 by [DELETED] 5
I just hope that the quarter-flat alternative that we use in Egypt is treated as such (an alternative) to the one Tartini uses, as the two are equivalent in every respect. I had referred to this matter in another post.
Hosam Adeeb Nashed
In reply to Revision 2645 exports the 4 by [DELETED] 5
Import is done in r2746.
In reply to Import is done in r2746. by Leon Vinken
Thank you Leon.
Maybe a stupid question, what LVIFIX stands for?
In reply to Thank you Leon. Maybe a by [DELETED] 5
Just a reminder by me for myself to fix things later.
In reply to MusicXML accidentals by [DELETED] 5
The definition has long been decided! The whole topic is about exporting those accidentals to XML.
Hosam Adeeb Nashed
Hi Hosam,
If you wish to give your converter some publicity in the future, make sure you can deploy it as a web service. As an example: On Google App Engine you can deploy java & python software which you can interface with MuseScore via a plugin. See Lasconic's ABC importer plugin for inspiration.
In reply to On another note by Thomas
As a matter of fact, the programme started life as a JavaScript application, then, when I felt it was becoming quite heavy, I shifted to my preferred language of old: Pascal. I could potentially re-write it in Python; I always wanted to learn Python nyway. But I'll just leave that to later, when I finish the essential parts.
My original plan was to send the programme (in source and binary forms) to Dr Philip Hazel, the author of PMW, to distribute it with a new release. Of course, once it covers most of my set goals (I'm almost half-way).
Hosam Adeeb Nashed
What do you mean by single/double tremolos?
The followings (single, double, triple ?) are exported/imported OK.
In reply to Tremolos by [DELETED] 5
Tremolos between two notes do not export/import to MusicXML correctly.
In reply to Tremolos between two notes do by David Bolton
I filed a bug #4477: MusicXML: tremolos between two notes not exported/imported
Any information on the correct implementation is welcome.
In reply to Tremolos by [DELETED] 5
Single tremolo is rapid repetition of one note, double tremolo is rapid alternation between two notes. MuseScore does support writing them alright, but it doesn't play them, or export them to XML.
Hosam Adeeb Nashed
In reply to Re Tremoloes by HosAdeeb
I notice that only 3 beams are available to tremolos. It is fairly common for me to see a fourth flag, expecially in a slower tempo. This is needed because a tremolo is a shorthand marking for a repeated group of 1 or 2 notes, rather than just a rapid alternation at an arbitrary speed. I've seen it get so specific as to write a tremolo with a number under it to indicate a tremolo-tuplet.
In reply to Tremolos by MDMilford
I've never heard of that :-)
Regards, MD.
In reply to I've never by xavierjazz
Maybe it's just a piano thing, but that's where I see tremolos most. For a common example look at Beethoven's Sonata Pathetique where the bass line is eighth notes alternating octaves. Instead of writing out all the eighth notes, he (or at least the publisher) uses in many places a tremolo with half notes and one beam. I also have a reduction to two pianos by Percy Grainger of Grieg's Piano concerto in A minor in which in one measure, Grieg writes a tremolo (trill with a chord) using dotted half notes, 2 beams, and the places the number 12 to indicate the number of alternations. Percy Grainger rewrites the same measure adding "molto ritardando", and doubling the speed of the tremolo by using two groups of dotted quarter notes, 3 beams and the 12. The next beat accelerates the trill, by using quarter notes and 4 beams.
I wish I could show you the printed example that's right in front of me.
In reply to examples by MDMilford
Gershwin's Rhapsody in Blue where a chord is repeated rapidly 9 times staccato. 3 dotted eighth notes are beamed together with each having a extra tremolo beam through their stems. 3 staccato dots and the number 3 appear above each one, making it clear that each note represents a 1/16th note triplet group. I'm sure with a little digging I could come up with more examples, but my point is that this doesn't seem to be a wholely uncommon practice confined to a single style or composer.
I noticed that the "credits" (title, subtitle, composer and poet) are exported to XML in their chronological order of creation, rather than in their hierarchical relation to each other. So, if you forget to put a subtitle, and you later put one after you have already inserted the composer, for example, the XML will be exported in that order. It can make it difficult for XMl importers... Not impossible, but a bit more complicated.
Hosam Adeeb Nashed
In reply to Another XML oddity by HosAdeeb
The order of those elements should be no issue normally for any xml importer or use case. But good you hunted this down. You never know.
When the displayed score ends with a clef change, the next staff has a redundant xml clef element. That is, the right-most measure on the previous system will have a clef element, and the left-most one on the next system will have one, too. I suspect the extra clef change could be troublesome.
Hosam Adeeb Nashed
Customarily, staves linked with a bracket also have their bar lines continuous (non-broken), except for the four staves of a choir, to accommodate for lyrics, and avoid any possibility of lines covering them.
Now, this is not reflected in the exported XML, while the standard does cater for that sort of thing: "<group-barline>no</group-barline>".
Also, breath marks are not exported to XML. And if one needs to put two articulations on the same note, e.g. staccato + tenuto (to be played three-quarters of the note head normal time), only one articulation is exported.
Hosam Adeeb Nashed
In reply to Some New XML Issues I Recently Found by HosAdeeb
Hosam,
thanks for reporting these issues. This thread is getting very long and contains several related but different subjects. Could you use new threads for new issues instead of adding to this thread. That will make it easier to keep track of which issues still need to be fixed.
It would be even better if yuo could create new issues in the issue tracker.
Regards, Leon.
I put an "Allegro" tempo direction on the first measure. To my surprise, the XML stated that its placement was "below", rather than "above" the staff!! (Version 0.9.5) In addition, there was an empty element right after it. The other dircections were all right, though. I have no idea what went wrong.
Also, the same thing happened with crescendo and diminuendo wedges; their placement was "above", the opposite of how they were displayed in the score.
Hosam Adeeb Nashed
In reply to When System Text Gets Exported To XML by HosAdeeb
In r2655 tempo text placement is (hopefully) fixed.
For wedges, it seems to be already fixed.
Yes, I know about manual tuning in MS, but it's not a solution. Would it be possible to define quarter tone accidentals, the same way as normal ones, so everytime you use it in your score it play microtones, as normal notes ?
In reply to Yes, I know about manual by perotinus
I realize it is not a solution I was just mentioning that the framework was in place. In my first reply I gave a link to the relevant feature request in the issue tracker.
Hi,
Still working with 0.9.5, I noticed the following:
1) One-bar repeats and double-coda are not exported.
2) There is no clear way of marking things like rit., rall., accel., etc. as system text, in the sense that, unlike tempo markings, e.g. Allegro, they have no "sound" element. They are represented as just "direction" elements that have "words" child elements. But, since their effect should concern all staves within the same system, they need to be marked in a way as to distinguish them from, say, pizz.
Hosam Adeeb Nashed
Still working with 0.9.5.
8va marks, though they seem to end within the same measure (I couldn't extend them beyond that...) are exported in MusicXML as ending at the start of the following measure, instead. Lines' ends are inconsistent, too. Plus, one and the same line segment has its placement as "above" at its start, but, oddly enought, as "below" at its end!
But, apart from the way things are exported to XML, I'm at a loss as to how to tell, within the context of a grand staff, whether an 8va belongs to one of the two staves but not the other. Let me explain: in contrast to Ped, which logically belongs to the lower staff, an 8va alta or bassa might conceivably be used on either staff, or at least I'm unaware of any hard and fast rules. So, on importing them, where should they be put? Always on the upper staff? What??!! [A reminder: the source of the trouble is that the contents of both staves are supplied within the self same measure, separated by a "backup". Hence, the end of a measure only comes after the contents of lower staff. Maybe, if all things that concern the upper staff are put before that "backup", thing would have been easier...]
Any ideas are sorely needed.
Hosam Adeeb Nashed
In reply to Newly found issues by HosAdeeb
Direction elements for multi-staff instruments should always be exported with a staff element that specifies which staff the direction belongs to. Otherwise it is ambiguous.
Michael
In reply to Newly found issues by HosAdeeb
Hosam,
these issues were fixed in October/November last year. Is it possible for you to switch to a more recent MuseScore version, retest and report the remaining issues ?
Leon.
This morning, while trying to import some other stuff from MusicXML, I discovered the following (I'm not sure they are already known issues; the Issue Tracker didn't help me much):
1) Grace notes are exported using "backup" elements, while the standard offers a much clearer way: a "grace" element, which has a "slash" attribute that is missing from the current implementation.
2) Glissandi are not exported at all.
3) I'm not sure of this one, but in the case of arpegiated chords, why should every note in the chord have an "arpegiate" element? Staccato, for example, doesn't behave like this. In both cases the mark applies to the chord in its entirety.
4) Ottava marks are indeed extensible (me culpa for my inability to do it in my last post), still, it always goes one step beyond the last note it should apply to; so, if it should end at the last note within a given measure, it really ends at the start of the following measure.
Hosam Adeeb Nashed
In reply to This morning, while trying to by HosAdeeb
The arpeggiate element works different than other elements like staccato because, on a score, you visually see an arpeggiate element in front of different notes. The arpeggiate element also needs to be able to handle arpeggios that cross staves and voices.
In reply to This morning, while trying to by HosAdeeb
Grace notes, glissandi, arpeggios, and ottava all seem to work for me. (Tested using r. 2698 nightly, Windows XP)
In reply to This morning, while trying to by HosAdeeb
1) Grace notes should work, fixed several issues in November and December last year
2) Glissandi were fixed with r2376 (end Nov)
3) As far as I understand it, arpeggiate works according to spec
Regards, Leon.