How to use multiple soundfonts in TiMidity++

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

# The default reverb is horrible
# https://sourceforge.net/p/timidity/mailman/timidity-talk/?viewmonth=200907
opt -s 44100
opt -f
opt -EFresamp=L
opt -EFreverb=4,21
opt -EFns=0
opt -m 3000
opt -p 256
opt -EFchorus=2

dir /path/to/soundfonts

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

  # Single instruments can be overwritten:
  #
  # PROGNUMBER %font SFFILE SFBANK [KEY] [OPTIONS]
  # - the soundfont SFFILE will be used for the MIDI instrument PROGNUMBER within the bank
  # - %font is a string to tell timidity++ that a soundfont file is used
  # - SFFILE is the path to the soundfont file (absolute or relative to a directory specified with "dir")
  # - SFBANK and SFBANK defines which instrument (identified by bank number and bank number) in the
  #   soundfont file SFFILE will be used for PROGNUMBER
  000 %font "/path/to/piano.sf2"  0  0 # Acoustic Grand Piano
  004 %font "/path/to/rhodes.sf2" 0  0 # Bright Acoustic Piano
  040 %font "/path/to/violin.sf2" 0 40 # Violin
  # etc.

# "drumset" is more complicated than expected. Every instrument within the drum 
# kit must be mapped individually, like in GUS patches, although they are all 
# in the same program number the soundfont.
# A third parameter specifies ... something - IF the soundfont implements 
# proper percussion! Otherwise it must be left out.
# Test with timidity -ia to see errors.
# PROGNUMBER %font SFFILE SFBANK [KEY] [OPTIONS]
# 
# The percussion program number are documented in https://en.wikipedia.org/wiki/General_MIDI#Percussion
drumset 0
  029 %font "drumkit.sf2" 128 0 29  amp=70 # scratch1
  030 %font "drumkit.sf2" 128 0 30  amp=70 # scratch2
  035 %font "drumkit.sf2" 128 0 35  amp=70 # kick1
  036 %font "drumkit.sf2" 128 0 36  amp=70 # kick2
  037 %font "drumkit.sf2" 128 0 37  amp=70 # stickrim
  038 %font "drumkit.sf2" 128 0 38  amp=70 # snare1
  040 %font "drumkit.sf2" 128 0 40  amp=70 # snare2
  041 %font "drumkit.sf2" 128 0 41  amp=70 # tomlo2
  042 %font "drumkit.sf2" 128 0 42  amp=70 # hihatcl
  043 %font "drumkit.sf2" 128 0 43  amp=70 # tomlo1
  044 %font "drumkit.sf2" 128 0 44  amp=70 # hihatpd
  045 %font "drumkit.sf2" 128 0 45  amp=70 # tommid2
  046 %font "drumkit.sf2" 128 0 46  amp=70 # hihatop
  047 %font "drumkit.sf2" 128 0 47  amp=70 # tommid1
  048 %font "drumkit.sf2" 128 0 48  amp=70 # tomhi2
  049 %font "drumkit.sf2" 128 0 49  amp=70 # cymcrsh1
  050 %font "drumkit.sf2" 128 0 50  amp=70 # tomhi1
  051 %font "drumkit.sf2" 128 0 51  amp=70 # cymride1
  052 %font "drumkit.sf2" 128 0 52  amp=70 # cymchina
  053 %font "drumkit.sf2" 128 0 53  amp=70 # cymbell
  054 %font "drumkit.sf2" 128 0 54  amp=70 # tamborin
  055 %font "drumkit.sf2" 128 0 55  amp=70 # cymsplsh
  056 %font "drumkit.sf2" 128 0 56  amp=70 # cowbell
  057 %font "drumkit.sf2" 128 0 57  amp=70 # cymcrsh2
  059 %font "drumkit.sf2" 128 0 59  amp=70 # cymride2
  060 %font "drumkit.sf2" 128 0 60  amp=70 # bongohi
  061 %font "drumkit.sf2" 128 0 61  amp=70 # bongolo
  062 %font "drumkit.sf2" 128 0 62  amp=70 # congahi1
  063 %font "drumkit.sf2" 128 0 63  amp=70 # congahi2
  064 %font "drumkit.sf2" 128 0 64  amp=70 # congalo
  069 %font "drumkit.sf2" 128 0 69  amp=70 # cabasa
  073 %font "drumkit.sf2" 128 0 73  amp=70 # guiro1
  074 %font "drumkit.sf2" 128 0 74  amp=70 # guiro2
  076 %font "drumkit.sf2" 128 0 76  amp=70 # woodblk1
  077 %font "drumkit.sf2" 128 0 77  amp=70 # woodblk2
  078 %font "drumkit.sf2" 128 0 78  amp=70 # cuica1
  079 %font "drumkit.sf2" 128 0 79  amp=70 # cuica2
  082 %font "drumkit.sf2" 128 0 82  amp=70 # shaker

# other drum sets:
# 16 power
# 32 jazz
# 48 orchestral
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.