Home:ALL Converter>Decode a RPN in a MIDI Channel Event

Decode a RPN in a MIDI Channel Event

Ask Time:2012-10-04T08:15:11         Author:Antoine

Json Formatter

I'm working on midi file format, and I encountered an issue with a file.

Here is the content of my midi sample file where the channel event appears.

["00", "b1", "64", "00", "00", "65", "00", "00", "06", "0c", "00", "e1", "00", "40", "00", "b1"]

I think this is a RPN event (the part I hilighted).

But I didnt manage to decode this RPN. Why the controller 64 is followed by 2 bytes and 65 too.
How to know if there is only one or two bytes to decode ?

I found this ressources, but can't find an answer :
http://www.sonicspot.com/guide/midifiles.html
http://www.somascape.org/midi/tech/spec.html#rpns

EDIT :
Later in the same midi file :
["00", "b1", "65", "00", "00", "64", "01", "00", "06", "40", "00", "26", "00", "00", "65", "7f", "00", "64", "7f", "00", "b0", "64", "00", "00", "65", "00"]

Author:Antoine,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/12718691/decode-a-rpn-in-a-midi-channel-event
yy