| Electronics > Projects, Designs, and Technical Stuff |
| MIDI. Documentation is one thing, implementation the other. O_o |
| (1/3) > >> |
| Yansi:
Hello, I am currently working on some project incorporating a MIDI interface. I am new to MIDI, never have worked with this stuff, so please bear with me. First, I need a documentation. If I could sum up my few minutes of googling around, this is the best (well, the only one usable) "documentation" of the MIDI interface: https://www.nyu.edu/classes/bello/FMT_files/9_MIDI_code.pdf I could find within that time frame. Then there is the "midi.org", where the full documentation is nowhere to be found, apart from numerous links to "pay them and then send whatever data you want through the MIDI interface". There goes the standard. ::) Currently, I have a HW that should receive MIDI from a keyboard/controller. I have one such keys available, currently hooked up to my HW, trying to figure out what happens within the MIDI line. From what I see, is nowhere near what I have expected, based on the "documentation" above. Here I present the byte sequence I have recorded from my keyboard: Pressing a key (G#3 in the middle of the keys - according to the "documentation") produces this sequence: 7F B0 7B 00 90 44 7F 7B Releasing the key produces 00 00 44. What the hell?!!! Pressing the key next to the right, produces 7F B0 7B 00 90 45 7F 7B, release does 00 00 45 So okay, I can see the control byte 90, telling channel 0 to start a note 45 with maximum velocity of 7F. But that is the only thing that makes sense. What's the rest of the rubbish? O_o :o The note cut sequence of double zeros does not make any sense, according to the "documentation". Is this some non-standard implementation? Or am I reading the doc wrong? Or are the keys really a piece of junk? Thank you for any insight. Y. //EDIT: I can also see a B0 control byte, telling me a controller has changed, in this case a controller 7B to 00. You know, fun is, that I have found controller 7B is typically "all notes off" button. I don't understand a shit this keyboard is telling me. |
| Yansi:
So half issue solved. I needed to get myself a bit of rest too see the mistake: There was a tiny memory leakage, corrupting the receive buffer. (That's what gets created, where X-mass gets mixed with a pile of assembly language on an old system, where there is no debug possibility, neither writing a software monitor routine - UART already taken by the MIDI. Ugh!) So in fact the note on sequence as sent by the keyboard looks like this: C0 16 B0 7B 00 90 44 7F, note cut is B0 7B 00. Makes much more sense now! So it is telling me before each note, what sound bank is used - ugh, why? It is enough to tell once for all successive notes on that channel, isn't it? What is infuriating, is that B0 7B 00 sequence, used to tell "All not stop" simulating a (non existent) "all notes off" button. So indeed, some retarded moron nut-fucker has programmed the MIDI interface on this keyboard. This explains why I was not able to use the keyboard with a PC, it was behaving weird. Now we know why! Even if it would work like this, it would not play in polyphony, only one note at a time. Am I getting that correct? But the question remains - is this sequence something common within MIDI instruments? Should I make my HW compatible with such setup? Or is this complete exotic rubbish, where someone didn't do his one job right? Thanks |
| hamster_nz:
Why be so angry at a protocol? As far as protocols go, MIDI is actually OK, considering it is from the 1980s.... |
| Yansi:
Well I am not angry at the protocol itself really, I get easily pissed of by websites like the MIDI organization has. I think it is pretty obvious to look for standards directly at the place where it comes from, however the midi.org site is of no help. I could find third party publications way easier. Even the SD card or USB specs can be downloaded quite easily, not to mention the RFCs for ethernet and such. But this is a bit offtopic. Yes, the data received were corrupted. Now receiveing correctly, as above. Yet the keyboard is producing I'd say a non-standard output. |
| hamster_nz:
Good info is at http://www.personal.kent.edu/~sbirch/Music_Production/MP-II/MIDI/midi_protocol.htm ... Or you might need to do what we did in the 80s and buy a book. It is just that it it so old it predates the Internet (as we know it) |
| Navigation |
| Message Index |
| Next page |