How to add a new TAB instrument to instruments.xml?

• Aug 15, 2020 - 23:09

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

Comments

<Instrument id="mtn-dulcimer-3-str-chomatic-tab">
<trackName>Mtn Dulcimer 3-string (Tablature)</trackName>
<init>mtn-dulcimer</init>
<description>Mtn Dulcimer (3-str. Chromatic TAB)</description>
<musicXMLid>pluck.dulcimer</musicXMLid>
<stafftype staffTypePreset="tabUkulele">tablature</stafftype>
<!--                   <clef>TAB</clef>  -->
<genre>common</genre>
<genre>popular</genre>
<genre>classroom</genre>
</Instrument>

Where is the "mtn-dulcimer" defined to init from?

In reply to 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 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.

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