Raspberry Pi Plays A MIDI Tune Wherever You May Roam

MIDI controller keyboards are great because they let you control any synthesizer you plug them into. The only downside: you need a synthesizer to turn MIDI notes into actual sounds, slightly complicating some summer night campfire serenading. Not for [Geordie] though, who decided to build the nanoPi, a portable, MIDI instrument housing a Raspberry Pi.

Using a Korg nanoKEY2 USB MIDI controller as base for the device, [Geordie] took it apart and added a Raspberry Pi Zero W, a power bank to, well, power it, and a USB hub to connect a likewise added USB audio interface, as well as the controller itself. As the nanoKEY2 has a naturally slim shape, none of this would ever fit in it, so he designed and 3D printed a frame to extend its height. Rather than wiring everything up internally, he decided to route the power and data cable to the outside and connect them back to the device itself, allowing him to use both the power bank and the controller itself separately if needed.

On the software side, the Pi is running your common open source software synthesizer, Fluidsynth. To control Fluidsynth itself — for example to change the instrument — [Geordie] actually uses the Termius SSH client on his phone, allowing him also to shut down the Pi that way. While Fluidsynth’s built-in MIDI router could alternatively remap the nanoKEY2’s additional buttons, it appears the functionality is limited to messages of the same type, so the buttons’ Control Change messages couldn’t be remapped to the required Program Change messages. Well, there’s always the option to fit some extra buttons if needed. Or maybe you could do something clever in software.

As you may have noticed, the nanoPi doesn’t include any speaker — and considering its size, that’s probably for the best. So while it’s not a fully standalone instrument, it’s a nice, compact device to use with your headphones anywhere you go. And thanks to its flexible wiring, you could also attach any other USB MIDI controller to it, such as this little woodwind one, or the one that plays every pop song ever.

Continue reading “Raspberry Pi Plays A MIDI Tune Wherever You May Roam”

Arduino Drums Bring The Noise, No MIDI Required

When looking through existing Arduino drum kit projects, [joekutz] noticed that most of them just used the microcontroller as an input for an existing MIDI device. That’s fine if you’re just looking to build your own hardware interface, but he wondered if it would be possible to forgo the MIDI device completely and actually generate the audio internally.

To be sure, this is a lot to ask of an 8-bit microcontroller, which is probably why nobody does it this way. But [joekutz] wasn’t giving up without a fight. One of the trickiest aspects was storing the samples: the 8-bit, 11.025 KHz mono WAV files ultimately had to be converted into C data arrays with a custom Python script.

Unfortunately, since the samples are essentially part of the drum’s source code, he says distributing the firmware is something of a problem. Though it sounds as though there might be a solution to this soon for those who want to play along at home.

But don’t get the impression that this project is just software. Check out the custom impact sensors lovingly crafted from popsicle sticks and metal cut from soda cans, which have been mated with sections cut out of old DVD-Rs. Actually getting the beats out of the Arduino required the addition of a R2R DAC circuit and a TDA2822 amplifier. In the video after the break, you can hear the results for yourself.

[joekutz] is no stranger to homebrew electronic instruments. When we last heard from him, he was turning a very pink keyboard into his own personal circuit bending playground.

Continue reading “Arduino Drums Bring The Noise, No MIDI Required”

Rocking Out On A Limb With LE STRUM

It’s hard to imagine 80s Synth-pop without the keytar, and yet this majestic Centaur of a musical instrument rarely gets much love, and their players are often the target of ridicule. It almost seems as if being hung around the neck should be a privilege solely reserved for stringed instruments. Well, [midierror] has at least that part somewhat right then, with the Full On MIDI Leg that is guaranteed to make every keytarist look like a prestigious cellist in comparison.

What looks like the 1987 movie Mannequin taking a dark, Mengelesque turn, is as awesome as it is bizarre, thanks to building the concept of the LE STRUM into, well, a leg. LE STRUM itself is an open source MIDI instrument built by [Jason Hotchkiss], who describes it as “a cross between a Stylophone and an Omnichord”. It consists of a set of buttons to select different combinations of chords, that can than be strummed by scratching an attached stylus over an array of contact pads. However, [midierror], who also distributes a pre-assembled version of the LE STRUM, uses strings instead of contact pads, and a pick for the actual strumming, turning this into a close-enough string instrument.

The only thing missing now is a functioning knee joint, and maybe some inspiration from this MIDI-controlled concertina, and we’d be ready to revolutionize the accordion world with the, uhm, kneetar? And since it’s built around a PIC16, this thigh-slapper won’t even cost you an ARM, just the leg — but enough already with these toe-curling puns.

Continue reading “Rocking Out On A Limb With LE STRUM”

Adding MIDI To An Old Casio Keyboard

Not content to rule the world of digital watches, Casio also dominated the home musical keyboard market in decades past. If you wanted an instrument to make noises that sounded approximately nothing like what they were supposed to be, you couldn’t go past a Casio. [Marwan] had just such a keyboard, and wanted to use it with their PC, but the low-end instrumented lacked MIDI. Of course, such functionality is but a simple hack away.

The hack involved opening up the instrument and wiring the original keyboard matrix to the digital inputs of an Arduino Uno. The keys are read as a simple multiplexed array, and with a little work, [Marwan] had the scheme figured out. With the Arduino now capable of detecting keypresses, [Marwan] whipped up some code to turn this into relevant MIDI data. Then, it was simply a case of reprogramming the Arduino Uno’s ATMega 16U2 USB interface chip to act as a USB-MIDI device, and the hack was complete.

Now, featuring a USB-MIDI interface, it’s easy to use the keyboard to play virtual instruments on any modern PC DAW. As it’s a popular standard, it should work with most tablets and smartphones too, if you’re that way inclined. Of course, if you’re more into modular synthesizers, you might want to think about working with CV instead!

Drumming A Beat On A Hundred-Year-Old Typewriter

We have seen a fair share of unusual items being turned into musical instruments. Luckily, with a little bit of hacking it is possible to turn almost anything into a MIDI controller. [William Sun Petrus] just converted a 1920s typewriter into a drum machine and delivers a hell of a live performance on it.

The build is rather simple, all [William Sun Petrus] needed was an Arduino Mega and lots of wires to convert a hundred-year-old Remington typewriter into a MIDI controller. Whenever a key is pressed the hammer hits a metal plate at the center of the typewriter and closes the contact between one of the Arduino’s IO pins and the 5 V rail like a regular push button. The Arduino code is based on the MIDI library sending commands to a PC which is running Hairless MIDI and Ableton. As sort of a gimmick, [William Sun Petrus] included an LCD screen which shows a line from Green Eggs and Ham by Dr. Seuss every time a key is pressed.

Interestingly, the latency due to the hammer’s travel time does not disturb [William Sun Petrus’] live play. To calm the skeptics in the comments he also released an unedited version of the video to prove that the performance is real and an instructional video on how to play his beat note by note.

Other unusual MIDI controllers include a bandoneon accordion or this English concertina.

Video after the break.

Continue reading “Drumming A Beat On A Hundred-Year-Old Typewriter”

Signal The End Of A Print With MIDI Of Your Choice

The end of every 3D print should be a triumphant moment, and deserves a theme song. [FuseBox2R] decided to make it a reality, and wrote tool for converting MIDI tracks to G-code that uses the buzzer on your 3D printer.

The tool is up on GitHub, and uses the M300 speaker command that is available in Marlin and some other 3D printer firmware packages. It takes the form of a static HTML page with in-line JavaScript that converts a midi track to series of speaker commands with the appropriate frequency and duration parameters, using the Tone.js framework. Simply add to your slicer G-code to add a bit of spice to your prints. You can also build a MIDI jukebox using the RAMPS board and LCD you probably have gathering dust somewhere. See the video after the break for a demonstration, including a rendition of the DOOM theme song, and off course Mario Bros.

For more quarantine projects, you can also play MIDI using the stepper motors on your printer, or build a day clock if time is becoming too much of a blur.

Continue reading “Signal The End Of A Print With MIDI Of Your Choice”

Quieting Down A Bandoneon Accordion With MIDI

The bandoneon, known as the tango accordion, is quite a loud instrument to practice within the confines of an apartment, and could possibly lead to some neighborly disputes. [HLB] enjoyed playing his but wanted a way to turn down the volume a bit without, in consideration to his neighbors. Instead of building a whole soundproof room, he decided to throw Arduino’s and MIDI at the problem.

Bandoneons, like all accordions, are operated by pushing air from manually pumped bellows through a series of reeds, which are each opened and closed by a valve mechanism. [HLT] turned each valve lever into a simple on/off switch by attaching a magnet, with hall-effect sensors on long custom PCBs next to each row of valves. The hall effect sensors are connected to I2C I/O expander ICs which connect to an Arduino Nano, one for each side of the instrument, which sends out MIDI messages via serial. Everything is mounted inside what looks like quite an old instrument with Blu Tack to avoid having to make a lot of permanent modifications.

The bandoneon still functions normally with no permanent modifications, so to play with MIDI-only the bellow is simply not pumped. This means [HLB] can’t modulate the MIDI velocity (loudness) while playing, which he admits is a limitation but better than not playing at all. He does, however, note that he could add a pressure sensor inside the bellow if we wanted to add velocity to the midi output when neighbourliness isn’t a consideration. On the audio output side [HLB] built a small stand-alone synthesizer with an Odroid SBC running FluidSynth and a HiFi shield.

Continue reading “Quieting Down A Bandoneon Accordion With MIDI”