Paragon Project: Euclidean Drum Machine

In terms of making music with the Raspberry Pi, there are a handful of options available. People have come up with ways to turn their Pis into instruments of all kinds. However, by comparison, there are few music projects revolving around the Raspberry Pi Pico. So it’s thrilling to see a new Pico euclidean drum machine pop up on reddit.

Introducing the euclid-16, a euclidean drum machine developed around the Raspberry Pi Pico, created by aproximacion.

Not only is this project inspired, but it’s also super straightforward and aproximacion included a GitHub repository with all the code you need to put it together yourself!

Credit: aproximacion.

As aproximacion details, the euclid-16 above consists of a perfboard and a soap case.

Before we get into the hardware and software, it’s worth touching on what’s “euclidean” about this drum machine. Euclidean rhythms – referring to the ancient Greek mathematician, Euclid – are rhythms with super balanced patterns over intervals of time.

This has all sorts of really cool implications, but for this drum machine project, it means effectively that you determine the intervals and how many beats should go in each interval.

So euclidean drum machines base their patterns on euclidean rhythms, which you can observe in this video that aproximacion, who goes by redraw on GitHub, uploaded:

Credit: redraw.

Hardware

As you can see, this project has a perfboard attached to a soap case, along with an encoder, a yellow LED along with 16 red LEDs, four buttons, two shift register 74HC595 ICs, and a Raspberry Pi Pico.

Obviously, though, the setup here is fairly customizable. Any case that could hold the Pico and necessary components, for instance, would be well-suited for a project like this.

The two shift registers control the 16 LEDs, as indicated by the wiring diagram included in the GitHub repository:

Credit: redraw.

Software

The code is CircuitPython, which aproximacion notes on the GitHub, “is great to play around,” but “it doesn’t provide hardware timer interrupts, which is critical to keep tempo consistent.”

The audio is output through PWM, but could be output through I2S as well. You can learn more about audio output with the Pico and PWM, I2S, and I2C in our article on audio with the Pico W.

In the reddit post, aproximacion says: “For the moment, it’s working as a MIDI sequencer, but audio through PWM, or using a i2s DAC should be also possible. The ideal goal would be to play cheap DR-55, CR-78, Minipops, etc samples in it.”

And this little drum machine can save up to 16 sequences.

So if you want to create a super cheap, really powerful euclidean drum machine with your Raspberry Pi Pico, this is the project for you!

Grab a couple of Picos and then you can put this together with some other projects to set up your rock band or a full orchestra.

If you’d like to see more details, check out the GitHub source here.

If you’d like to see more Paragon Projects that we’ve featured in this series – you can click here.

And if you’ve got any questions or if you’d like to suggest a project for this series, please comment below!

Leave a Comment