What is a SoundFont?
The MPTK synthesizer is based on SoundFonts. It’s a kind of library which contains the samples associated to each instruments (as piano, sax, drum, …). The description of how to use each sounds for each keys, velocities, effects, controllers is quite complex. Happily the complexity is hidden by Maestro!
A SoundFont can contains hundreds samples and instruments. Moreover hundreds SoundFont are available on the web!!! for free or not, with different styles (general, classic, jazz, electro, hip hop, …), with different quality and size. The possibilities are huge, quite infinite!
SoundFont(R) is a registered trademark of E-mu Systems, Inc.
The FREE version of Midi Player Tool Kit use the SoundFont GeneralUser GS v1.471 from Christian Collins site here. It’s a SoundFont with a very good balancing between size and quality.
Maestro Midi Player Tool Kit PRO is able to use others SoundFonts, optimize the samples list, load and switch between SoundFont when your application is playing:
- Keep only banks of interest for your application.
- Analyze your Midi files to keep only necessary samples.
- API to load SoundFont when running.
- API to switch between SoundFont.
So, you keep a low volume of files for your application or game.
Find and download interesting SoundFonts here:
- Polyphone sorted by category and search engine.
- Ultimate List of Free Soundfonts
- Soundfonts 4U
- Don’t forget to have a look to the Christian Collins site which contains a lot of interesting information.
Create or Modify SoundFonts
To be clear, Maestro does not provide full functions for editing SoundFont. There is a reason for that: there is powerful tools, often for free, to modifying in depth SoundFonts. However, Maestro is able to optimize the contents of the SoundFonts! see below.
Have a look to these two applications for editing SoundFonts:
- Viena. Free and exhaustive functions. Interesting also to understand how works a synthesizer based on SoundFont.
- Polyphone. Free and easy-to-use. Perfect for copy / paste presets between SoundFonts. Also there is an On-line SoundFonts repository with a powerful search engine. A must have!
Tips: try General Midi SoundFont to get a large variety of instruments and a compatibility with Midi norm.
Add a new SoundFont to Maestro Pro
- Download SoundFont on your computer, see above.
- Go to the menu Unity menu MPTK “SoundFont Setup”
This popup windows is displayed (empty if no SoundFont already exists):
Panel “SoundFont available”
This panel displays your list of SoundFont available for your project. You can add, remove or select SoundFont. Some information are displayed in the list: count of patches, count of waves, total size.
Button Add SoundFont
Click on the button “Add SoundFont” and select your SoundFont from your computer (filename of type .sf2). A first and quick analysis is done. Any samples are extracted.
Button Remove: delete definitively the SoundFont and all samples associated to it .
Button Default / Select: select the default SoundFont to use when playing Midi files. Only one SoundFont can be selected at the same time. But it’s possible to change the default SoundFont when running. See API documentation.
Panel “Banks available“
A SoundFont is composed with banks, each bank contains a set of patches (or preset which is a synonym), each patch can used one or more waves.
Only two banks can be enables at the same time: for the Instrument and for the Drum Kit. But you can change default when running with the MPTK API.
You can select the banks to used in the top right sub windows:
- Checkbox Keep: Choose the banks to keep or remove if your need is to lower the volume of data. Banks and relevant presets and waves will be stripped.
- Button Instrument: Choose your default bank for Instrument as Piano, Sax, Organ, Guitar. Often the first bank contains a well selected variety of instruments.
- Button Drum: Choose your default bank for Drum Kit sound. Often the last bank.
Next you have the choice : optimize your presets list depending on the Midi files defined in MPTK or get all presets and samples available.
- Button Optimize from Midi file list: each Midi Files (here, how to add Midi files in MPTK: Midi File Setup) are analyzed to detect patches and waves used. Patches and samples not used are stripped from the SoundFont to reduce the size of your project.
- Button Extract all Patchs & Waves: keep all patches and samples from the selected banks.
Warning: Extracting samples can take a while if the SoundFont is huge. From some tens of seconds to tens of minutes, during this extraction, the Unity editor is locked and don’t react to your input. Be patient! This action is only necessary at the first loading of a SoundFont.
When the work is done, the sub panel Logs displays some information about the extraction. You can save logs, open folder with the logs, clear the logs.
- Free Version is published with the SoundFont “GeneralUser_GS_SoftSynth_v144”. It’s a free sound font with a good balancing between size and quality but you can’t change it. To download the same SoundFont as for the free version, you could visit the excellent Christian Collins’s site.
- Christian Collins site here
- and search for GeneralUser GS SoftSynth version 1.44.
- Demo video here
- Don’t forget to ask authorization for copyrighted resources!