在 Linux 中播放 midi 文件

2020-07-26  本文已影响0人  孙庚辛

The total solution for play midi files under Ubuntu/Deepin/Debian Linux is:

  1. Install all required pacages by running

    sudo apt-get install freepats timidity timidity-interfaces-extra
    
    
  2. Run timidity -iA in terminal first to check/get started. It should give something like this

    $ timidity -iA
    Requested buffer size 32768, fragment size 8192
    ALSA pcm 'default' set buffer size 32768, period size 8192 bytes
    TiMidity starting in ALSA server mode
    Opening sequencer port: 129:0 129:1 129:2 129:3
    
    

If so, congratulations, your midi is working.
You can play a midi file directly from the command timidity followed by the file name. For example,

timidity awesometune.mid

Or, if you want a GUI, you can simply type

timidity -ig

and an old-fashioned window will pop up.

timidity-ig

另外一个更好的工具是 LMMS, 下载后不用安装就可以运行。 不过需要配合SoundFont文件, 在配置中指定下载好的SoundFont文件即可, 导入 midi 文件,就可以播放了。 一个比较好用的 SoundFont 文件是 ChoriumRevA.SF2

上一篇 下一篇

猜你喜欢

热点阅读