我正在尝试玩这个 MIDI 文件下载自这里,但我得到:
$ timidity --verbose marivonnig1\ \(1\).mid
Requested buffer size 32768, fragment size 8192
ALSA pcm 'default' set buffer size 32768, period size 8192 bytes
Playing marivonnig1 (1).mid
MIDI file: marivonnig1 (1).mid
Format: 1 Tracks: 2 Divisions: 192
Sequence: Marivonnig
Text: By Traditionnel
Text: Generated by NoteWorthy Composer
Time signature: 2/4 24 clock 8 q.n.
Time signature: 3/4 24 clock 8 q.n.
Time signature: 2/4 24 clock 8 q.n.
Time signature: 3/4 24 clock 8 q.n.
Time signature: 2/4 24 clock 8 q.n.
Time signature: 3/4 24 clock 8 q.n.
Time signature: 2/4 24 clock 8 q.n.
Time signature: 3/4 24 clock 8 q.n.
Time signature: 2/4 24 clock 8 q.n.
Time signature: 3/4 24 clock 8 q.n.
Time signature: 2/4 24 clock 8 q.n.
Track name: Staff
364 supported events, 3413810 samples, time 1:17
No instrument mapped to tone bank 0, program 41 - this instrument will not be heard
No pre-resampling cache hit
和完全没有声音。
多一个链接,同一文本的不同旋律。
对于该网站的一些 MIDI 文件,我听到了一些声音,但我仍然收到消息没有乐器映射到音色库 0--不会听到这个乐器我怀疑我听到的不是我应该听到的。
也许它需要一些声音字体,但它没有告诉我是哪一个。
我如何听到旋律?
答案1
timidity
是一个 midi 渲染器,但它本身不带有乐器定义。
看来您缺少一些声音字体(至少对于程序41
)。为了解决这个问题,您可能需要安装/启用另一组仪器。例如流体GM似乎相当完整。安装后请务必启用它。类似以下内容应该有所帮助(以 开头的行$
是要执行的命令;以 开头的行#
只是注释):
$ sudo apt-get install fluid-soundfont-gm
# then edit your /etc/timidity/timidity.cfg to activate the new soundfont
# (and deactivate the old ones), e.g.:
$ sudo sed -e 's|^source|#source|' -e '$a source /etc/timidity/fluidr3_gm.cfg' -i /etc/timidity/timidity.cfg
# restart timidity
$ sudo /etc/init.d/timidity restart
# and play your file
$ timidity --verbose marivonnig1\ \(1\).mid
答案2
安装补丁
默认使用 timidity freepats
,尝试安装eawpatches
作为替代方案:
sudo su
echo "deb https://www.fbriere.net/debian stable misc" > /etc/apt/sources.list.d/midi-fbriere.net.list
wget -q -O- 'https://www.fbriere.net/public_key.html' | sudo apt-key add -
wget -q -O- 'http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x96B4BF71E4D7FB01' | sudo apt-key add -
apt install eawpatches-package
make-eawpatches-package
chmod 777 ./eawpatches_12-10+local_all.deb
sudo apt-get install ./eawpatches_12-10+local_all.deb
# then edit your /etc/timidity/timidity.cfg to activate the new soundfont
# (and deactivate the old ones) with:
sudo sed -e 's|^source|#source|' -e '$a source /etc/timidity/eawpatches.cfg' -i /etc/timidity/timidity.cfg