Evolution

class Evolution(var morphBudget: Float = 8.0f)

Paces a drawing's changes of form by how much is happening in the music.

It adds up musical activity (hits, novelty, density) over heard time. When the sum reaches the budget and a hit lands, or a cycle edge passes under a usable pulse, it fires morph and starts again. Every third morph and every surge fires birth as well. An accepted section fires a morph at once; a drop sets bloom and a breakdown sets collapse, which are the gene moves to most and least with a name a drawing can read. Elapsed time alone never fires anything: a pause or a silence adds no activity, and a silence drops what was added.

Constructors

Link copied to clipboard
constructor(morphBudget: Float = 8.0f)

Properties

Link copied to clipboard

Activity added up since the last morph, in units of the budget.

Link copied to clipboard

True on the one frame a new form is born inside the picture.

Link copied to clipboard
var births: Int

How many births have fired since the last reset.

Link copied to clipboard

True on the frame of an accepted drop: every part to its fullest.

Link copied to clipboard

True on the frame of an accepted breakdown: every part to its sparest.

Link copied to clipboard

True on the one frame a form change starts.

Link copied to clipboard

Activity units between morphs. About four cycles of busy music, sixteen of a ballad. Judgement.

Link copied to clipboard
var morphs: Int

How many morphs have fired since the last reset.

Functions

Link copied to clipboard
fun reset()

Forgets every count and the activity added so far.

Link copied to clipboard
fun update(state: VizRenderState, gestures: Gestures)

Reads one frame. Call once per frame, after gestures has read the same frame.