Duration of midi file


    Apr 08 2006 | 6:41 am
    Does anybody know a way of finding out the length of a midifile without having to play through it? (i.e. something akin to sfinfo~ for midi files)
    I'm working on a patch that converts a midi-file to a bitmasked buffer~. Currently I'm playing through the file in real-time, but it there's a faster way, it'd be nice...
    thanks,
    Peter McCulloch

    • Apr 08 2006 | 10:03 am
      I do this with jit.qt.movie. Quicktime reads and plays midi files so you can read them into jit.qt.movie, ask the right questions, et voila!
      Cheers, Gary Lee Nelson TIMARA Department Oberlin College www.timara.oberlin.edu/GaryLeeNelson
    • Apr 09 2006 | 8:16 am
      Java ? You may use the javax.sound.midiFileFormat class, then request its microsecondsLength (long) field/property. I'm about to put it in my MidiConverter object, in order to make it a kind of [mfinfo], for those who don't own Jitter (as Gar says, you may also use jit.qt.movie for this...)
      f.e
    • Apr 09 2006 | 2:51 pm
      Any chance you have a java applet that plays type 1 midi files?
      Cheers, Gary Lee Nelson TIMARA Department Oberlin College www.timara.oberlin.edu/GaryLeeNelson