lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: understanding midi files


From: Phil Hézaine
Subject: Re: understanding midi files
Date: Mon, 27 Jan 2014 11:09:09 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

Le 26/01/2014 22:32, address@hidden 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]