A while back, [Jacob] played around with a player piano. After feeding a roll into the machine and trying to figure out how a fifty year old machine using hundred year old technology can replicate a skilled pianist, he decided to take a crack at decoding piano rolls for himself. He came up with a clever way of doing it over Christmas break, using a camera and a few bits of OpenCV.
The old-school mechanics of a player piano use a bellows and valve system to suck air through dozens of holes, making the action hit a string whenever a hole is present in the piano roll. To bring this mechanism into the modern age, [Jacob] pointed a video camera at the active part of the piano roll and used OpenCV to translate holes in a piece of paper to a MIDI file.
The synthesized version sounds just as good as the original paper scroll-based version, as seen in the video after the break. There are a few sync issues in the video and the resulting MIDI file isn’t in the right key, but that’s easily fixed by anyone willing to replicate this project.
Continue reading “Reading Piano Rolls Without A Player Piano”