I'd like to do something like
$ play filename.mid
and hear the midi file played without opening up a graphical program. Is there a package for Ubuntu that can do this?
I'd like to do something like
$ play filename.mid
and hear the midi file played without opening up a graphical program. Is there a package for Ubuntu that can do this?
There are many different packages/commands you can try:
wildmidi
(as used by gstreamer)timidity
(found this very CPU intensive)playmidi
(never tried personally)You'll likely want the
playmidi
package (sudo apt-get install playmidi
) which will allow you to play midi files from the command line.playmidi filename.mid
I know this thread is old, but I was looking for answers for a Raspberry Pi but didn't find any. After more work I came up with the following, it may work in Ubuntu too. The output is through a cheap USB to midi interface.
On Raspbian Jessie Lite with no extra installs:
fluidsynth
from http://www.fluidsynth.org/.Use it like this:
fluidsynth /some/dir/with/sundfonts/some_soundfont.sf2 some.mid
You can find soundfonts here: https://musescore.org/de/handbuch/soundfont
And quite a nice collection of MIDI files to try this out here: http://garyrog.50megs.com/midi1.html
I especially like the soundfont "Timbres of Heaven" from http://midkar.com/soundfonts/.
If you have fluidsynth installed, you can also play Midi files with VLC by installing the
vlc-plugin-fluidsynth
package.Another alternative besides Fluidsynth nowadays is Timidity. Install the packages
timidity
,timidity-interfaces-extra
andfreepats
(the latter is about 30MB, but smaller than the sf2 files influid-soundfont-gm
). Then the following should work: