Bug when exporting/importing a percussion kit with custom noteheads/notehead set?


I just encountered something strange, and wanted to report it.

I created a custom notehead set that includes custom noteheads with brackets either side of the regular circle notehead. I set all of the custom noteheads, and the notehead set, as “default”, so they are available to all Dorico projects. I have attached my userlibrary.xml, which contains this notehead set, and the noteheads:
userlibrary.xml (19.6 KB)

I then created a custom percussion kit, and edited the instruments in that kit to utilize the custom notehead set for one of their playing techniques. I have attached the project I used to create that kit in (I removed the VSTs first, to reduce filesize): project.dorico (431.7 KB) .

Next, I exported the percussion kit as a .doricolib file (zipped, to allow upload): percussionKit.zip (11.1 KB)

I created a new project, and confirmed that my custom noteheads and notehead set are available.

Next, I added a new solo player, and created that player by using “import kit” to import the percussion kit I previously exported.

When I did this, I noticed that the following happened:

  • A unique copy of the custom notehead set was created for every instrument that referenced it (even though they were all referencing the same set in the original project) - in my case, that meant 9 new copies of that notehead set were added to my project.
  • These new copies of the custom notehead set did not correctly recall the changes I made to the noteheads. They had all the glyphs, but the bracket positions were incorrect (it looks like they lost their horizontal offsets).

I fixed this myself by manually editing the percussion kit .doricolib file, to remove the definitions for the custom noteheads/sets, and instead point them at my existing user notehead set (by ID). On import, it no longer creates new notehead sets, and instead reuses the existing one (which ensures the glyphs are correct).

I understand why you would save the notehead sets with the kit, but I would have expected:

  • a) Only a single copy of that set, even if multiple instruments are referring to it.
  • b) That this copy correctly stored the notehead set data.


Thanks for the report, Steve. Everything here is working within the current expected parameters. When you export a percussion kit, Dorico doesn’t consider whether or not any of the dependent library items that are required by the kit are included in your user library. It exports everything using unique IDs so that all items can be imported into another project without worrying about ID collision. But this also means that Dorico does not at present try to determine whether the actual appearance or other properties of those library items matches items that are already present in the library: in other words, at present it will always choose to add those entities to the library, rather than updating the references in those items if possible.

We do plan to provide further flexibility in this area in future when we introduce dedicated features for managing library items, so please watch this space for changes.

Hi Daniel,


I’m completely on board with the notehead set being exported with the kit, and being added again upon import - regardless of the user library - that makes sense. However, my issue is relating to that exported notehead set data. I think maybe I wasn’t clear with my explanation, and my mentioning the user library likely complicated things, so I’ll try explaining it again differently :slight_smile:

If I open the project I attached, I see the custom notehead set, and everything looks correct. The brackets surround the notes, sitting on either side:

I export a percussion kit from that exact project. I then create a new project and import that kit. When I do, the notehead sets that are created do not match those in the project that exported the kit. The glyphs are there, but they are in the wrong positions. The newly created notehead sets all look like this:

That’s my main issue - the imported notehead sets are broken.

I did a bit of digging into the exported percussion kit’s XML file (I’m a software developer by day - which I hope proves helpful and not a nuisance to you). From what I can tell, the issue is the following:

When exporting the glyphs in the percussion kit file, their IDs are updated with newly generated user IDs (as you mentioned). However, the “relativeAttachments” data - which contains the horizontal offsets for the bracket glyphs, relative to the noteheads - is not updated to use these new glyph IDs. It’s still referring to the old glyph IDs from the project.

For example, lines 2680 and 2691 update the componentIds to new user IDs, but lines 2713, 2721 and 2725 leaves the referenced glyph as its original ID from the source project. Likewise for all other relativeAttachment data.

Thus, upon import of the kit, those relative attachments are invalid, ignored, and the xOffset of each bracket is left at 0.0 (which is incorrect).

There also appears to be an issue with the half-note notehead, where one bracket is missing. I’ve not been able to track that one down in the XML yet.

(Edit: It looks like maybe the user ID of that one missing bracket is not updated in the XML file - or is corrupted in some way. All the other glyphs are updated to “glyph.user.SOME_ID” but this one missing glyph is just named “glyph.user”. That also appears to be how it was named in the original project - versus the others which are “glyph.user.SOME_NUMBER”. Maybe that’s why it’s not being updated properly, and subsequently why it’s not importing correctly? Take a look at line 2752, for example - the component ID has not been updated to a randomly generated ID)

A lesser issue - one of tidiness, more than anything - is that in the source project there is a single custom notehead set that is referenced by 9 instruments in the kit. When exported and then imported, this creates 9 custom notehead sets (all broken, in this case), one per-instrument. I feel that if playing techniques in an exported kit are referring to the same custom notehead set, that this should be exported once, and all exported playing techniques should refer to that same exported copy. The current behavior appears to export a new copy of the notehead set every time it is encountered, which leaves the project a little bit messy upon re-import.


Thanks, Steve, for providing that additional detail. Your diagnosis of the problem is completely correct and I’ve spent a bit of time looking into the problem. We’ll make sure that this gets fixed in the next version of Dorico. Sorry for the inconvenience in the meantime.

1 Like

Thanks, Daniel :slight_smile:

No need to apologise. Exporting percussion kits is not something I do too often, and it’s easy enough for me to clean up the XML by hand in the meantime.