Ever since I was a child I had a dream to some day be able to play the piano. As it turned out, learning how to play an instrument is not nearly as fun. Lacking the willpower and determination, my practice was limited to one hour of frustrated key bashing once every few months.
Many years later with even more life lessons under my belt, I still lack the I learned some better words though conviction to practice daily. Luckily one of the skills that I have picked up is engineering and as we will find out, that’s all you really need!
Today we will go through the adventure of creating our own music instrument. Not one that takes years to master, but a fun interactive activity for your next dinner party. Without further ado, I present to you: The BeatBox
Or well, On second thought let's not make too many Holy Grail references, it's rather a silly movie. it’s only a model.
The BeatBox is a cube (or box, if you will) with a glass plate on top.
Along the edges of the glass plate sit various tiles that you can place on top of the box.
Each tile represents a unique sound that will play when placed on the glass.
By mixing and matching different tiles you can create all kinds of fun songs (or I think they get it beats, if you will).
Here it is for real this time! 
Because the actual technical details are relatively simple, we will keep it light. There won’t even be But now that you asked: https://github.com/ishadijcks/beatbox any code today.
The BeatBox is powered by a Raspberry Pi 5 attached to a camera that is pointed at the frosted glass. It detects what tiles are on the glass and where, and provides that information to the audio player. The audio player is secretly playing all samples at the same time, but the ones that are undetected are muted. The detected samples get their volume set based on the position of the corresponding tile. This audio is then output into a standard 3.5mm jack, allowing you to connect the BeatBox to your own music system!
Each tile has an ArUco marker that can be detected. Unlike QR codes that can represent any value, ArUco markers contain a single number from a fixed set of numbers, in our case 1-40. This makes them much smaller and And much more difficult to hide secrets in, but not impossible quicker to decode.




As someone who had never bought glass before, I was surprised to see how many different kinds of glass there are. Overwhelmed with possibility I stood there, yeah glassy-eyed, until a very attentive employee helped me out. I went with frosted glass, which has a nice light diffusing property. Only when a tile is placed directly on the it, it is clear from the other side. When hovering the tile a few centimeters above, it gets too blurry for the camera to pick up. This prevents the feeling that a sample starts “too soon”, and prevents me from wasting time developing a software solution. Win-win!


At first I wanted to comission an (actual) artist to create some samples that worked nicely together, but then my attention got caught by sample packs. I bought one containing 8000 samples from Ejay. I spend some time combing through the samples, trying to curate ones that would fit together nicely. This was not fun, so I artistically decided that it would be better if trying out all samples is also part of the Artistic liberty is one helluva drug! experience! A sample pack of 30 different samples is randomly generated by a script that matches on bpm and duration, leading to countless variations!
The BeatBox is a very fun interactive curiousity that has an addicting simplicity. I’ve watched many people play with it now, and it’s interesting how different I'm sure you can distill some sort of personality type out of how people interact with it. Doesn't seem any sillier than Myers-Briggs to me. some people use it. Some first sort all the samples into different instruments, discarding ones they don’t like. Others just throw on everything, then remove what doesn’t sound good.
One day I would like to get it in the hands of an (actual) musician to see what they can do with it. Until then it functions as a decent coffee table.
Thank you for reading!