This is the anatomy of a sequencer disc. There are five circular tracks, each broken into 16 steps. Think of them as four measures of 4/4 time (four beats to the measure, 1/4 note gets the beat). So, each step is a quarter note.
This is a typical pattern style for a 16-step drum machine pattern. You can count it off as "one-2-3-4, two-2-3-4, three-2-3-4, four-2-3-4"
The outer ring is the clock track. It keeps time and its steps tell the whole system when to check for drum steps to play. Whenever a new clock step is sensed, the pattern has advanced one step.
The four inner tracks are for the four drum sample .wav files (they don't have to be drums, actually, any sample you want to play will work). One sample sound will be triggered per track, wherever a filled-in black step is sensed.
I've chosen a kick drum, snare drum, closed high hat, and clap as the four samples. Each track corresponds to one sample .wav file as well as one "voice" of the CircuitPython audio mixer.
Here's an example of a traditional, Roland 808-style drum pattern, created with Pattern.Sketch.com
Now, imagine we tidy that up to only the four tracks and the clock track at the top:
Then, we deform it into a circle, by going from rectangular to circular polar coordinates:
Hey! Now we've got a disc version of our drum pattern!
Here's a clean version we can use with the sensor strip:
One difference you'll notice is that the clock steps have been rotated to occur a little bit before the drum steps. This is to give the clock track sensor and Feather M4 time to register a clock tick and then scan the other four sensors to see if a drum step needs to be triggered.
I've also added some space between steps, this aids the sensors in detecting the "edge" between a white, reflective portion of the disc, and a black, non-reflective step mark.
You can now download and print out the .pdf files linked below. Just make sure you print them at 1:1 scale (a.k.a. "actual size") -- the circle has an 8" diameter so will fit on a sheet of Letter-sized paper.
White cardstock works great, but you can use regular printer paper as well. Use scissors to cut out the discs.
You can use a hobby knife to cut out the center circle, which helps with alignment later.
Now, we need a way to mount the pattern disc to the continuous rotation servo motor. You can cut out a flat piece of chipboard, or even better, laser cut an 8" circle with a hole in the middle for perfect servo horn alignment.
This can also be done with an MDF circle from the craft store or laser cut acrylic if you want something perfectly flat.
You can print and cut this template to make it simple to find the edges and center of your cardboard if you like.
Use hot glue to mount one of the servo horns to the center of the platter. To keep things even, I find it best to hold the two parts together and then use hot glue on top of them, rather than between the surfaces.
Next, use a few dabs of glue stick to hold the paper disc to the cardboard platter. Go sparingly and the disc will work well, but still be easy to remove to swap out discs.
Now, press the platter and horn onto the servo shaft.
Now, we'll arrange our parts onto a base made of foam-core board, using hot glue to hold down the servo and speaker. (Platter has been removed from the servo for this photo.)
You don't need to mount the Crickit if you don't want to, or use some double-stick foam tape or 2.5mm nylon screws and standoffs to secure it.
The sensor bar requires adjustment to get the best angle, so we'll convert a third-hand tool into our adjustable sensor arm.
Remove the main arm from the base by loosening the retention screw.
Take one of the alligator clips off of one end, and place it into the base socket, then tighten.
This will allow three degrees of freedom in placing the board.
Add a nylon standoff and screw to the perma proto board as shown.
Clamp alligator clip onto the standoff. (Heat shrink tubing is optional.)
The stand can now be adjusted easily!
We're ready to do this! Place the sensor assembly over the disc and angle it as shown, with the sensors a few millimeters from the surface.
Plug in the power adapter, and turn on the Crickit on/off switch. The sounds will each play once, then the disc will start to spin! If it doesn't spin, double check all connections and make sure you calibrated the servo as outlined on the previous page of this guide.
You'll hear a hip hop beat playing when the sensor is aligned properly. This is the trickiest part, so take your time adjusting the angle and height of the sensors over the disc. Each sensor should be over it's own track.
Once you have a good alignment, go ahead and secure the sensor base to the foam-core with some hot glue. You'll still be able to make fine adjustments if needed, but won't need to worry about the base being knocked off course.
To make your own pattern discs, all you need to do is print out a blank template, and then fill in the steps with a black chalk marker. Sharpies and other ink markers tend to be too shiny, so the matte finish of the chalk paint marker is what you want.
Now, you can make your own drum tracks! You can also use your own samples as well -- just make sure they are PCM 16-bit Mono WAV files at 22KHz sample rate. You can follow this guide for more info on converting your audio files.
This project could be extended into an even more fully featured drum sequencer! Here are some ideas:
- With a greater distance between sensors you may improve their ability to read tracks from a greater distance (less lateral IR light spill from neighbors
- You could use a full sized perma-proto board and a larger disc to add more sensors and therefore the ability to read more tracks. How about some toms, cymbals, and clavs?
- What about subdividing it into 32 steps for greater variety?
- A metal disc with magnetic step markers could be fun for quickly adjusting patterns
- You could go out to a proper amplifier and speaker stack for some huge sound!