Custom Instrument XML Files That Reference Custom Soundfonts
It's such a pain to have to dig through the "instruments.xml" file to input and modify my own custom instruments that I can use when creating a score. It's also such a pain to have to always change their soundfont in the mixer since the instruments xml file only references the "MS Basic.sf3" soundfont.
I think it would be HIGHLY beneficial for anybody who makes their own instruments with custom notation, staff, and sounds to be able to just write up a new XML document using the same formatting as the instruments one, but only for a specific instrument soundfont....maybe have it so if they have matching file names, they are automatically referenced?
EXAMPLE:
../Documents/Musescore 4/SoundFonts/ MyCoolSounds.sf2
../Documents/Musescore 4/Instruments/ MyCoolSounds.xml
I find a lot of people online who love making their own instruments, but hate having to either make a template because the instruments xml file is just too bloated to look at for some, or start working on a project after creating the score, to have to go in and change the installed soundfont in the mixer. I mean you already have the ability to read more soundfonts in that exact "SoundFonts" directory. Why not take it a step further and build custom xmls that correlate to that font?
Attachment | Size |
---|---|
image_2025-06-15_132358844.png | 46.8 KB |
image_2025-06-15_132201616.png | 141.96 KB |
Comments
Instruments.xml does not refer to the MS Basic soundfont at all, it refers to banks and programs of a (any!) General MIDI compliant soundfont.
In reply to Instruments.xml does not… by Jojo-Schmitz
See that makes no sense. It's refers to the banks and programs, but only of one file.....in this case the MS Basic soundfont. That's where the problem is. I can't have it refer to a different sound font from that xml file and still retain ALL of it's current sounds for each of the other instruments unless merged.
Example...If i have a new instrument that I wrote into the instruments xml, the ONLY way I can get it to autoload the proper sounds for it is by merging my new specific soundfont data into the MS Basic soundfont with it's own bank/program. This I can do with some work, but that's for me personally. What If I want to to pass this onto other people? They have no clue how to go in the instruments xml, use polyphone to merge sound font data, etc. Or even if sending someone the MS Basic soundfont file that's been updated by me as well as the xml, it will overwrite their current ones, and they may have other plugins (like MDL or others) that I don't have, and it messes with what their end.
See my solution is simple, and gives the user more freedom to create instruments as separate xml files using the exact same formatting, that correspond directly to soundfonts, and they can just be read from the already existing User Musescore location and not be invasive to what Musescore is doing. This also would be a very simple backend implementation according to some devs I spoke to about it. It already has the ability to bring in soundfonts from the user location, and also has the instrument xml formatting defined. it just needs the extension to be able to read more instruments from more xml files and have those refer to a soundfont of the same name. Not saying it's easy, but it's certainly a lot simpler than some of the other things being done, AND very user friendly.
In reply to See that makes no sense. It… by CymSkippy
That would be a nightmare. Not only would I require your custom soundfont but I would also require your custom instruments.xml.
I don't use MuseScore's SF2 at all, I have my own which I load into the software without having to mess around with instruments.xml and my scores will work for users who don't have my soundfont because I have kept it GM compatible.
In reply to That would be a nightmare… by yonah_ag
well that's exactly my point. You wouldnt need to replace anything. The average user could STILL use their MS Basic soundfont for other projects where having a custom soundfont is not required. But we have custom instruments and even different ways of reading/writing percussion music as it's always been. Marching cymbals for example do not have universal written style. We all customize it to our liking, and I provide my students with a very clean and simple format. There is also the case for the various sound effects. There is no cymbal sound font out there that cover every single cymbal default sound effect at various dynamic levels.....so I recorded my own and formatted all of the soundfont details.
So I still use other basic sounds because they might not be as important, but if I NEED a custom sound for something like this case, the solution in the feature request I present actually simplifies everything, even if you download your soundfonts from somewhere else. All you would need to do besides install the soundfont, is type up a quick xml with the same formatting as the instruments xml, and drop it into a USER instruments folder (much like the user soundfonts), and if it has the same name as the soundfont file, it uses that soundfont file by default. If there is no soundfont then it defaults to MS Basic.
It really couldn't be simpler. I know not everybody is code savvy, but honestly I figured out how to format my instruments xml in like 10 minutes with only an html background lol. That's all that would be required of the user...write up your own instrument...drop it and the sound font in their respective folders....DONE! The end user can then just start writing at any time with no worries about template files or modifying anything.
In reply to See that makes no sense. It… by CymSkippy
Send your soundfonts with a new name so that their Basic Sounds is not overwritten. Do not merge into Basic Sounds. This is a very bad idea as it's the built-in standard. You can add a single instrument to a srparate SF2 file and share this to use alongside Basic Sounds.
In reply to Send your soundfonts with a… by yonah_ag
But I did this already. I made my own soundfont and it installs into musescore just fine. I can go into the mixer and switch to that sound at any point. My problem is that it doesn't autoload to the mixer when I write in the new instrument into instruments.xml....It always defaults to MS Basic, which is a huge problem if you have a lot of custom instruments in one score that need a soundfont.
But my solution is one that doesn't just work for me, but simplifies the process of making new instruments much easier for EVERYBODY who knows how to do it. Understanding the formatting for a new instrument xml is really simple, but not everybody knows how to find that file or want to dig through the bloat of it to try and make sense of it. Why not just have it so they can write up an instrument in a separate xml, and if the xml file has the same file name as the soundfont it's supposed to use, have it default to it in the mixer.
As far as people writing their own instruments, it can be solved by a simple tutorial...only takes 10 minutes to figure out. But once they get past that step, installing the sound font into one folder along with the xml is nothing lol.
In reply to See that makes no sense. It… by CymSkippy
As Jojo has already said, instruments.xml does NOT refer to Basic Sounds at all. I think that your mistake here may be causing the rest of your difficulties.
In reply to As Jojo has already said,… by yonah_ag
See that's where I think the problem is. It's not explained very well in any documentation and nobody really helps better understand it. By default musescore sounds are all in this one file. I have installed multiple sound fonts, but no matter what I do, it's impossible to get them to auto load from the instruments.xml file.
If "refer to" is the wrong terminology, then please help me find a better way to say it, because it's not a "mistake" as far as what I'm doing...just as how I'm explaining it. So here i can break it down...
But what of multiple instruments? If i add lets say 10 custom instruments to the instruments xml, all needing the use of a new soundfont. I'm going to have to go into the mixer and change the sound font for 10 different instruments. This is where my wording of "refer to" comes in and I dont know why it's so confusing for everybody. When you make new instruments and modify them in the xml...they use the default soundfont on the system.
I installed MDL (musecore drumline) and it inserted a new set of instrument banks inside the MS Basic soundfont file. It didn't add another file. So even that one, in my wording, refers to the basic soundfont lol. So please, help me better understand the correct wording for it, because that's exactly what it's doing.
In reply to See that's where I think the… by CymSkippy
OK, I think that I see what's going on a bit better now. (I am a long time user of MS3 but fairly recent to MS4.)
In MS3 there was an option called Synthesiser which kept an ordered list of all SF2 soundfonts that you want to load. This could be set per score or set as a default for the application. I can't find this option in MS4 so I'm not sure how soundfont management is supposed to work.
If you can find the replacement for Synthesiser then we can see how much this helps you.
In any case, instruments.xml was never tied to a particular soundfont, (soundfonts in MS3 do not load from the instruments.xml file). I'm not sure whether this would be a useful enhancement for MS4 if there is no synthesiser. Maybe other MS4 users can clarify this point.
In reply to OK, I think that I see what… by yonah_ag
I have created and used own instruments in MS3.6.2 and MS4.0, til MS4.6.0. The way to include and use own instruments in MS3 and MS4 is quite different. In MS4 does not exist the Synthesizer any more but In MS4 you can also created and used your own instruments. As far as i know You must do the following:
1. you create a .xml file, where you describe all the characteristics of your instrument, in accordance whit the requirements of the MusicXml format (i.e. instrument name, staff typ, pitch etc.).
2. You can create a directory like "my_instruments" under ..../MuseScore4/.
3. Copy your .xml in .../MuseScore4/my_instruments/.xml.
4. When you open MuseScore, you go to : Edit-> Preferences -> Scores (Partitur) and in the window "Standard-Files in "Scores Sort List 2: you enter the fullpath and file name where your .xml is stored.
5. You must also copy your "own-Soundfonts".sf2 (or sf3) to the directory .../Musescore4/Soundfonts.
When you close Musescore and open it again, MuseScore will give you the chance to choose your new instruments.
If you have created an own percussion-Kit you must also copy the corresponding "my-kit".drm file in ....../MuseScore/Styles.
At the moment you still have to use the mixer to allocate the right sound to the selected instrument and even Edit the DrumPalette to load your drum-kit.
As far as I know in MuseScore 4.6.0 do not exist jet the possibility to call out of a my_instruments.xml file a particular "soundfont". In the instrument.xml file they are only GM -conform Midi Pitches defined. If your instrument use no GM-conform Pitches Soundsy you even must create your instrument.sf2 with your own samples, for example by using Polyphone.
In reply to I have created and used own… by puggbma
Well that's why I have it in feature request, so hopefully they will see it as a good idea and possibly implement it. As of right now, I'm trying to simplify everything for people by utilizing the default file and folder locations without having to move anything around.
As for using the instruments.xml file and the soundfont, I already record my own instruments and create proper soundfont files compatible with musescore 4. I use the default instruments.xml to write in the percussion instrument and format it much like you would with a .drm file, except it requires no extra work on the user's part, AND it shows up in the instrument's list when making a new score.
This is where I think it would be VERY beneficial for users to NOT have to do this kind of thing. If there were another xml default location much like the default location for user soundfonts, it would be nice to have it read in the custom instrument file like this WITHOUT having to dig through the default instruments.xml. Then it would be EXTRA beneficial to be able to have it identify a soundfont or have an xml command to at least call upon a soundfont of your choosing that could auto-load into the mixer by default without changing it for any of the default stuff.
In reply to Well that's why I have it in… by CymSkippy
Good luck with the feature request., I'm sure that many users would benefit. However, I see SF2 as being 'on the way out' so it might not get implemented.
In reply to OK, I think that I see what… by yonah_ag
I guess it may not be "tied" to the default soundfont, but they certainly didn't give any way of calling upon another soundfont lol. Like I don't mind going into the mixer and changing a single instrument myself, but when others load my new percussion instrument, they don't think about that and ask why they are getting random "bonks" "pokes" and "whistles" lol. Like it's cool that we can use the xml to switch bank/program, but it would only make sense for them to at least add an xml command that lets us call on a different installed soundfont BEFORE selecting the bank and program.
In other cool news, a friend of mine is working on a plugin that installs custom instrument xml files directly into the instruments.xml and uninstalls them just the same. So that kind of rules out the need for a custom xml folder I guess. It just leaves the soundfont issue.
In reply to I guess it may not be "tied… by CymSkippy
The omission of synthesiser has made things more difficult but I suppose that SF2 soundfonts really are a second, (or even third), choice option for playback in MS4 so they are probably on the deprecated list for MS5, (if not omitted altogether). Everything is moving towards better sounding audio formats such as MuseSounds and VSTi's.
In reply to The omission of synthesiser… by yonah_ag
Maybe you are wright, but anyway MuseScore should provide a simple way to implement/use free VST for Linux users.
In reply to Maybe you are wright, but… by puggbma
There is hope. Check/test the nightly builds
https://github.com/musescore/MuseScore/pull/28382