36

The (ex-totem?) Video player proposes the installation of gstreamer1.0-plugins-bad, but after installation there is no playback, nothing. When I try to open the .midi file again, the Video player comes up with the installation again and again. So I guess, this is not the right package.

UPDATE: Rythmbox isn't configured to play .midi files either.

enter image description here

imrek
  • 184
  • 1
  • 8
  • 17
  • 1
    See [Arch's MIDI doc](https://wiki.archlinux.org/index.php/MIDI#Software) and [SoftwareSynthesisHowTo](https://help.ubuntu.com/community/Midi/SoftwareSynthesisHowTo). – CL. May 12 '16 at 15:00

5 Answers5

31

Open the terminal and enter:

sudo apt install timidity timidity-interfaces-extra

Enter your password, another prompt may appear type, Y and hit enter.

Go to your menu, you should now have an application called TiMidity++ launch it. In terminal would be timidity mymusic.mid.

In TiMidity++ go to File > load and redirect it the location of your midi file, select the file, then okay then play

Pablo Bianchi
  • 14,308
  • 4
  • 74
  • 117
Lützel Gordon
  • 321
  • 2
  • 5
  • 8
    Does anyone know how to associate .mid file to play using timidity? – Soichi Hayashi Jan 14 '17 at 16:52
  • 2
    Not necessary to install the `timidity-interfaces-extra` - it's quite spooky. Can use `timidity` directly from the terminal. – Andriy Makukha Feb 19 '19 at 10:45
  • @SoichiHayashi check [how to associate any MIME type](https://askubuntu.com/a/4365/349837) with a default program. Then you can test from CLI with `xdg-open filename.mid`. – Pablo Bianchi Mar 28 '19 at 02:55
  • under 18.04, timidity works with errors `No instrument mapped to tone bank 0, program 78 - this instrument will not be heard` and it plays nothing where numerous other players (e.g. vlc) play tunes, and its ++ gui version crashes on these errors – kay27 May 24 '22 at 00:27
30

VLC media player can do that for you given that the plugin for midi is installed.

sudo apt install vlc vlc-plugin-fluidsynth

After that you can play your midi library with VLC without installing timidity.

Pablo Bianchi
  • 14,308
  • 4
  • 74
  • 117
Ashish Yadav
  • 401
  • 4
  • 2
9

The gstreamer method of playing MIDI is to use the sound card's sequencer to do so. However, many sound cards do not necessarily have an instrument for playing MIDI, these days. Instead, you will need to install a software sequencer, such as timidity to play the files.

dobey
  • 40,344
  • 5
  • 56
  • 98
8

I needed proper sound fonts.

sudo apt install fluid-soundfont-gm fluid-soundfont-gs
Rob Audenaerde
  • 231
  • 2
  • 10
  • VLC complains about missing sound font file. I installed what you wrote but how to setup sound font file path in VLC? The settings are in Input/Codecs>Audio Codecs>FluidSynth – Marecky Apr 16 '21 at 18:00
  • ok found it with `dpkg-query -L fluid-soundfont-gm` and `dpkg-query -L fluid-soundfont-gs`! – Marecky Apr 16 '21 at 18:05
  • I installed fonts and configured VLC but I still can't play midi files. I get error in the console: `fluidsynth decoder error: cannot load sound fonts file /usr/share/sounds/sf2/FluidR3_GS.sf2` or `fluidsynth decoder error: cannot load sound fonts file /usr/share/sounds/sf2/FluidR3_GM.sf2` – Marecky Apr 16 '21 at 18:17
0

There is also a Firefox plugin now: MIDI Player.

If all you need is playing the occasional MIDI that comes up on web pages like on Wikipedia, this may be the simplest solution.

mivk
  • 5,082
  • 1
  • 47
  • 56