While one often listens to songs or albums in full, sometimes you just want to lay down a simple beat. [todbot]’s latest project promises to do just that.
The build relies on a Raspberry Pi Pico or any other RP2040-based microcontroller board, and is programmed in CircuitPython. The PWM feature is used for audio output, and it’s loaded with different WAV samples of the classic “Amen” break.
Each measure, a random new sample is chosen and played, changing the beat. Even better, all the samples can loop, and they come in varying lengths, allowing them to overlap and lay over each other to add further depth to the mix. It’s a cinch to setup, as CircuitPython has an AudioMixer object built in.
Those wishing to tinker for themselves can find all the code and samples on Github. A build like this one is a great way to start learning about working with audio and music, after all. We’ve seen [todbot]’s work here before, too. Video after the break.
Want breakbeats but have no time? Let #CircuitPython do the work on a @Raspberry_Pi RP2040-based board. CirPy can play multiple simultaneous samples easily. And RP2040 chip has PWM audio out. Code to follow pic.twitter.com/CutQz0bNao
— Tod Kurt (@todbot) February 9, 2022