Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

life

Namespace: global/life

fn finish

fn finish(ctx: ScriptContext)
Finish the scenario and stop playback.

fn harmonic_density

fn harmonic_density(min_freq: float, max_freq: float) -> Map
fn harmonic_density(min_freq: float, max_freq: float, opts: Map) -> Map
Harmonic density spawn method.

fn harmonicity

fn harmonicity(min_freq: float, max_freq: float) -> Map
fn harmonicity(min_freq: float, max_freq: float, opts: Map) -> Map
Harmonicity spawn method.

fn life

fn life(patch: Map) -> Map
Life config patch helper (returns the patch map).

fn pop_time

fn pop_time(ctx: ScriptContext)
Restore the most recently pushed cursor time.

fn push_time

fn push_time(ctx: ScriptContext)
Save the current cursor time onto the time stack.

fn random

fn random(min_freq: float, max_freq: float) -> Map
fn random(min_freq: float, max_freq: float, opts: Map) -> Map
Random log-uniform spawn method.

fn release

fn release(ctx: ScriptContext, tag: String, sec: float)
Release agents by tag over `sec` seconds.

fn release_agent

fn release_agent(ctx: ScriptContext, target: AgentHandle, sec: float)
Release agents over `sec` seconds.

fn release_cohort

fn release_cohort(ctx: ScriptContext, target: CohortHandle, sec: float)
Release a cohort over `sec` seconds.

fn release_tag

fn release_tag(ctx: ScriptContext, target: TagSelector, sec: float)
Release a tag selector over `sec` seconds.

fn remove

fn remove(ctx: ScriptContext, tag: String)
Remove agents by tag.

fn remove_agent

fn remove_agent(ctx: ScriptContext, target: AgentHandle)
Remove agents immediately.

fn remove_cohort

fn remove_cohort(ctx: ScriptContext, target: CohortHandle)
Remove a cohort immediately.

fn remove_tag

fn remove_tag(ctx: ScriptContext, target: TagSelector)
Remove a tag selector immediately.

fn run

fn run(ctx: ScriptContext, sec: int)
fn run(ctx: ScriptContext, sec: float)
Run for `sec` seconds and finish the scenario.

fn scene

fn scene(ctx: ScriptContext, name: String)
Add a named scene marker at the current cursor time.

fn set_global_coupling

fn set_global_coupling(ctx: ScriptContext, value: float)
Set the global coupling strength across agents.

fn set_harmonicity

fn set_harmonicity(ctx: ScriptContext, map: Map)
Configure harmonicity calculation parameters.

map schema:

  • mirror: f32 (optional, mirror weighting)
  • limit: i64 (optional, partials limit)

fn set_rhythm_vitality

fn set_rhythm_vitality(ctx: ScriptContext, value: float)
Set the global rhythm vitality (affects oscillatory dynamics).

fn set_roughness_tolerance

fn set_roughness_tolerance(ctx: ScriptContext, value: float)
Set the global roughness tolerance.

fn set_time

fn set_time(ctx: ScriptContext, sec: float)
Set the cursor to an absolute time (seconds).

fn spectral_gap

fn spectral_gap(min_freq: float, max_freq: float) -> Map
fn spectral_gap(min_freq: float, max_freq: float, opts: Map) -> Map
Spectral gap spawn method.

fn tag

fn tag(_ctx: ScriptContext, name: String) -> TagSelector
Create a dynamic selector for a tag.

fn wait

fn wait(ctx: ScriptContext, sec: float)
fn wait(ctx: ScriptContext, sec: int)
Advance the global time cursor by `sec` seconds.