lilypond-user
[Top][All Lists]
Advanced

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

understanding midi files


From: karl
Subject: understanding midi files
Date: Sun, 26 Jan 2014 22:32:53 +0100 (CET)

 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

-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57





reply via email to

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