Dorico and missing MusicXML words

I do a lot of transcriptions using Photoscore Ultimate either from original scores or PDF’s to transfer the notes etc. into Dorico as MusicXML files.

One of the frustrations is that random words, which might be techniques (arco/pizz), no of players (a2), instruments (piccolo) and so on, although present in the MusicXML as the subcategory , never make it into Dorico. I can understand the reasons for this (for instance techniques are all classified by type in Dorico) and started thinking how I could list the occurrences to manually add them to Dorico later.

I thought that the solution might be to store the music in a database created from the MusicXML and whilst looking for an easy way to parse such content came across a very powerful (open source and free) product to do this called BaseX. With a user friendly GUI this can open your MusicXML file and store it as a database. It incorporates the industry standard XQuery language, an sql type language, which operates on the database and allows you to analyse the music to you hearts content. I display below a part of the listing from one of my scores which shows where I have to add the missing text to my Dorico score.

Measure 1 Tuned Percussion - Chimes
Measure 2 Trumpet in Bb 2,3 - Bell-like a2
Measure 2 Horn in F 1, 2 - Bell-like a2
Measure 5 Horn in F 3, 4 - Bell-like a2
Measure 5 Trombone 1,2 - Bell-like
Measure 5 Euphonium - Bell-like
Measure 5 Alto Saxophone 1, 2 - a2
Measure 6 Keyboard - Piano sound
Measure 7 Piccolo (Flute 3) - Flute
Measure 7 Trumpet in Bb 1 - play
Measure 7 Trumpet in Bb 2,3 - play
Measure 7 Flute 1,2 - a2
Measure 7 Tuned Percussion - Crotales
Measure 7 Clarinet in Bb 2, 3 - a2
Measure 9 Double bass - arco

To those who might be daunted by the thought of any kind of computer coding I attach a file of the XQuery routine to produce the result above.
For those familiar with the idiom it should be relatively easy. For other why not have a go! (596 Bytes)

Joe, thank you. I don’t have time to play with this now but I suspect I might find it very helpful in just a few days.

This is potentially very useful, Joe, and I thank you for sharing it with the community. You can get some (but not all) additional text in MusicXML files to import by switching on the ‘Text items’ checkbox on the MusicXML Import page of Preferences.

Thanks Daniel, I hadn’t realised about the ‘Text Items’ switch. I’ll look at redefining my code to pick out items not covered by it.

At the risk of becoming a Photoscore > MusicXML > Dorico bore, there are other problems associated transferring from transposed wind band scores. As neither Photoscore nor Dorico distinguish between a transposed or non-transposed score one would expect the transfer to be exactly as is. In fact on a recent project of mine both the Bass Clarinet and Baritone Sax parts appeared in Dorico an octave down with both the notes and key signature in concert pitch. All the other parts were as the original transposed score including key signatures.

I traced this to the inclusion of a node ‘-14’ for the bass clarinet and a similar -21 for the Bari. in the MusicXML code. As ‘transpose’ is defined as ‘Transposition from written to sounding pitch’ in the MusicXML blurb one would have expected all the transposing instruments to have this node if the output from Photoscore was being consistent not just the two that did. In any case, as Dorico is well aware of instrument transpositions it might be well to ignore this node. Maybe it is the octave below actual sound that confuses photoscore.

The workaround is easy using BaseX. a simple two line piece of code in the editor pane:-

let $trans := doc(‘MusicXML-file.xml’)
return (delete node //transpose)

will give a revised file in the result pane minus the offending transpositions which can then be saved with a different file name. The original file is unaltered.