launchpad-control-0.0.1.0: High and low-level interface to the Novation Launchpad midi controller.

Safe HaskellNone

System.MIDI.Launchpad.Apps.Conway

Description

Conway's game of life on a 8x8 torus grid, outputting sound.

Press buttons to turn turn them on. The simulation is running only if there is external MIDI sync signal coming (that is, press play in your DAW of choice).

The triangle side buttons trigger predefined patterns (the bottom one erasing the grid).

The directional buttons choose between four different modes of associating notes to the grid cells.

Example usage:

 main = runPureApp defaultGlobalConfig $ conway defaultCfg

Synopsis

Documentation

data Cfg Source

Constructors

Cfg 

Fields

noteFrom :: !Int

the first note (eg. 60 is middle C)

midiScale :: !Scale

the musical scale to use

stepFrequency :: !Int

speed of the simulation (larger is slower)

Instances

data Scale Source

Instances

gridNote :: Cfg -> Dir -> (Int, Int) -> IntSource

data Mode Source

Constructors

Conway 

Instances

data State Source

Constructors

State 

Fields

_table :: !(UArray (Int, Int) Bool)
 
_playing :: !Bool
 
_screen :: !Int
 
_noteMode :: !Dir

four different ways to associate notes to the grid cells

Instances

table0 :: [String]Source

A "block-laying switch engine"

table1 :: [String]Source

The famous "glider"

table2 :: [String]Source

The "Lightweight spaceship"

table3 :: [String]Source

"Toad" (period 2 oscillator)

table4 :: [String]Source

"Acorn"

table5 :: [String]Source

Almost a "Loaf" (stationary), but added 1 extra cell to have something

table6 :: [String]Source

"R-pentonimo"

conway :: Cfg -> MonadicApp Cfg Mode StateSource

Conway's game of life on a 8x8 grid