I'm searching a tool that can be used in Python or via the command line (preferably Windows but Linux would also be okay) that returns a .wav or .mp3 file for a MIDI file.
What is the best choice for this task?
Software Recommendations Stack Exchange is a question and answer site for people seeking specific software recommendations. It only takes a minute to sign up.Sign up to join this community
And for MP3 conversion you can put it together with timidity + ffmpeg:
sudo apt install timidity ffmpeg timidity MIDI_sample.mid -Ow -o - | ffmpeg -y -f wav -i - MIDI_sample.mp3
Tested on Ubuntu 20.04 with this MIDI file: https://en.wikipedia.org/wiki/File:MIDI_sample.mid