in reply to MIDI time elapsed stat
That will give a print out like this for each midi file in the directory:wine -- mididir.exe -length
Where the MM::SS is at the end after GS,Y:\ZLIG~MY.MID: (33 kb, format 1, 11 tracks, GS, 3:00)
Now you have 2 problems, working out a way to translate the crappy 8.3 notation output for the filename to the real filename, and extracting the MM::SS info and probably throwing it in a hash for saving in a database.
Heres an UPDATE: If you go to the free utilities section of gnmidi.com, there is the miditime utility. You can run it on an individual file like this:
and you will get output like this#!/usr/bin/perl my $midifile = shift; system("wine -- midifade -songtime $midifile");
So run it with backticks, and grab the last set of digits.song: units 0 - 34475 time 0:00.000000 - 2:59.545800
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: MIDI time elapsed stat
by chanio (Priest) on Nov 27, 2004 at 17:18 UTC |