Search code examples
midisoundfont

How to create a soundfile with Timidity++ specifying a particular soundfont sf2 file?


I have a midi file scale.mid that I can play via

timidity my-midi-file.mid -Ow

How can I play this using the instruments of my own soundfont .sf2 file?


Solution

  • timidity can accept a configuration parameter using the option -x i.e. --config-string. In this case:

    timidity my-midi-file.mid --config-string="soundfont my-soundfont-file.sf2"
    

    From the timidity man file:

    -x str, --config-string=str

    Configure TiMidity++ with str. The format of str is the same as timidity.cfg.