electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
Our server is undergoing some maintenance. As long as this message appears, we may go down at any time. Sorry for the inconvenience.
 Forum index » DIY Hardware and Software
DIY Euclidean Polyrhythm Generator
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 1 [8 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
sneakthief



Joined: Jul 24, 2006
Posts: 538
Location: Berlin

PostPosted: Fri Feb 07, 2014 7:04 am    Post subject: DIY Euclidean Polyrhythm Generator
Subject description: for ~$20
Reply with quote  Mark this post and the followings unread

Overview:

A couple a years ago, a guy called Tombola made a Euclidean Polyrhythm generator for Arduino. The documentation was very sparse and the code was rough: http://www.muffwiggler.com/forum/topic-45485.html

Here's the original video demo from then:




I cleaned up Tombola's code somewhat, added Offset controls and imported a much better encoder-reading library. Now the encoders work great! I also made a schematic and included much-needed diode input-protection.


[FEB 2015 UPDATE]


User Interface:

When the rhythms are playing, the display flips between page 1 (steps 1-8 ) and page 2 (steps 9-16).

Here's what the display shows...

Row 1: What step is Output 1 playing
Row 2: Output 1 Pattern (steps 1-8 or 9-16)

Row 3: What step is Output 2 playing
Row 4: Output 2 Pattern (steps 1-8 or 9-16)

Row 5: What step is Output 3 playing
Row 6: Output 3 Pattern (steps 1-8 or 9-16)

Row 7: Which channel is selected

- 2 dots on the left for Channel 1
- 2 dots in the middle for Channel 2
- 2 dots on the right for Channel 3


Row 8: Current triggers

1. Input trigger
2. -
3. Output 1 trigger
4. Output 1 off-beat trigger (all the steps when Output 1 isn't playing)
5. Output 2 trigger
6. -
7. Output 3 trigger
8. -


- When you have Channel 1 selected and you rotate the N- and K- and Offset knobs, Rows 1 and 2 will respectively show the pattern length (N), pattern density (K) or Offset (O).

The same goes for Channel 2 (Rows 3 and 4) and Channel 3 (Rows 5 and 6)

- Rotating the Offset encoder clockwise rotates the steps up to one full rotation.

Example:

X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - Original 16-step pattern (N = 16, K = 1)
0 X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - Offset of 1
0 0 X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - Offset of 2
0 0 0 X 0 0 0 0 0 0 0 0 0 0 0 0 0 - Offset of 3
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 X - Offset of 15
X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - Offset of 16



Updated Code:

http://sneak-thief.com/modular/Tombola_Euclidean_v0.3.zip
(Arduino sketch, LED & Midi libraries & schematic)

Notes:

- I included a modified LED library in case you have an LED-matrix which runs backwards.

- Tombola's code doesn't always recall the flash memory properly when rebooted

These two libraries are included:

- LedControl (or LedControl2 in my zip for led matrices that run backwards)
http://playground.arduino.cc/Main/LedControl

- Encoder
http://www.pjrc.com/teensy/td_libs_Encoder.html



Parts (about $20 USD):

$1.80 USD - LED Matrix
$2.88 USD - Arduino Nano with USB
$4.88 USD - 5 encoders (you only need 3 but 3 separate are about the same price)

http://www.ebay.com/itm/1pcs-MAX7219-dot-matrix-module-Arduino-microcontroller-module-DIY-KIT-M67-/291289140410?pt=LH_DefaultDomain_0&hash=item43d22f8cba

http://www.ebay.com/itm/Nano-V3-0-ATmega328P-Improve-Controller-Board-XTWduino-USB-Driver-For-Arduino-/391000702325?pt=LH_DefaultDomain_0&hash=item5b09753d75

http://www.ebay.com/itm/5PCS-Rotary-encoder-with-switch-EC11-Audio-digital-potentiometer-handle-20mm-/181356150848?pt=LH_DefaultDomain_0&hash=item2a39ab4040


The rest I recommend ordering from Tayda for about $5:

- 6x 5.1V Zener diodes (protects inputs by limiting voltages both over and under 0-5V)
- 6x 200 Ohm resistors (one for each input/output)
- 6x Jacks (4 gates outs, 1 clock in, reset in)
- SPST button (if you want a reset switch)
- 4x 15k resistors

Extras: There's a possibility of adding another 4 analog/digital ins for future CV/gate usage. for CV control, I recommend using 2x 1N5819's per CV input. I'll draw a schematic for that later.



Schematics and Hardware:

Posted Image, might have been reduced in size. Click Image to view fullscreen.

Posted Image, might have been reduced in size. Click Image to view fullscreen.



SVG Panel file:

http://sneak-thief.com/modular/Tombola-Euclid-Panel.svg

Posted Image, might have been reduced in size. Click Image to view fullscreen.

I put A, B, C & D as placeholders for whatever inputs make sense. I decided to set mine to gate inputs for density and length:

Posted Image, might have been reduced in size. Click Image to view fullscreen.

_________________
Sneak-Thief - raw electrofunk

Last edited by sneakthief on Mon Feb 02, 2015 11:04 am; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
inlifeindeath



Joined: Apr 02, 2010
Posts: 315
Location: Albuquerque, NM

PostPosted: Fri Feb 07, 2014 1:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

looks awesome, thanks for sharing!
looking forward to building one!

_________________
http://www.youtube.com/user/borisandfef
Back to top
View user's profile Send private message Visit poster's website
AuDioMiRage



Joined: Jan 14, 2015
Posts: 4
Location: Wisconsin

PostPosted: Mon Feb 02, 2015 7:36 am    Post subject: Anyone completed this? :?:
Subject description: Problems with LED Matrix
Reply with quote  Mark this post and the followings unread

This is a fantastic project. I've managed to assemble the hardware parts, but the software is another issue. Checked rotary encoders, they are good. Some data is getting to the display, but it is garbled. Swapped MAX72xx chips = same problem. Swapped LED Matrix = same problem.
Not familiar with editing library for Arduino, suspecting that now is the time to learn.
Any help will be greatly appreciated.
Back to top
View user's profile Send private message
sneakthief



Joined: Jul 24, 2006
Posts: 538
Location: Berlin

PostPosted: Mon Feb 02, 2015 8:09 am    Post subject: Reply with quote  Mark this post and the followings unread

I just updated the schematic and software in the first post - here's the parent thread:

https://www.muffwiggler.com/forum/post-1786613.html#1786613

_________________
Sneak-Thief - raw electrofunk

Last edited by sneakthief on Mon Feb 02, 2015 11:03 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
sneakthief



Joined: Jul 24, 2006
Posts: 538
Location: Berlin

PostPosted: Mon Feb 02, 2015 10:11 am    Post subject: Reply with quote  Mark this post and the followings unread

Please post a pic of your board showing the pin connections and wires to the display.

A pic of your display would help too.

_________________
Sneak-Thief - raw electrofunk
Back to top
View user's profile Send private message Visit poster's website
AuDioMiRage



Joined: Jan 14, 2015
Posts: 4
Location: Wisconsin

PostPosted: Tue Feb 03, 2015 11:58 pm    Post subject: Display Issue Fixed :D Reply with quote  Mark this post and the followings unread

Very Happy I swapped the display board and it works! Very Happy
Haven't "ohmed" out the board yet to find it's problem, just enjoying the fact that this module is working!
Thanks sneakthief for your help.
I will post some pic and samples when I get it all wrapped up.
Back to top
View user's profile Send private message
commathe



Joined: Jul 26, 2013
Posts: 130
Location: Beijing
Audio files: 5

PostPosted: Wed Feb 04, 2015 3:33 am    Post subject: Reply with quote  Mark this post and the followings unread

Wow! I've been writing off the arduino for far too long
Back to top
View user's profile Send private message
yusynth



Joined: Nov 24, 2005
Posts: 1245
Location: France

PostPosted: Sun Mar 01, 2015 10:56 am    Post subject: Reply with quote  Mark this post and the followings unread

Cool stuff indeed
_________________
Yves
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 1 [8 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use