Euclidean Polyrhythm generator - code and details
Moderators: Kent, luketeaford, Joe.
- daynehacks
- Common Wiggler
- Posts: 156
- Joined: Sun Sep 06, 2015 12:52 pm
- Location: Grand Forks, BC
- Contact:
It means add // in front of the if and end bracket ( } ) where it says something about writing to eeprom and upload the code. It should rewrite the eeprom, and then you could change it back to normal and re upload the code.
I didn't look at the code though, but thats what its saying.
You could also upload the "clear eeprom" sketch in the arduino examples.
I didn't look at the code though, but thats what its saying.
You could also upload the "clear eeprom" sketch in the arduino examples.
-
- Common Wiggler
- Posts: 81
- Joined: Wed May 29, 2013 3:52 am
- Location: Germany
-
- Learning to Wiggle
- Posts: 35
- Joined: Sun Sep 03, 2017 3:19 pm
- Location: Dallas, Texas
-
- Common Wiggler
- Posts: 81
- Joined: Wed May 29, 2013 3:52 am
- Location: Germany
-
- Common Wiggler
- Posts: 81
- Joined: Wed May 29, 2013 3:52 am
- Location: Germany
[video][/video]
I've been working on adding MIDI to the Euclidian Sequencer. Here's a video that shows how I set up MIDI programing using the 3 encoders and the bottom 2 rows of the LED matrix.
Not shown is setting up the MIDI channel. It's set using Encoder 1 and is global for all 4 sequencer channels. Is there any reason to have the MIDI channel set differently for each sequencer row?
Still a bit buggy, but moving along
I've been working on adding MIDI to the Euclidian Sequencer. Here's a video that shows how I set up MIDI programing using the 3 encoders and the bottom 2 rows of the LED matrix.
Not shown is setting up the MIDI channel. It's set using Encoder 1 and is global for all 4 sequencer channels. Is there any reason to have the MIDI channel set differently for each sequencer row?
Still a bit buggy, but moving along
If anyone is interested in trying out the code I'm working on, here's a download link.
I've added MIDI out, which at a minimum you can implement with 2 resistors and a MIDI out jack. MIDI is sent from PIN 1 (TX) on the Arduino. https://www.arduino.cc/en/Tutorial/Midi The MIDI out should be buffered with a TTL gate, but it'll work with just the resistors
Also I've added patch storage. There are 8 storage locations to keep sequence and MIDI setups.
The enclosed READ ME has instructions for using the MIDI setup and Patch store/recall.
I also tweeked the way the Arduino ADC runs, greatly speeding up the response time, as well as a few other minor tweeks.
If anyone tries it, let me know what you think...
I've added MIDI out, which at a minimum you can implement with 2 resistors and a MIDI out jack. MIDI is sent from PIN 1 (TX) on the Arduino. https://www.arduino.cc/en/Tutorial/Midi The MIDI out should be buffered with a TTL gate, but it'll work with just the resistors
Also I've added patch storage. There are 8 storage locations to keep sequence and MIDI setups.
The enclosed READ ME has instructions for using the MIDI setup and Patch store/recall.
I also tweeked the way the Arduino ADC runs, greatly speeding up the response time, as well as a few other minor tweeks.
If anyone tries it, let me know what you think...
- Attachments
-
- Tombola Euclidian with MIDI and Storage.zip
- Euclidian Polyrhythm with MIDI and Patch Storage
- (82.7 KiB) Downloaded 50 times
I'm setting up a page on my web site for the 4U Euclidean Sequencer. The code for the euro synisi board is available there along with a working-on-it version of the user guide that shows how to use the MIDI and Patch storage modes.
http://clsound.com/euclideansequenc.html
http://clsound.com/euclideansequenc.html
- masterofstuff124
- Wiggling with Experience
- Posts: 396
- Joined: Mon Aug 03, 2015 11:04 pm
- Location: Miami
-
- 1-Post Wiggler
- Posts: 1
- Joined: Tue Jan 22, 2019 10:36 am
- Location: Belgium
I only got into eurorack recently but the Stoicheia was one of my first purchases. I LOVE its sound.
Now getting into synth DIY, I also built a breakout board that takes output signals from the Stoicheia and translates them to MIDI to drive the TR-09 roland drum machine! Euclidian 909 beats, definitely has a fresh feeling to it
Also been learning a lot from looking at the RT schematics. I'm considering them my learning milestones somehow.
Now getting into synth DIY, I also built a breakout board that takes output signals from the Stoicheia and translates them to MIDI to drive the TR-09 roland drum machine! Euclidian 909 beats, definitely has a fresh feeling to it

Also been learning a lot from looking at the RT schematics. I'm considering them my learning milestones somehow.
Hi, I just recently stumbled uppon this thread and immediately started building my own on a breadboard. After some minor troubleshooting everything seems to work fine, both the original tombola/sneakthief version and the Craig Lee midi patch version. Except my LCD is running backwards and I seem unable to fix this. I tried all libraries, renaming the backward running folder, zip it and install through the IDE. It even seems that the programs don't recognize the added LedControl libraries. In the code in the IDE , the include LedControl, are grey, while include Encoder is orange. If I install LedControl through the IDE, by searching libraries>install, the 'include LedControl' turns orange. But I guess this is the wrong librarie for my backward running matrix.
As I said I tried all sorts of stuff and dont know what to do next. I know this is an old thread but I hope someone can point me in the right direction. Cheers, Roel
As I said I tried all sorts of stuff and dont know what to do next. I know this is an old thread but I hope someone can point me in the right direction. Cheers, Roel
OK, it was not running backwards but behaving like this:
Strangely enough, after uploading the code for the NTH time, it now displays as it should. Something got messed up with the LedControl library, but I tried all severall times. Anyhow,it's working now and I'll save this one too as it was the solution for altitude909 and daynehacks ;Altitude909 wrote:So I am having some issues, It's not behaving at all like the one in the video, the rows are offset. The indicator row on mine is on the top row, not the bottom..
[video][/video]
daynehacks wrote:Me again, I used the LedControl library from here: https://github.com/wayoda/LedControl/releases
and the led matrix works as it should.
Now my encoders are just backwards.
EDIT: Flipped around the encoder numbers (lines 154-156) in the sketch to get my encoders going the right directions and now everything is golden!
Aha, maybe this was the solution cause I thought I used the 'original normal' library last time I uploaded the code. Anyway thanks very much for the answer!CLee wrote:Catfish,
I'm far from an Arduino expert but... are you changing the #include listing at the top of the arduino sketch? Delete the one there and do "Include" over again.
The sketch you download from me uses the backwards running LEDControl, maybe you need the forward running one.
After playing a lot with this wonderfull device, I noticed that the Tombola/Sneakthief with midi and patch version from CLee, missed a trigger once in while. I couldn't get it to sync straight for more than 1 minute or so. If I give it a reset every 4 bars it is totally do-able and funky to play with.
But after I uploaded Tombola/Sneakthief's 0.7 version again the sequencer synced far better.
I red in the beginning of the thread that Sneakthief had the same missing trigger issues with Tombola's first version and it disappeared after using the encoder library.
For now I use Tombola/sneakthief 0.7, but I really liked the midi options from CLee, does anyone recognise this syncing issue, or maybe have a solution?
But after I uploaded Tombola/Sneakthief's 0.7 version again the sequencer synced far better.
I red in the beginning of the thread that Sneakthief had the same missing trigger issues with Tombola's first version and it disappeared after using the encoder library.
For now I use Tombola/sneakthief 0.7, but I really liked the midi options from CLee, does anyone recognise this syncing issue, or maybe have a solution?
That's really odd. I never had that problem while testing the syinsi schematic. I don't have a module with that circuit to test anymore but I'll look at the code and see if I can find an issue.Catfish wrote:After playing a lot with this wonderfull device, I noticed that the Tombola/Sneakthief with midi and patch version from CLee, missed a trigger once in while. I couldn't get it to sync straight for more than 1 minute or so. If I give it a reset every 4 bars it is totally do-able and funky to play with.
But after I uploaded Tombola/Sneakthief's 0.7 version again the sequencer synced far better.
I red in the beginning of the thread that Sneakthief had the same missing trigger issues with Tombola's first version and it disappeared after using the encoder library.
For now I use Tombola/sneakthief 0.7, but I really liked the midi options from CLee, does anyone recognise this syncing issue, or maybe have a solution?
Anyone else using my code with this build? Have this problem?
What are you using for a clock catfish?
Ok sorry to bother you, I think it's my fault again. With compiling and playing with different versions, copy, pasting I always get a mess somehow.
I deleted all I downloaded before and tried with a new download. And the Tombola/Sneakthief version with midi and patch seems to sync very straight now! Superb.
I had a little issue cause when I unzipped the folder from your (CLee's) site, the folder in wich the "ino's" are, hasn't the same name as the sequencer ino file. So I renamed the folder : Tombola_Euclidean_Sequencer_with_MIDI_and_Patch_storage , same as the seq ino.
It's running very straight for a while now so I'm totally happy with it!
BTW, I'm using a breadbord version with 1k in- and output resistors and 5.1 zenerdiodes for protection, and I sync it with Pamela's NEW Workout witch is synced to my MIDIbox sequencer (through Expert Sleepers FH-1)
I'm soon gonna build into my rack.
Thanks all for building and sharing this wonderfull little sequencer!
I deleted all I downloaded before and tried with a new download. And the Tombola/Sneakthief version with midi and patch seems to sync very straight now! Superb.
I had a little issue cause when I unzipped the folder from your (CLee's) site, the folder in wich the "ino's" are, hasn't the same name as the sequencer ino file. So I renamed the folder : Tombola_Euclidean_Sequencer_with_MIDI_and_Patch_storage , same as the seq ino.
It's running very straight for a while now so I'm totally happy with it!
BTW, I'm using a breadbord version with 1k in- and output resistors and 5.1 zenerdiodes for protection, and I sync it with Pamela's NEW Workout witch is synced to my MIDIbox sequencer (through Expert Sleepers FH-1)
I'm soon gonna build into my rack.
Thanks all for building and sharing this wonderfull little sequencer!
-
- Common Wiggler
- Posts: 81
- Joined: Wed May 29, 2013 3:52 am
- Location: Germany
See catfish's post above. After un-zipping you need to rename the folder the sketch is in to "Tombola_Euclidean_Sequencer_with_MIDI_and_Patch_storage".klangbauer wrote:Try to compile your euro file with midi and storage I get :
exit status 1
'setupADC' was not declared in this scope
I'm not a Arduino spec, what I have to do?
Use Arduino 1.6 on PC or 1.8 on Linux.
Other Euclid.ino work.
Thank you
Sorry, this was my first dip into Arduino and I didn't realize renaming the folder would cause problems. If the IDE created a new folder you could also move all the .ino files into the new folder also.
-
- Common Wiggler
- Posts: 81
- Joined: Wed May 29, 2013 3:52 am
- Location: Germany
-
- Common Wiggler
- Posts: 81
- Joined: Wed May 29, 2013 3:52 am
- Location: Germany
LedControl.cpp.
When I running Clee Euclid version matrix is running upside down.
When running THX-sneak thief version it is running on opposite way.
I do have only one LED library in Arduino library folder.
I would like to know how it can be managed to change the LedControl.cpp for both version. Sometimes it is useful.
Any help?
When I running Clee Euclid version matrix is running upside down.
When running THX-sneak thief version it is running on opposite way.
I do have only one LED library in Arduino library folder.
I would like to know how it can be managed to change the LedControl.cpp for both version. Sometimes it is useful.
Any help?
My code uses the same LED routines as the Tombola, I just expanded on his sketch. They shouldn't act differently. Make sure they're both using the same LED library. Which library you use probably depends on the LED matrix. I got mine at Tayda and use the backwards running LED library.klangbauer wrote:LedControl.cpp.
When I running Clee Euclid version matrix is running upside down.
When running THX-sneak thief version it is running on opposite way.
I do have only one LED library in Arduino library folder.
I would like to know how it can be managed to change the LedControl.cpp for both version. Sometimes it is useful.
Any help?
-
- Learning to Wiggle
- Posts: 33
- Joined: Thu Jul 25, 2019 2:20 am
- Location: Fife Scotland
Encoder stripboard
Encoder stripboard layout . 


