Posts | Comments

Planet Arduino

Archive for the ‘Midi’ Category

Max Danilin created an automatic barrel piano that outputs MIDI signals, not through an SD card or internal memory, but by reading sheet music encoded on paper as black dots and dashes.

The paper is pulled under an array of 40 optocouplers using a hand crank — or even power drill — providing musical info to the device’s controlling MKR Zero board. These inputs are translated into USB MIDI, which can then be passed along to any synthesizer for a wide range of audio output.

The electronics and paper feed mechanism are put together in an elegantly simple way, and it appears to work quite well in the video below. In fact, it can even be played while mobile via casters on the bottom of its stand!

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.

Vintage typewriters are truly amazing pieces of technology, but unlike modern keyboards, they are decidedly one-purpose machines. William Sun Petrus, however, had other ideas for his 1920s-era Remington Portable typewriter, augmenting hammers with wires as inputs to an Arduino Mega.

Input signals are produced when each key strikes a metallic “live plate” in the center, completing a circuit. This info is passed along as MIDI signals to a computer running Ableton digital audio software, allowing him to create the excellent beat seen in the video below. 

Typewriter code is available on GitHub, where you’ll certainly notice the lines from Green Eggs and Ham that are output on an LCD screen at the base of the almost 100-year-old device.

SunVox synth software allows you to create electronic music on a wide variety of platforms. Now, with his ZT-2020 project — which resembles a miniature arcade game — YouTuber “fascinating earthbound objects” has a dedicated input scheme.

This cabinet prominently features a wide array of buttons, a directional input from a PlayStation controller, and 16 potentiometer knobs. There’s also a screen on top for video output. 

Inside a Raspberry Pi runs SunVox, while most of the buttons and all of the input knobs are connected to an Arduino Mega. The Mega plays the role of MIDI controller as well, passing digital music info along to produce beautiful electronic music!

Learning to play an an instrument well takes a lot of time, which many people don’t have. To address this, Franco Molina — who enjoys MIDI controllers and writing music, but describes himself as being terrible at playing the keyboard — created the Synthfonio.

Molina’s DIY device is vaguely reminiscent of a guitar, with a series of keys on the neck that indicate the chords and key signatures, and another set roughly positioned where you’d strum a guitar to play the notes.

The Synthfonio is assembled from laser-cut MDF sections, and utilizes a MKR WiFi 1010 to take care of I/O and MIDI functions. A second microcontroller in the form of an ATmega328 on a breadboard is used to produce actual synth sounds, though most Arduinos would be suitable either function.

The Synthfonio features 2 sets of keys, one to define chords and key signatures, and another one to actually play the notes. Whatever chord is pressed in the instruments neck keys, will define the pitch of the keys on the instrument handle. Similar to a guitar, violin, and other string instruments; with the added advance that the Synthfonio is a smart device that can deduce the chords being played from a single set of notes. This way, for example, the musician can use the handle keys to play chords, melodies, and arpeggios in the key of A, just by pressing the A key on the neck. In the same way, pressing the A key on the neck in conjunction with the C key (minor third of A) will activate an A minor tonality for the handle keys.

This can allow any player to execute a 4-chord melody, accompaniment, or even improvisation; with no more than one or two fingers in position.

While you may know on some level that an Arduino can help you make music, you probably haven’t seen as good an implementation as this MIDI controller by Switch & Lever. 

The device features a numeric pad for note input, which can also be used as a drum pad, and a variety of knobs and even a joystick for modifying the beats. Controls are housed inside a beautiful laser-cut, glued, and finished wooden enclosure.

An Arduino Mega (with its 54 digital IO and 16 analog pins) is used to accommodate the inputs, and data is passed on to a digital audio workstation, or DAW, to produce actual sound. 

Code and circuit diagrams are available here if you want to build one, though your setup can be customized however you like!

You’ve seen barcode scanners register the price for your groceries, and likely in many other applications, but did you ever consider if one could be made into an instrument? Well we now know the answer, thanks to this MIDI guitar by James Bruton.

Bruton’s amazing device presents a matrix of barcodes arranged on the instrument’s four necks, allowing him to select the note to be played with a scanner gun.

The scanned code then triggers a note that’s piped to an output device via an Arduino Mega and MIDI shield. A joystick, spinner, and arcade buttons are also available for functions such as note cutoff, changing the octave, and pitch bends.

Apparently not content with a traditional laser harp, Jonathan Bumstead set out to take things in a different direction. What he came up with is a device whose laser strings are arranged horizontally, and loop though its boxy structure for an amazing audiovisual effect. 

The aptly named Upright Laser Harp is divided up into six rows, which each contain two laser/photoresistor pairs for an instrument total of 12 notes. Each laser is reflected once before hitting its photoresistor to wrap the entire structure in light, and values are sensed by an Arduino Mega as note inputs. Sounds are then generated by an Adafruit Music Maker Shield, and different MIDI instruments are selected with a rotary switch and a stepper-based electromechanical display system. 

Laser harps are musical devices with laser beam “strings.” When the beam is blocked, a note is played by the instrument. Usually laser harps have the beams travel vertically in the shape of a fan or vertical lines. 

In this project, I built a laser harp with stacked laser beams that propagate horizontally. The beams reflect off mirrors to form square shaped beam paths. Instead of a MIDI output like my previous laser harp, this device has built-in MIDI player so the output is an audio signal. This means the device does not have to be connected to a computer or MIDI player (e.g. keyboard) to play sound. Both built-in speakers and audio output jack are available for playing music.

Be sure to check out the mini-concert and build details in the video below!

[Julien] is one of those cool dads who shows his love with time invested rather than money spent. His daughter plays the harp, and you would not believe the price of concert harps. Even the cheap ones are several thousand USD. So naturally, he decided he would build her a MIDI concert harp from the ground up.

This plucky work in progress uses a strain gauge and an AD620 amplifier on every string to detect the tension when plucked. These amplifiers are connected to Arduinos, with an Arduino every nine strings. The Arduinos send MIDI events via USB to a Raspberry Pi, which is running the open synth platform Zynthian along with Pianoteq.

The harp is strung with guitar strings painted with silver, because he wanted capacitive touch support as well. But he scrapped that plan due to speed and reliability issues. Strain past the break to check out a brief demo video.

[Julien] used strings because he wanted to anchor the harpist in tactility. But you’re right; many if not most MIDI harps use lasers.

Upon obtaining a small toy piano, Måns Jonasson went to work “Arduinoizing” it with 30 solenoids to hammer out tunes. 

A MIDI shield is used to pipe commands from a computer to the Arduino Mega that’s used for control, and after experimenting with discreet wiring and electronics for each of the solenoids, he switched to motor shields as outlined here to simplify the setup. This, along with a new version of the solenoid holders he designed, cleaned up the build nicely, allowing it to play a plinky version of the Super Mario Bros. theme song.

Be sure to check out the Mario themed auto-concert in the video below, plus a video outline of its construction, below. 



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook