Posts with «musical hacks» label

Robotic Melodica Student Is Enthusuastic But Terrible

Anyone who has through the process of learning to play a musical instrument for the first time, or listening to someone attempting to do so will know that it can be a rather painful and frustrating experience. [Alessandro Perini] apparently couldn’t get enough of the sound of a first-time musician, so he created a robot to play the melodica badly for hours on end, as demonstrated in the video after the break.

The project is appropriately named “AI’ve just started to learn to play”, and attempts to copy every melody it hears in real-time. The robot consists of the cartridge carriage from an old printer, mounted on a wooden frame to hold the melodica. The original carriage used a DC motor with an encoder for accurate movement, but since position accuracy was not desirable, [Alessandro] ditched the encoder. Two small trolley wheels are mounted on the cartridge holder to push down on the melodica’s key. A bistable solenoid valve controls airflow to the melodica from an air compressor. The DC motor and solenoid valve is controlled by an Arduino via a pair of LM298 motor drivers.

A host computer running software written in Cycling ’74 MAX listens to the melody it’s trying to imitate, and send serial commands to the Arduino to move the carriage and open the solenoid to try and match the notes. Of course, it keeps hitting a series of wrong notes in the process. The Arduino code and build instructions have been published, but the main Max software is only described briefly. [Alessandro] demonstrated the robot at a local festival, where it played YouTube tutorial snippets and jammed with a local band for a full 24 hours. You have to respect that level of endurance.

If listening to less error-prone electronically controlled instruments is more to your taste, listen to this building-sized pipe organ play MIDI files.

Hack a Day 01 Jan 03:00

Co41D 2020 MIDI Theremin Sounds Pretty Sick

As the pandemic rages on, so does the desire to spend the idle hours tinkering. [knaylor1] spent the second UK lockdown making a sweet Theremin-inspired noise machine with a low parts count that looks like a ton of fun.

It works like this: either shine some light on the photocells, cover them up, or find some middle ground between the two. No matter what you do, you’re going to get cool sounds out of this thing.

The photocells behave like potentiometers that are set up in a voltage divider. An Arduino UNO takes readings in from the photocells, does some MIDI math, and sends the serial data to a program called Hairless MIDI, which in turn sends it to Ableton live.

[knaylor1] is using a plugin called TAL Noisemaker on top of that to produce the dulcet acid house tones that you can hear in the video after the break.

If you’ve never played with light-dependent resistors before, do yourself a favor and spend a little bit of that Christmas cash on a variety pack of these things. You don’t even need an Arduino to make noise, you can use them as the pots in an Atari Punk console or make farty square waves with a hex inverting oscillator chip like the CD40106. Our own [Elliot Williams] once devoted an entire column to making chiptunes.

He’s the Operator of His Pocket Arduino

The band Kraftwerk hit the music scene with its unique electronic sound in the 70s in Germany, opening the door for the electronic music revolution of the following decade. If you’re not familiar with the band, they often had songs with a technology theme as well, and thanks to modern microcontroller technology it’s possible to replicate the Kraftwerk sound with microcontrollers as [Steven] aka [Marquis de Geek] demonstrates in his melodic build.

While the music is played on a Stylophone and a Korg synthesizer, it is fed through five separate Arduinos, four of which have various synths and looping samplers installed on them (and presumably represent each of the four members of Kraftwerk). Samplers like this allow pieces of music to be repeated continuously once recorded, which means that [Steven] can play entire songs on his own. The fifth Arduino functions as a controller, handling MIDI and pattern sequencing over I2C, and everything is finally channeled through a homemade mixer.

[Marquis] also dressed in Kraftwerk-appropriate attire for the video demonstration below, which really sells the tribute to the famous and groundbreaking band. While it’s a great build in its own right and is a great recreation of the Kraftwerk sound, we can think of one more way to really put this project over the top — a Kraftwerk-inspired LED tie.

Procedural Barcode Synth is as Simple as Black and White

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!

Starshine is a MIDI Controller for the Musically Shy

What keeps people from playing music? For one thing, it’s hard. But why is it hard? In theory, it’s because theory is confusing. In practice, it’s largely because of accidentals, or notes that sound sour compared to the others because they aren’t from the same key or a complementary key.

What if there were no accidentals? Instruments like this exist, like the harmonica and the autoharp. But none of them look as fun to play as [Bardable]’s Starshine, the instrument intended to be playable by everyone. The note buttons on the outside are laid out and programmed such that [Bardable] will never play off-key.

We love the game controller form factor, which was also a functional choice. On the side that faces the player, there’s a PSP joystick and two potentiometers for adding expression with your thumbs. The twelve buttons on this side serve several functions like choosing the key and the scale type depending on the rocker switch position. A second rocker lets [Bardable] go up or down an octave on the fly. There’s also an OLED to show everything from the note being played to the positions of the potentiometers. If you want to know more, [Bardable] made a subreddit for this and other future instruments, and has a full tour video after the break.

If this beginner-friendly MIDI controller isn’t big enough for you, check out Harmonicade’s field of arcade buttons.

Reel in the Years with a Cassette Player Synth

Variable-speed playback cassette players were already the cool kids on the block. How else are you going to have any fun with magnetic tape without ripping out the tape head and running it manually over those silky brown strips? Sure, you can change the playback speed on most players as long as you can get to the trim pot. But true variable-speed players make better synths, because it’s so much easier to change the speed. You can make music from anything you can record on tape, including monotony.

[schollz] made a tape synth with not much more than a variable-speed playback cassette player, an Arduino, a DAC, and a couple of wires to hook it all up. Here’s how it works: [schollz] records a long, single note on a tape, then uses that recording to play different notes by altering the playback speed with voltages from a MIDI synth.

To go from synth to synth, [schollz] stood up a server that translates MIDI voltages to serial and sends them to the Arduino. Then the DAC converts them to analog signals for the tape player. All the code is available on the project site, and [schollz] will even show you where to add Vin and and a line in to the tape player. Check out the demo after the break.

There’s more than one way to hack a cassette player. You can also force them to play full-motion, color video.

Via adafruit

Controlling a Broken Super Nintendo With MIDI

A Super Nintendo that has trouble showing sprites doesn’t make for a very good game system. As it turns out, Super Mario World is a lot less fun when the titular hero is invisible. So it’s no surprise that [jwotto] ended up tossing this partially functional SNES into the parts bin a few years back.

But he recently came up with a project that may actually benefit from its unusual graphical issues; turning the glitched console into a circuit bent video synthesizer. The system was already displaying corrupted visuals, so [jwotto] figured he’d just help things along by poking around inside and identifying pins that created interesting visual effects when shorted out.

Installing the new electronics into the SNES.

Once he mapped out the pins, he wired them all up to a transistor switching board that he’d come up with for a previous project. That would let an Arduino short out the pins on command while still keeping the microcontroller relatively isolated from the SNES. Then it was just a matter of writing some code that would fire off the transistors based on MIDI input.

The end result is a SNES that creates visual glitches along with the music, which [jwotto] can hook up to a projector when he does live shows. A particularly neat feature is that each game responds in its own way, so he can swap out the cartridge to show completely different visuals without having to change any of the MIDI sequencing.

A project like this serves as a nice introduction to both circuit bending and MIDI hacking for anyone looking to get their digital feet wet, and should pair nicely with the MIDI Game Boy Advance.

[Thanks to Irregular Shed for the tip.]

Four Steppers Make A Four-Voice MIDI Instrument

Any owner of a budget 3D printer will tell you that they can be pretty noisy devices, due to their combinations of stepper motors and drives chosen for cost rather than quiet. But what if the noise were an asset, could the annoying stepper sound be used as a musical instrument? It’s a question [David Scholten] has answered with the Stepper Synth, a device that takes an Arduino Uno and four stepper motors to create a four-voice MIDI synthesiser.

Hardware-wise it’s as simple as you’d expect, a box with four stepper motors each with a red 3D-printed flag on its shaft to show rotation. Underneath there is the Arduino, plus a robot control shield and a set of stepper driver boards. On the software side it uses MIDI-over-serial, so as a Windows user his instructions for the host are for that operating system only. The Arduino makes use of the Arduino MIDI library, and he shares tips on disabling the unused motors to stop overheating.

You can hear it in action in the video below the break, and we’re surprised to say it doesn’t sound too bad. There’s something almost reminiscent of a church organ in there somewhere, it would be interesting to refine it with an acoustic enclosure of some kind.

This isn’t the first such instrument we’ve brought you, for a particularly impressive example take a look at the Floppotron.

Hack a Day 15 Aug 09:00

Less Rock, More Roll: A MIDI Barrel Piano

Strolling around a park, pedestrian zone, or tourist area in any bigger city is rarely complete without encountering the sound of a barrel organ — the perfect instrument if arm stamina and steady rotation speed are your kind of musical skills. Its less-encountered cousin, and predecessor of self-playing pianos, is the barrel piano, which follows the same playing principle: a hand-operated crank rotates a barrel, and either pins located on that barrel, or punched paper rolls encode the strings it should pluck in order to play its programmed song. [gabbapeople] thought optocouplers would be the perfect alternative here, and built a MIDI barrel piano with them.

Keeping the classic, hand-operated wheel-cranking, a 3D-printed gear mechanism rolls a paper sheet over a plexiglas fixture, but instead of having holes punched into it, [gabbapeople]’s piano has simple markings printed on them. Those markings are read by a set of Octoliner modules mounted next to each other, connected to an Arduino. The Octoliner itself has eight pairs of IR LEDs and phototransistors arranged in a row, and is normally used to build line-following robots, so reading note markings is certainly a clever alternative use for it.

Each LED/transistor pair represents a dedicated note, and to prevent false positives from neighboring lines, [gabbapeople] 3D printed little collars to isolate each of the pairs. Once the signals are read by the Arduino, they’re turned into MIDI messages to send via USB to a computer running any type of software synthesizer. And if your hands do get tired, you can also crank it with a power drill, as shown in the video after the break, along with a few playback demonstrations.

It’s always fun to see a modern twist added to old-school instruments, especially the ones that aren’t your typical MIDI controllers, like a harp, a full-scale church organ, or of course the magnificently named hurdy-gurdy. And for more of [gabbapeople]’s work, check out his split-flip weather display.


Rock Out with Toilet Paper Rolls

Singing in the shower is such a common phenomenon, rarely anyone ever bats an eye about it. Singing in the toilet on the other hand is probably going to raise an eyebrow or two, and it’s not for nothing that the Germans euphemistically call it “stilles Örtchen”, i.e. the little silent place. But who are we to judge what you do in the privacy of your home? So if you ever felt a lack of instrumental accompaniment, or forgot to bring your guitar, [Max Björverud] has just the perfect installation for you. (Video, embedded below.)

Inspired by the way bicycle computers determine your speed, [Max] took a set of toilet paper holders, extended each roll holding part with a 3D-printed attachment housing a magnet, and installed a Hall-effect sensor to determine the rolling activity. The rolls’ sensor data is then collected with an Arduino Mega and passed on to a Raspberry Pi Zero running Pure Data, creating the actual sounds. The sensor setup is briefly shown in another video.

Before you grab your pitchforks, [Max] started this project a little while back already, long before toilet paper became an object of abysmal desire. Being an artist in the field of interactive media, this also isn’t his first project of this kind, and you can find some more of his work on his website. So why of all things did we pick this one? Well, what can we say, we definitely have a weakness for strange and unusual musical instruments. And maybe there’s potential for some collaboration here?