Google's Piano Genie

Piano Genie Trained A Neural Net To Play 88-Key Piano With 8 Arcade Buttons

Want to sound great on a Piano using only your coding skills? Enter Piano Genie, the result of a research project from Google AI and DeepMind. You press any of eight buttons while a neural network makes sure the piano plays something cool — compensating in real time for what’s already been played.

Almost anyone new to playing music who sits down at a piano will produce a sound similar to that of a cat chasing a mouse through a tangle of kitchen pots. Who can blame them, given the sea of 88 inexplicable keys sitting before them? But they’ll quickly realize that playing keys in succession in one direction will produce sounds with consistently increasing or decreasing pitch. They’ll also learn that pressing keys for different lengths of times can improve the melody. But there’s still 88 of them and plenty more to learn, such as which keys will sound harmonious when played together.

Piano Genie training architectureWith Pinao Genie, gone are the daunting 88 keys, replaced with a 3D-printed box of eight arcade-style buttons which they made by following this Adafruit tutorial. A neural network maps those eight buttons to something meaningful on the 88-key piano keyboard. Being a neural network, the mapping isn’t a fixed one-to-one or even one-to-many. Instead, it’s trained to play something which should sound good taking into account what was play previously and won`t necessarily be the same each time.

To train it they use data from the approximately 1400 performances of the International Piano e-Competition. The result can be quite good as you can see and hear in the video below. The buttons feed into a computer but the computer plays the result on an actual piano.

For training, the neural network really consists of two networks. One is an encoder, in this case a recurrent neural network (RNN) which takes piano sequences and learns to output a vector. In the diagram, the vector is in the middle and has one element for each of the eight buttons. The second network is the decoder, also an RNN. It’s trained to turn that eight-element vector back into the same music which was fed into the encoder.

Once trained, only the decoder is used. The eight-button keyboard feeds into the vector, and the decoder outputs suitable notes. The fact that they’re RNNs means that rather than learning a fixed one-to-many mapping, the network takes into account what was previously played in order to come up with something which hopefully sounds pleasing. To give the user a little more creative control, they also trained it to realize when the user is playing a rising or falling melody and to output the same. See their paper for how the turned polyphonic sound into monophonic and back again.

If you prefer a different style of music you can train it on a MIDI collection of your own choosing using their open-sourced model. Or you can try it out as is right now through their web interface. I’ll admit, I started out just banging on it, producing the same noise I would get if I just hammered away randomly on a piano. Then I switched to thinking of making melodies and the result started sounding better. So some music background and practice still helps. For the video below, the researcher admits to having already played for a few hours.

This isn’t the first project we’ve covered by these Google researchers. Another was this music synthesizer again using neural networks but this time with a Raspberry Pi. And if our discussion of recurrent neural networks went a bit over your head, check out our overview of neural networks.

Continue reading “Piano Genie Trained A Neural Net To Play 88-Key Piano With 8 Arcade Buttons”

Chiptunes In An Altoids Tin

For [Dejan]’s entry to the Musical Instrument Challenge in this year’s Hackaday Prize, he’s tapping into some of the great work that has been done over the years to bring bleeps and bloops to the masses. He’s building a drum machine, a bass synth, and an arpeggiator that fits in your pocket, in a handy form factor that fits in an Altoids tin. It’s the FATCAT Altoids Tin Mod Tracker.

This is a simple build meant to fit in an Altoids tin, so you’re not getting a whole lot of hardware here. There’s a battery, there’s a boost circuit, and there’s a single chip, an ATtiny84. This tiny little microcontroller is the heart of the box, able to provide a drum track with a kick, snare, and a closed and open high hat. There’s a bass with a simple square wave and portamento, and an arp track that can be used as a lead or arpeggiated chords. All of this is programmed in C and uploaded straight to the chip.

The ATtiny series of microcontrollers are fairly popular for various means and methods of creating square wave bleeps and bloops. We’ve seen them become a MIDI synth that fits inside a MIDI jack, and we’ve seen how much chiptune goodness you can fit in thirty two bytes of RAM. Cornell even had a spat of rickroll vandalism with a coin cell throwie built on an ATtiny85. Anything that puts more ATtiny chiptunes into the hands of more people is great in our books, and this Altoids tin synth is just the thing.

You can check out a demo of the FATCAT below.

Continue reading “Chiptunes In An Altoids Tin”

Travel To Mercury On Ion Power

Star Trek — as much as we love it — was guilty sometimes of a bit of hyperbole and more than its share of inconsistency. In some episodes, ion drives were advanced technology and in others they were obsolete. Make up your mind!

The ESA-JAXA BepiColombo probe is on its way to Mercury riding on four ion thrusters developed by a company called QinetiQ. But unlike the ion drive featured in the infamous “Spock’s Brain” episode, BepiColombo will take over seven years to get to Mercury. That’s because these ion drives are real.

The craft is actually two spacecraft in one with two different Mercury missions. The Mercury planetary orbiter will study the surface while the magnetosphere orbiter will study the little planet’s magnetic field. Check out a video about the mission, below. The second video shows [Neil Wallace] talking about how the ion propulsion — also known as solar electric engines — differ from traditional chemical thrusters.

Continue reading “Travel To Mercury On Ion Power”

This RC Fortnite Rocket Is A Victory Royale

Minecraft is over and Red Dead Redemption II has barely even started yet. The biggest thing on the planet right now is Fortnite, and oh man, is it awesome. It’s the best game ever, and we wish every day was a Battle Royale. But what if Fortnite was real life? That’s exactly what [Giaco] and [David] did when they made an RC Fortnite Foam Rocket. It’s Fortnite, in the real world! If you don’t mind, we’re going to go T-pose in the corner.

The core of this build was done with the Maker Knife, first introduced as a Kickstarter by [Giaco] as an everyday carry utility knife that features ceramic blades. It’s impressive for a box cutter, but what’s even more impressive is that this fantastic tool can be used to make a real-life Fortnite rocket.

This rocket, like so many other RC planes we see these days, was constructed out of foam board, a technique that was popularized by the folks at Flite Test, and uses all the construction techniques you would usually see in a foam board model airplane. The hinges for the control surfaces are chamfered and reinforced with packing tape, servos are just hot glued to the body, and the control horns are just bits of cardboard.

What makes this really impressive is that this Fortnite rocket actually flies. [Giaco] took this plane out with [David] of rcexplorer fame, and even though this ‘plane’ didn’t really have any lifting surfaces, despite indiscernible center of gravity, and the fact that the paint weighed more than the plane itself, this thing can fly. Fairly well, too, until it gets stuck in a tree. There are prices to pay for producing content that’s this attractive to 12-year-olds, I guess.

Continue reading “This RC Fortnite Rocket Is A Victory Royale”

The Bolt-On Peristaltic Pump

With the proliferation of 3D printing in the new millennium, stepper motors are no longer those idle junkbox inhabitants you pulled out of a dot matrix in 1994 and forgot about ever since. NEMA standard parts are readily available and knocking about just about everywhere. Now, you can readily turn a stepper motor into a peristaltic pump with just a few simple 3D printed parts.

The pump consists of a bracket that fits on to a standard NEMA-14 stepper motor frame. A rotor is then fitted to the motor shaft, constructed out of a 3D printed piece fitted with a series of standard roller bearings. These bearings roll against the tubing, pumping the working fluid.

The design uses the bearings to squeeze outwards against the tube’s own elastic resistance. Frictional wear is minimised by ensuring the tube is only pressed on by the bearings themselves, avoiding any contact between the tubing and hard plastic surfaces.

While the design is in its early stages of development, we’d be interested to see a pump performance comparison against other 3D printed peristaltic designs – we’ve seen a few before!

[Thanks to Baldpower for the tip!]

 

Hardware Controllers For Software Effects

There is an interesting multi-effect available for all you musicians out there. It’s the Turnado from Sugar Bytes. It’s a real-time effects unit that takes advantage of a computer’s horsepower to add reverb and ring mods to whatever audio you feed into it. There’s flanger and a phaser. If you feed a drum loop into your computer, there’s a stutter function which means you too can become a Soundcloud rapper.

Unfortunately, this multi-effect runs on a computer. That means you have to deal with the user interface of a desktop or laptop — GUIs, a mouse, and keyboard. Maybe a touch screen if you’re lucky.

We just wrapped up the Musical Instrument challenge in the Hackaday Prize, and if there’s one thing musicians like it’s a physical interface for all their weird gadgets. That’s what makes the Turnado Hardware MIDI Controller from [Liam Lacey]. It’s a hardware interface for a computer-based software tool.

On board are nine independent joysticks, more than that many encoders, a few buttons, and a display to have everything make sense. All of this is controlled by a Teensy, and it is mostly a plug-and-play solution for controlling Turnado. It’s a great project that makes a great software tool even more useful, and we’re glad to see it make the final cut for the Musical Instrument Challenge in this year’s Hackaday Prize.

Rebuilding An Amiga 500 PSU

One of the challenges of keeping a vintage computer up and running is the limited availability of spare parts. While not everything has hit dire levels of availability (not yet, anyway), it goes without saying that getting a replacement part for a 30+ year old computer is a bit harder than hitting up the local electronics store. So the ability to rebuild original hardware with modern components is an excellent skill to cultivate for anyone looking to keep these pieces of computing history alive in the 21st century.

This is in ample evidence over at [Inkoo Vintage Computing], where repairs and upgrades to vintage computers are performed with a nearly religious veneration. Case in point: this detailed blog post about rebuilding a dead Amiga 500 power supply. After receiving the machine as a donation, it was decided to attempt to diagnose and repair the PSU rather than replace it with a newly manufactured one; as much for the challenge as keeping the contemporary hardware in working order.

What was found upon opening the PSU probably won’t come as a huge surprise to the average Hackaday reader: bad electrolytic capacitors. But these things weren’t just bulged, a few had blown and splattered electrolyte all over the PCB. After removing the bad caps, the board was thoroughly inspected and cleaned with isopropyl alcohol.

[Inkoo Vintage Computing] explains that there’s some variations in capacitor values between different revisions of the Amiga PSU, so it’s best to match what your own hardware had rather than just trying to look it up online. These capacitors in particular were so old and badly damaged that even reading the values off of them was tricky, but in the end, matching parts were ordered and installed. A new fuse was put in, and upon powering up the recapped PSU, the voltages at the connector were checked to be within spec before being plugged into the Amiga itself.

As a test, the Amiga 500 was loaded up with some demos to really get the system load up. After an hour, the PSU’s transformer was up to 78°C and the capacitors topped out at 60°C. As these parts are rated for 100°C (up from 85°C for the original parts), everything seemed to be within tolerances and the PSU was deemed safe for extended use.

This sort of repair isn’t exactly rare with hardware this old, and we’ve seen similar work done on a vintage Apple power supply in the past. If you’re less concerned with historical accuracy, [Inkoo Vintage Computing] has also shown off adapting an ATX PSU for use with the Amiga.