Both small children and cats have a certain tendency to make loud noises at inopportune times, but what if there were a way to combine these auditory effects? This seems to have been the reasoning behind the creation of the Meowsic keyboard, a children’s keyboard that renders notes as cats’ meows. [Steve Gilissen], an appreciator of unusual electronic instruments, discovered that while there had been projects that turned the Meowsic keyboard into a MIDI output device, no one had yet added MIDI input to it, which of course spurred the creation of his Meowsic MIDI adapter.
The switches in the keys of the original keyboard form a matrix of rows and columns, so that creating a connection between a particular row and column plays a certain note. [Steve]’s plan was to have a microcontroller read MIDI input, then connect the appropriate row and column to play the desired note. The first step was to use a small length of wire to connect rows and columns, thus manually mapping connections to notes. After this tedious step, he designed a PCB that hosts an Arduino Nano to accept input, two MCP23017 GPIO expanders to give it enough outputs, and CD4066BE CMOS switches to trigger the connections.
Continue reading “Meowsic Keyboard MIDI Adapter Aims For Purrfection”
Midi adapter3 Articles
Cheap DIY MIDI To USB Adapter
[Joonas] became frustrated with cheap but crappy MIDI to USB converters, and the better commercial ones were beyond his budget. He used a Teensy LC to build one for himself and it did the job quite well. But he needed several converters, and using the Teensy LC was going to cost him a lot more than he was willing to spend. With some tinkering, he was able to build one using an Adafruit Pro Trinket which has onboard hardware UART (but no USB). This lack of USB support was a deal killer for him, so after hunting some more he settled on a clone of the Sparkfun Pro Micro. Based on the ATmega32U4, these clones were just right for his application, and the cheapest to boot. He reckons it cost him about $5 to build each of his cheap USB MIDI adapters which receive notes and pedal data from the keyboard’s MIDI OUT and transmit them to a computer
Besides the Pro Micro clone, the only other parts he used are a generic opto-coupler, a couple of resistors and a MIDI connector. After testing his simple circuit on a bread board, he managed to squeeze it all inside an old USB dongle housing, stuffing it in dead-bug style.
The heavy lifting is all done in the firmware, for which [Joonas] used LUFA — the Lightweight USB Framework for AVR’s. He wrote his own code to handle MIDI (UART) to USB MIDI messages conversion. The interesting part is his use of a 32.15 kbps baud rate even though the MIDI specification requires 31.25 kbps. He found that a slightly higher baud rate fixes a problem in the AVR USART implementation which tends to miss consecutive bytes due to the START edge not being detected. Besides this, his code is limited in functionality to only handle a few messages, mainly for playing a piano, and does not have full-fledged MIDI capabilities.
We’ve featured several of [Joonas]’s hacks here over the years, the most recent being the Beaglebone Pin-Toggling Torture Test and from earlier, How to Turn A PC On With a Knock And An ATTiny.
The Perils Of Cheap MIDI Adapters
[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.