Instruments XML file capabilities

• Dec 28, 2017 - 04:15

So I want to add a couple of "instruments" to the instruments.xml file and maybe edit some existing ones, but I have a couple of questions and ideas to discuss first. So I've tried to do this a couple times before and failed miserably. I'm trying to add 2 keyboards: one that uses a string soundfont patch and another that uses a brass soundfont patch. This in itself seems easy enough though... I just don't know what I'm doing wrong, so if anyone's ever successfully added his or her own instrument to the musescore instrument browser using that file, can you share your instruments.xml file with me? or maybe if you just used an extra xml file as a second list, could you upload that one? (As an example so I can see how a working edited list looks) Thanx.

Now for my second question/idea, I'll start with a little backstory, hahaha. Musescore is for notation not playback, so I don't really ever expect much from musescore playack, to be honest... and it's already pretty good. But something that has a large impact on realism is articulation. Different soundfonts often have different articulation, so if you can control which soundfonts/patches are being used for certain notes, you can add realism to the playback (if you care about that sort of thing). And it can be done in the same way we use can use staff text properties to set "Arco," "Pizz," or "mute." So to see if this is applicable I need to ask a question. You can make up/ add channels to instruments using the instruments.xml file, right?

And In case anyone's interested, I'd really like to see if I could use this for solo violin and maybe even strings in general. I really like the AA violin soundfont for a single violin, so I need it's fast violin for faster passages/passing notes and it's slow violin for longer notes. And maybe in some GM soundfonts for any [plural amount of] strings instruments in musescore I can add a fast strings and slow strings channel in a similar fashion. (And copy and paste text to set different channels). So aside from my plea for help in the first paragraph, and my genuine question in the second paragraph, what do you all think about this idea in general? Thanx.


First question is why not use the exist "string synthesizer" or "brass synthesizer" instruments?

Second question is, how did you try adding your own? Did you try modifying MuseScore's own private read-only file, or did you make your own copy and modify that, or did you created your own file with just the new instruments? How did you then tell MsueScore to use your file? And what exactly went wrong when you tried?

Third - yes, you can add channels to an instrument by using a custom instruments.xml file. The default string synthesizer instrument already defines two channels, same with brass, but if you want more, that could indeed be a good reason to customize. You could also simply use the "effect synthesizer" which defines eight channels already.

In reply to by Marc Sabatella

A1: Actually I misspoke. I only want to create a "strings" instrument like the "brass" instrument that already exists so that I don't always have to change the soundfont in the synthesizer. [I don't like the synthesizer sounds that's really the only reason... it's not for notation] Or so I don't have copy and paste a self made template, and go through editing title, composer, instruments, etc manually. Really this is just laziness... and it's not too important anyways I could keep doing it if I have to... but if there is a way to add the instrument... why not? [I just need to learn to do it correctly]

A2: Well, I actually tried all of those. I started off trying to edit the actual file. I basically broke it, so I replaced it with the back up of the original instruments.xml. I did this a few times without success. Then I looked in the preferences and saw that I could add an "instrument list 2." So then I opened a bracket for each family (I wanted to put the strings in the strings family) and went through the rest of the... uhh.. not sure what the proper term is. I did this in a file I named "extra instruments.xml" and directed musescore to it in preferences. I think the instruments remained the same but there were 2 random divider lines or something with not content under them in the instruments that time. So on the last attempt with the extra list I'd apparently created 2 new families/categories, (or seemed as though musescore thought that) but there was nothing under those dividers. I'm recalling this from memory so it may not be 100% accurate. Either way, I did something wrong. I'm not exactly sure what though... If I had to guess, it was probably formatting. I'll try again and upload it next time, since I probably wont get it working and will need help .

A3: That's good to know. For now, I may make some templates using the effects synthesizer and soundfonts.

Well thank you for your response! I think I have an idea of how I'm going to approach this. I think now, that I want to leave musescore and it's defaults as it is, but I want to create more instruments using the "instruments list 2" xml file under a new family/category I'll call "performance instruments." With these, I'll find extra soundfonts to add below my GM soundfont with different articulations, and map the new instruments/channels to them. That way for simple notation I can still get a great workflow with regular musescore, and then if I ever want more from the performance, I can use those extra instruments I add. Does this seem theoretically possible?

In reply to by speedmeteor101

A1: If you main purpose is to let a brass instrument have 3 channels you can add a string instrument that is close to the brass instrument. Temporarily add a brass instrument and take note of the Transposition in the staff properties and make the string instrument have that Transposition. You can then change the Transposition, Part name, Long name and Short name to your instrument. This will give you 3 channels in the mixer to use any sounds you want.

In reply to by mike320

Yes, but at first I was only trying to basically create a keyboard that uses the strings soundfont patch and list it under the strings family. If you do an instrument search for brass, there is what's pretty much a keyboard instrument called "brass" but it's listed under the brass family. I wanted to do that, but for strings, originally. But if I want a bunch of channels, I can, like Marc Sabatella said, use the effect synth instrument which has 8, and replace the sounds as I see fit. It's very similar to your suggestion, but yours is also a great idea. Thanx.

In reply to by speedmeteor101

You don't need a new soundfont just to use different sounds than the defaults for an instrument - you can simply change the sounds in the Mixer. So no reason you couldn't use the String Synthesizer instrument and then simply change the default sounds from Synth Strings 1 & 2 to, say, Strings and Pizzicato.

As for template, no need to edit title composer et al manually. If you save your template to your Templates folder, then they are automatically made available in the Create New Score wizard, meaning you can enter the title and other information same way you would for any other score.

For instruments.xml, know that editing the efault file will accomplish nothing - MuseScore doesn't actually use the one you can see in your filesystem. Instead it sees a special version built in to the program. The one you can see is just a copy. So you can't break anything just by editing it. But if you then go to Edit / Preferences / Score and tell MuseScore to use that version, indeed, you can break things that way. And in any case, editing a file in MuseScore's installation folder is always a bad idea, could spell trouble for future updates. Leave MuseScore's files alone, always work only in your own folers.

For simple changes, I think the easiest thing is to make a copy of the default one and place it in one of your own folders, then edit that, and tell MuseScore to use it rather than the default. That way you don't have to set up the whole structure of the file yourself. Downside is you won't be able to take advantage of improvements made in future updates unless you reapply those changes to a new copy. The alternative is creating a second file with just your changes - new instruments. In principle it's a better solution but it does require more work to set up and be sure you have the whole structure set up correctly.

Anyhow, if you continue to want help creating a custom instruments.xml filke, probably best to make the attempt first, then if you have trouble getting it to work, attach it here and describe the problem you are having in more detail.

In reply to by Marc Sabatella

I actually got it this time. I think since I didn't make a new instrument group last time I would've had to have formatted it differently... either that or I just completely messed up last time. Anyhow, I did get it working this time. My only sort of issue was when I was trying to map the instrument soundfont patches, and I wanted to map the number by the order the patches came in in the synthesizer. (So my general user soundfont which is gm, of course, has 0-127 and some more... then I have some extra soundfonts with certain sounds... which add up to 266 patches). I assumed that the program just counts up all the patches in order (so 40 is violin, 265 would be a patch from the lowest soundfont in the synthesizer) and that it would select them in order. Well those patches defaulted to piano in the mixer, so now I'm thinking that it can only read patches 0-127 (general midi patches). Would this be accurate? And if so, does that mean the only way to apply extra sounds/patches is through the mixer, and you can't define a patch value in the channel line or anything similar?

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