[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sun, 20 Sep 2009 18:29:39 +0200
I have been hacking around a little bit with the midi2ly script.
Some time ago I reported a problem with tunes that were not in
But as reaction I got a "sorry, midi2ly is not supported anymore"
So I decided to try a little Python hacking myself.
I found the problem was in format-1 MIDI files, where track 1 often
(always ?) contains Time and Tempo information, but no notes. And the
midi2ly script only writes out tracks if they contain notes. Result:
everything will get the default 4/4 time and the default 4=60 tempo.
Then I started hacking.
Here's my ChangeLog:
- TrackA(time and tempo events, but no notes) and TrackB are combined
in one Staff. Time signature and Tempo are correctly used now.
- I have added some commandline options
-T --time NUM/DEN manually force a global time signature
-P --partial DUR specify an upbeat duration
--skip use invisible rests (s) for rests.
I have changed the default behaviour to
use visible rests (r)
-w --warranty The warranty message was broken. Fixed.
- I use the variable program_version in more places in the script.
For example \version is no longer written as "2.7.18" but uses the
actual program_version ("2.13.3") .
I have attached my version of midi2ly. Anyone who is interested may take
a look at it or just try it. There are still some serious problems (
like (long) notelengths that cross barlines ) but I think my version
already works a little better than the previous one.
I have just started learning Python, and am not very good with git.
Maybe someone more experienced can evaluate my version of the script,
maybe improve or correct it, and then take it to the git ?
Description: Text document
- midi2ly continued,
Martin Tarenskeen <=