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?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
You'll likely want the
playmidi package (
sudo apt-get install playmidi) which will allow you to play midi files from the command line.
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/.
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:
pi@pizerow:~$ aconnect -l client 0: 'System' [type=kernel] 0 'Timer ' 1 'Announce ' client 14: 'Midi Through' [type=kernel] 0 'Midi Through Port-0' client 20: 'CH345' [type=kernel] 0 'CH345 MIDI 1 ' pi@pizerow:~$ aplaymidi --port=20:0 myfile.mid