Monday, April 16, 2007

MIDI data on the oscilloscope

So, whilst attempting to debug some stuff, I connected a MIDI out port to the oscilloscope. The results are very clear - you can really see the data. For those who are unfamiliar with the MIDI protocol a message such as this will consist of three 8 bit bytes. The status byte is the first one (the first four bits represents the data type - control change in this case- and the last four bits represents the channel), the second byte is the controller number and the last byte is the controller value.


| Byte 1 | Byte 2 | Byte 3 |
| 1XXX | XXXX | 0XXXXXXX | 0XXXXXXX |
| Type | Ch. | Data 1 | Data 2 |

So for this stuff it goes like this:

| CC | Ch. | CC# | CC Value |



Here is the data that was sent:

Picture 1
Control (1011)
Channel 1 (0000)
Controller Number 1 (00000001)
Controller Value 1 (00000001)


Picture 2
Control (1011)
Channel 7 (0110)
Controller Number 8 (00001000)
Controller Value 39 (00100111)


Picture 3
Control (1011)
Channel 14 (1101)
Controller Number 22 (00010110)
Controller Value 118 (01110110)


Picture 4
Control (1011)
Channel 16 (1111)
Controller Number 127 (01111111)
Controller Value 127 (01111111)
In order to get the pictures as smooth and clean as this i sent the same data out at a period of 10ms or so. Or at least the computer says it was sending MIDI messages out at this rate. You know what i mean...



0 comments: