I am looking for a software that converts MIDI files into music notation.

I want the following features:

  1. Should work on Linux
  2. Should be able to run in terminal
  3. Should be able to save the music sheet in a image format: JPEG or PNG

I have tried using musescore, which is an excellent software, but I can't find any command line (shell) interface.


1 Answer 1


There is a music notation program called Lilypond which includes a command line interface and a command line midi2ly converter that will read in a midi file and output a lilypond file.

  • Should work on linux Yes and OS/X, Windows
  • Should be able to run in terminal Yes or GUI for the main program
  • Should be able to save the music sheet in a image format: jpeg or png Yes By default saves as both pdf and poscript format but you can specify -fpng for png format or -dbackend=svg for svg format
  • Price: Free - Gratis & Open Source GNU GPL

The output of Lilipond is very high quality and the input files, (output from midi2ly), are text files that can easily be tweaked as needed.

While I haven't tested it you should be able to use:

midi2ly somefile.md | lilypond --pdf - -o somefile

There are a couple of known shortcomings of midi2ly especially when converting midi files that have been recorded by someone playing on a keyboard.

  • Isn't there a typo in the command after the | ? I am not getting the desired result.
    – bela83
    Commented May 2, 2021 at 14:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.