This is a sketch for nw2s::b module that implements Conway's Game of Life and translates it into triggers and control voltages by taking advantage of the ::b's vast number of outputs (the sketch generates 16 triggers and 16 control voltages). It's designed to work with a connected monome grid using it for both visualization and control (see this thread for more information on how to connect a grid).
If you're unfamiliar with the Game of Life check out this link: http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
In a nutshell it's a cellular automaton defined by 2 very simple rules - a new cell is created if an empty cell has 3 neighbours, and a live cell stays alive if it has 2 or 3 neighbours. These simple rules can create amazingly complex and varied colonies of cells. But here this concept is taken further by putting the rules under CV control, and giving you the ability to kill or create new cells by touch.
A couple of older videos:
- Either download the 1.1 firmware from GitHub (if you know how to do it and how to upload using the Arduino IDE) or follow instructions from this thread
- The following instructions are only if you want to use the Arduino IDE.
- Open bGameOfLife sketch in Arduino IDE
- Make sure to update the following line:
Code: Select all
grid = GameOfLife::create(DEVICETYPE, COLUMNS, ROWS, VARIBRIGHTNESS);
- replace COLUMNS with the number of columns on your grid
- replace ROWS with the number of columns on your grid
- replace VARIBRIGHTNESS with true if your grid supports VB and false otherwise
- Example - the following line will set up the sketch to work with the latest edition grid128 that supports VB:
Code: Select all
grid = GameOfLife::create(DEVICE_GRIDS, 16, 8, true);
Disclaimer: the 1.1 version of firmware is still in alpha, so there might be some things that don't fully work. I did test it with my VB grid 128.
HOW TO USE
Ok, youÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢re running it and nothing is happening. ThatÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢s because you donÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢t have any live cells yet. Simply press grid buttons to create new cells and see what happens.
LetÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢s start with the outputs:
- The top row gets mirrored on digital outputs, by default those will be triggers. So whenever a cell in the top row becomes live the corresponding digital output will get a trigger. TheyÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢re synced to the clock, of course, as the next generation gets populated on the clock, but if you manually create any cells in the top row those will send a trigger without waiting for the clock.
- The first two digital outputs are an exception as they are reserved for something else: the first one goes high when the colony becomes too populated, and the second one goes high when the colony is too small. This is handy if you want a self playing patch as you can use these triggers to trigger new random colonies, for instance, ensuring that life never stops. Since these two will never be high at the same time you can use a simple mixer to get a trigger when a colony is either too populated or too small.
- Each column also gets a corresponding output on one of the analog outputs. If all the cells in that column are dead the voltage is at 0. If all the cells are alive the voltage is at the maximum (the actual value depends on your version of the ::b). This scale can be changed on the control page if you need to define a smaller range for your modulations.
The real fun starts when you start bending the rules! And there are many ways to do so.
- Instead of creating new cells by pressing buttons you can use digital in #2 ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Å“ send a trigger here and it will create a new cell, or several. There are several predetermined shapes that were chosen to work well with the classic rules, and, of course, you can CV control the shape itself by using the analog input #2. The new shape will be created at the coordinates specified by the analog inputs #3 and #4 ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Å“ so you can CV control that too. The last 4 shapes are gliders ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Å“ useful for repeatable actions.
- If you want something more drastic try digital input #3 ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Å“ a trigger here will replace the current colony with a completely new randomly generated one. The density of the new colony is determined by the analog input #9. This can be useful for self playing patches ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Å“ use the digital outputs #1 and 2 for this ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Å“ this way it will keep going no matter what happens.
- Triggers to the digital inputs 5/6/7/8 will shift the colony left/right/up/down ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Å“ Try plugging some of the digital outputs here!
- Instead of using the classic rules try your own ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Å“ you can control them by using the analog inputs 5-8. To switch to CV rules you have to put the digital input #4 to the left position (you can use a gate or trigger here too for interesting effectsÃƒÂ¢Ã¢â€šÂ¬Ã‚Â¦) Analog inputs 5 and 6 control the minimum and maximum number of neighbours for a cell to be born, and number 7 and 8 control the min and max number of neighbours to survive. This is all about finding sweet spots as creating conditions for life can be tricky, but spend some time here and you can get some really crazy patterns, especially if you plug some of the analog outputs here, so that the game will control itself.
- You can use the control page to adjust the outputs. To enter the control page press the two top leftmost buttons together. TheyÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢ll be constantly lit up while youÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢re on the control page so that you know where you are (the Game itself continues to run while youÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢re on the control page).
- The top row lets you select between triggers and gates for the digital outputs. When itÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢s lit it means itÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢s set to gate, otherwise itÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢s a trigger.
- The bottom row is reserved for v2, so nothing will happen if you press there.
- The area in between lets you control the CV range for the analog outputs for each column. To select a new range press any two buttons in that column and it will scale the voltage accordingly.
- To exit the page press the two top leftmost buttons again. When you exit the control page all of your settings are saved on the SD card, and they will get loaded automatically next time you use the sketch (or if you press the reset button). - not supported in the pre-alpha 1.1 release, grab the latest 1.1 from github instead if you want this.
- if you have a grid that supports varibrightness you will see cells getting dimmer as they get older
- tempo can be CV controlled (analog input 1) or it can be slaved to external clock ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Å“ you need to modify your sketch or JSON for this!
- I recommend reading up on GoL to see how you can use different building blocks to have some control over your colony. But really itÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢s all about playing with it ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Å“ youÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢ll get something crazy going very soon!
- ability to pre-populate the grid with JSON
- using tilt for shifting
- "note" mode on CV outs with quantization and choice of scale
- "varibright" version with cells having 16 states instead of 2
Any questions / feedback / bug reports etc please contact me at fuzzybeacon at gmail dot com.