How to add a new TAB instrument to instruments.xml?
Am trying to add an instrument to the instruments.xml file. NOTE: I have confirmed Musescore is reading my edited .xml file. The issue is that I cannot work out how to get it to add a Tablature staff. The instrument shows up in the instruments list, but no matter what I do in the .xml file Musescore always creates a Standard staff.
What I did was copy the 4-string Ukulele tablature .xml entry and revise what seems like the sorts of tags needed revision for a new instrument. (NOTE: I did confirm that the Ukulele instrument does add a correct TAB staff in Musescore before doing this, and even after adding my new instrument entry.) Since there obviously insn't any "staffTypePreset" for the Mountain Dulcimer, I left that as staffTypePreset="tabUkulele" for test purposes. But, still, it doesn't work.
After many edit variations it seems that the Instrument "id" tag is significant. If I copy the Ukulele text and change just one character in the id tag then it fails to work. Which implies to me that the id tag is pointing to something in the Musescore code?? But then if that's true that implies you cannot add a new instrument by adding to the .xml by itself.
Below is the added entry - any help appreciated! fwiw; I would love to be self-sufficient in doing this, but have not found sufficiently complete documentation for the .xml file tags. So I'd take the answer or a pointer to where I could work out the answer.
I see this editor tried to read the xml tags as html, so I snipped out my instrument entry into a file and attached it.
Strings - Plucked
Mtn Dulcimer 3-string (Tablature)
mtn-dulcimer
Mtn Dulcimer (3-str. Chromatic TAB)
pluck.dulcimer
tablature
common
popular
classroom
Attachment | Size |
---|---|
test-mtn-dulcimer-xml.mscz | 10.56 KB |
instruments_MtnDulcimer-snip.xml | 2.91 KB |
Comments
Where is the "mtn-dulcimer" defined to init from?
In reply to <Instrument id="mtn-dulcimer… by Jojo-Schmitz
I have no clue what the tag means or is for, so I just made an entry there seemed to at least match the syntax of other instruments. So can you help me understand that tag?
In reply to I have no clue what the tag … by rocchio
That init refers to a full non-tab instrument definition with that name
In reply to <Instrument id="mtn-dulcimer… by Jojo-Schmitz
Ah! Your question pointed me in the right direction. I have deduced that the init tag is a way to reference another instrument as the 'basis' for the tablature version of the instrument. So now when I copy the base Ukulele entry and make it a 'standard mtn dulcimer' entry, update my init tag to match that instrument's id tag, then it works!
OK, so that's cool. Now is there a good way to get some help in how to create or specify a 3-string (3-line) tab staff? I assume the staffTypePreset's refer back to code in the Musescore code-base??
In reply to Ah! Your question pointed me… by rocchio
Good question, next one please.
;-)
I believe those would need to be built into MuseScore, but I'm not 100% sure
In reply to Good question, next one… by Jojo-Schmitz
Ok - well, I guess it could be a useful exercise for me to start taking a look at the code to see if I can work out the linkages. (I do have a goal of getting the mountain dulcimer added into Musescore permanently. And I would like to contribute to the project...so I guess here is my entry point.)
Thanks for your help with this.
In reply to Ok - well, I guess it could… by rocchio
Continued in https://musescore.org/en/node/309301