I mentioned previously that I wrote a program to convert MIDI files to LilyPond files. That program is called MidiToLily and it’s now freely available on GitHub. It’s a console app, doesn’t have an installer, and doesn’t store things in the registry or anywhere else. It does have command line help, including a few examples.
https://github.com/victimofleisure/MidiToLily Notes can be quantized to a regular grid, a triplet grid, or both grids, in which case the note snaps to whichever grid is nearest. The title, composer, and copyright can be specified, with Unicode support. Clef overrides, sections, and ottavas are also supported. The tempo, time signature, and key signature are read from the input MIDI file. I have only tested MidiToLily on type 1 MIDI files. MidiToLily includes a verification feature which is very useful to me. It depends on the fact that LilyPond can output a MIDI file that corresponds to its engraving. MidiToLily invokes this feature in the .ly file it creates, so after LilyPond runs, in addition to a PDF, you’ll also have a .mid file. Run MidiToLily a second time, specifying the verify flag, and instead of outputting a LilyPond file, MidiToLily looks for a .mid file with the same name as the output file. It then compares that LilyPond-generated MIDI file to the original MIDI file. The comparison automatically accounts for certain expected differences, and it creates two text files: MidiToLilyIn.txt for the original MIDI, and LilyPondMidi.txt for LilyPond’s MIDI. If MidiToLily reports differences, you can investigate them by comparing these two text files, using a source comparison utility, such as WinMerge for example. MidiToLily does what I need it to do, but undoubtably it could be improved. I make no claim that it’s useful to others, but I hope so. Best regards,Chrishttps://www.chriskorda.com/