Just run this :
$ ./midi2fmf.py music.mid
It will write the fmf file on stdout, if you want to write to a file you can do this :
$ ./midi2fmf.py music.mid > music.fmf
This is based on this project with a few modifications of my own, including shell arguments support instead of modifying the script and a minimum note lengh (the original script was for some reason creating very short pauses while the flipper only supports 1/128 of a note as its very minimum).
As the original script didn’t featured any license and I didn’t just reuploaded the file without any change, I took the liberty to license it under the GPLv3 license.