[Arvydas] recently bought a Rock Band 3 Wii keyboard thinking it would be an excellent and very inexpensive (£9.99) MIDI controller. The keyboard has a proper DIN-5 MIDI out port, so theoretically the only thing needed to plug this into a computer is a USB to MIDI adapter. Unlike the keyboard, the MIDI adapter was a cheap piece of Chinese cruft, but given some ingenuity and a handful of components, he was able to get everything working.
The 30-year-old MIDI specification includes a few schematics on how to properly connect MIDI devices together. The most important part of these schematics is an optoisolater on the MIDI in, a valuable addition considering early MIDI keyboards cost thousands of dollars. It seems [Arvydas]’ MIDI to USB adapter didn’t include this vital component, instead replacing it with a simple resistor. Anything to keep costs down, right?
To get the MIDI adapter working, [Arvydas] headed over to Maplin and bought an optioisolator, With everything wired up on a breadboard, he got it to work and eventually transplanted the circuit to the adapter’s PCB.
It’s a great piece of work to get this MIDI adapter functioning, especially since it’s doubtful the cheap adapter would have worked with any MIDI device.
28 thoughts on “The Perils Of Cheap MIDI Adapters”
Hi, I have the same cheapo, this things usually worked “fine” for me if you are using it just as midi to usb “keyboards” only, Sysex protocol seems to overflow the buffer of this thing. I have a Boss GT-5 pedal board, and I cannot dump Sysex messages due this. I will try this at home but I have my doubts if it would work…
Same story here… Just added tap connector after optoisolator and connected to FTDI to get sysex dumped… But i want to build some cheap and properly working MIDI USB convertor…
There is a bug in the cheap chinese midi->usb adaptors …they lie to the OS and claim they can process messages longer than 4bytes – and they can’t – so note/controller/etc message are fine (max 4 bytes) but (long) sysex messages fail …if you use windoze (as I do), you’re stuffed – nobody (to my knowledge) has patched up a driver to work – find me the source code for one and I’ll patch it and compile it, but I’m not writing one from scratch …If you use linux you’re (probably) in luck – the linux guys have been patching the kernel to work with these cheap controllers (a random link about this: https://lists.debian.org/debian-kernel/2011/05/msg00119.html )
I did a MIDI adapter for the Palm Pilot – tx and rx – with sequencer program many years ago (can you tell?). Midi is just opto-isolated TTL 31250 baud UART stuff.
I could go into my archives and find it, but why? I don’t know if I still have Dave Small’s Atari ST Mac disk reader adapter (I forget the name, red rabbit pixelated), which went with the “Magic Sac” but I had to “borrow” its optoisolator for a project.
I am really sad that stock FTDI SIO drivers at linux can’t be set to 31250 baud using stty or something… I had to make my own “driver” using libftdi:
If they don’t know what a G clef looks like chances are…
Oh wow. Is that what it’s supposed to be?
That’s a real reach… dang. I wouldn’t have seen it otherwise. Oy!
Maybe it’s an S-clef, for Shit.
Only useful for playing the Brown Note.
“especially since it’s doubtful the cheap adapter would have worked with any MIDI device.”
I have 3 of them and they worked fine until I replaced them with a Prodipe 4×4 interface because I needed more spare USB ports and wanted less cables around. The specification says midi in should be insulated so that the input is protected. Therefore if something goes wrong you won’t kill a multi thousand dollars keyboard but a five bucks crap midi interface.
But… if the midi out was designed by a neanderthal and outputs too much current, you could fry the input optocoupler at other end ($$$ expander?). Therefore using quality interfaces makes sense anyway.
Had Brian bothered to actually read the information he links to he would have discovered that the opto-isolator has nothing whatsoever to do with the protection of “MIDI keyboards (which) cost thousands of dollars”.
Ground loops will cause horrendous hum, buzzes, and other noises, especially when connected to computerized gear or lighting equipment.
In fact, a major design goal of MIDI, as seen in the electrical specification explanation in the MIDI Specification Document, is to prevent any ground loops that might occur with the MIDI cables. This is done by using a balanced current loop through an opto-isolator and only grounding the MIDI outputs.
(and strictly that isn’t fully correct either because the current loop isn’t “balanced”, it’s mono-polar.)
qwerty> The specification says midi in should be insulated so that the input is protected.
It says no such thing.
The opto is there entirely for the functional reason of PREVENTING GROUND LOOPS, and not to “protect the equipment”.
I’ve got two of these cheapo usb midi adapters, they look identical though inside they are both very different. One causes ground loops and the other does not. But most notably neither will handle input of frequent, high volumes of SysEx messages. I spent quite a while fighting with the winapi to make it work, only to latter realise it was the device. Normal short 2 or 3 byte midi messages were no problem, but one device couldn’t even send a MTC full frame (a short SysEx message) though sent MTC quarter frames with ease! Probably the result of tiny buffers in the device. That was a blob chip, the better of the two devices had a 16 pin surface mount ic, with a Chinese data sheet.
Maplin sells actual components still :O
I thought they’d given that up years ago and solely moved into the USB power toys and other cheap gimmicks. Such a shame compared to what the shops used to be like 7-10 years ago when the staff actually had experience in electronics.
I’m with AussieTech – I’ve been using these Rock Band keyboards for some time without opto-isolators (to send notes to an Arduino softsynth) and they work fine in this sort of setup…
(and the end of that official MIDI spec kind of admits that those old-style PC joystick/MIDI cables didn’t have opto-isolators either)
My hunch is: it’s usually possible to read MIDI voltages between pin 5 and pin 2 (which is what the cheap USB interface was originally trying to do), but the Rock Band keyboard uses the presence of a circuit between pin 5 and pin 4 (which can be achieved using a small resistor) to detect whether it’s being used for MIDI or as a game controller.
Although… Arvydas does say “The Rock Band keyboard detected a MIDI cable and switched to MIDI mode,” which in my experience it doesn’t do when only connected via pin 2 and 5, so that’s not entirely consistent with this explanation : )
Does ist send information how strong the key was pressed? (probabbly not but asking anyway…)
In my experience, most of these cheap USB/MIDI interfaces do not support sysex messages larger than 17 bytes. This is the size of the MIDI inquiry response. They just seem to ignore larger messages.
so…the problem related with sysex is more a Buffer thing than a optoisolator issue…someone knows of a project (arduino, etc) to make a midi2usb with sysex support? my old SoundBlaster AWE32 had a joystick/midi port that worked great with it, but newer PC’s/laptops doesn’t have that at all…and using an old pc just to upload or download my Boss Gt-5 patches looks not like a great solution. Any idea? regards!
I’ve done extensive testing on the two cheapo devices I have… On the ‘better’ of the two, receiving SysEx seems to be much more of a problem than sending. I gave up, no matter how many calls to stop/reset/addbuffer, the device stopped receiving SysEx after (presumably) it’s buffer overflowed… A decent 2nd hand usb-midi devices on ebay can be had for 50 bucks. There is another cheap usb interface in abundance on ebay is a Chinese 4 port ‘midibox’ which has merging functionality, but I’ve never tried it.
I have a Roland VG-8, and after buying two of the cheap chinese usb converters, I’ve reformatted my Windows 7, 2 tb drive, and am using it for a data drive for my XP machine. I’ve gone back to using my SB Live! card’s midi port, and my analog midi cables. ENOUGH! I’m tired of blowing my money only to re-invent what used to work PERFECTLY WELL, on XP. Screw this. I’m sorry, but I’m really mad about having to waste good money all in the name of chasing MS’s newer OS’s designed by IDIOTS that refuse to acknowledge that newer is not necessarily better. What!? You mean they couldn’t afford the space in the bloatware they call an OS, to include the drivers to make my older functional components work? Yeah, right. My old stuff has been working fine for over a decade, and replacements can be had now for pennies. You would pay more for digital midi converters than you would for an XP system nowadays. Greed and the Almighty Dollar is the only thing MS understands. I threw all my support behind MS in the 80’s – anything to kill off IBM. IBM’s presence is not a threat anymore, and to fill in the gap left by IBM, Microsoft has putrified, and rotted with its greed and obsession with wealth and acquisition, leaving behind the strewn carcasses of its past supporters. “The Devil will not support his children in the last days, but draggeth them speedily down to Hell.” Welcome to Hell, Children.
You talk about greed but you’re so cheap you wont even buy a proper USB audio/MIDI interface to replace that trashy (even on release) audio card of yours.
I don’t get the reasoning in the article at all. Even IF a optocoupler would protect expensive items, there is no point in fiddling with that modification if all you want to connect is such a ass-cheap keyboard. As the article itself points out, he is not “protecting” thousands of euro, but a 9.99 keyboard.
Oh, and why is it doubtful that it would have worked with any MIDI device? Would be kind of missing the point selling a MIDI interface which does not work, wouldn’t it?
One of my first projects was a Q&D hack into midi with a 50 cent mcu. So optoisolators are the right way to do it. That said it is a 9$ device. My first proto’s worked fine. None had isolators. Take it a step further and make your own midi converter & device and there really is no reason for it.
What Im getting at is if you are protecting a trinitron you won’t be using one of these. I really think these cheap 2-3$ adapters were intended to be hacked onto arduino projects. Which they work exceedingly well for. Alternatives are generally expensive. When your goal is to break it in half and make something these are not terrible.
Expanding on what these do well.
You could reprogram your arduino usb and make it enumerate as a midi device. You may not feel comfortable doing this and an arduino is like 30$. Proper usb – midi adapters are about 50. You also might need a programmer or another duino to convert your arduino. (30 + the programmer and you just paid allot to diy) You have now tied up a 30 $ device to replace what this can do , hassle free , for 3$.
Since serial ports and in spec midi is getting harder to find now you use usb. If you want to connect to old proper midi equipment you should do it right. If you are using a duino to make a midi controller these are perfect.
Does this have an actual chip or is it just a circuit that kights up an led???
There is an open source for for replacing the circuit inside the cable. So it will be fully MIDI compatible. Here are the details: https://github.com/hightower70/MIDIUSB
Laszlo Arvai, would it be possible to buy a built board of your MIDIUSB? I have one of those Chinese ones and would love to replace the guts, but it’s a lot of work for each person to source the parts and dev tools to make one. Thanks! Contact me at my website if you have one for sale.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)