用midi2audio实现midi转wav、mp3
- 安装midi2audio
- 下载soundfont文件(https://freepats.zenvoid.org/Piano/YDP-GrandPiano/YDP-GrandPiano-SF2-20160804.tar.bz2)
- 下载免安装版的fluidsynth(网盘提取码:1ki5 或者 https://github.com/FluidSynth/fluidsynth/releases/tag/v2.2.4),并为bin目录添加到环境变量path
- 具体用的时候sound_font指定好,sample_rate的话点进源码容易看到一个默认的常量值,选这个赋值就好
- 接下来的操作就看python第三方库文档了