Using an idea from a video I watched about making a programmable music box, I decided to make flexible pieces that would snap into place in the holes along the barrel.
Here’s the finished design of the barrel with a 32×6 matrix of holes:
I haven’t finished printing all the parts of the barrel yet, and I still only have sketches of the lever mechanism.