Le 26/01/2014 22:32, k...@aspodata.se a écrit :
  I'm experimenting with midi file to lilypond conversion since
midi2ly creates files that are hard to read for me, and thus makeing
it hard to use its output. Yes I can write a program to tidy up its
output, and I did so, but looking at the dump of a midi file with
this simple program:

/// midi.pl:
#!/usr/bin/perl -w

use strict;
use MIDI;

sub proc_file($);
my $file;
foreach $file (@ARGV) {
     proc_file($file);
}


sub proc_file($) {
     my $file = shift;

     my $opus = MIDI::Opus->new({ 'from_file' => $file });
     $opus->dump({ "dump_tracks" => 1 });
}
///

I started to experimenting extracting e.g. header data etc. in
the program:

  http://turkos.aspodata.se/git/musik/bin/miditoly.pl

(Which is work in progress.)

Looking at midi files created with NoteWorthy Composer, e.g.:

  http://www.cipoo.net/downloads/midi/LottiAminAgnus.mid

it should be possible to create a good readable .ly files.
Dumping this midi file with midi.pl, it easy to identify
what goes where.

If you can create example files (midi and pdf) created from
notesetting programs, perhaps we can identify heuristics for a
nice conversion to ly-code.

Idéas and suggested conventions for the generated code are also
welcome.

Regards,
/Karl Hammar

Hi,

Perhaps you don't know midicomp.
Here the latest version:
https://github.com/markc/midicomp

It gives you all information on a midifile.
As you know Perl there is a tiny exemple to use it with midicomp in the README.
Perhaps it's worth to try a nice conversion to ly-code.
HTH.
Phil.

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to