List of available instruments and mappings to MuseScore3?

How do I find which new_part() instruments are available and what they will map to when show_xml() opens MuseScore3?

My “poking a stick” at the problem has lead me attempt digging into SF2 SoundFont files, but really don’t know squat about them. I’ve downloaded swami but on first opening, it looks very incomplete, with most menus opening Qt prototype templates that are devoid of any content or function.

I’m not sure that will help me enough to determine how whatever happens in SCAMP translates to specific instruments in MuseScore3 via show_xml().

So, the sounds available for playback and the instruments that MuseScore3 will recognize are two separate things.

The sounds available for playback you can get by calling s.print_available_soundfont_presets() (assuming s is the name of your Session). The default soundfont is a General MIDI soundfont, but you can load up any other soundfont you want instead. Mostly, I would just download soundfonts other people have put together, but if you want to make your own, I think Polyphone is the software to go with (I had a similar experience with swami).

As for what instruments translate to in MuseScore3, it’s also the list of standard general MIDI instruments. You can get the actual dictionary SCAMP is matching everything against with:

import pymusicxml
print(pymusicxml.Part.general_midi_preset_nums)

…but it’s basically this: https://soundprogramming.net/file-formats/general-midi-instrument-list/

1 Like

No such beastie as s.print_available_soundfont_presets(). But since Python 3 does tab completion, I’m guessing s.print_default_soundfont_presets() is what I’m looking for.

Thanks for the Polyphone tip. I’ve installed it and started exploring it.

Next, pymusicxml…
To be continued…

ah, my bad! Glad you found the correct beastie :slight_smile: