Creating New Instruments

• Oct 6, 2019 - 03:21

I am trying to add a tenoroon part and subcontrabassoon (still in prototype) to the code so I don’t have to manually change parts every time but I can’t find how to


Comments

You can add an instruments.xml file and tells it's location in Edit->Preferences in the Score tab. You can use the existing instruments.xml (in the data sub folder under the MuseScore folder). The new instruments.xml file should only have the instruments you are adding. The only documentation for this is at https://musescore.org/en/developers-handbook/references/instruments.xml…. Using an existing instrument from the default instruments.xml file is more informative in my opinion.

In reply to by mike320

hello
can someone give me an example of an instrument.xml with only one instrument in it.
I am not into programing and never managed it so i always have to add the new instruments to the existing list .
This is not so easy because the list is so long.

In reply to by wolfgan

If you wanted to put a stringed instrument (with strings defined) this is all that would need to be in the file. This is from the default (version 2.something) instruments.xml, but serves to show the basic structure of an instrument definition.

<?xml version="1.0" encoding="UTF-8"?>
<museScore version="2.06">
  <InstrumentGroup id="Common">
<Instrument id="guitar-nylon">
   <longName>Classical Guitar</longName>
   <shortName>Guit.</shortName>
   <description>Acoustic Nylon-strung Guitar</description>
   <musicXMLid>pluck.guitar.nylon-string</musicXMLid>
   <StringData>
       <frets>19</frets>
       <string>40</string>
       <string>45</string>
       <string>50</string>
       <string>55</string>
       <string>59</string>
       <string>64</string>
   </StringData>
   <clef>G8vb</clef>
   <barlineSpan>1</barlineSpan>
   <aPitchRange>40-83</aPitchRange>
   <pPitchRange>40-83</pPitchRange>
   <Channel>
       <program value="24"/>
   </Channel>
       <genre>common</genre>
       <genre>popular</genre>
</Instrument>
</InstrumentGroup>
</museScore>

In reply to by mike320

I believe you'd need to wrap this inside

<?xml version="1.0" encoding="UTF-8"?>
<museScore>

and

</museScore>

</xml>
Maybe even

<?xml version="1.0" encoding="UTF-8"?>
<museScore>
      <InstrumentGroup id="some name">

and

      </InstrumentGroup>
</museScore>

</xml>

Edit, @mike320 added this in his example now

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