Convert MIDI file to WAV using fluidsynth on OS X
I found the easiest solution to be timidity:
timidity input.mid -Ow -o out.wav
If you use homebrew it's also trivial to install:
brew install timidity
There is a simpler way than using SoX: when FluidSynth is installed with libsndfile support, it outputs WAV by default. This is how Homebrew installs FluidSynth by default:
$ brew install fluid-synth
...
$ fluidsynth -T help
FluidSynth runtime version 2.0.8
Copyright (C) 2000-2019 Peter Hanappe and others.
Distributed under the LGPL license.
SoundFont(R) is a registered trademark of E-mu Systems, Inc.
-T options (audio file type):
'aiff','au','auto','avr','caf','flac','htk','iff','mat','mpc','oga','paf','pvf','raw','rf64','sd2','sds','sf','voc','w64','wav','wve','xi'
auto: Determine type from file name extension, defaults to "wav"