The Java7 internal synthesizer uses a Soundbank file to create the sounds MIDI instruments make. This can be a small and low quality set of instruments, or a large file with better quality sound. Java7 uses the Gervill internal synthesizer with a default 'emergency' tiny instrument bank. The sound is... not impressive.
There are many General Midi (GM) 'standard instrument set' soundbank files out on the internet that you can use to improve your sound. The Java7 internal Gervill synth can read in both DLS and SF2 when coded to by Java7 application, but will on its own use tiny soundbank-emg.sf2 and recreate if need be. Better (FAR better) sounding GM soundbank files are availible, a couple examples would be
Arachno SoundFont - Version 1.0.sf2
which can directly replace the emergeny GM soundbank Java7 uses as default by the Brute Force method below. The other method is to leave the lousy tiny emergency soundbank there and rely on the programs to choose other soundbank files. This is problematic in that not all coders bother to look for better soundbanks. Minecraft mods do have access to code alternate soundbank use.
My dev partner Aeronica clued me in on the soundbank code,
they are far better at finding and reading tutorials and docs on this than I am.
I was not using any PaulsSoundCode in my branch of the mcMML mod,
but idk how much of what my partner learned about soundbanks was from reading Pauls vs Oracle javax online docs vs private tuts, wikis, and forum posts like jsresources.org....lets call it 2nd generation derived from a few sources including Pauls & jsro
Stage1: Get a better soundbank file
You have a few ways to get a better soundbank file: You can download a GM soundbank from a midi site, you can use one already on your system, or you can create your own. Most folks will choose to grab one from the internet, but there are some instances software installed on your system will have its own midi soundbank (example would be Nexon's game Mabinogi uses its own instrument soundbank DLS.)
Surf around the internet and get a GM soundbank in SF2 format.
The SF2 formant will allow you to do the Brute Force method below to swap out the default emergency soundbank with a better sf2. I have had good results with FluidR3_GM.sf2 (148mb),
but be aware many sf2s out there are using a VERY OLD compression archive for sf2 files, 'sfArk', that may give you a hard time getting the file extracted and usable. sfArk can be viewed as an alternative to using Zip to compress files to an archive. sfArk is very good at what it does, but it is also very uncomon for folks to have already installed on their computers.
Stage2: Put the new soundbank to use
Method 1: Brute Force replacement
When at first you dont succeed, use a bigger hammer. Java7 will look for the emergency soundbank file to use, and if it dosnt find it it will make it, and then use it. The brute force method will replace that tiny soundbank-emg.sf2 file with the better sf2 you just got in Stage1.
Java7 will want to hide the Gervill synth suff in your home folder, so the SF2s look in
where 'someuser' is your username... aka its a hidden dot folder in your home.
Rename or delete that file : soundbank-emg.sf2,
and place your better sf2 file there (not some ZIP, the actual .sf2 file),
and then rename your better file to the default filename: soundbank-emg.sf2 .
Now whenever some java application wants to use MIDI instruments
it will use that better sounding GM instrument set soundbank.
Method 2: Choice of soundbanks to use.
This is much less effective than BruteForce replacement of default file,
because it relies on each application to be coded by the authors to look for and use alternate soundbanks. Good programs will let you configure better sounding MIDI, but many/most just use the defaut and leave it at that.
Minecraft modders can write to load alternate soundbanks with great ease,
and modders that use MIDI should be encouraged by the community to support that.
This also allows access to using the DLS format of soundbanks... the Windows format... even on linux machines, which would then provide access to any of the DLS instruments from vaious provoiders. Some games provide DLS for their ingame instruments, but you should check with their Terms of Service on using their files elsewhere.
MC Mod coding for soundbanks;
Direct access to the Java7 internal midi system is thru JAVAX includes. You must
Initialize the Synthesizer,
Clear the default instruments that got loaded,
Load the desired Soundbank,
Place the instruments from that soundbank into the Synthesizer
Initialize the Sequencer to use the synth you just setup with better sounds
The basic, no frills and not hardened way to do it-
That should be enough to get modders started on coding alternative instrument soundbanks for better midi.
Obviously you have to supply an accurate path to the SF2/DLS file, but its a universal load that will read SF2 and DLS without problems
If you replace the default file and want to switch back later,
you can rename or delete the soundbank-emg.sf2 again
and Java7 will replace it with a new one.
This is handy, but in the style of bettr safe than sorry, renaming rather than deleting is always prudent