Project 3: Physical Drum Looper
December 10, 2020Physical Computing
For Project three I created a physical drum looper that allows you to play rhythms with everyday objects. The device is a box with four buttons connected to three motors. Each motor is attached to a mallet. I used rubber bands to attach the motors to the bottles and pans that would act as my drums.
I initially wanted to mutate the beat over time using DrumsRNN, an AI algorithm for generating rhythms, but ran into a snag when I damaged my arduino attempting to connect the motors and was not able to implement that aspect.
The wiring is straightforward. The Arduino is connected to four pushbuttons and three servo motors. The motors are powered by a +5V power supply.
The wiring: four pushbuttons and three servo motors connected to an Arduino nano
For the enclosure I used a bicycle light box that perfectly fit the breadboard. I cut holes in the sides for the USB connection and 5V power supply, as well as for the servo motor wires.
To make the buttons reach the top of the box I extended them with segments of wooden dowel and cut holes in the lid. This solution worked but did make the buttons a little harder to press consistently.
The arduino code can be viewed here. The core logic handles timing. The loop begins recording when the first beat is played and ends when the loop button is pressed. The user timings are then calculated and quantized to eighth notes based on the overall loop length. If I had connected the DrumsRNN algorithm, the quantized beats would be used as the initial input to generate derivative rhythms