我试图在OS上将MIDI文件转换为WAV文件。
到目前为止,我有这样的想法:
fluidsynth -F output_sound soundfont.sf2 note.mid这会创建一个output_sound文件,但是,该文件不是WAV,考虑到我获得了以下输出,它似乎是sint16格式的:
~ $ fluidsynth -O help
FluidSynth version 1.1.6
Copyright (C) 2000-2012 Peter Hanappe and others.
Distributed under the LGPL license.
SoundFont(R) is a registered trademark of E-mu Systems, Inc.
-O options (audio file format):
's16'是否有一种简单的方法可以将output_sound转换为终端中的WAV文件(或以任何可编写脚本的方式)?
发布于 2013-11-05 00:57:05
感谢CL.的评论,我想出了以下几点:
sox -t raw -r 44100 -e signed -b 16 -c 1 raw_audio audio.wav发布于 2015-08-02 21:22:46
有一种比使用SoX更简单的方法:当安装带有libsndfile支持的FluidSynth时,默认情况下它会输出WAV。默认情况下,Homebrew安装FluidSynth的方式如下:
$ 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"发布于 2016-01-28 23:16:46
我发现最简单的方法就是胆怯:
timidity input.mid -Ow -o out.wav如果您使用的是自制软件,那么安装也很简单:
brew install timidityhttps://stackoverflow.com/questions/19762063
复制相似问题