in reply to Re: MIDI time elapsed stat
in thread MIDI time elapsed stat

You're the best!

Perhaps it might help to also read this tip that I found yesterday.

I can't judge your recent code until I study a little more about Midi. I've also got the MIDI.PM family. And I guess that most might be obtained with MIDI::Score. But it's all my guessing.

Besides, I managed to use Midifade by providing a Win-DOS short midi filename (but keeping also the long filename). I used dir /X instead of opendir. Then, some splitting whitespaces would provide both: short and long filename to do all the job.

I had some complains, I guess, with the speed of the qx commands but I have overcome that difficult part.

Anyway, I am interested in studying a bit more about handling MIDI files and your code would be of great help.

Lot's of thanks, zentara!

.{\('v')/}
_`(___)' __________________________
Wherever I lay my KNOPPIX disk, a new FREE LINUX nation could be established.

Replies are listed 'Best First'.
Re^3: MIDI time elapsed stat
by zentara (Cardinal) on Nov 29, 2004 at 11:21 UTC
    Yes, I have the information from your tip, but just couldn't seem to "get my head around it". :-) I tried testing on midi files ranging from 96 ticks/qn to 480 ticks/qn, and could only get good results with perl if I used a different equation for each range...sort of a lookup table. However, the gnmidi utility was always correct, and the various midi players also report correct time. The gnmidi source is not open source, so I can't see what he does, but I may look at the open source midi players, and see how they compute it in C. It's got to be a simple equation, yet it's implementation eludes me. :-(

    I'm not really a human, but I play one on earth. flash japh