Midi parser that will give note lengths?

    Sep 27 2008 | 5:09 pm
    I need a way to take a standard one track midi file and then convert it into a text list of note pitches and their corresponding lengths.
    So basically the program needs to parse the midi file looking for note on events and then match them to noteoff events and calculate the note length.
    I am tight for time so I was wondering if anyone has something like this that is already written?

    • Sep 27 2008 | 5:23 pm
      oh and by note length it can either be a time in ms based on a tempo or preferably just the note length in notation (e.g. 1/16, 1/8th, wholenote etc.)
    • Sep 27 2008 | 6:24 pm
      Thanks for the patch! I opened it and then clicked on edit lists to go to the specific parameters. I then chose pitch 1 read and then opened a midi file that I had converted to type 0. I get the following errors in the max window:
      error mary_had.mid: bad magic number error coll: error reading mary_had.mid
      Also when I load the patch I have
      out1: no such object lgate: no such object
      Any ideas?
    • Sep 27 2008 | 6:43 pm
      just change [lgate] to [gate]
      use your own .mid file - it wont be able to find mine
      you dont need [out1] for file examination