craffel / pretty-midi

Utility functions for handling MIDI data in a nice/intuitive way.
MIT License
873 stars 151 forks source link

[HELP] How to convert .mid to .mp3? #184

Closed gongel closed 4 years ago

gongel commented 4 years ago

Thanks.

craffel commented 4 years ago
import pretty_midi
import librosa

pm = pretty_midi.PrettyMIDI("filename.mid")
audio = pm.fluidsynth(fs=44100)
librosa.output.write_wav("output.wav", audio, 44100)