Simple Drum Machine With Arduino Uno and Mozzi

Introduction: Simple Drum Machine With Arduino Uno and Mozzi

About: Argentine writer and inventor

Living in Argentina means that international mail will be stolen or get stuck in customs. Add Coronavirus quarantine and your next project is restricted to an old Arduino Uno board. Good news? As the great poet from Rolling Stones says “Time is on my side... yes it is”

I’ve downloaded Mozzi, the excellent – but also complicated – music library that does not require any additional hardware to work and I’ve started to read the documentation. I’ve came out with a simple drum machine/sequencer that can be operated entirely with 5 knobs and 1 button. The first knob will change beats per minute and other 4 knobs will determine what to play in every beat. I’ve added also 4 Leds to identify current beat.

Supplies

Arduino Uno

Mozzi Library

5 knobs

1 push button

1 audio jack

Optional 3d Printed Case

Step 1: Programming Details

Inside the code, as beats goes by, every knob is read and the value from 0 to 1024 is mapped to a 1-10 scale. 1 means silence. 2 means kick. 3 means hi hat. 4 means snare and latest positions are used for some synthesized sounds in different notes.

Step 2: Enclosure

The enclosure was made with 2mm rectangles and 4 screws.

Step 3: Sounds

Sounds were converted from wav to raw data and loaded as external.h files along with the .ino code. This procedure was a little bit tricky and involved external software like Audacity and also a Python script to convert the .raw to.h

The simple drum machine is fun to play, default sounds can be changed for other sounds like Gameboy effects and low-fi Atari sounds.

Of course quarantine also means no public for your odd electronic concerts, so I’ve made a little moving animatronic that will auto-detect the beats and moves the head to the music.

Step 4: Demo

Here is a demo of the Drum Machine being played.

The moving head is a stand alone project with Sound Module and Arduino Nano. It auto-detects BPM and moves head accordingly.

Be the First to Share

    Recommendations

    • Crayons Challenge

      Crayons Challenge
    • Back to School: Student Design Challenge

      Back to School: Student Design Challenge
    • Plywood Contest

      Plywood Contest

    5 Comments

    0
    karsten harazim
    karsten harazim

    Question 8 months ago on Step 4

    hi out there! would really love to give it a rebuild. would you like to assist / be more specifiv about the mozzi / soundclip part of this? would it be possible to get that running on top of or switchable in a APC setup? and use the 8steps?

    0
    karsten harazim
    karsten harazim

    Reply 7 months ago

    thx, is it possible to get the information outside of amazon/kindle ecosystem?

    0
    RoniBandini
    RoniBandini

    Reply 7 months ago

    You can contact Steadman Thompson Editorial. I think they sell the book from outside as well.

    1
    Sushyoshi
    Sushyoshi

    Question 1 year ago

    Can you share the code and the converter script?