Added a tutorial on the customization of instruments.xml files for the Jeux14.sf2 SoundFont file

• Oct 10, 2019 - 15:42

The attached file in this tutorial describes how to create and utilize a custom instruments.xml file with MuseScore, using the Jeux14.sf2 SoundFont file. The information in the .xml file (via comments) should make it useful for anyone who wishes to extend the instruments.xml file with their own custom, supplementary instruments.xml file.
The tutorial is here:

Hopefully anyone interested in creating and using their own custom instruments.xml file will find this file useful.




In reply to by BSG

Thanks BSG.
One thing I'm investigating at the moment is the relationship between the SoundFond patches (presets) and banks, and their order in the MuseScore dropdown box where you select the patch (preset) in the mixer, versus the SoundFont file structure. For a SoundFont like Jeux14.sf2 this means there are 204 presets i.e a lot in a drop down box!

For MuseScore version 3, it looks like the Mixer patch text box (where you select the patch) is sorted in patch then bank order. So a 'patch=0 bank=0' would be followed by a 'patch=0 bank=1'. In the case of Jeux14.sf2 this means you see, at the top of the list Montre 8 (patch=0, bank=0) followed by Viola 8 (patch=0, bank=1).

In MIDI, though it's not a hard and fast rule, banks usually represent a different 'set' (no hard definition here) of instruments. Following this MIDI logic, the author of Jeux14.sf2 says (in the SoundFont information contained in the file, and I'm paraphrasing here) that:
- The first bank represents (stops) for music before 1750
- The second bank (1) represents stops needed for other styles including the Romantic repetoire.

So...for this bank specifically, it would make more sense for the sorting order to be by bank and then patch order. It may make sense for other SoundFonts too that follow what seems like MIDI's usual use of the bank concept.

Ultimately, I'm wondering would it make more sense for MuseScore to sort patches in patch then bank order, rather than the other way around given MIDIs approach to banks?

(Another possible option in MuseScore would be to display both the bank and patch numbers, as well as the Preset name in the Mixer list as well e.g.
'0/0 - Montre 8'
'0/1 - Prestant 4'
'1 - 74 Corinthian Flute'
'1 - 75 Glockenspiel'
For pipe organ SoundFonts, this would be most helpful too when selecting patches based on organ rank or manual
What do people think? I realise these questions might be rather arcane, but having had a quick check of the code (I'm familiar with Qt/C++) the info is all there, and it's not a particularly large change - an issue being would this represent a big change to the way MuseScore use SoundFont patches with other kinds of SoundFonts? What do people think? These are just initial thoughts, but I'm happy to progress the question further in a separate posting if there's interest.

In reply to by Lofo

Investigating further: I have compiled MuseScore 3 with a code version that sorts the Mixer instruments by Bank first, then Patch second. For the Jeux_14 SoundFont file, it makes much more sense when changing instruments in MuseScore, given the banks represent almost completely different instruments. For organ fonts in general, I'd suggest these would be designed in this manner too.

The Qt/C++ changes were fairly simple. While I expect most SoundFont files follow the MIDI suggestion ie. patches are within a bank, and banks separate different instrument types, there's nothing hard and fast about this in MIDI's rules. In general though, I like the idea of a bank being a superset of the patches and think the sorting of the patches in the Mixer window would benefit from being 'bank first', 'patch second'. It's a relatively trivial issue.
Note: the SoundFont concept of the bank can never match the pipe organ stops structure where 'pulling' additional stops add to the sound by opening extra organ ranks - it's not what the SoundFonts formats are designed for. Instead you would need to make a patch in PolyPhone that included all the ranks in your stop settings ie. make a patch for each combination of pulled stops ie. makes the SoundFont file way too complex. Still, after mucking around with the C++ code, I think the change in MuseScore (sort by bank then patch in the Mixer instrument screen) would be worthwhile. Most SoundFonts from what I've seen are designed within a single bank anyway, making this patch sort change invisible to most people using a SoundFont.

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