( ) daisy chain ( )O( ) .--. ( )\ .-. ( )/ `--- `-' `--( )O( ) ( ) Naïve live coding ----------------- Building graph structures to create new graph structures. Music and animation occurs as a side effect of adaptive structure change/growth. The focus is on making this easy to play with, rather than obvious - interesting to watch, rather than simple to understand. Fluidity of performance. Programs consist of the instructions (tokens) passed around a graph (program substrate/memory). Tokens are combined to modify the current graph. Daisy Chain is loosely based on coloured petrinets, but without transitions (which are implicit) and coloured tokens which represent instructions rather than data. The graph toplogy changes trigger musical events. The visual style is very important to this (see below) this project is probably more about visuals than music. The transition of tokens is set to a global timed update, but this can be further explored (tokens having internal "speed" state? tap tempo?) - needs external sync? 2 types of tokens: * instruction (of which many subtypes) * activate (for triggering instructions) 3 types of arcs * typed instruction * typed activate * any Typed arcs will only accept tokens of the specified type. 1 type of place/vertex When an instruction shares a place with an activate token, it is executed. The instruction and the activation token are then removed. When tokens reach leaf node/vertex/places they will be removed, also if a typed arc prevents further progress. Tokens are duplicated on branches. Arc lifetime ------------ Arcs will have an internal count of the number of times a token has passed, the arc will be removed when the count reaches a global preset limit. Orphaned places (and contained tokens) will be culled - orphaned subgraphs will be maintained. The idea is to prevent lazyness and hopefully keep things moving dynamically, and fluidly rather than statically creating one big graph. It also means the general method of making music/visuals will be to make different forms of self replication. Instruction set --------------- Daisy Chain instructions represent different topological changes (graph rewriting grammars centred on one vertex). There may eventually be many of these, the current set are initially inspired by the need for self replication. Most instructions have variants for each type (or combination of types) of arc. Instructions are run from the perspective of vertex the instruction inhabits at activation time. branch (type) Just add a attach a new vertex to this one. -->[O] => -->[O]-->O loop (type) Add two verts in a loop. -->[O] => -->[O]<-. | O `-O-' extend (type) Add verts to all out arcs. -->[O]--> => -->[O]-->O--> \ \ `--> `->O--> double-extend (type) Add 2 verts to all out arcs. -->[O]--> => -->[O]-->O-->O--> \ \ `--> `->O-->O--> double-branch (type type) Add two arcs to a new vert attached to this one. ,->-. -->[O] => -->[O] O `->-' pre-extend (type) Connect all outverts to a new vert, leaving one connection to the new vert from this one. -->[O]--> => -->[O]-->O----> \ \ `--> `--> typed-pre-extend Same as above, but add new verts for each type of arc, as required. split Remove this vertex, and stitch up in/out arcs by type, adding vertices as needed. (r) (r) (r) O>-.(r),-->O O--->O--->O \ / O-->[O]--->O => O--->O--->O / \ O>-'(g)'-->O O--->O--->O (g) (g) (g) chop (type) Remove all outgoing verts. -->[O]-->O-->O--> -->[O] O--> \ => `-->O prune (type) Remove all connected verts with degree of 1. -->[O]-->O-->O \ => -->[O]-->O-->O `-->O Example self replication machine -------------------------------- loop-activate loop-instruction double-extend double-extend double-extend double-branch (exe/ins) typed-pre-extend split ,<. O O | | instruction loop O O \ / ,>-O->. O O activation point `>-O->' / \ O O | | execute loop O O `<' Musical mapping --------------- Mapping seems to generally work better if this is a side effect of the language rather than an explicit matter (betablocker vs al-jazari) - i.e. explicit musical instruction tokens are probably best to avoid. Plan A Each instruction has an associated instrument. When an instruction is executed it triggers the instrument. Lengths of arcs attached to the execution vertex are used to drive synth parameters. This will be at least one arc present, usually two and often many more. Example mapping: arc 1 length: pitch arc 2 length: pan arc 3 length: cutoff etc The only constant musical structures will be self replicating ones. Other options: Interesting to try a mapping where the place/vertex degree and token type, along with the last passed arc lifetime are sonified. Could use a third token type Possibilities ------------- * Tap tempo for different speeds of tokens * Non-deterministic mode - execution order randomised * Grammar mutation * Grammar livecoding (rewrite the language live e.g. l-systems) * Grammar abstraction - combine atomic tokens into abstract tokens * reverse tokens - travel in the opposite direction Interface --------- Gamepad navigation around graph with analogue sticks. Placement of new instructions/execution tokens into the graph via a ring menu. Other mode executes instructions immediately in place with the ring menu for manual graph edits Direct edits of topology might be possible. ____ ____ [_L2_] [_R2_] ____ ____ [_L1_] [_R1_] .-----. .-----. / .-. '----------' F \ | .-' '-. D E| | '-. .-' sel B C | \ '-' .---. .---. A / / '--- //LS \\ //RS \\ ---' \ / _\\___//__\\___//_ \ / / '---' '---' \ \ | | | | \ / \ / '---' '---' RS : Navigate graph LS : Token menu A : Place token on current vertex B : Operate token on current vertex Left DPad : Change token type - toggle between none, activate, instruction Up/down DPad: Zoom view Visual style ------------ Force directed layout algorithm Everything else hand drawn/animated Pinks, whites, flowers (places), bees (tokens) Shadows, minimal textures, thick drawn lines Has to cope with hundreds/thousands? of places and tokens Depth of field with mipmap hack - requires fluxus feature ref: okami Musical style ------------- ambient slow coil fakeshift microstoria add sample voice to itchy with filter etc lots of samples, scrapes Problems -------- How easy will it be to use? - no idea I want it to be dreamlike, expressive yet complex & unpredictable. Dunno what it means exactly. Speed of force directed algo - needs space partitioning, also useful for navigation interface. tests show everything else is trivial speed wise.