Lmao man this Euclidean sequencer on the Digitone is cool. You don't even need creativity for the rhythm when you have writer's block. And such a convenient tool squeezed into the same box as the sound generators.
I was expecting something like the Make Noise Rene but this is kind of different. Not sure why it's called Euclidean, maybe it's because the rhythm always has to resolve to a predefined boundary.
For the spherical coordinates, we'll use 3 dimensions to sequence the main synth. One sequencer will do the notes on an odd signature (pitch & time covering 2 dimensions) & another, an euclidian sequencer, will control the gate (our 3rd dimension) on it, also at an odd signature, but different, creating a subtle variation.
Similarly, the bassline will follow an odd signature, but no gating, opting instead for a bit more sustain.
#synths #Korg #MS20 #SCI #SixTrak #polyrhithm #euclidean #music
Hypersphere slow motion explanation
#silent #digital #animation of a #hypersphere. 2.5-min.
❛❛ In #math, a hypersphere or 3-sphere is a 4-dimensional #analogue of a #sphere, and is the 3-dimensional n-sphere. In 4-dimensional #Euclidean #space, it is the set of #points equidistant from a fixed central #point. ❜❜
🔗 https://www.youtube.com/watch?v=XFW769hqa1U 2012 Jul 04
🔗 https://Wikipedia.org/wiki/N-sphere … #nSphere
🔗 https://Wikipedia.org/wiki/3-sphere … #3Sphere
#Community #TimeTravel #Research #Topology #Geometry #Kronodon
1 likes, 0 comments - intafon on January 12, 2025: "Monday, #Jamuary 13, 2025 at 3:26:15 PM GMT+9 (2025年1月13日 月曜日 15:26:15 GMT+9) Cabinet system jam, playing around with Bloom clocked by the Zularic Repetitor, and with 3 VCOs set to a minor chord. . #electronicmusic #euclidean #eurorack #eurorackmodular #experimental #glitch #idm #instrumental #Japan #maxmsp #modular #modularsynth #modulartokyo #secretsoundsystem #synthesizer #tokyo #モジュラーシンセ".
0 likes, 0 comments - intafon on January 12, 2025: "Clip: Sunday, #Jamuary 12, 2025 at 6:18:36 PM GMT+9 (2025年1月12日 日曜日 18:18:36 GMT+9) Playing around a bit with a couple a sequences with 2 VCOs and various post VCA treatments. . #electronicmusic #euclidean #eurorack #eurorackmodular #experimental #glitch #idm #instrumental #Japan #maxmsp #modular #modularsynth #modulartokyo #secretsoundsystem #synthesizer #tokyo #モジュラーシンセ".
In this posts I describe a version of the Arduino Euclidean Gate Sequencer that implements the same user interface and most of the features of HAGIWO’s brilliant build.
Also see the Arduino Clock Generator Shield PCB design.
https://makertube.net/w/vPXHnd69UifLhHyQangUr4
Warning! I strongly recommend using old or second hand equipment for your experiments. I am not responsible for any damage to expensive instruments!
If you are new to Arduino, see the Getting Started pages.
Parts List
In principle this could use the same hardware as described in Part 3 but I’m using my PCB as it makes everything a lot easier to test and use.
Introduction and Core Functionality
There is a really good demonstration of HAGIWO’s build in this video: https://www.youtube.com/watch?v=lkoBfiq6KPY
HAGIWO’s screen is shown above and has the following features:
The menus are navigated by means of a rotary encoder and switch and it expects an external clock signal, as it is designed for use in a Eurorack setup.
I’m not bothered about the random mode, but I want to implement a built-in clock source with its own tempo control, similar to that shown in Part 3.
The Code
HAGIWO’s code is implemented in a single loop function, using IO interrupts with the Enc rotary encoder library, which means the encoder has to be on pins 2 and 3 on an Uno.
I want to keep my timer-driven GATE outputs and will be polling the encoder using the library from Matthias Hertel (https://github.com/mathertel/RotaryEncoder) which means essentially I’m going to be doing a re-implementation rather than a port of HAGIWO’s code to my hardware.
I’ve reused all the user interface design elements though (apart from the random mode) even though the implementation has been tweaked slightly.
Once again I have two main threads of code:
By keeping the GATE handling in an interrupt routine it will not be affected by the slower I2C updates of the display.
I did wonder about a third level – perhaps a multiple of the main tick, to give me a thread for the encoder and one for the GATES, but it seems to work fine using the same 10mS tick for both.
The core sequencer parameters are:
Timer Functions:
Sequencer Functions:
tempoTickCnt to decide if a sequencer step is to be enacted or not and output the GATEs as required. Called from the timerLoop().Gate Functions (all called from the sequencerLoop()):
Pattern Functions:
User Interface and Menu Functions:
The main menu logic from the updateMenu() function has to manage 7 selection states as follows:
Most of the states will add the (positive or negative) increment to the appropriate sequencer parameter and bounds check the result.
The exceptions are mute and reset which act immediately – mute being a toggle, and reset simply setting all seqCounters[] back to 0.
uiLoop() will act on the encoder switch using it to choose between moving between menus and selecting the functionality of one of the menu items.
uiUpdate() is the function that closely mirrors HAGIWO’s original as it has to reproduce the interface on the display. As already mentioned, I’ve not implemented a random mode, but I have added a tempo indication which I show by adding a blocked-out rectangle across the centre of the display with the current bpm tempo value shown.
I’ve also added code so that the currently selected menu item has a solid triangle when in parameter changing mode. This is mostly as HAGIWO’s original used an independent switch, so the sub-menu mode was active as long as the switch was pressed. As I’m using a switched encoder, I want the switch to be a latched toggle between modes rather than only active when pressed.
There is one bug that I can’t quite see why it happens. When showing the tempo there is a block of interference on the bottom right-hand corner. I’m using display.print() at the coordinate point indicated for the tempo text, so I’m not sure what is causing that. Once the tempo display disappears as the menu selection moves on, it goes away…
This seems to be a result of setTextSize(2) and using print(). I’ve no idea why, but switching over to using drawChar() directly for the three digits seems to solve the issue! Still no real idea why to be honest but must be some weird buffer bug in the libraries somewhere I guess.
// Note: default font has 6x8 characters, but we're using size=2Update – Nov 2024
I realised what the issue is likely to be. The SSD1306 library has to allocate a chunk of memory on startup, as part of the display.begin() call and if that fails, but the code continues on anyway, then its behaviour will be quite unpredictable.
It requires the following amount of memory to run (from Adafruit_SSD1306.cpp):
(WIDTH * ((HEIGHT + 7) / 8))So for 128×64 that is 1136 bytes of memory. I would imagine there is some kind of overrun going on – if not then it is probably something related to that.
Either way, I’ve added a test on startup to ensure that the display.begin() calls succeeds before proceeding just in case – something I should have been doing anyway.
Apart from these changes, I believe the interface is working as to HAGIWO’s original.
Closing Thoughts
Once again the video shows my Arduino Clock Generator Shield PCB running the above code, driving my Arduino Drum Trigger to MIDI Shield PCB which is hooked up to a Roland TR-505.
When I first started messing around with Euclidean rhythms and thinking about an encoder and screen-based interface, I did think I’d just pick up and use the code from HAGIWO’s project pretty much “as is”. But in the end it was just the interface design I reused and reimplemented everything else myself so I could tweak and adjust things in the way I wanted.
So I consider this is another wheel dutifully reinvented here.
As always though, major thanks to HAGIWO for the project that inspired this one and for publishing the designs and code online for others to learn from.
Kevin
https://diyelectromusic.com/2024/10/28/arduino-euclidean-gate-sequencer-part-4/
#arduinoUno #euclidean #gate #midi #oledDisplay #rotaryEncoder #ssd1306 #stepSequence
Arduino Euclidean Sequencer with OLED display
This is another variant of my Arduino Euclidean Gate Sequencer this time using a rotary encoder and I2C display rather than a potentiometer for control.
https://makertube.net/w/s1cMmrCzW7tGm16NQQKH9w
Warning! I strongly recommend using old or second hand equipment for your experiments. I am not responsible for any damage to expensive instruments!
If you are new to Arduino, see the Getting Started pages.
Parts List
The Circuit
The above diagram shows how to connect two variants of rotary encoder. On the left is a common KY-040 switched encoder module. On the right is a common switched encoder directly connected to solderless breadboard. Only one encoder should be connected to D4, D5 with the switch on D6.
Note if it turns out the encoder is incrementing/decrementing values in the opposite way to what is expected, then usually the simplest thing to do is swap the IO pin assignments for the A and B connections in the code.
The diagram also shows how to connect a 128×64 I2C OLED display. These are the very common SSD1306 based displays. Note that the pinouts on these can vary with GND/VCC swapped or SCL/SDA swapped, but they must be connected to 5V, GND and A4 (SDA) and A5 (SCL).
The clock generator outputs are on D8-D13. I’ve not added an LED to D13 as it is wired to the internal LED, but that can be added too if required.
I’ve put together an Arduino Clock Generator Shield PCB which includes buffered outputs, a rotary encoder and I2C display connections.
The Code
This expands on the original code that is fully described in part 1 here.
There are two main threads of code as follows:
In order to ensure a responsive encoder the display is only updated when something actually needs to change.
Once again I’ve opted for Matthias Hertel’s simple RotaryEncoder library which can be found here: https://github.com/mathertel/RotaryEncoder. A detailed explanation of how it works can be found here. I’ve found this seems to work best for me for the cheap encoders I tend to buy. One the correct encoder type has been found I’ve found this to be very reliable, especially when simply polling IO pins for an encoder. There is a little more on the rationale for choosing this library in a previous project here: Arduino MIDI Rotary Encoder Controller.
For the I2C display, I’m using the SSD1306 implementation of the Adafruit GFX library which can be found here:
All of these should be installable from the Arduino Library Manager.
The core principles of operation are as follows:
This is the display I have. I’ve used a larger font for the tempo and underlining to show the active focus of the interface.
The display is managed by having lists of the coordinate points for “cursor” which map what I’ve used for positioning the text.
int cursor_x[GATES+1] = {10,30,50,70,90,110,20};Then when the encoder triggers a change, the main interface code essentially runs the following algorithm:
IF encoder signals UP THENI did wonder if the encoder should be polled in its own timer-driver routine. For performance, many people might enable hardware pin interrupts, but these are only available on pins 2 and 3 on an ATMega328. But as the interface loop is essentially not doing much else, it will poll the encoder pretty quickly (at least compared to the speed a person can turn it) and performance is further enhanced by only writing out to the display if something has actually changed.
There are three #defines for the encoder IO pins. If the encoder seems to be doing the opposite to what is expected, just swap over the pins for ENC_A and ENC_B.
#define ENC_A 4The display is assumed to have an I2C address of 0x3C but that can be changed. It is also built for a 128×64 display but a 128×32 display could also be used if the coordinates for the text and cursors mentioned previously are changed accordingly.
#define OLED_ADDR 0x3CThere are two sets of IO pin definitions in the code. One provides a consecutive set of GATES on D8-D13 and one uses D2,D3,D10-D13 to match the requirements of my Arduino Clock Generator Shield PCB.
int gatePins[GATES] = {13,12,11,10,3,2}; // PCB variantClosing Thoughts
The video shows my Arduino Clock Generator Shield PCB running the above code, driving my Arduino Drum Trigger to MIDI Shield PCB which is hooked up to a Roland TR-505.
The only change required is for the GATE pins, which are slightly different for the PCB.
Kevin
https://diyelectromusic.com/2024/10/27/arduino-euclidean-gate-sequencer-part-3/
#arduinoUno #define #defines #euclidean #gate #midi #oledDisplay #rotaryEncoder #ssd1306 #stepSequence