Euclidean Rhythm Drum or Synth Sequencer Module
Introduction: Euclidean Rhythm Drum or Synth Sequencer Module
I teach a lot of electronics in my high school engineering and robotics classes. Concepts like filters and resonance and their underlying mathematics can be really abstract and difficult for students to grasp. This year, I'm working with my Junior students to build an analog modular synthesizer to demonstrate these and other concepts - plus it's just darned cool! One of the modules I knew we needed in our rack was a sequencer, but not just any sequencer - I wanted a Euclidean Rhythm generator!
The term Euclidean Rhythm was first coined by computer scientist <PERSON> in his 2005 paper on the topic. Euclidean Rhythms consist of "n" events evenly spaced across "m" possible positions in a repeating pattern. Allocation of the events is determined using <PERSON>'s method of repeated subtraction commonly used to determine greatest common divisors. <PERSON> observed that Euclidean Rhythms crop up in music around the world, making it a very useful algorithm for generating things like drum patterns. A number of virtual and physical implementations of these rhythm generators exist, but my favorite has to be Qu-Bit Electronix's Pulsar Eurorack module, which served as the inspiration for my design.
The module presented in this Instructable is based around an Arduino Nano, and can drive four drum or synth voice triggers spread out over a 16 beat pattern. Tempos can be produced using an internal or external clock. The number of triggers for each part can be specified independently and rotated to produce interesting rhythmic interactions between the voices. The panel design is based around <PERSON> aka Look Mum No Computer's "Kosmo format," but it could be easily adapted to Eurorack or another standard.
Supplies
1 Arduino Nano - You can use other Arduinos, but I like the Nano's compactness and low cost
1 Adafruit 16 Bit NeoPixel Ring - You can get cheaper knockoffs, but please support Adafruit!
5 Multicolored Momentary Push Buttons
1 SPDT Mini Toggle Switch
1 B100K (Linear Taper) Potentiometer
1 Rotary Encoder with Switch
5 Mono 1/4" Female Audio Jacks
1 TL074 Quad Operational Amplifier - Optional if you feel lucky!
1 14 Pin IC Socket for TL074
1 10 Pin Male IDC Socket Box Connector for Eurorack power
4 5mm LEDs (Red, Blue, Green, and Yellow)
1 220 Ohm Resistor
6 1K Ohm Resistors
1 2.2K Ohm Resistor
1 4.7K Ohm Resistor
2 10K Ohm Resistors
Jumper Wire
Stranded Wire
Breadboard
2 4cmx6cm Protoboards
Male and Female Header Pins
Acrylic, wood, or aluminum sheet for front panel - I laser cut mine from black acrylic
You will also need a soldering iron, solder, and a multimeter with continuity test mode if you plan to move beyond breadboarding the circuit.
Step 1: Prototyping
I start any new Arduino/circuit project by breadboarding my ideas. I usually add a few components and test them with the software feature they're associated with before moving on to additional components. 769
In this case, the NeoPixel and Encoder were new to me and were the first to go on the board for testing and software development. These are both digital devices.
The NeoPixel's data line is attached to digital pin 2 on the Nano through a 220 Ohm resistor. The rotary encoder has two lines that are attached to pins 3 and 4 to count pulses that come out of the encoder. Pin 5 is used with an internal pull-up resistor in the Nano to read the switch that is closed when the encoder knob is pressed down. We'll be using this to switch between modes in the module.
Note that the NeoPixel must be supplied with 5V to power it. The Nano's 5V output and ground pins are attached to the labeled pins on the NeoPixel. The encoder has two pins that must be connected to the Nano's ground. These are shown most clearly in the circuit schematic.
Once those were working I added some temporary pushbuttons to switch between the four triggers. It might be tempting to assign each button to a separate digital pin, but those are precious commodities. When I have a bunch of push buttons to deal with, I wire them up in series with resistors that become inputs into a voltage divider. The divider's output voltage varies depending on which button(s) are pressed and are easily decoded using one of the analog inputs on the Nano. 939