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 
 Forum index » DIY Hardware and Software » Lunettas - circuits inspired by Stanley Lunetta
Fibonacci Sequence Generator
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [16 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: 1953
Location: Moon Base
Audio files: 386

PostPosted: Sat Nov 15, 2014 4:50 pm    Post subject: Fibonacci Sequence Generator
Subject description: golden bits
Reply with quote  Mark this post and the followings unread

A fibonacci sequence generator is something I've been wanting to build for a while so I thought I'd give it a go.

The basic circuit consists of an ADDER + FlipFlops and works as follows:
- A + B are added together.
- A is moved to B and the result of the ADDER becomes A
- A + B are added together.
etc.


fibonacci sequence generator basic.gif
 Description:
basic Fibonacci Sequence generator
 Filesize:  20.71 KB
 Viewed:  69 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

fibonacci sequence generator basic.gif



_________________
"My perf, it's full of holes!"
http://phobos.000space.com/ http://www.acidtrash.com/ Stickney Synthyards
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: 1953
Location: Moon Base
Audio files: 386

PostPosted: Sat Nov 15, 2014 4:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

Starting from that basic circuit I designed the following 2 circuits.

The first one is the MASTER sequence generator:
U3 is a 4bit adder and U2 contains 8 D-type flipflops. I used TTL because the only CMOS full adder is the CD4008 which appears to be obsolete
and I have a bunch of 74LS83 chips anyway. I also have a couple of 74LS377 chips so those came in handy too. Although the basic circuit works,
it doesn't have an option to insert the first (Seed) values. This is what U1 is used for. It is actually an Octal Bus Transceiver chip but I'm
using it as an Octal switch. With the DIR pin (1) held high data flows from A to B, at least as long as the Output Enable pin (19) is at
a low level. When it is at a high level the outputs are floating (it has 3-state outputs).

The Output Enable pin is controlled by U4a which also enables the seed switches. So when Q is high the datastream gets interrupted and the data
from the switches is inserted. Using a Flipflop for this isn't necessary but it keeps everything in sync with the CLK. The 2k2 pullup resistors
are added because U1 is not TTL but high speed CMOS. And because U4 is also CMOS and can only drive one TTL input the transistor buffer is needed.
I also added a reset option using U4b, when the reset button is pressed the datastream is interrupted but the seed switches aren't enabled so seed
A and B are both 0. The result is that all the outputs will be low and stay low untill new seed values are added.

The second circuit is the SLAVE sequence generator:
It's pretty much the same as the MASTER generator except that it doesn't have the seed section. Instead it uses the carry out from the MASTER
circuit and it's used to turn it from a 4 bit generator into a 8 bit generator (and you can add more SLAVE circuits for more bits). You could
add seed switches too but 2x 4 bit is enough for me.


I haven't actually tested the circuit yet (didn't have a free breadboard yet and I don't have any 20 pins sockets to solder it either) but I did
simulate an 8 bit sequence generator. For an 8 bit generator the maximum output value can be 255 and higher values are truncated, so the sequence
pattern won't be correct after that. I was expecting that it would either just zero out or repeat a short sequence, however it keeps going and can
create a sequence with a maximum lenght of 384 steps (depending on the seed values) before it repeats. Very Happy

with seeds 0 and 1 the full sequence is:
Code:
  0,   1,   1,   2,   3,   5,   8,  13,  21,  34,
 55,  89, 144, 233, 121,  98, 219,  61,  24,  85,
109, 194,  47, 241,  32,  17,  49,  66, 115, 181,
 40, 221,   5, 226, 231, 201, 176, 121,  41, 162,
203, 109,  56, 165, 221, 130,  95, 225,  64,  33,
 97, 130, 227, 101,  72, 173, 245, 162, 151,  57,
208,   9, 217, 226, 187, 157,  88, 245,  77,  66,
143, 209,  96,  49, 145, 194,  83,  21, 104, 125,
229,  98,  71, 169, 240, 153, 137,  34, 171, 205,
120,  69, 189,   2, 191, 193, 128,  65, 193,   2,
195, 197, 136,  77, 213,  34, 247,  25,  16,  41,
 57,  98, 155, 253, 152, 149,  45, 194, 239, 177,
160,  81, 241,  66,  51, 117, 168,  29, 197, 226,
167, 137,  48, 185, 233, 162, 139,  45, 184, 229,
157, 130,  31, 161, 192,  97,  33, 130, 163,  37,
200, 237, 181, 162,  87, 249,  80,  73, 153, 226,
123,  93, 216,  53,  13,  66,  79, 145, 224, 113,
 81, 194,  19, 213, 232, 189, 165,  98,   7, 105,
112, 217,  73,  34, 107, 141, 248, 133, 125,   2,
127, 129,   0, 129, 129,   2, 131, 133,   8, 141,
149,  34, 183, 217, 144, 105, 249,  98,  91, 189,
 24, 213, 237, 194, 175, 113,  32, 145, 177,  66,
243,  53,  40,  93, 133, 226, 103,  73, 176, 249,
169, 162,  75, 237,  56,  37,  93, 130, 223,  97,
 64, 161, 225, 130,  99, 229,  72,  45, 117, 162,
 23, 185, 208, 137,  89, 226,  59,  29,  88, 117,
205,  66,  15,  81,  96, 177,  17, 194, 211, 149,
104, 253, 101,  98, 199,  41, 240,  25,   9,  34,
 43,  77, 120, 197,  61,   2,  63,  65, 128, 193,
 65,   2,  67,  69, 136, 205,  85,  34, 119, 153,
 16, 169, 185,  98,  27, 125, 152,  21, 173, 194,
111,  49, 160, 209, 113,  66, 179, 245, 168, 157,
 69, 226,  39,   9, 48,   57, 105, 162,  11, 173,
184, 101,  29, 130, 159,  33, 192, 225, 161, 130,
 35, 165, 200, 109,  53, 162, 215, 121,  80, 201,
 25, 226, 251, 221, 216, 181, 141,  66, 207,  17,
224, 241, 209, 194, 147,  85, 232,  61,  37,  98,
135, 233, 112,  89, 201,  34, 235,  13, 248,   5,
253,   2, 255,   1, ( 0,   1,   1,   2,   3...)



I wrote a little (java)script to generate sequences which I uploaded here


fibonacci generator (master).gif
 Description:
Fibonacci Sequence generator circuit (MASTER)
 Filesize:  73.1 KB
 Viewed:  90 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

fibonacci generator (master).gif



fibonacci generator (slave).gif
 Description:
Fibonacci Sequence generator circuit (SLAVE)
 Filesize:  52.97 KB
 Viewed:  58 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

fibonacci generator (slave).gif



_________________
"My perf, it's full of holes!"
http://phobos.000space.com/ http://www.acidtrash.com/ Stickney Synthyards
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
commathe



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

PostPosted: Sat Nov 15, 2014 11:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

Madness as always! It's interesting how simple it is at its core.
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 1953
Location: Moon Base
Audio files: 386

PostPosted: Tue Jan 06, 2015 4:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

I made a change to the Master generator using a second Octal Bus Transceiver chip as a switch instead of the transistor.
This makes it easier to have external seed inputs aswell Very Happy
I'm also adding some displays to see the numbers! The schematic for that is posted here.
I will have to add some buffers to make it's compatible with a higher voltage and standard CMOS.


fibonacci generator (master) V2.gif
 Description:
 Filesize:  97.49 KB
 Viewed:  37 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

fibonacci generator (master) V2.gif



Fibonacci Sequence Generator Master.jpg
 Description:
 Filesize:  91.34 KB
 Viewed:  6 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Fibonacci Sequence Generator Master.jpg



Fibonacci Sequence Generator Display.jpg
 Description:
 Filesize:  97.17 KB
 Viewed:  6 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Fibonacci Sequence Generator Display.jpg



_________________
"My perf, it's full of holes!"
http://phobos.000space.com/ http://www.acidtrash.com/ Stickney Synthyards
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: 248
Location: Montreal, Canada
Audio files: 2

PostPosted: Wed Jan 07, 2015 5:16 am    Post subject: Reply with quote  Mark this post and the followings unread

Ha, cool. I wonder what it could sound like.

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



Joined: Jan 14, 2010
Posts: 1953
Location: Moon Base
Audio files: 386

PostPosted: Sun Jan 18, 2015 7:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

it works ! Razz
jackson dancing

I will post a schematic with the buffers and how it's connected later (probably tomorrow). And maybe some sounds too.
now I'm just gonna watch the numbers Shocked


Fibonacci Sequence Generator - 01.jpg
 Description:
Fibonacci Sequence Generator
 Filesize:  94.87 KB
 Viewed:  7 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Fibonacci Sequence Generator - 01.jpg



Fibonacci Sequence Generator - 02.jpg
 Description:
Fibonacci Sequence Generator
 Filesize:  132.75 KB
 Viewed:  8 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Fibonacci Sequence Generator - 02.jpg



Fibonacci Sequence Generator - 03.jpg
 Description:
Fibonacci Sequence Generator
 Filesize:  103.18 KB
 Viewed:  5 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Fibonacci Sequence Generator - 03.jpg



Fibonacci Sequence Generator - 04.jpg
 Description:
Fibonacci Sequence Generator
 Filesize:  105.5 KB
 Viewed:  4 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Fibonacci Sequence Generator - 04.jpg



_________________
"My perf, it's full of holes!"
http://phobos.000space.com/ http://www.acidtrash.com/ Stickney Synthyards
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: 1953
Location: Moon Base
Audio files: 386

PostPosted: Mon Jan 19, 2015 3:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

Here are the 'final' schematics. Master and Slave haven't really changed except that I removed the seed inputs and switches
and added labels to show that they are internally connected. What they are connected to is the in/out buffers. I used CD4050
as input buffers + level shifters and opamps as output buffers + levels shifters. The diodes on the seed inputs aren't
needed with the way I wired up the switches but I only noticed after soldering them. I also added a schematic of
the display drivers here to have it all in one place.


I had it working faster then expected. After powering it up for the first time it didn't really work as it should but it didn't smoke either.
and I had already tested the display board earlier so I knew that was working. After some measuring I found 3 pulldown resistors
that were floating together because I forgot one solder connection.
After fixing that it almost worked except that the second bit seemed to be at a high state all the time. Which turned out to be
a trace which I made a bit too long in the PCB design so it was connected to the +5V supply. Since I copied the design for the
Slave board from the Master it had to fix this on both. But after that it worked as it should Very Happy

I think I will make one change to it; connecting the reset input of the LOAD flip flop to the ouput of the RESET flipflop.
Because they are synced to the CLK the reset doesn't have any effect after the load button is pressed untill there has been a CLK pulse.


something interesting I noticed is that although it takes some time before the 8 bit pattern repeats the individual bits
have a shorter repeating pattern. With 0 & 1 as seeds the first bit (D0) repeats after 3 steps, the 2nd bit after 6 steps,
the 3rd bit after 12 steps, the 4th bit after 24 steps, the 5th after 48 steps,. and .. I didn't look further than that but I
assume it keeps doubling.


fibonacci generator (master) V3.gif
 Description:
Fibonacci Sequence Generator - Master
 Filesize:  87.79 KB
 Viewed:  19 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

fibonacci generator (master) V3.gif



fibonacci generator (slave) V3.gif
 Description:
Fibonacci Sequence Generator - Slave
 Filesize:  53.14 KB
 Viewed:  13 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

fibonacci generator (slave) V3.gif



fibonacci generator (buffers) V3.gif
 Description:
Fibonacci Sequence Generator - In/Out Buffers
 Filesize:  102.29 KB
 Viewed:  13 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

fibonacci generator (buffers) V3.gif



fibonacci generator (LED displays) V3.gif
 Description:
Fibonacci Sequence Generator - Displays
 Filesize:  76.95 KB
 Viewed:  13 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

fibonacci generator (LED displays) V3.gif



_________________
"My perf, it's full of holes!"
http://phobos.000space.com/ http://www.acidtrash.com/ Stickney Synthyards
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: 248
Location: Montreal, Canada
Audio files: 2

PostPosted: Tue Jan 20, 2015 2:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

Wow... impressive build. Image 04 (i.e. lying face down) made me think of a layer cake. A circuit layer cake.

.: James :.
Back to top
View user's profile Send private message Visit poster's website
piedwagtail



Joined: Apr 15, 2006
Posts: 170
Location: shoreditch
Audio files: 1

PostPosted: Sun Jan 25, 2015 7:45 am    Post subject: Reply with quote  Mark this post and the followings unread

Great build, great graphics,metal stanchions....what you trying to do....5 days no samples...I can hardly breatheeeeeeee Smile
Back to top
View user's profile Send private message Visit poster's website
PHOBoS



Joined: Jan 14, 2010
Posts: 1953
Location: Moon Base
Audio files: 386

PostPosted: Mon Jan 26, 2015 12:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

layer cake, mmm. maybe I should do a slice of pi next Wink

Here are some fibonacci rhythms. Patched up so that the sequence plays for 384 steps (If I did it correct) and then a new
seed value is loaded (audible by the cowbell). Seed values come from a binary counter connected to the A seed inputs
(B seed stays at 0).


PHOBoS - Fibonacci rhythms A1-15.mp3
 Description:
PHOBoS - Fibonacci rhythms A1-A15

Download
 Filename:  PHOBoS - Fibonacci rhythms A1-15.mp3
 Filesize:  12.69 MB
 Downloaded:  34 Time(s)


_________________
"My perf, it's full of holes!"
http://phobos.000space.com/ http://www.acidtrash.com/ Stickney Synthyards
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: 1953
Location: Moon Base
Audio files: 386

PostPosted: Mon Jan 26, 2015 3:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

some drums, a VCO (+R2R), chromatic melody generator and a simple gated oscillator all controlled by the FSG.
(with exception of the 'hi-hat' which is triggered by the CLK). Changing seed A values again, but this time with seed B at a forced 8.


PHOBoS - Frantic Fibo.mp3
 Description:
PHOBoS - Frantic Fibo

Download
 Filename:  PHOBoS - Frantic Fibo.mp3
 Filesize:  8.35 MB
 Downloaded:  31 Time(s)


_________________
"My perf, it's full of holes!"
http://phobos.000space.com/ http://www.acidtrash.com/ Stickney Synthyards
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
piedwagtail



Joined: Apr 15, 2006
Posts: 170
Location: shoreditch
Audio files: 1

PostPosted: Tue Jan 27, 2015 12:10 am    Post subject: Reply with quote  Mark this post and the followings unread

Super.

Especially like that the first piece sounds like something that could have be made in the 70s by Alvin Lucier as an adjunct to those mathematical sine pieces; Exploratory Fibonacci Rhythm Ace Smile

For me, this is the most interesting subforum in existence; bleeding edge lunetta!

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



Joined: Feb 18, 2013
Posts: 142
Location: south Germaica (schwabilon)

PostPosted: Tue Jan 27, 2015 2:38 am    Post subject: Reply with quote  Mark this post and the followings unread

nice drum demo and nice gear p0rn photos .... °!!°
Back to top
View user's profile Send private message Visit poster's website
PHOBoS



Joined: Jan 14, 2010
Posts: 1953
Location: Moon Base
Audio files: 386

PostPosted: Tue Jan 27, 2015 3:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

piedwagtail wrote:
For me, this is the most interesting subforum in existence; bleeding edge lunetta!

Laughing glad you find it interesting as I think it's actually a bit outside the realm of lunetta's. I mostly just use the chips for what they are intended to do,
which is doing calculations. Except that I'm making music with the results.

When I started on this circuit I remembered Eric Archer had done an FSG. So I looked it up but the info wasn't any longer available. What I didn't think
about was that I could have used the wayback machine which does indeed have a copy.

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/ http://www.acidtrash.com/ Stickney Synthyards
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Skrog Productions



Joined: Jan 07, 2009
Posts: 837
Location: Scottish Borders
Audio files: 94

PostPosted: Tue Jan 27, 2015 4:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

Fantastic, Phobos , love the panel , nice colour & layout Smile.

Dave.

_________________
www.myspace.com/skrogproductions
Back to top
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 1953
Location: Moon Base
Audio files: 386

PostPosted: Wed Jan 28, 2015 3:25 am    Post subject: Reply with quote  Mark this post and the followings unread

thanks dave Very Happy
_________________
"My perf, it's full of holes!"
http://phobos.000space.com/ http://www.acidtrash.com/ Stickney Synthyards
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 [16 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
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