Arduino-based Euclid Rhythm Sequencer
This sequencer is inspired by Euclidean Circles v2 by vpme.de.
It has 4 channels: A, B, C, D
Internal (with tempo control) or external clock operation
Each channel can adjust the pattern length (1-16) and number of active spots in the pattern (1 to pattern length) and the offset of the pattern start within the cycle
The euclidean “algorithm” places the active beats within the pattern of a given length in a way that spreads them equally as much as possible.
A 16 color led circle shows the parameters and a rotary encoder at the center of the ring is used as the main interactive control
The module provides 4 gate signals for Eurorack.
Each channel can have a different pattern, and the 4 channels together with their patterns constitute a “patch”.
Up to 16 patches can be saved and later loaded from EEPROM, so if you got something cool, it will not be lost..
The module has a play/stop button, and once playing can be triggered from an internal clock whose rate is controlled with a potentiometer, or switched to use an external clock from Eurorack.
int/ext toggle switch - setting the clock source
Tempo pot. - used when clock is internal to set the tempo BPM
16 RGB Led circle (Nano Pixels) to show setup, pattern and real time playback
Channel Colors are Yellow, Orange, Light Red and Red, where the leds in those color show the pattern length.
According to the mode (selected by pushing the rotary encoder), the actrive beats are shown in Purple (edit number of active), Blue (edit pattern offset), Cyan (edit pattern length).
When in play mode, the current step is highlighted in green
In Store mode (entered by long clicking the rotaty encoder), the whole 16 pixels are turned red (if the corresponding slot is free) or green (if the corresponding memory slot is taken). Selected memory position is highlighted in white. Selected position is moved with the rotary encoder. Clicking the CHN/store button stores the current pattern to the selected position (overriding existing stored pattern if there was one). If the selected position is a programmed one (Green), clicking the PLAY/load button loades the stored patch to the active pattern.
PLAY push button (toggles between start and stop modes)
Rotary encoder with push button action to set parameters as described above
CHN Select push button - cycles between the 4 channels
The circuit is based on an Arduino Nano Every board, as shown below.
Clock input - a 2N3904 transistor is used as an inverting buffer to protect the arduino, two resistors and a diode are connected (one resistor from input to base, one resistor from collector to +5V, diode cathode to base, anode to ground). Input from collector to D10.
Gate outputs - digital pins 2,3,4,5 go to gate output
NeoPixels ring - digital pin 6 drives the LED ring
Rotary encoder inputs - D7, D8
Rotary encoder switch - D9
Play/Stop push connected as INPUT PULLUP to ground and D11
Channel select push is connected to ground and to A3, A3 connected with 1M resistor to v+
Int/Ext Switch - ground to D12
EEPROM size on Nano Every is 256 bytes, we would like to store patches into it, so they can be called upon later and survive power downs.
This section explains the arrangement of the data in this rather small memory space.
Each patch consists of 4 channels, each channel has 3 parameters: pattern length, number of active beats and offset. Each parameter can be stored in 4 bits, so the channel data is stored in 1.5 bytes, and the whole 4 channels in 8 bytes.
As the GUI consists of 16 LEDS, we will limit the pattern storage to 16 patches, to simplify the user interface.
To simplify managing the memory, we can store 2 bytes of 16 bits telling us if the respective slot is already stored.
The source code is available at this repo here:
See the readme for additional info, and feel free to comment, or branch...
Post a Comment