fbpx
Skip to main content

MIDI Forum

Soundfont tool, ext...
 
Notifications
Clear all

Soundfont tool, extract instrument files

7 Posts
4 Users
0 Reactions
13.8 K Views
Jonas
Posts: 207
Reputable Member
Topic starter
 

Does anyone know any tool to create/ instrument files, preferably with drum patch listed, from SF2 soundfont files?
There was an old program that "almost" did this MegaFont, but I do not think it listed drumpatches "drum sample" names.

This is not exactly MIDI, but related so I hope my question is ok.

JT

 
Posted : 17/06/2021 8:32 pm
Pedro Lopez-Cabanillas
Posts: 154
Estimable Member
 

I am not sure to understand what you mean with "instrument files". Maybe the .ins file text format used by Cakewalk/Sonar to map banks and program numbers to program names? Or do you mean extracting the digital audio samples from the SF2 files? Please clarify.

Maybe you are trying to simply parse the SF2 format, looking for the names. In this case, you may be interested in the sf2text utility. The sources are at GitHub: https://github.com/tiwai/awesfx

Another option is using the Fluidsynth library to parse the soundfont file. Here is a gist demoing this proposal.

 
Posted : 18/06/2021 1:17 am
Jonas
Posts: 207
Reputable Member
Topic starter
 

Yes i meant a cakewalk ins file extractor i already made a insfile parser. I got megafont working so i got the banks from the SF i tried to read out.
But the note names of drum patches isn't there, and i wanted those.

 
Posted : 18/06/2021 4:20 am
JohnG
Posts: 227
 

If you download the GM2 specification and look at Appendix B "Percussion Sound Set", on page 32, you can see which Note Number is used for each percussion sound.
The first column (PC#1 Standard set) gives the basic GM set, the other columns the enhanced GM2 sets.
The GM set uses MIDI note numbers 27 to 88 only.

 
Posted : 18/06/2021 5:51 am
Jonas
Posts: 207
Reputable Member
Topic starter
 

I have the standard set mapped for my SC-7 i would like something that can extract the sets from SF2 files.

 
Posted : 18/06/2021 11:06 am
Pedro Lopez-Cabanillas
Posts: 154
Estimable Member
 

The sf2text utility by Takashi Iwai that I've mentioned earlier does not directly generate an .ins file, but you can certainly convert the SF2 structure to text with it. Another related utility by the same autor is sftovkb, which is included in his vkeybd program. They do not directly give you the final result, but the programs are open source, and easy to understand plain C code. The vkeybd program is a classic virtual keyboard for Linux, that was an inpiration for my VMPK, which also contains a class to parse SF2 and other formats and generate an .ins file, but it doesn't export the drum names, only the patch names.

Anyway, my advice is to use some existing code as inspiration to parse the SF2 format, and write a conversion utility yourself.

 
Posted : 18/06/2021 2:04 pm
Maciej
Posts: 8
Active Member
 

Maybe Vienna Soundfont Studio...

 
Posted : 22/06/2021 10:54 am
Share: