Transcribing Piano Rolls With Python

Piano Roll

 

Perforated rolls of paper, called piano rolls, are used to input songs into player pianos. The image above was taken from a YouTube video showing a player piano playing a Gershwin tune called Limehouse Nights. There’s no published sheet music for the song, so [Zulko] decided to use Python to transcribe it.

First off the video was downloaded from YouTube. This video was processed with MoviePy library to create a single image plotting the notes. Using a Fourier Transform, the horizontal spacing between notes was found. This allowed the image to be reduced so that one pixel corresponded with one key.

With that done, each column could be assigned to a specific note on the piano. That takes care of the pitches, but the note duration requires more processing. The Fourier Transform is applied again to determine the length of a quarter note. With this known, the notes can be quantized, and a note duration can be applied to each.

Once the duration and notes are known, it’s time to export sheet music. LilyPond, an open source language for music notation, was used. This converts ASCII text into a sheet music PDF. The final result is a playable score of the piece, which you can watch after the break.

Continue reading “Transcribing Piano Rolls With Python”

This Is Not Your Father’s Power Wheel

If you had a Power Wheel vehicle as a kid you may have been the envy of the neighborhood. Even as fun as they were you probably out grew them. Lucky for a few youngsters, [Bob] hasn’t. Not only does he have several Power Wheels for his children to use, he does some pretty cool mods to make them even more fun.

Changing the stock motor out for a cordless drill is one of the first things that gets done. A few brands have been used but the  Ryobi 18v Cordless Drill is the favorite. The entire drill is used, including the reduction gearbox. The gearbox is switched to LOW gearing so that the drill has enough torque to move the combined weight of the vehicle and child. As much as it may sound odd to use a drill in this manner, the Power Wheel can get up to about 15 mph. A stock Power Wheels maxes out at 5 mph

Continue reading “This Is Not Your Father’s Power Wheel”

Play Peek-A-Boo With Blind Spot

blindspot

You’re at a concert, and a car filled with balloons is in a glass box. As you approach the box, vertical blinds close to block the view directly in front of you. You move left, more blinds close to block your view. The blinds follow your every move, ensuring you can’t get a close up view of the car inside. You’ve just met Blind Spot, an interactive art installation by [Brendan Matkin].

Blind Spot was presented at Breakerhead, an incredible arts and engineering event which takes place every September in Calgary, Canada. Blind Spot consists of a car inside a large wooden box. Windows allow a view into the box, though there are 96 vertical blinds just behind the glass. The vertical blinds are individually controlled by hobby servos. The servos are wired to six serial servo controllers, all of which are controlled by an Arduino.

A PC serves as Blind Spot’s brain. For sensors, 6 wide-angle webcams connect to a standard Windows 7 machine. Running 6 webcams is not exactly a standard configuration. To handle this,  [Brendan] switched the webcams to friendly names in the windows registry. The webcam images are read by a Processing sketch. The sketch scans the images and determines which of the 96 blinds to close. The code for Blind Spot is available on github.

Continue reading “Play Peek-A-Boo With Blind Spot”

ISPnub – A Stand-Alone AVR In-System-Programmer Module

[Thomas] tipped us about his latest project: a stand-alone AVR programmer module named ISPnub. As you can see in the picture above, it is a simple circuit board composed of a main microcontroller (ATmega1284p), one button and two LEDs. Programming a target is a simple as connecting the ISPnub and pressing the button. The flashing operation success status is then shown using the green/red LED.

ISPnub gets its power from the target circuit so no external power supply is needed. It works over a wide voltage range: 1.8V to 5.5V. The module also features a programming counter which can be used to limit the number of programming cycles. A multi-platform Java tool is in charge of embedding the target flash contents with the ISPnub main firmware. The complete project is open source so you may want to check out the official GitHub repository for the firmware and the project’s page for the schematics.

Using Bitcoin To Detect Malware

vigil

Now that you can actually buy things with bitcoins, it’s become a playground for modern malware authors. [Eric] recently lost about 5 BTC because of some malware he installed and decided to do something about it. He came up with BitcoinVigil, a web service that constantly looks at bitcoin honeypots and alerts you when bitcoins are surreptitiously removed.

The idea behind BitcoinVigil is to set up a Bitcoin wallet with a small amount of coins in it – only about $10 USD worth. When modern, Bitcoin-seeking malware is run on a computer, it looks for this ‘moneypot’ and sends an email out notifying the owner of the coins to stolen money.

[Eric] was at a LAN party a few weeks ago and ‘borrowed’ a friend’s copy of Starcraft 1. Just a few seconds after installing it, he received an alert notifying him about a few stolen bitcoins. This time [Eric] only lost a few microBTC, but better than the thousands of USD he lost before.

Google Releases Project Ara MDK

Ara Modules

 

It’s been a little while since we’ve heard about modular smartphones, but Google has just released the Module Developers Kit (MDK) for Project Ara. The development kit gives an overview of the inner workings of the project, and provides templates for building your own modules.

Once you’ve agreed to the license agreement and downloaded the MDK, you’ll find a large specification document. It explains how a phone will comprise of many modules loaded into an endoskeleton, giving mechanical support and electrical connections. An interface block provides each module with power and data over LVDS. Modules are held in place by an electro-permanent magnet which can be toggled by software.

When you’re finished with the specification document, you can dive into the reference designs. These include templates and actual modules for WiFi, thermal imaging, a battery pack, and more. Mechanical CAD is provided as STEP files and drawings, and electrical design files are provided as Altium projects and PDF schematics.

We discussed both Project Ara and Phonebloks on Hackaday in the past, but now we’re starting to see real details. Google’s Project Ara Developer Conference takes place on April 15th and 16th, and you can register to take part remotely for free. Is this the start of an open, modular phone? Let us know what you think.

[Thanks to Adam for the tip]

The Ancient Greeks Invented Kevlar Over 2 Millennia Ago

In 356-323 B.C. Alexander the Great of Macedon conquered almost the entire known world by military force. Surprisingly, not much is known about how he did it! An ancient and mysterious armor called Linothorax was apparently used by Alexander and his men which may have been one of the reasons for his ever so successful conquest. A group of students at the University of Wisconsin Green Bay (UWGB) have been investigating in detail and making their own version of it.

The problem is this type of armor decomposes naturally over time unlike more solid artifacts of stone and metal — meaning there is no physical proof or evidence of its existence. It has been described in around two dozen pieces of ancient literature and seen in over 700 visuals such as mosaics, sculptures and paintings — but there are no real examples of it. It is made (or thought to be) of many layers of linen glued together, much the same way that Kevlar body armor works.

The cool thing about this project is the students are designing their own Linothorax using authentic fabrics and glues that would have been available in that time period. The samples have been quite successful, surviving sharp arrows, swords, and even swinging axes at it. If this is the secret to Alexander the Great’s success… no wonder!

The group has lots of information on the topic and a few videos — stick around to learn more!

Continue reading “The Ancient Greeks Invented Kevlar Over 2 Millennia Ago”