Midi Line Code Question (Low Level)
Jeremy Brookes
jezz at enterprise.net
Tue Jun 9 17:30:33 CEST 1998
>I'm happily integrating my 256 pot midi controller UP however the midi
>output section is causing much grief. I have a series of parallel to
>seriel shift registers that I load then shift out at the proper rate
>howver the message is some how corrupted. I verified that the bits in
>the massage are correct:
>
>F0 7F AA DD F7
>AA is pot address
>DD is pot data
>|=start and stop bytes = binary one
>
>|11110000||01111111||aaaaaaaa||dddddddd||11110111|
In MIDI all the data bytes should be between 0 and 127. You cannot use 8
bits for AA and DD in your above example. If you happened to be sending the
data for pot number 247 (=F7 Hex), this would look like the end of sysex
byte (F7) and any receiving software would then ignore the subsequent bytes
until it got another intact message. Basically the first byte of all MIDI
messages has the MSB set (e.g. 9n = Note On, 8n = Note Off). These messages
have a defined number of following bytes (e.g. Note On has two; note and
velocity). System Exclusive is a special case where the number of following
bytes is undefined. The end of sysex (F7) is used to terminate the data.
The first byte after a sysex message should be the manufacturer code (01 =
SCI, 02 = Big Briar, etc.). There is a code for home brew equipment - I
can't remember if it is 7F though...
>I am conforming to 0 = current on.
I think this is right.
>1.Is there any special line code for midi?
>2.Does a 1 have to return to zero before a new 1 can be sent?
>3. Is there a better list for asking these MIDI hardware questions?
>4. I was given a similar schematic from an old electronic musician mag
>however it's message format is weird.
>|mmmmmmm||nnnnnnnn0|oooooooo0||
>(I can forward the EM schematic for someone to take a peek)
Do you have start and stop bits included? It would also appear from above
that you are sending MSB first. MIDI is LSB first.
More information about the Synth-diy
mailing list