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 
 Forum index » DIY Hardware and Software
Conway's Game of Life
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 3 of 8 [178 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Author Message
PHOBoS



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

PostPosted: Sun May 05, 2019 7:46 am    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
the step input will move over the cells outputting notes based on the x/y coordinate the step is on.

I like that X/Y idea Very Happy
I could do it with 2 analog inputs and if I use 2 pots it could be used like an etch-a-sketch to draw patterns.

hmm now I am curious, someone must have made an etch-a-sketch with LED displays, hold on..
yep: https://www.youtube.com/watch?v=xeCkLCFMLjw (love the shake feature)


here are some patterns I found for an 8x8 grid that loop (with wrapping enabled)
Code:

x-wrap = enabled
y-wrap = disabled

 --------
 ---x----
 --xxx---
 --------
 --------
 --------
 --------
 --------

 20 steps total
 spans 35 cells
 looks very symmetrical


Code:

x-wrap = enabled
y-wrap = enabled

 --------
 --------
 --xxx---
 ---xx---
 ---xxx--
 --------
 --------
 --------

24 steps total
spans all but 6 cells
looks very symmetrical, but one side is flipped


Code:

x-wrap = enabled
y-wrap = enabled

 --------
 --------
 -----xx-
 ----x-x-
 ----xx--
 ----xx--
 --------
 --------

132 steps total
spans all 64 cells
looks very chaotic
(step 67 is actually the same as step 1 but mirrored)


These patterns can be moved/rotated depending on the wrap settings.

_________________
"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: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Sun May 05, 2019 10:09 am    Post subject: Reply with quote  Mark this post and the followings unread

Heh .. I did add X and Y inputs later on as well Laughing

For me it works like :

a)when no X or Y is connected the step input will move column first row next to scan over all the cells, the reverse input works too then to reverse the direction.

b)when X or Y is connected step will grab the X and Y values to control the cursor (readout) position, reverse does nothing.

c)when step is not connected the X and Y input control the cursor asynchroneously and reverse does nothing.

Might change things for b) and c) to let the reverse input to use 1-X and 1-Y for X and Y ... dunno yet.

That idea with settable patterns is nice too to turn it into a sequencer .. hmm separate X and Y wrap .. how useful is that? Anyway .. my grids are paintable too Cool and when nothing is clocked in it will just evaluate.

Oh and I changed the cell count to 16 x 8 .. didnt hear any useful relations with 12 x 6 either ... maye could make that user selectable Shocked

_________________
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
airlock



Joined: Apr 06, 2007
Posts: 297
Location: Calabash, NC USA
Audio files: 53

PostPosted: Mon May 06, 2019 2:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
Aand then there is some .. ahum .. life Cool

[edit: there is an audio track below the image]


That sounded good really good, damn machines are making better tunes than me. Laughing
Back to top
View user's profile Send private message
airlock



Joined: Apr 06, 2007
Posts: 297
Location: Calabash, NC USA
Audio files: 53

PostPosted: Mon May 06, 2019 2:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

PHOBoS wrote:
Thanks for all the useful tips Very Happy

Here's the result of a very simple implementation that simply converts the number of live cells to a note. Not the most interesting thing
to do with it but it gave me some nice music combined with a lightshow. (I am thinking of adding a kaleidoscope mode). I also added
some extra repeating notes. All sounds come from the Proteus 2000 (thanks bob Very Happy)


That was a great result!
Back to top
View user's profile Send private message
PHOBoS



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

PostPosted: Mon May 06, 2019 7:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks Airlock Smile


I added a cursor and a drawing mode with X/Y controlled by MIDI CC knobs (easier to test right now as those are built into the keyboard)
Blue Hell wrote:
a)when no X or Y is connected the step input will move column first row next to scan over all the cells, the reverse input works too then to reverse the direction.

check. I also have a mode that does the same thing but skips dead cells. At the moment it has to check all the cells untill it finds a live one
so I limited the max amount to 64 in case it's all is dead. Because of this it does sometimes not find a cell even though there are live ones.
(I think I could fix this with another array but it's not really a problem)

Quote:
b)when X or Y is connected step will grab the X and Y values to control the cursor (readout) position, reverse does nothing.

ah, I haven't added a synchronous mode. So step acts like a sample and hold for the X/Y values ?

Quote:
c)when step is not connected the X and Y input control the cursor asynchroneously and reverse does nothing.

yeah, I can do that too now with the knobs, not very usefull yet since it isn't automated though. However when it is running I can force it
to step from another position which is fun to play with.

_________________
"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: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Tue May 07, 2019 12:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

PHOBoS wrote:
Thanks Airlock Smile


Yes, thanks Airlock Smile

Quote:
check. I also have a mode that does the same thing but skips dead cells. At the moment it has to check all the cells untill it finds a live one
so I limited the max amount to 64 in case it's all is dead. Because of this it does sometimes not find a cell even though there are live ones.
(I think I could fix this with another array but it's not really a problem)


That other array to keep values for live cells should solve it yes - was thinking about such a thing too after reading earlier on you have a "skip the dead" mode and I was worried about lookup speed .. its not nice to have code that wildly varies in execution time when that code is in the audio generation path of the program .. which the cell evaluation is for me.

Quote:
ah, I haven't added a synchronous mode. So step acts like a sample and hold for the X/Y values ?


yes.

Quote:
yeah, I can do that too now with the knobs, not very usefull yet since it isn't automated though. However when it is running I can force it
to step from another position which is fun to play with.


Hmm .. I could implement that with alt click or something ... or maybe just a "jump to random location" input. Some other click options are taken already for drawing on the grid - which when nothing is clocked in and the mode is set into freeze or there is no change clock ... turns it into a sequencer of sorts .. static pattern that is which can be drawn.

Ok .. the extra array is calling on me now Laughing

but not sure how to do that with X/Y control .. maybe .. "find nearest live cell" or something .. welp .. for simple stepping first.

_________________
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: 5591
Location: Moon Base
Audio files: 705

PostPosted: Tue May 07, 2019 12:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
That other array to keep values for live cells should solve it yes - was thinking about such a thing too after reading earlier on you have a "skip the dead" mode and I was worried about lookup speed .. its not nice to have code that wildly varies in execution time when that code is in the audio generation path of the program .. which the cell evaluation is for me.

I was a bit worried about execution time myself but it works surprisingly well (most of the time), even with picking random cells.
Of course I don't have to worry about audio generation which makes a huge difference, I just have to send a MIDI command every now and then

Quote:
but not sure how to do that with X/Y control .. maybe .. "find nearest live cell" or something .. welp .. for simple stepping first.

hmm, hadn't thought about doing that yet, that's tricky indeed. Nearest cells sounds a bit more difficult to do on an X/Y plane.
Actually I don't think it's that hard,. have to work outwards from the position you're at (give some directions priority if you only use the
resolution of the grid itself). Don't know how fast that would work though.

_________________
"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: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Tue May 07, 2019 4:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hmm .. that extra index is not directly trivial .. it needs two .. one for forward and one for backward mode .. which actually makes it efficient to do deletions of dead cells .. but insertions still need a lookup ... untested code below Rolling Eyes

Edit: bug fix for the insertion case when there were no live cells

Edit: some more fixes, seems to work now


Code:

    procedure   TModVitaPHoBium.CellChanged( aSender: TObject; anX, anY: Integer; IsAlive: Boolean);
    // Note: called from audio thread
    //
    // Example .. for a 3 x 3 grid ... with cells 1, 4 and 8 being alive (marked by a *
    // where the cell number (or Pos later on) = X + 3 * Y. Also FLiveCount = 3;
    //
    //                             +-----+-----+-----+
    //                             | 0   | 1 * | 2   |
    //                             +-----+-----+-----+
    //                             | 3   | 4 * | 5   |
    //                             +-----+-----+-----+
    //                             | 6   | 7   | 8 * |
    //                             +-----+-----+-----+
    //
    // Then the index arrays FFwdIndex and FRevIndex should be:
    //
    //                             +-----+-----+-----+-----+-----+-----+-----+-----+-----+
    //                      index  |  0  |  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |
    //                             +-----+-----+-----+-----+-----+-----+-----+-----+-----+
    // Then in FFwdIndex we values | -1, |  4  | -1  | -1  |  8  | -1  | -1  | -1  |  1  |
    //                             +-----+-----+-----+-----+-----+-----+-----+-----+-----+
    // and in  FRevIndex we have   | -1  |  8  | -1  | -1  |  1  | -1  | -1  | -1  |  4  |
    //                             +-----+-----+-----+-----+-----+-----+-----+-----+-----+
    //
    // That is -1 for the dead cells and for the live cells the index of the next live one (or the previous
    // live one in the reverse index)
    //
    // Now say ... item 4 (X=1, Y=1, so Pos = 4) dies .. so in the Fwd index now item 1 needs to point to where 4
    // pointed, so to 8 we can find the fwd cell that needs to be changed (1) in the Rev index at position 4 and
    // the value it has to be changed to (8).
    //
    // So we find:
    //
    //   NewFwdPos = FRevIndex[ Pos] = FRevIndex[ 4] = 1  - the cell that needs to be changed in FFwdIndex
    //   NewFwdVal = FFwdIndex[ Pos] = FFwdIndex[ 4] = 8  - the value that cell needs to be changed to
    //
    // Likewise for the reverse index we find:
    //
    //   NewRevPos = FFwdIndex[ Pos] = FFwdIndex[ 4] = 8  - the cell that needs to be changed in FFwdIndex
    //   NewRevVal = FRevIndex[ Pos] = FRevIndex[ 4] = 1  - the value that cell needs to be changed to
    //
    // Then finally the value at index Pos (the died cell) needs to be set to -1 in both FFwdIndex and FRevIndex.
    // and also we decremtnt FLiveCount by so it's 2 now.
    //
    // So now things look like:
    //
    //                             +-----+-----+-----+
    //                             | 0   | 1 * | 2   |
    //                             +-----+-----+-----+
    //                             | 3   | 4   | 5   |
    //                             +-----+-----+-----+
    //                             | 6   | 7   | 8 * |
    //                             +-----+-----+-----+
    //
    // Then the index arrays FFwdIndex and FRevIndex should be ( with FLiveCount being 2)
    //
    //                             +-----+-----+-----+-----+-----+-----+-----+-----+-----+
    //                      index  |  0  |  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |
    //                             +-----+-----+-----+-----+-----+-----+-----+-----+-----+
    // Then in FFwdIndex we values | -1, |  8  | -1  | -1  | -1  | -1  | -1  | -1  |  1  |
    //                             +-----+-----+-----+-----+-----+-----+-----+-----+-----+
    // and in  FRevIndex we have   | -1  |  8  | -1  | -1  | -1  | -1  | -1  | -1  |  1  |
    //                             +-----+-----+-----+-----+-----+-----+-----+-----+-----+
    //
    // and when cell 1 dies too :

    //                             +-----+-----+-----+
    //                             | 0   | 1   | 2   |
    //                             +-----+-----+-----+
    //                             | 3   | 4   | 5   |
    //                             +-----+-----+-----+
    //                             | 6   | 7   | 8 * |
    //                             +-----+-----+-----+
    //
    // Then the index arrays FFwdIndex and FRevIndex should be ( with FLiveCount being 1):
    //
    //                             +-----+-----+-----+-----+-----+-----+-----+-----+-----+
    //                      index  |  0  |  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |
    //                             +-----+-----+-----+-----+-----+-----+-----+-----+-----+
    // Then in FFwdIndex we values | -1, | -1  | -1  | -1  | -1  | -1  | -1  | -1  |  8  |
    //                             +-----+-----+-----+-----+-----+-----+-----+-----+-----+
    // and in  FRevIndex we have   | -1  | -1  | -1  | -1  | -1  | -1  | -1  | -1  |  8  |
    //                             +-----+-----+-----+-----+-----+-----+-----+-----+-----+
    //
    //
    // Insertion of a live cell is a bit more work though, and it nees some searching, but at least it only nees to be
    // done once instead of on each iteration.
    //
    // Ok, let's make cell 2 alive now, 2 will have to point at 8 then and 8 must point at 2.
    //
    // The only thing we then know is that Pos = 2 and from that we'll have to do some searching ...
    // just see the algorithm below for the IsLive == True case
    //
    var
      Pos       : Integer;
      NewFwdVal : Integer;
      NewRevVal : Integer;
      NewFwdPos : Integer;
      NewRevPos : Integer;
      i         : Integer;
      p         : Integer;
    begin
      Pos := anX + m_xsize * anY;                  // That is the position for the cell which died or came alive

      if   ( Pos >= 0     )                        // Make sure to have a valid Pos so we wont addres outside
      and  ( Pos <  m_size)                        // the index arrays later on
      then begin
        if IsAlive                                 // Is the changed cell alive now?
        then begin
          if FLiveCount <= 0                        // No live nodes currently ... just insert the new one pointing to itself
          then begin
            FFwdIndex[ Pos] := Pos;
            FRevIndex[ Pos] := Pos;
            FLiveCount      := 1;                   // and there is one live node now
          end
          else begin
            if   ( FFwdIndex[ Pos] < 0)            // Only turn on dead cells
            and  ( FRevIndex[ Pos] < 0)
            then begin
              p := Pos;

              for i := 0 to m_size - 1             // at most m_size - 1 lookups, the msize - 1 case would be the new one .. but then count would have been zero
              do begin
                p := MathIntMod( p + 1, m_size);   // C: p = ( p + 1) % m_size

                if FFwdIndex[ p] >= 0
                then Break;
              end;

              FFwdIndex[ FRevIndex[ p]] := Pos;
              FFwdIndex[ Pos          ] := p;
              FRevIndex[ Pos          ] := FRevIndex[ p];
              FRevIndex[ p            ] := Pos;
              Inc( FLiveCount);
            end;
          end;
        end
        else begin                                 // A cell died ... remove it from Fwd and Rev index chains
          if  ( FFwdIndex[ Pos] >= 0)              // First check if it was actually alive, don't kill the dead
          and ( FRevIndex[ Pos] >= 0)
          and ( FLiveCount      > 0 )
          then begin
            NewFwdPos := FRevIndex[ Pos];          // Find the fwd position to be changed
            NewFwdVal := FFwdIndex[ Pos];          // Find the new value that has to be at the fwd position
            NewRevPos := NewFwdVal;
            NewRevVal := NewFwdPos;

            if  ( NewFwdVal >= 0)                  // Make sure to have valid indices and link values
            and ( NewFwdPos >= 0)
            then begin
              FFwdIndex[ NewFwdPos] := NewFwdVal;  // Then set the new stuff
              FRevIndex[ NewRevPos] := NewRevVal;
              Dec( FLiveCount);
            end;
          end;

          FFwdIndex[ Pos] := -1;                   // And finally, and always. clear the links for the removed item
          FRevIndex[ Pos] := -1;
        end;
      end;
    end;


_________________
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
RingMad



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

PostPosted: Wed May 08, 2019 5:59 am    Post subject: Reply with quote  Mark this post and the followings unread

You guys are amazing. I can't even follow / understand everything, but it's great stuff. And wow, I haven't seen Pascal code in a long, long time... flashbacks to university!

PHOBoS wrote:
The next thing is how to 'play' the cells. You can't play all of them at once,. well I guess you could but that's like smashing a lot of keys at once and doesn't sound very musical.

Indeed. I don't want to derail the thread too much (again) but this made me think of an experiment I did back in 2006, which I called "frames2sound".

I was fascinated with generating sound directly from video, and I came up with this brute-force process using some linux tools, ImageMagick, a C program I wrote and stuff. The whole thing has no doubt been rendered quite obsolete with Max/MSP/Jitter or whatever now.

Basically, it reduced each frame of a video to 40x15 and for every pixel (all 600 of them!), mapped its RGB value onto a frequency, then used SoX to synthesize a square wave of that frequency 1/15 seconds long (i.e. corresponding to the frame rate I used), and mashed all 600 of them together. Yeah, a 0.0666-second sound of 600 waves, one for every frame! These were appended to a file.

The process ran for 14 hours, and then I synchronized the resulting audio file with the video.

It's quite unlistenable, but does in general follow the image:
https://vimeo.com/251205673

.:james:.
Back to top
View user's profile Send private message Visit poster's website
blue hell
Site Admin


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

PostPosted: Wed May 08, 2019 2:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

RingMad wrote:
It's quite unlistenable, but does in general follow the image:
https://vimeo.com/251205673


Not that unlistenable, I like it Smile

Not sure yet if the skip dead mode works flawlessly .. but at least .. its way more lively when its in effect .. going to add an input to control it .. so it can toggle between lively and . hmm .. dull is not the proper word maybe .. but less lively anyway Smile

Hmm it does not work perfect yet .. it can get derailed when the number of live cells gets low after having been high for a while ... as if some live cells did not register properly ... but anyway not again going to bed at 3:30 tonight Rolling Eyes

_________________
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
RingMad



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

PostPosted: Thu May 09, 2019 6:47 am    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
hmm .. dull is not the proper word maybe .. but less lively anyway Smile


Calm? Lethargic?

And thanks,
.:james:.
Back to top
View user's profile Send private message Visit poster's website
PHOBoS



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

PostPosted: Thu May 09, 2019 3:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

RingMad wrote:
You guys are amazing. I can't even follow / understand everything, but it's great stuff. And wow, I haven't seen Pascal code in a long, long time... flashbacks to university!

I don't really understand what I am doing either and I think jan is lightyears ahead of me, but I understand snippets of it Wink

Your frames2sound wasn't that horrible, I wonder if it would work 'better' with computer generated/abstract videos. Nice idea though Very Happy
And that's what it's about IMO, testing ideas to see if it does anything interesting or rather yet discover something unexpected.

_________________
"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
RingMad



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

PostPosted: Fri May 10, 2019 10:02 am    Post subject: Reply with quote  Mark this post and the followings unread

Yeah, for sure, testing ideas, experimenting is fun to see where it goes, if anywhere. It's not like this stuff is going to be used on any life-critical systems like airplanes or spacecraft. It's just fun, and creative.

I've done other stuff like generating video from text, a couple other video to sound processes, sound to video... basically trying to interpret one form as another.

Playing a matrix / grid... some ideas I'm just throwing out there :

- treat each position in the matrix as a unique note, play it if "on", either as a sequence, running through each position, or perhaps as a note in a chord (e.g. if it was 8x8, it could mash up all 8 notes (the ones that are "on") for a column, playing in sequence along the row).

- (more suitable for a larger grid, like 64x64): do like the vOICe program does ( https://www.seeingwithsound.com/ ), i.e. mapping vertical position to frequency/pitch, horizontal position to stereo panning, and brightness to volume. Blind people have learned to "see" with this technique!

.:james:.
Back to top
View user's profile Send private message Visit poster's website
blue hell
Site Admin


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

PostPosted: Fri May 10, 2019 10:17 am    Post subject: Reply with quote  Mark this post and the followings unread

Ah, some more modes, nice Cool
_________________
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: 5591
Location: Moon Base
Audio files: 705

PostPosted: Sun May 12, 2019 10:52 am    Post subject: Reply with quote  Mark this post and the followings unread

PHOBoS wrote:
I also have a mode that does the same thing but skips dead cells. At the moment it has to check all the cells untill it finds a live one
so I limited the max amount to 64 in case it's all is dead. Because of this it does sometimes not find a cell even though there are live ones.
(I think I could fix this with another array but it's not really a problem)

Apparently I didn't need another array just had to check my code better Embarassed
I did some tests and noticed that it was actually playing a note at every step the 'cursor' just seemed to be lagging a bit.
On closer inspection it was jumping to the next life cell from the previous iteration and I could fix it by updating the cellmap at a different point.
Took my quite some time to find it though.

I've added an LCD which helped out with troubleshooting and made me aware of another bug. To create some free pins for it I also added
2 shiftregisters to read all the switches. I still have 8 inputs of those unused so I can add some more.

RingMad wrote:
- treat each position in the matrix as a unique note, play it if "on", either as a sequence, running through each position, or perhaps as a note in a chord (e.g. if it was 8x8, it could mash up all 8 notes (the ones that are "on") for a column, playing in sequence along the row).

At the moment each column has the same notes just a different octave (although they could also be the same octave) so playing all the notes of a
column might not be very interesting but it could create a fuller sound. I do want to play some more notes at once though so I was already thinking
of playing multiple rows at the same time. if I combine the 2 ideas I could play the notes of 1 row in sequence and at the same time the notes from
another row all at once. I do want to add a mode to use it as a 64 step sequencer, or I should say 64 note sequencer, which doesn't use any scale so
any note can be assigned to any cell.

Another mode I want to try is using the X/Y controls to set the tempo for X and Y counter seperately but synchronous (for now).
For example if I set X to 2 and Y to 5 then it will move 1 position horizontaly every 2 steps, and 1 position vertically every 5 steps.
(useful for 64 step sequencer)

_________________
"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: 5591
Location: Moon Base
Audio files: 705

PostPosted: Sat May 25, 2019 7:30 am    Post subject: Reply with quote  Mark this post and the followings unread

PHOBoS wrote:
Another mode I want to try is using the X/Y controls to set the tempo for X and Y counter seperately but synchronous (for now).
For example if I set X to 2 and Y to 5 then it will move 1 position horizontaly every 2 steps, and 1 position vertically every 5 steps.
(useful for 64 step sequencer)

I have that working and also implemented a random setting for it. I noticed that it also works very nice when it is used to draw cells,
especially when set to random. Up untill recently the 'cursor' (used for drawing) was just the position of the sequencer, so I could
switch between drawing or sequencing. I did want to add a seperate cursor to be able to draw and sequence at the same time but that
makes it a bit difficult to see what is going on on the LED matrix display. I was already using PWM to make the sequencer position brighter
than the other LEDs but this didn't work too well, probably because the chip I use to drive the display has its own refresh rate and already
uses PWM to set the overall brightness.

So, time for a bit of an upgrade Cool
Instead of using a single color matrix display I now use a Red/Green one (which can also do yellow). It needs a bit more hardware
to work (currently using 3 shiftregisters + 8 transistors) and is bit harder to control than the driver chip I was using (MAX7219), but
with the help of a timer interrupt it was actually not that hard. I haven't added any PWM (yet) for variation in brightness but it might
look nice to vary brightness depening on cell age (=number of generations the cell has been alive). That would also needs a lot more
code though so I am probably not going to do that. (have fun with that jan Wink)

I also added more buttons but I need some more knobs aswell. Maybe I'll add a menu since I have an LCD now, so the knob function
depends on the menu setting. I can't turn them all at the same time anyway.

And I added a small change to the auto scale function. It wasn't really a bug but when the length of the scale was set larger than the
number of notes that had been played there would be empty spots in the scale. For example if the length was set to 4 and only keys for
C, D and E had been pressed the resulting scale would be C D E - C D E -. Now it first checks how many notes are available and adjusts
the length if there aren't enough. So with the previous example the scale is now: C D E C D E C D. So the scale length setting now only
adjusts the maximum number of notes used.


MIDI GoL - 20190525.jpg
 Description:
 Filesize:  224.18 KB
 Viewed:  254 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

MIDI GoL - 20190525.jpg



_________________
"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 Sat May 25, 2019 9:42 am; 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
blue hell
Site Admin


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

PostPosted: Sat May 25, 2019 8:32 am    Post subject: Reply with quote  Mark this post and the followings unread

PHOBoS wrote:
(have fun with that jan Wink)


Nah .. age discrimination Exclamation Laughing [*] also I'm done for now with Life .. erm the "Conway game of" variant of it ... I may go back to it, but for now its a module that can do some nice things in patch.

Working on tunings now .. got all possible equal divisions of arbitrary sized octaves done now .. but would like to implement tuning tables too (Scala like) .. this weekend maybe .. already have a lot of stuff for this in the form of a dedicated module, but not sure I understand it properly all.

[*] actually it does not fit in well with the current patch format which uses ASCII strings to represent a grid state with spaces an X-es .. and that code is all over the place.

_________________
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: 5591
Location: Moon Base
Audio files: 705

PostPosted: Sat May 25, 2019 9:34 am    Post subject: Reply with quote  Mark this post and the followings unread

I had a quick look at scala, looks interesting but those number are mindboggling Shocked
I'll just stick to 12 tone equal temperament for now before I get completely lost.
(I did see the E-mu Proteus series in the list of supported synths though)

_________________
"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: 5591
Location: Moon Base
Audio files: 705

PostPosted: Wed Jun 05, 2019 4:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

game of life on an iphone synth app https://youtu.be/PEC_JL5pf10?t=552
_________________
"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: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Thu Jun 06, 2019 10:03 am    Post subject: Reply with quote  Mark this post and the followings unread

Oh the idea to have a small life in a larger sequencer! could be nice Smile
_________________
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: 5591
Location: Moon Base
Audio files: 705

PostPosted: Tue Jul 07, 2020 11:53 am    Post subject: Reply with quote  Mark this post and the followings unread

PHOBoS wrote:
I think I should be able to do 4 cells with a single 512Kb EPROM though and I do have a bunch of octal latches aswell (thanks jan Very Happy).
Of course you still need a lot of them but maybe someday I design some PCB's and actually build it as some sort of art project.

I can't shake this idea and at least want to try it as a proof of concept, let me explain it a bit more.
a 512Kb EPROM has a 16 bit address and an 8 bit output so there are 65536 different input combinations and for each of them you can program an 8 bit result.
4 output bits are used to indicate the state of the 4 (Game of Life) cells, 0 = dead, 1 = alive and these are used to communicate with any neighbouring cells.
4 cells in a 2x2 grid share 12 neighbors from which the state (dead/alive) must be read.

Code:

[e11]    [e0]   [e1]    [e2]

[e10]    [A]     [B]    [e3]

[e9]     [D]     [C]    [e4]

[e8]     [e7]   [e6]    [e5]

A, B, C, D are the cells simulated by the EPROM, e0...e11 are neighbouring cells

12 of the address bits are used to read the neighbouring cells. So depending on the state of those 12 neighbors (4096 possible combinations) a 4 bit output
indicating the state of the cells (A,B,C,D) will be produced. Of course the 4 cells also need to communicate with eachother so the outputs are fed back to the
4 remaining address bits. Latches connected to the outputs (before the feedback) will keep everything in sync.
This results in the folliwng EPROM connections:
A0: e0
A1: e1
A2: e2
A3: e3
A4: e4
A5: e5
A6: e6
A7: e7
A8: e8
A9: e9
A10: e10
A11: e11
A12: A<
A13: B<
A14: C<
A15: D<
D0: A>
D1: B>
D2: C>
D3: D>

CELL A depends on e0, e1, e9, e10, e11, A, B, C, D
CELL B depends on e0, e1, e2, e3, e4, A, B, C, D
CELL C depends on e3, e4, e5, e6, e7, A, B, C, D
CELL D depends on e6, e7, e8, e9, e10, A, B, C, D

for example let's say that the following cells are alive: D, A, e11, e7, e2, e0 so the 16 bit address will be: 1001100010000101
CELL A has 3 live neighbors (e0, e11, D) and according to the rules that means the cell will come alive or in this case stays alive. So the output for CELL A = 1
CELL B has 4 live neigbors (e0, e2, A, D) which means it will die or in this case stay dead. so the output for CELL B = 0
CELL C has 3 live neighbors (e7, A, D) so it will come alive so the output for CELL C = 1
CELL D has 2 live neighbors (e7, A) so it will stay the same and in this case that means the output for CELL D = 1
in other words for address 1001100010000101 the output will be xxxx1101 (65534 addresses to go)


What I hadn't really thought about untill yesterday are the 4 other output bits (xxxx in the above example) as I only need 4 bits to indicate the state of the cells
but I have 8 bits to play with. I could simply duplicate the outputs to spread the load as each output has to drive a maximum of 5 other circuits + 1 feedback
connection + an LED (so you can see what's happening). I don't think this would be a problem to do with 1 output though and I could use a simple transistor
driver for the LED if needed.

Something else I might be able to do is use bicolor LEDs (Red/Green with seperate connections) to give some more info about the state of a cell.
Currently it will only show if a cell is dead (0) or alive (1) but with 2 outputs per cell driving a bicolored LED it could indicate 4 states related to the 4 rules.
if a cell died because of rule 1 (less than 2 live neighbors) the LED could be off
if a cell is alive because of rule 2 (exactly 2 live neigbours and cell was alive) the LED could be yellow
if a cell is alive because of rule 3 (exactly 3 live neighbours) the LED could be green
if a cell dies because of rule 4 (more than 3 live neighbors) the LED could be red

I also thought about using the 4 bits to indicate the number of live neighbours on a 7 segment display (reminds me a bit of minesweeper) but that would
either require 2 displays which gets too complicated or 1 display in hex but apparently binary to hex 7-segment decoders aren't really standard.

Another thing that would be possible is program the 4 other bits according to a different rule set which would require some jumpers or switches to choose
which outputs to use. This would make it possible to mix rulesets resulting in cells that play by different rules (like real life), could also do this by changing
EPROMs of course. I did play around with some alternate rules on this page but it seems
that the original Conway rule set is one of the more practical ones. With different rules they either die out very quick or end in a fixed state. The result of
some of those rules reminds me of microbial growth btw. Those are just simple variations though you could also use boolean logic to create more interesting
rules.


Could also use the 4 bits for something musical or even use all the 8 bits but for something like that a microprocessor is just much more convenient.

SUGGESTIONS ARE WELCOME Smile


Something else that crossed my mind is to use an UV LED (or 4) controlled by the cells pointed at the window on top of the EPROM, so the longer the cells are
alive the more corrupted they get. UV LEDs with the right wavelength are rather expensive though and low power so I don't know how much effect it would
even have.


for now I leave you with the Cyclic cellular automaton
Posted Image, might have been reduced in size. Click Image to view fullscreen.

that would take a lot of RGB LEDs Laughing

_________________
"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 Wed Jul 08, 2020 6:10 am; 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
PHOBoS



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

PostPosted: Tue Jul 07, 2020 3:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

I also need to figure out how to set and clear cells manually, which is not exactly trivial.
I think I might be able to do it with a second EPROM but ehm,.. let me see if I can come up with something else first.

_________________
"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: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Tue Jul 07, 2020 5:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

PHOBoS wrote:

A12: A<
A13: B<
A14: C<
A15: D<D0>
D1: B>
D2: C>
D3: D>


Something went wrong there I guess? disabling html in the post might help ... no idea why using a code section does not do that for you .. for us.

Then the lots of LEDs thingie in the gif .. it's only a small image on my screen .. so I gues 64k of LEDs nowadays is not that much really :p

ideas .. hmm .. four bits free to be used .. with linear predictive coding legacy audio could be possible .. or speech ... I had another idea .. but then I forgot .. my chocolate orange cocos icecream needed stirring Shocked

Ah yes .. unforgot ... there is theory for this .. clocked feedback state machines .. but I guess that in this case the actual logic involved would all be 'code' (as in programmed EPROM locations)?

your PCB for this is going to get crazy with the connects to neighbor cells Laughing but maybe some modularity could be done with a four cell machine on a PCB and doing the routing (mistakes) manually.

I didn't read all you wrote yet .. the icecream Rolling Eyes I'll get back to it - I like the idea Exclamation

_________________
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
blue hell
Site Admin


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

PostPosted: Tue Jul 07, 2020 5:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

PHOBoS wrote:
I also need to figure out how to set and clear cells manually, which is not exactly trivial.
I think I might be able to do it with a second EPROM but ehm,.. let me see if I can come up with something else first.


Hmm ..maybe you need some 4 bit flip flop thingie to store the actual cell states .. and let the EPROM machine 'just' do the control?

Edit: thing is .. EPROMs are not RAM ...

Edit2: added 'quotes' Laughing

Edit3: uh oh .. there go the four spare bits Evil or Very Mad

_________________
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: 5591
Location: Moon Base
Audio files: 705

PostPosted: Wed Jul 08, 2020 7:31 am    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
PHOBoS wrote:

A12: A<
A13: B<
A14: C<
A15: D<D0>
D1: B>
D2: C>
D3: D>


Something went wrong there I guess? disabling html in the post might help ... no idea why using a code section does not do that for you .. for us.

I hadn't even noticed that but disabling html does indeed fix it. And you are correct, code tags don't Confused

Quote:
Then the lots of LEDs thingie in the gif .. it's only a small image on my screen .. so I gues 64k of LEDs nowadays is not that much really :p

OLED ? that's cheating! Laughing I want 5mm RGB LED's! well I would allow a LED matrix.

Quote:
ideas .. hmm .. four bits free to be used .. with linear predictive coding legacy audio could be possible .. or speech ... I had another idea .. but then I forgot .. my chocolate orange cocos icecream needed stirring Shocked

I could do something by turning it into a voltage and use a single connection between all the cells to mix those voltages together but nah,.
not going to make music with this. Although if each cell (or group of 4) had a small speaker it might be fun. At the moment I am testing with an arduino
(which is also used to program the EPROMS) and the color thing seems to work nice. Too bad I can't use my testboard right now which has an 8x8 R/G
LED matrix so I could see how it looks, Maybe something to try in the future.

Quote:
Ah yes .. unforgot ... there is theory for this .. clocked feedback state machines .. but I guess that in this case the actual logic involved would all be 'code' (as in programmed EPROM locations)?

yes, I want to add as little extra hardware as possible. The inital Idea was only EPROMs and probably some resistors. I did do try using the EPROM as a latch which didn't really
work without using an extra schmitt trigger but as I mentioned before
Quote:
if I need some schmitt triggers I might aswell just use a latch instead


Quote:
your PCB for this is going to get crazy with the connects to neighbor cells Laughing but maybe some modularity could be done with a four cell machine on a PCB and doing the routing (mistakes) manually.

yep, a bidirectional connection between 12 cells, so that's 24 connections and also need power and a clock. It will indeed be a bit reduced by having 4 cells per
PCB but what I haven't been able to figure out yet is how to make the connection (unless I use wires) at least not for 'corner cells'. I'll check some tiling patterns
to see if I can find a useful shape or maybe I can route some things through other boards. So for example if I need to get the signal to a cell in the top left corner,
which would be the position of e11, I could probably just route it through e0 and/or e10.

Quote:
Hmm ..maybe you need some 4 bit flip flop thingie to store the actual cell states .. and let the EPROM machine 'just' do the control?

Well, I'd probably have to put the latches before the EPROM instead of after which is what I initially was thinking about doing. That needs 16 instead
of 8 though. I did figure out something that may or may not be useful, If you look at this setup:
Code:

[e11]    [e0]   [e1]    [e2]

[e10]    [A]     [B]    [e3]

[e9]     [D]     [C]    [e4]

[e8]     [e7]   [e6]    [e5]

you can 'set' cells by making e0, e3, e6, e9 high + e11 for A, e2 for B, e5 for C and e8 for D. So if you want to set B and C, that would be
e0, e3, e6, e9, e2, e5 or address 0000001001101101 so 16 different addresses for all combination of A,B,C,D but only 4 bits that vary between
these addresses. Of course as you already figured out actually setting those cells is rather tricky. I can disable the signals from other cells to the
EPROM by using a 3-state latch and than set the address I need after the latch, but then what,.. maybe I need muxes.

_________________
"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: jksuperstar, Scott Stites, Uncle Krunkus
Page 3 of 8 [178 Posts]
View unread posts
View new posts in the last week
Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
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


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