G-Do,
what operating system are you using?
I am a little frustrated with PyGame, since I can never get a midi file to play! PyGame is based on SDL, when I use its SDL counterpart in Ruby it plays midi files!
In my Delphi days I used the MPlayer component, and that one plays midi files and shows a progress bar. I even bound the progress information to a slide show. So it must be possible to get the length information for midi files.
vegaseat
DaniWeb's Hypocrite
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
G-Do,
you and vegaseat seem to share fascination with midi music files. I have explored vegaseat's code snippet
http://www.daniweb.com/code/snippet431.html
and it work well at least on Windows XP. Midi is great stuff!
I am thinking that pythonmidi is the same package as PMIDI, at least the files/directories are the same.
bumsfeld
Nearly a Posting Virtuoso
1,445 posts since Jul 2005
Reputation Points: 404
Solved Threads: 184
I am getting old!
I did suddenly remember that I posted a Python snippet that used the length of an audio file, including .MID files.
Take a look at:
http://www.daniweb.com/code/snippet467.html
It uses wx.media.MediaCtrl() and should work on Linux. You may have to give it the right backend.
vegaseat
DaniWeb's Hypocrite
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417