Projects - The Riffler

The Riffler



Python Arduino



Inspiration

The theme of Hack Canada 2025 was to build a project that solves a Canadian issue. In the advent of tariffs and competitive hockey games, our firm sense of national identity is more vital than ever. What better way to address this than our common appreciation for music?

 

Software

Thus, The Riffler was born. In 36 hours, we built a guitar to play any user-uploaded .gp5 tablature file. Using the pyguitarpro library, our python script will parse through the tablature. We extract the string number, fret number, and start time of notes. With these, we concatenate them into custom commands S{string #}F{fret #} and store them with the starting time as elements of a JSON file. We then use this to run a loop simulating the playing process of the uploaded piece. In real time, we use the pyserial library to send these custom commands to an Arduino Mega which then controls the servos on the guitar to play the piece.

 

Hardware

On the hardware side, we cut out parts from a tape's plastic container to simulate a guitar picks. With custom 3D-printed parts, we were able to convert the servo's rotational motion in to linear motion for controlling the frets. With Starbucks popsicle sticks we built a support for the servos. Hardware was probably our biggest challenge as we had to ensure consistency of performance with limited material. There was also a lot of trial and error when it came to centering the servos and what each servo's position should be for playing optimally as each string as a different mass density and tension. It was also a challenge as the 3D-printer malfunctioned at times.

 

Challenges

Aside from the aforementioned hardware challenges, the time constraint posed another issue. We were only able to construct 4 fret servos out of the 8 planned for the O Canada tablature. Speaking of the O Canada tablature, we edit the tablature to concur with our hardware limitations. Because the frets are so close to each other, we had to sacrifice the inner voicings so the final tablature only contained the melody and bass. However, it seems that only 3 hours of sleep has paid off since we placed top 5.

 

(Our planned frets, orange for melody, green for bass. F0 denotes open string)

 

Huge thanks to Rohan Katreddy and Claire Liu who worked mostly on hardware, and Vince Nguyen who worked alongside me mostly on software. The Riffler would never have come to life had it not been a team effort.

 

Media