electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
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 
go to the radio page Live at electro-music.com radio 1 Please visit the chat
poster
 Forum index » DIY Hardware and Software » Lunettas - circuits inspired by Stanley Lunetta
Sierpinski pattern generator
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [12 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
PHOBoS



Joined: Jan 14, 2010
Posts: 5581
Location: Moon Base
Audio files: 705

PostPosted: Tue Nov 04, 2014 1:33 pm    Post subject: Sierpinski pattern generator
Subject description: fractal bits
Reply with quote  Mark this post and the followings unread

I was searching for some Sierpinski triangle images when I stumbled upon the following image

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

Besides noticing that it's boolean logic I also realized that it's quite a nice pattern generator.
The (A___), (_B__), (__C_), (___D) patterns are the same as the outputs of a binary counter. And the rest of the pattens
are derived from those using AND logic.

I first drew up a schematic using a counter, a bunch of AND gates and a 4 bit mux, but quickly realized that it could be
done much easier without a mux and only 1 (4 input) AND gate. All that's needed is to connect the inputs to either
one of the outputs of the counter or make it high. And this can be achieved using OR gates Cool.

note: To get the pattern in the same orientation as the example above the ABCD inputs need to be inverted.


Basic Sierpinski pattern generator.gif
 Description:
 Filesize:  42.95 KB
 Viewed:  755 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Basic Sierpinski pattern generator.gif



_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
PHOBoS



Joined: Jan 14, 2010
Posts: 5581
Location: Moon Base
Audio files: 705

PostPosted: Tue Nov 04, 2014 1:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

From that basic version I created a more elaborate circuit. (I'll go from right to left explaining it)
The 4-input AND gate is replaced by 3 2-input AND gates (U4b,U4c,U4d). The 4th AND gate (U4a) is used
to create short (clocked) pulses.
The OR gates are replaced with diodes and resistors.
By adding XOR gates (U2, U3) the outputs from the counter and the ABCD inputs can be inverted. This has
the effect that the pattern is rotated.
For the ABCD inputs there are 3 options:
- a switch to force a high or low state
- using the ABCD CTRL inputs
- using the second counter (U1b) to cycle through the complete pattern (auto switch open).

I haven't tested it yet but I did simulate the logic part and that should work. I'm not enitely sure
about the reset section but I think it'll work like this.

When I first found the above image it was on a seperate page but I now found a page which
has other versions aswell using different logic. So I'm thinking of incorporating that into the circuit
too, most likely with some muxes.


Sierpinski pattern generator2.gif
 Description:
Sierpinski Pattern generator V2
 Filesize:  105.4 KB
 Viewed:  782 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Sierpinski pattern generator2.gif



_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24075
Location: The Netherlands, Enschede
Audio files: 277
G2 patch files: 320

PostPosted: Tue Nov 04, 2014 2:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

:-) nice find!
_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
PHOBoS



Joined: Jan 14, 2010
Posts: 5581
Location: Moon Base
Audio files: 705

PostPosted: Tue Nov 04, 2014 6:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

So there are a couple of other possibilities besides AND gates:
OR, XNOR, XOR, NAND, NOR, NXOR, NXNOR

OR, NAND, NOR create Sierpinski triangles like using AND
OR is the inverted version of X=1, Y=1
NAND is the inverted version of x=0, y=1
NOR is the same as X=1, Y=1
so adding an inverter to the output will create all those

More interesting is using a XNOR, XOR, NXOR, NXNOR which creates what's called a Hadamard Matrix.
Posted Image, might have been reduced in size. Click Image to view fullscreen.


Basic Hadamard Matrix pattern generator.gif
 Description:
Basic Hadamard Matrix pattern generator
 Filesize:  49.4 KB
 Viewed:  695 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Basic Hadamard Matrix pattern generator.gif



_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
elmegil



Joined: Mar 20, 2012
Posts: 2177
Location: Chicago
Audio files: 16

PostPosted: Tue Nov 04, 2014 8:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

You're being coy. I want to HEAR it Smile
Back to top
View user's profile Send private message
piedwagtail



Joined: Apr 15, 2006
Posts: 297
Location: shoreditch
Audio files: 3

PostPosted: Wed Nov 05, 2014 5:35 am    Post subject: Reply with quote  Mark this post and the followings unread

Ha! Loving these studies.

Just as we hear of robots and expert software gradually replacing the "professions" lawyers,accountants etc...soon the contemporary jazz drummer with all their rhythm variations will be replaced by Phobos's Hadamard Matrix pulse streams Wink

Flash ADCs /shift registers etc on the ABCDs will make this so powerful...it's easy enough to sing the variations but the real power lies in the ability to change those variations without some clunky intervention.

Robert
Back to top
View user's profile Send private message Visit poster's website
PHOBoS



Joined: Jan 14, 2010
Posts: 5581
Location: Moon Base
Audio files: 705

PostPosted: Wed Nov 05, 2014 7:55 am    Post subject: Reply with quote  Mark this post and the followings unread

elmegil wrote:
You're being coy. I want to HEAR it Smile


hmm ok,. I haven't build the circuit yet but I made a quick patch with the AND gates.
I'm probably gonna use it at low speeds as a patten generator for rhythms most of the time. But here's
how it sounds when running at a high frequency and the ABCD inputs turned on/off at random. Very Happy

I don't think the Hadamard Matrix will be very interesting used like this since it's always 8 bits on and 8 bits off,
just shuffled around a bit.


PHOBoS - Sierpinski Chiptune.mp3
 Description:
PHOBoS - Siepinski chiptune

Download
 Filename:  PHOBoS - Sierpinski Chiptune.mp3
 Filesize:  736.13 KB
 Downloaded:  1416 Time(s)


_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
PHOBoS



Joined: Jan 14, 2010
Posts: 5581
Location: Moon Base
Audio files: 705

PostPosted: Wed Nov 05, 2014 8:19 am    Post subject: Reply with quote  Mark this post and the followings unread

And here's a drone thingy with 2 of the CTRL inputs connected to oscillators running at audio frequencies.
(and a ton of added delay/reverb)


PHOBoS - Sierpinski Drone.mp3
 Description:
PHOBoS - Sierpinski Drone

Download
 Filename:  PHOBoS - Sierpinski Drone.mp3
 Filesize:  3.69 MB
 Downloaded:  1391 Time(s)


_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
PHOBoS



Joined: Jan 14, 2010
Posts: 5581
Location: Moon Base
Audio files: 705

PostPosted: Wed Nov 05, 2014 11:38 am    Post subject: Reply with quote  Mark this post and the followings unread

here' s a version that has most of the different gate options.
Easiest way seems to be to use both AND and XOR gates and just switch between them (or you could use both outputs).
This leaves a spare XOR which can be used as an inverter and a spare AND which is used to create short pulses.

Inverting the outputs of the counter is the same as counting backwards so instead of the CD4520 + CD4070 I used a CD4029.
No XOR's on the CTRL inputs this time but they could be inverted externally.


Sierpinski Hadamard pattern generator.gif
 Description:
Sierpinski Hadamard pattern generator
 Filesize:  63.62 KB
 Viewed:  750 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Sierpinski Hadamard pattern generator.gif



_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube

Last edited by PHOBoS on Sun Nov 09, 2014 3:00 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
RingMad



Joined: Jan 15, 2011
Posts: 427
Location: Montreal, Canada
Audio files: 4

PostPosted: Wed Nov 05, 2014 12:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

Wow, The Amazing PHOBoS once again pulls a really interesting circuit rabbit out of his electronic hat Smile
Can you do a Koch snowflake or a dragon curve? Smile

What about replacing the gates with JingleJoe's "4051 ANY gate"? Although I barely remember how that worked or if it's even appropriate. Probably not, sorry.

- james
Back to top
View user's profile Send private message Visit poster's website
PHOBoS



Joined: Jan 14, 2010
Posts: 5581
Location: Moon Base
Audio files: 705

PostPosted: Wed Nov 05, 2014 1:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

oops I accidentally hit the edit button on your reply, hope it's restored as it was Embarassed

Quote:
Wow, The Amazing PHOBoS once again pulls a really interesting circuit rabbit out of his electronic hat Smile

Can you do a Koch snowflake or a dragon curve? Smile

Laughing not yet
I really like the golden dragon though:
Posted Image, might have been reduced in size. Click Image to view fullscreen.

Quote:
What about replacing the gates with JingleJoe's "4051 ANY gate"? Although I barely remember how that worked or if it's even appropriate. Probably not, sorry.

I thought about that, hence why I mentioned muxes, but it needs a 4 bit mux and then you don't have the spare gates to create the inversion and short pulses.

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
PHOBoS



Joined: Jan 14, 2010
Posts: 5581
Location: Moon Base
Audio files: 705

PostPosted: Thu Nov 06, 2014 3:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

Here's a mux/anygate version anyway.


Sierpinski Hadamard pattern generator (mux).gif
 Description:
Sierpinski Hadamard pattern generator (mux version)
 Filesize:  62.75 KB
 Viewed:  750 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Sierpinski Hadamard pattern generator (mux).gif



_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [12 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 » Lunettas - circuits inspired by Stanley Lunetta
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


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