Posts | Comments

Planet Arduino

Archive for the ‘barcode’ Category

We are no stranger to peculiar and wonderful musical instruments here at Hackaday. [James Bruton] has long been fascinated with barcode scanners as an input source for music and now has a procedural barcode-powered synth to add to his growing collection of handmade instruments. We’ve previously covered his barcode guitar, which converts a string of numbers from the PS/2 output to pitches. This meant having a large number of barcodes printed as each pitch required a separate barcode. As you can imagine, this makes for a rather unwieldy and large instrument.

Rather than looking at the textual output of the reader, [James] cracked it open and put it to the oscilloscope. Once inside, he found a good source that outputs a square wave corresponding to the black and white lines that the barcode sees. Since the barcodes [James] is using don’t have the proper start and stop codes, the barcode reader continuously scans.  Normally it would stop the laser to send the text over the USB or PS/2 connection. A simple 5v to 3.3v level shifter feeds that square wave into a Teensy board, which outputs the audio.

A video showcasing a similar technique inspired [James] with this project. The creators of that video have a huge wall of different patterns of black and white lines. [James’s] next stroke of brilliance was to have a small HDMI display to generate the barcodes on the fly. A Raspberry Pi 4 reads in various buttons via GPIO and displays the resulting barcode on the screen. A quick 3d printed shell rounds out the build nicely, keeping things small and compact. All the code and CAD files are up on GitHub.

Thanks [James Bruton] for the awesome project!

One of our favorite things about the rise of hobbyist development ecosystems such as the Arduino is that it’s now possible to make a MIDI controller out of almost anything, as long as you have the the shields and the dedication. We’re glad that [James Bruton] takes the occasional break from making robots to detour into instrument making, because his latest creation turns it up to 11.

This awesome guitar uses a barcode scanner to play notes, and various arcade controls to manipulate those notes. The barcodes themselves scan as ASCII values, and their equivalent integers are sent to an external MIDI device. This futuristic axe is built on an Arduino Mega, with a USB shield for the barcode scanner, and a MIDI shield on top that [James] connects to various synths in the video after the break.

In between shooting barcodes, the right hand also controls octave shifting and changing MIDI channels with the joystick, and doing pitch-bends with the rotary encoder. The array of arcade buttons on the bottom neck let him switch between single player for monophonic synths, and multiplayer for polys. The other three buttons are press-and-scan programmable single-note sounders that assist in chord-making and noodling.

We particularly dig the construction, which is a combination of 20/20 and 3D printed boxes. [James] found some angled PVC to serve as fretboards for the four necks, and a nice backgrounds for bar codes.The only thing we would change is the native beep of the barcode scanner — either silence it forever or make it mutable, because it doesn’t jive with every note. It might be nice to get the gun to scan continuously so [James] doesn’t get trigger finger. Or better yet, build the scanner into a glove.

Want to do something more useful with that barcode scanner in your parts bin? Use it to manage your household inventory. But first, reacquaint yourself with the history of the humble barcode as presented by [Adam Fabio].

Thanks for the tip, [baldpower]!



  • 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