parsing midi file - How to separate running data from next time varlen?

Discussion in 'comp.music.midi' started by Max M, Aug 20, 2003.

  1. Max M

    Max M Guest

    I am writing a parser for midi files.

    Due to running status you have to take care that there might be more
    than one set of data after a status byte.

    But how do you tell the difference between a running data byte and the
    next varlen time event?


    regards max M
  2. midiprog2000

    midiprog2000 New Member

    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    0
    Hi Max,

    Even in case of running status there will be a delta time (varlen time as you called it) in between the two messages. If there is no status byte after the delta time value (the first byte after the delta time value is smaller then &h7F), then running status has to be applied. Therefore, the last status byte you received has to be remembered (stored in a variable).

    Kind regards,
    Alain
    www.mididesign.be

Share This Page