How to use multiple soundfonts in TiMidity++

Adapt the following timidity.cfg to your needs.
# http://apfelboymchen.net/gnu/notes/timidity++%20multiple%20soundfonts.html

bank 0
  # The main soundfont
  # If no instrument is defined explicitely below, this soundfont will be used.
  soundfont "/path/to/main_soundfont.sf2"

  # Different soundfonts for different instruments are defined as follows.
  #
  # number %font file bank prog [key] [options]
  # - number is the MIDI instrument number
  # - %font is to tell timidity++ that a soundfont file is used
  # - file is the path to the soundfont file
  # - bank and prog is specific to the soundfont used
  0  %font "/path/to/piano.sf2"  0 0
  4  %font "/path/to/rhodes.sf2" 0 0
  40 %font "/path/to/violin.sf2" 0 40
  # etc.

# "drumset" is more complicated than expected. Every instrument within the drum 
# kit must be mapped individually, like in GUS patches, although they are just 
# one instrument in the soundfont.
# I took the list from /usr/share/timidity/shompatches/gsdrum.cfg
drumset 0
  29 %font "/path/to/drumkit.sf2" 0 2 amp=70 # scratch1
  30 %font "/path/to/drumkit.sf2" 0 2 amp=70 # scratch2
  35 %font "/path/to/drumkit.sf2" 0 2 amp=70 # kick1
  36 %font "/path/to/drumkit.sf2" 0 2 amp=70 # kick2
  37 %font "/path/to/drumkit.sf2" 0 2 amp=70 # stickrim
  38 %font "/path/to/drumkit.sf2" 0 2 amp=70 # snare1
  40 %font "/path/to/drumkit.sf2" 0 2 amp=70 # snare2
  41 %font "/path/to/drumkit.sf2" 0 2 amp=70 # tomlo2
  42 %font "/path/to/drumkit.sf2" 0 2 amp=70 # hihatcl
  43 %font "/path/to/drumkit.sf2" 0 2 amp=70 # tomlo1
  44 %font "/path/to/drumkit.sf2" 0 2 amp=70 # hihatpd
  45 %font "/path/to/drumkit.sf2" 0 2 amp=70 # tommid2
  46 %font "/path/to/drumkit.sf2" 0 2 amp=70 # hihatop
  47 %font "/path/to/drumkit.sf2" 0 2 amp=70 # tommid1
  48 %font "/path/to/drumkit.sf2" 0 2 amp=70 # tomhi2
  49 %font "/path/to/drumkit.sf2" 0 2 amp=70 # cymcrsh1
  50 %font "/path/to/drumkit.sf2" 0 2 amp=70 # tomhi1
  51 %font "/path/to/drumkit.sf2" 0 2 amp=70 # cymride1
  52 %font "/path/to/drumkit.sf2" 0 2 amp=70 # cymchina
  53 %font "/path/to/drumkit.sf2" 0 2 amp=70 # cymbell
  54 %font "/path/to/drumkit.sf2" 0 2 amp=70 # tamborin
  55 %font "/path/to/drumkit.sf2" 0 2 amp=70 # cymsplsh
  56 %font "/path/to/drumkit.sf2" 0 2 amp=70 # cowbell
  57 %font "/path/to/drumkit.sf2" 0 2 amp=70 # cymcrsh2
  59 %font "/path/to/drumkit.sf2" 0 2 amp=70 # cymride2
  60 %font "/path/to/drumkit.sf2" 0 2 amp=70 # bongohi
  61 %font "/path/to/drumkit.sf2" 0 2 amp=70 # bongolo
  62 %font "/path/to/drumkit.sf2" 0 2 amp=70 # congahi1
  63 %font "/path/to/drumkit.sf2" 0 2 amp=70 # congahi2
  64 %font "/path/to/drumkit.sf2" 0 2 amp=70 # congalo
  69 %font "/path/to/drumkit.sf2" 0 2 amp=70 # cabasa
  73 %font "/path/to/drumkit.sf2" 0 2 amp=70 # guiro1
  74 %font "/path/to/drumkit.sf2" 0 2 amp=70 # guiro2
  76 %font "/path/to/drumkit.sf2" 0 2 amp=70 # woodblk1
  77 %font "/path/to/drumkit.sf2" 0 2 amp=70 # woodblk2
  78 %font "/path/to/drumkit.sf2" 0 2 amp=70 # cuica1
  79 %font "/path/to/drumkit.sf2" 0 2 amp=70 # cuica2
  82 %font "/path/to/drumkit.sf2" 0 2 amp=70 # shaker
For further information have a look at man timidity.cfg or timidity/timidity.c in the source.

Licensed under the Creative Commons Attribution-Share Alike 3.0 License.