I am an algorithmic composer with a library of over one hundred .SFZ files. I have been generating a bunch of single-track MIDI files using midiutil in python, and then manually opening up Sforzando in a DAW to play the midi tracks using SFZ soundfonts.

Is there a way for me to automate this process? I can think of two possibilities, neither of which I've found the solution for. I could convert all the .SFZ to .SF2 and then use fluidsynth or timidity, but I haven't found a way to do that in an efficient manner given that I'd be converting 100+ files (there is an unanswered question on this site regarding how to do this). Alternatively, I'd like to find a MIDI rendering software that is a) usable via command line and b) compatible with SFZ. Do either of those things exist? I am on OS X, but could work with virtual box linux.


1 Answer 1


This can be solved using sfizz, specifically the sfizz_render program they include. I couldn't find a packaged version of that program but you can build it from source as follows:

git clone https://github.com/sfztools/sfizz.git
cd sfizz
git submodule update --init --recursive
mkdir build && cd build

The build should include a folder called clients which contains an executable named sfizz_render. You can give that a path you your sfz, midi and output wav like so:

./sfizz_render --sfz "/path/to/Virtuosity_Drums-924/Programs/01-basic-kit.sfz" --wav /path/to/sfizz_render_test.wav --midi /path/to/midi/path.mid

This should work on Linux as well. Hope that helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.