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

Introduction

日本語版

Conchordal is a psychoacoustic instrument for generative composition. Rhai is its scenario language: it directs the instrument without reducing it to note scheduling. The central idea is shaping a perceptual consonance field, then letting populations of voices move, survive, and reorganize inside it.

A scenario script defines PopulationSpecs, places each one into the field as a stable Population, and shapes the terrain its Voices inhabit. Together those Populations form the runtime Community. Harmony emerges from psychoacoustics (roughness and harmonicity); rhythm emerges from coupled oscillators on a shared meter the Community itself drives. The script is a director, not a sequencer.

Conchordal v0.5.0 is an alpha release for researchers and developers who want to examine these concepts directly. Features are incomplete and may be unstable; composers and creators should wait for the beta release. The model is intentionally described in its own terms rather than hidden behind common music-production vocabulary.

How this book is organized

Every rhai code block in this book is executed against the real script engine by the test suite. This checks that the examples compile and run with the current engine; it does not by itself prove that every explanation is semantically correct.

Quick Start

Run a scenario script with the real-time instrument (release mode is recommended for real-time DSP):

cargo run --release -- samples/01_a_single_voice.rhai

Minimal Sound

place(sine().amp(0.08).sustain(), at(440.0));
wait(2.0);

place(population_spec, placement) creates a Population immediately at the current script time. The returned handle can patch or release that living population.

Basic Objects

  • PopulationSpecs describe founder voices and population policy. Start one with sine(), harmonic(), modal(), saw(), square(), and noise().
  • Variants clone a specification with population_spec.
  • Placements decide where populations enter: field targets consonance(), dissonance(), edge(), gap() (cloud by default, .peak() for the extremum), plus random(), at(), and line().
  • Populations are the stable handles returned by place(). Their founder voices exist from that boundary; live methods update the current voices.
  • Sections scope populations and release them automatically.

A Population is one stable handle for a placed population. A placement with .count(6) creates six founder voices under that handle. If voices later die and respawn, the Population remains the same while its members and generations change. See Population — A Persistent Unit of Voices for the complete object and lifecycle model.

let population_spec = harmonic()
    .amp(0.08)
    .sustain()
    .brightness(0.35);

section("plain entry", || {
    place(population_spec, line(220.0, 440.0).count(3));
    wait(4.0);
});

Placing Into the Field

consonance(root_hz).peak() places voices at high Consonance Field positions around a root. The field is shaped by what the system perceives — an anchor changes where the peaks are.

let anchor = harmonic()
    .brain("drone")
    .amp(0.06)
    .sustain()
    .anchor();

let voice = harmonic()
    .amp(0.04)
    .sustain();

section("field placement", || {
    place(anchor, at(110.0));
    wait(1.0);

    place(voice, consonance(110.0).peak().range(1.0, 4.0).count(6).spacing(0.9));
    wait(6.0);
});

How the field works — and how voices move, survive, and respawn inside it — is the subject of Consonance Field — A Terrain for Evaluating Pitch.

Live Patching

Configure body, behavior, lifecycle, and respawn on a PopulationSpec before calling place(). The returned Population exposes only operations that make sense after placement: live patches and release. The API Reference marks the two method sets.

let spec = harmonic().amp(0.04).sustain();
let population = place(
    spec,
    consonance(220.0).peak().count(3)
);
population.amp(0.02); // live patch on running voices
population.glide(0.8);
wait(3.0);
release(population);

A Complete Miniature

seed(7);

let anchor = harmonic()
    .brain("drone")
    .amp(0.05)
    .sustain();

let colony = harmonic()
    .amp(0.035)
    .sustain()
    .seek_consonance()
    .glide(0.4)
    .avoid_neighbors(0.6);

section("emergence", || {
    place(anchor, at(110.0));
    wait(2.0);

    place(colony, consonance(90.0, 900.0).count(8).spacing(0.8));
    wait(8.0);
});

Where to go next

Checking a script before playing

cargo run --release -- samples/01_a_single_voice.rhai --compile-only

--compile-only evaluates the Rhai script and validates its scenario without starting audio or the GUI. Loops, closures and script print statements run. The final Warnings: N line counts diagnostics. Each warning includes its source position and explains a setting that was ignored; revise the combination or remove an ineffective setting. An invalid enum name stops evaluation with an error. Enum names are case-sensitive lowercase canonical names; aliases and surrounding whitespace are rejected.

Editor Setup (LSP)

Conchordal ships a Rhai LSP definition file describing its named callable scripting API, including hover documentation. With a compatible client, it can provide completion, hover, go-to-definition, and diagnostics for calls such as place, harmonic, .brain(), and .send(habitat_bus). The bus-combining | overloads are operators rather than named declarations and are therefore not emitted into the definition file.

The two files that drive this are committed at the repo root:

  • Rhai.toml — workspace config picked up by rhai-lsp
  • rhai-defs/conchordal.d.rhai — auto-generated type/fn declarations with doc comments

The upstream rhai-lsp project labels itself experimental and incomplete, and does not recommend general use. Treat this setup as an optional development aid rather than guaranteed production tooling. If you still want to use it, install it directly from its git repository (it is not published on crates.io):

cargo install --git https://github.com/rhaiscript/lsp rhai-cli

This builds a binary named rhai with the lsp subcommand.

Then wire your editor:

VS Code

The official Rhai extension currently provides syntax highlighting only. It does not launch rhai-lsp. For LSP features in VS Code, use an LSP client/extension that can launch this command from the conchordal workspace:

rhai lsp stdio --config Rhai.toml

Neovim 0.11+

vim.lsp.config("rhai", {
  cmd = { "rhai", "lsp", "stdio", "--config", "Rhai.toml" },
  filetypes = { "rhai" },
  root_markers = { "Rhai.toml", ".git" },
})
vim.lsp.enable("rhai")

Helix

In ~/.config/helix/languages.toml:

[[language]]
name = "rhai"
scope = "source.rhai"
file-types = ["rhai"]
language-servers = ["rhai-lsp"]

[language-server.rhai-lsp]
command = "rhai"
args = ["lsp", "stdio", "--config", "Rhai.toml"]

Emacs (eglot)

(add-to-list 'eglot-server-programs
             '(rhai-mode . ("rhai" "lsp" "stdio" "--config" "Rhai.toml")))
(add-hook 'rhai-mode-hook #'eglot-ensure)

Regenerating the definition file

The definition file and both the English and Japanese API references are generated from the engine’s register_fn surface joined with the documentation registry (src/scripting/docs.rs). If you pull a new conchordal version and miss diagnostics, regenerate all three:

cargo run --bin gen_rhai_defs

CI tests fail whenever the committed artifacts are stale. This checks the registered signatures and generated text; editor behavior still depends on the experimental upstream server and the client configuration.

Performance

Quick Start explains how to write and run a minimal scenario. This chapter describes the actual performance workflow: starting the real-time instrument, ending a run, performing without the GUI, and then recording or replaying what happened.

Performing with the GUI

Start a scenario with the real-time instrument:

cargo run --release -- samples/10_generations.rhai

The scenario is compiled, the GUI opens, and playback begins automatically. The script supplies the macro-timeline: place() introduces Populations, wait() advances script time, and section() or play() releases the Populations created inside its scope. During that timeline, Voice behavior, the Landscape, and their feedback continue to evolve in real time.

The progress bar shows scenario time. While playback is running, the control at its right exits the performance; closing the window or pressing Ctrl-C also stops it. It is not a pause button, and the GUI is not a live script editor. To change the scenario, stop the run, edit the Rhai file, and run it again.

To prepare the GUI first and begin on a cue, add --wait-user-start. Press Space or click the start control when ready:

cargo run --release -- samples/10_generations.rhai --wait-user-start

By default the GUI remains open when the scenario finishes, allowing the final state to be inspected. Close it with the playback control or window close button. Add --wait-user-exit=false when it should close automatically at the end.

Performing without the GUI

--nogui starts immediately and exits when the scenario finishes. It still plays through the default audio device:

cargo run --release -- samples/10_generations.rhai --nogui

Use --play=false only for a silent simulation or report-only run:

cargo run --release -- samples/10_generations.rhai --nogui --play=false --report run.jsonl

--nogui disables both wait-for-start and wait-for-exit. Offline WAV output is a different operation provided by conchordal-render; the real-time instrument itself never records audio.

Listen, inspect, revise

A scenario specifies which Populations enter, when they enter, and the policies that guide their behavior. It does not predetermine the exact pitches, rhythmic synchronization, survival, or respawn outcome of a performance; those emerge from interaction with the changing Landscape. Run the scenario, listen to the result, inspect what happened, adjust the script, and run it again.

conchordal (the instrument) never writes audio to disk, in any build profile. A performance is designed as an ephemeral event that leaves no audio inside the instrument after it ends.

Replaying a performance

Every run logs its seed:

scenario seed: 3821650944810716341 (replay with --seed 3821650944810716341)

Top-level samples start from a fresh, unseeded run every time so they expose the system’s variation rather than prescribe one fixed result. When a run is worth keeping, replay it exactly with the logged value:

cargo run --release -- samples/10_generations.rhai --seed 3821650944810716341

--seed works the same way on conchordal-render for turning a kept performance into a WAV. A script-level seed(...) call always wins over the flag, since it runs during script evaluation and overwrites whatever seed the run started with — reach for it only when a script itself must be reproducible regardless of how it is invoked.

Reports

Run with --report, pointing at a file to write:

cargo run --release -- samples/10_generations.rhai --report run.jsonl

--report is a flag on the conchordal instrument (it also works headless, with --nogui). It is not available on conchordal-render, which renders audio rather than observing a live run.

The file is JSON Lines — one record per line, tagged by type. The record families are:

  • meta — the effective scenario seed, written first.
  • scene_marker — the start of each section("name", || { ... }), so later records can be grouped by the most recent marker.
  • spawn / respawn / death — population turnover per voice: spawn and respawn carry the entry frequency (and, for respawn, the parent voice); death carries configured nominal endurance, energy-depletion time, observable lifetime_sec (including the envelope tail), an early-life consonance snapshot (first_k_mean), and phase-locking at death (plv_at_death).
  • onset — per-voice onset time, strength, frequency, phase-locking, and scaffold context.
  • population_step — active Population size (including alive_count: 0 while awaiting replacement), mean frequency, Consonance Field score and level, and frequency entropy over time.
  • listener_state — the ListenerTwin’s four perceptual levels (stability_level, resolvability_level, tension_level, and attention_level), beat/subdivision/measure tracking, and analysis lag.
  • rhythm_observation — instantaneous global Kuramoto and environment rhythm state. rhythm_summary reports onset density, inter-onset-interval regularity, and burstiness globally and per Population; its Kuramoto summary is global only.
  • listener_confidence_summary — peak and late-window beat confidence.
  • dcc_pressure — listener-derived tension pressure and the pitch-temperature bonus applied by DCC.
  • phonation_gate_open — when a voice’s phonation gate opens, and the consonance value it opened at.

Reading the raw JSONL answers narrow questions well: “when did Population 3’s membership actually turn over?” or “what did tension_level do right after that anchor entered?”

Reading a report

The stream is plain JSONL, so section-level questions are one filter away with any JSON tool. For example, every death with its lifetime and early-life consonance:

jq -c 'select(.type == "death")
       | {time_sec, population_id, configured_endurance_sec,
          energy_depletion_sec, lifetime_sec, first_k_mean}' run.jsonl

Bucket those by your scene_marker times and “did the colony starve in section IV, and at what consonance?” becomes a direct read. There is no bespoke digest tool: which summaries matter depends on the piece, and a one-off filter (or a script) shaped to the question beats a fixed report format.

The GUI

The GUI shows the same landscape and listener-twin state live, as it runs. Reports exist for reading after listening — for the moments you noticed something but couldn’t hold every number in your head at once.

Mechanism evidence and choices

Conchordal gives each API term evidence labels in the API reference and editor hover. A label explains the grounding of a mechanism, or says that the term sets placement, an initial body or macro form. It is information, not another setting. You can start with the existing defaults and choose more specific controls only when a piece needs them.

Reading the labels

LabelMeaning
PrincipleAn adopted mechanism with primary evidence, an identified mechanism and a published model used as specified by its source, without requiring new human data collection. A label on an input function does not certify every equation or constant in the surrounding implementation.
Candidate (source)A published formal model whose brain mechanism is unidentified, or whose parameters are task-specific fits. The source names the hypothesis; additions outside it receive separate author-rule labels.
Candidate (source match pending)The published-model part has been identified, but source agreement is unfinished. This is not an accepted candidate.
Author ruleAn authored mechanism without a corresponding published formal model, including selected forms, thresholds and values. Using sensory evidence does not turn an action rule into a principle.
Not a mechanism (kind)Placement, initial body, macro form, routing, operation or data. Follow the referenced input and behavior terms for their mechanism labels.

One term can have several labels. For metric(), beat perception is a principle input, the Large neural-resonance oscillator form and Large & Jones (1999) gains are a candidate part with source matching pending, and participation and default coupling are author rules. consonance() is a placement operation: it reads H/R and authored consonance valuation, then applies a selection rule. It does not make the whole operation a sensory principle.

follow_own_sequence(w) combines the PPM-Decay candidate (Harrison and colleagues, 2020) with authored interval encoding and generation coupling. Its existing source fixtures cover distributions, information content and learning state; they do not establish R API or RNG equivalence. The term remains opt-in with weight 0 by default. See Rhythm for its supported execution paths and resource limits.

phrase_boundary(w) combines the LBDM candidate (Cambouropoulos, 2001) with authored finite-sequence completion, a six-onset online adaptation, birth-fixed caps and gain on one later legal Sine onset. Its implementation checks do not reproduce the original program or corpus results. It defaults to weight 0 and is available in the opt-in tonal profile, while the default sensory profile leaves it off. See Rhythm for support and response expiry.

Evidence is independent of Core / Experimental / Tuning / Research, which organize how the API is used and disclosed. Experimental does not mean Candidate, and Core does not mean Principle.

What operates by default

Principles operate by default. The instrument also retains its existing authored base behavior: movement cost, tessitura gravity, consonance valuation, habituation constants, participation, metabolism and lifecycle rules. For example, movement cost remains 0.5 and resolved tessitura gravity remains 0.1. These values are author choices, not consequences of sensory principles. Adding labels changes no sound, value, route or control.

Under the current policy, new candidate and author-rule axes start neutral. This does not switch off the existing base. dwell, rest_on_habituation, respond_to_onsets, follow_own_sequence and phrase_boundary are examples of optional weights whose defaults are 0. Defaults come first, then presets, then individual controls: simple pieces should not require a stack of parameters.

The listener profile

Write listener_profile("tonal"); before scene actions or scopes to select a bundle; listener_profile("sensory"); removes its inherited weights. Omitting the word still selects sensory, preserving the existing base sound. Changing that default requires separate author adoption; the bundle is available for audition, not already adopted.

MechanismTonal weightEvidence
follow_own_sequence0.05Candidate: Harrison et al. (2020), PPM-Decay; author rules for interval encoding and scoring
melodic_continuity0.00076066292Candidate: von Hippel (2000), text-consistent AR(1); author rules for prefix estimation, scoring and replacement
phrase_boundary1Candidate: Cambouropoulos (2001), LBDM; author rules for online boundaries and gain
Final section arch / ritard1 / 1Candidates: Todd (1992), Friberg–Sundberg (1999); author rules for interval assignment, gain floor and clock mapping

These are the SQ-1, ME-1i, PX-1i and PE-1i demonstration weights. They make mechanism differences available to audition; they are not author-adopted values and will be updated after adoption. listener_profile itself is labelled Not a mechanism (profile selection); the constituent terms retain their own labels.

ME’s weight matches the displaced old terms’ mean absolute score contribution. follow_tonal_context is not inherited: the table costs about 1 GB and 80 seconds to create, and approximation acceptance is limited to [0.25,1], based on measurements at 0.25/0.5/1. These are not word limits; outside that range acceptance is unverified and no extra warning is added.

Explicit Population weights override the profile, including explicit zero. Inheritance checks the final Voice form at placement, independently for each mechanism, and silently skips unsupported Voices. Individual axes still default to zero. Existing author-rule base behavior remains, except that a known enabled ME prediction replaces movement cost and fixed-center gravity for that decision.

Section expression uses the last completed section, only when it ends at the scene’s score cursor and the entire scene satisfies existing PE-1 support. Without a suitable section it does nothing. Flora, sustained participation and other unsupported PE-1 scenes are silently skipped as a whole; this does not extend PE-1 to those Voices. Any explicit expressive_section, including weights 0/0, takes priority over inherited expression. Runtime delivery and duration checks remain in force. See Rhythm for each mechanism’s limits.

What the composer chooses

The composer chooses the use and weight of hypotheses and style-dependent priors in layer-3 cognitive coordinates, as well as initial conditions and macro form. The labels do not expose internal memory integration or learning dynamics (layer 4), or change front-end sensation, roughness or harmonicity (layer 1). The configuration evidence table in the API reference includes research settings so their status is visible; it does not make those settings composing controls. Raw consonance valuation coefficients also remain outside the Rhai surface.

What acceptance means

Principles and candidates require numerical agreement with their source, the registered causal difference and real-time operation on the declared load. Candidate acceptance checks that a hypothesis has been implemented correctly; it does not prove that the hypothesis is true. Principles have no subjective acceptance gate.

Author rules require implementation checks of default agreement, causal difference and real-time operation, together with the author’s listening. A bundled default listener preset receives one author audition; listening does not rank parameter values. Composer-control upper bounds follow failure or effect saturation, not computational cost. These acceptance conditions do not change simply because a label appears in an editor.

melodic_continuity separates the von Hippel (2000) candidate from the author rules for estimation, self execution and generation coupling. Its default is zero.

Population — A Persistent Unit of Voices

The shortest useful mental model of conchordal is not a note followed by another note. It is a population definition becoming a persistent population of living voices:

PopulationSpec + Placement --place()--> Population --> Voice(s)
                                                |
                                                `-- later generations

Community = every Population sharing the runtime terrain

A PopulationSpec is a reusable pre-placement definition. It combines the founder Voice defaults with policy that belongs to the population as a whole, such as lifecycle, viability, and respawn. A Placement says where and how many founder voices enter. place() combines them and immediately returns a Population: one stable handle for the placed population, not one handle per Voice. The runtime Community is the aggregate of all Populations that share the Landscape.

let population_spec = harmonic()
    .amp(0.035)
    .sustain()
    .respawn_capacity(6);

let population = place(
    population_spec,
    consonance(90.0, 900.0).count(6)
);
wait(3.0);
release(population);

Here population controls six founder Voices together. Reports distinguish their shared population_id from each individual voice_id. If a Voice dies and is replaced, its voice_id and generation change; the Population and its population_id do not.

The placement boundary

place() is the only transition from definition to runtime. Configure all initial-only properties on the PopulationSpec first. Once placed, a Population exposes only live patches and release; it cannot be turned back into a specification or have its founder policy rewritten.

let spec = harmonic()
    .brightness(0.4)
    .brain("entrain")
    .endurance(8.0);

let population = place(spec, consonance(220.0).count(3));
population.amp(0.03); // Live patch at the current script time.
flush();              // Emit pending live patches without advancing time.
wait(2.0);
release(population);

wait(seconds) also emits pending live patches, then advances the script cursor. Neither wait() nor flush() creates a deferred or draft Population: the founder Voices were scheduled by place() itself.

The API Reference marks PopulationSpec methods as initial-only and Population methods as live-patchable.

Five independent questions

A PopulationSpec answers several independent questions. Keeping them separate prevents one musical decision from being mistaken for another.

QuestionMain controlsMeaning
What sounds?sine, harmonic, modal, brightness, modes, attack_noiseThe founder Voice body and spectrum.
What kind of life?brain(name): entrain, seq, droneWhether articulation participates in ecology, follows an authored life, or persists as terrain.
When does it sound?sustain, repeat, metric, entrained, steady, flowPhonation and onset timing.
Where does pitch go?Placement, anchor, seek_consonance, temperatureFounder entry position and later movement.
How does the population persist?endurance, recovery, viability, respawnVoice energy, death, and Population turnover.

Calls on different rows compose. Calls on the same axis are generally last-write-wins; the API Reference identifies the exact builder behavior.

At placement, harmonic().attack_noise(-18) gives each strike, including restrikes, a short noise burst. At unit strike strength its initial RMS is 18 dB below the note amplitude. The burst starts immediately even with a slow attack envelope, and falls by about 8.7 dB in 15 ms. Omit the method or set it to −80 dB for silence.

Articulation life: brain

brain(name) selects how a Voice lives while it is sounding:

  • brain("entrain") is the default living articulation. It can respond to consonance and rhythmic fit through the metabolism and lifecycle controls.
  • brain("seq") is an authored event with a fixed life. It ignores field viability and metabolism.
  • brain("drone") is undying until explicitly released. It is useful for terrain anchors and other persistent material.

This is separate from phonation timing. In particular:

brain("entrain") chooses a kind of life; .entrained() chooses medium coupling of repeated onsets to the shared meter.

The similar names describe different axes and may be used together.

let colony = harmonic()
    .brain("entrain")
    .entrained()
    .cycles(2)
    .seek_consonance()
    .endurance(8.0)
    .recovery(4.0)
    .consonance_viability(0.30, 0.80);

place(colony, consonance(90.0, 900.0).count(5));
wait(8.0);

The brain does not choose the body, Placement, or pitch strategy. A drone may be audible or habitat-only; a living Voice may be anchored or moving; the same modal body may use any articulation life.

Phonation and duration

Phonation answers two questions: when an onset occurs, and how long that onset remains open.

  • sustain() holds while the Voice is alive.
  • repeat() selects repeated phonation with defaults.
  • metric() selects shared-beat synchronization; entrained(), steady() and flow() select acoustic participation. Steady keeps its own due time and uses heard context only for sound or skip. These timing presets can re-attack; explicit sustain composes a living Tone with their opportunities. See Rhythm.
  • cycles(n) expresses duration in rhythmic cycles.

Start with the presets. For more control, set onset timing with once() or pulse(rate_hz), or set note length with adaptive_duration().

Release is not death

release(population) is a terminal script decision: later patches on that Population are ignored, its current Voices enter their release envelopes, and the Population closes. Ecological death is a runtime result: one living Voice exhausts its energy, after which the Population’s respawn policy may replace it. A section or play scope also releases the Populations it created when the scope ends.

The next chapter explains Voice and Landscape — Sound–Environment Feedback.

Explicit sustain() plus metric() combines held sound and acoustic beat synchronization. With free-pitch GateSnap/Rearticulate, omitted tie attacks at a beat with a pending adopted destination and extends other beats; write tie(0) for every beat. Fixed pitch and Glide still attack each crossing, and sustained entrained/steady/flow keeps omitted tie at zero. See rhythm.

Flora — Spectral Growth

Flora grows spectral biomass across a frequency extent. Growth consumes a slowly renewing band resource, and a patch needs a minimum density to sustain itself. New growth appears where the heard sound is harmonic and the resource is fresh. Silence is a legitimate state. These dynamics are authored composing rules, not claims about auditory cognition or a guarantee of continuing succession.

Population and Flora couple only through sound: habitat audio feeds the Landscape, and Flora reads its base field level before habituation and its harmonicity. Resource depletion and recovery already supply Flora’s band fatigue; Voices and the listener still read the habituated terrain. There is no direct exchange of their state. By default, each Flora removes its own actual habitat PCM before evaluating the base consonance and harmonicity used for growth and seed rain, as well as external resource power. Other Flora remain audible. Within-band competition still comes from the resource consumption kernel acting on latent biomass. send(presentation_bus) keeps its audio out of the habitat, so that Flora reads mixed C/H directly without an H/R observer. send(habitat_bus) affects the habitat without direct presentation. The shared beat meter still hears all habitat audio.

Set flora().leave_self_out(false) before placement to use mixed C/H including its own sound, without an H/R observer. External resource power still excludes its own PCM. Voice defaults to false, while Flora defaults to true because one Flora has many partials whose own harmonic lattice can sustain its growth and seed positions. In the undergrowth-v2 observation, that lattice persisted without a ground drone; choose false to allow this self-support, without a guarantee that the pitch stays fixed. Presentation-only Flora uses mixed C/H with either setting.

Resource consumption includes latent biomass, even when it does not sound, and the power of other habitat audio. The fixed power reference is the mean square of a sine with amplitude 0.03 (0.03²/2 = 0.00045); changing the Flora’s amplitude does not change that reference. Missing observations do not count as silence: resources retain their initial state before the first valid observation, and later gaps retain the last observed external consumption. Growth observations start from the mixed pre-birth history. Analysis invalidation ends the runtime, following its existing mixed-analysis rule; own-excluded C/H never falls back to mixed C/H. A geometry change discards old growth/seed scans until new observations are available. Reports show the growth and seed values actually consumed.

flora() builds a reusable FloraSpec. place(spec, placement) returns a Flora that can receive amplitude and pace updates. A Population’s Voices and Flora can share the same habitat, as in this example:

let sun = place(harmonic().brain("drone").sustain().amp(0.04), at(110));
let moss = flora().amp(0.03).fade(0.5)
    .tone("sine").residual(false).send(habitat_bus | presentation_bus);
let m = place(moss, consonance(110).range(1, 16));
wait(2);
m.amp(0.015);
release(m);
wait(1);
release(sun);

consonance(lo, hi) seeds from the base consonance density mass before habituation inside the extent, with a uniform fallback when that mass is zero. This placement value is mixed: no own sound exists yet. random(lo, hi) seeds uniformly. Both require density sampling, count 1, zero tension and the target’s default spacing (1 ERB for consonance, 0 for random). Explicit default modifiers are accepted by value. Other placement targets, at, line, .peak() and non-default modifiers raise script errors. Bounds must lie within 1–20000 Hz and span at least 1/96 octave, one bin of the initial Log2Space. Later space changes can make a Flora dormant until its extent contains bins again.

MethodAccepted valuesDefaultLive update
pacefinite, at least 1/641Yes
amp0–10.03Yes
fade0–60 seconds2Before placement
tone"sine", "resonant""sine"Before placement
residualBoolean; diffuse mass as band noisefalseBefore placement
leave_self_outBoolean; exclude own sound from growth and seed C/HtrueBefore placement
sendBus or BusSetBoth busesBefore placement

residual(true) enables the optional band-noise layer before placement.

amp is the nominal target-amplitude scale: a ceiling, not a guaranteed level. Fades, slews and retiring tones can affect the transient output.

amp and fade must be finite before and after conversion to f32. Invalid values raise errors during script evaluation. pace has no cost-based upper bound. Values below 1/64, NaN and negative infinity warn and use 1/64; positive infinity and positive f32 overflow warn and use f32::MAX, reaching internal saturation. The lower bound preserves finite retirement at 0.5 Hz (48 kHz / hop 512).

Live methods collect a pending patch. The next wait, flush or scope end emits it as UpdateFlora. release(m) marks release pending; the patch precedes ReleaseFlora in the same event, using the spec’s fade. Further updates and repeated releases on that handle warn and are ignored. Scoped verbs release the Flora they create, with nested Flora released at the inner scope’s end. Explicit release fades extend the scripted duration when needed. Flora still live at script end fades after Finish.

The Flora API is Experimental. Its dynamics are authored composition rules; this API tier is separate from claims about auditory cognition.

Beat opportunities

Every Flora uses beat opportunities: with fresh confirmed evidence, new tonal lanes and ordinary replacements wait for the Flora’s next local clock crossing. Biomass and resources continue to evolve every hop. Supported tonal and residual amplitude targets, including their shared normalization, follow current biomass every hop through the existing slew. A crossing alone does not refresh unchanged carriers. There is no timing opt-out; flora().metric() has been removed.

Like Population metric(), Flora uses a private CouplingClock with confidence-weighted rate and phase attraction (coupling 0.95), an independent initial phase, and the scene’s tempo-basin center as its starting rate (2 Hz without a basin). Its shared meter reads only habitat audio: flux and the selected acoustic recurrence path, with the same enculturation priors. Internal Voice onset commands and Flora lane commands never enter this meter. The meter runs from scene start, before Flora is placed, and includes Flora’s actual habitat sound. That sound may confirm and sustain a beat. This is separate from the production meter used by Population timing.

A waiting tone owns only the current excess in its last tonal window. That mass is removed once from the residual. Empty windows, out-of-range tones, separation conflicts and release start retirement immediately. New assignments occur at the sample crossing within the hop; births retain their amplitude slew while retiring tones use the metabolic tail described below. Thus neither all endings nor detected acoustic onsets are quantized to the beat.

When ecological renewal is faster than a private beat (k > 20) and the meter confirms a subdivision (positive confidence and ratio 2, 3 or 4), crossings of private phase times that ratio also become opportunities. Otherwise allocation uses beat crossings only. Layer changes retain phase. Span/gap transitions still use beat crossings.

Before beat confirmation, or while the observation is unknown or stale, allocation runs continuously each hop, including amplitude targets and normalization. Pending candidates are discarded and current biomass is reconsidered; the private clock is not reset and stored candidates are not replayed as a burst.

Pace and release

All Flora uses temporal_basin(lo, hi) as the composer’s tempo prior, starting at its center frequency (2 Hz without a basin). Every Flora follows fresh, confirmed beats with confidence-weighted coupling 0.95 and otherwise returns to the center. flora().pace(k) sets an authored multiplier relative to that beat; a placed handle also accepts m.pace(k). The default is 1. Until saturation, for frequency f, ecological time advances by k*f/2: growth is 4kf/s, resource recovery is 20/(kf) seconds and consumption is 0.6/(kf) seconds. Diffusion and seed rain scale together. Phase correction only changes metric opportunities. This authored rule does not model phrase duration.

All lanes retire with a finite metabolic amplitude tail. The existing macro fade bounds release; fade(0) ends immediately. The fixed lane pool can postpone births while tails occupy slots. The independent rate and renewal methods have been removed. pace(k) scales their shared time and divides the retirement tail duration by k at fixed f until saturation. Birth slew and macro fade retain physical seconds; pace retains the private beat clock while selecting the action layer described above.

Sample 17 uses temporal_basin(2, 4): its 3 Hz prior is 1.5 times neutral 2 Hz. The sustained scene has no explicit beat carrier; any confirmed acoustic beat can still change Flora’s pace. The basin is a compositional choice, not a new default or a measured optimum.

pace(k) determines how far ecology advances between action opportunities. Its speed saturates at one 10-second resource renewal per nominal opportunity: dt_eco = (f / (2 Hz)) * min{k, 20*r} * dt_hop, where r is 1 for beats or continuous fallback, and the confirmed subdivision ratio otherwise. Saturation starts at k=20 for beats, or 40, 60 or 80 for ratios 2, 3 or 4. Further increases advance no additional ecology. Retirement shares this speed. Phase correction moves opportunities without changing this nominal rate law. The substep rule is unchanged; the previous per-hop saturation and its cost estimate are superseded. No new real-time measurement is claimed. As with Voice self-exclusion, real-time cost depends on the entire scene and is the composer’s responsibility.

When a Flora is the loudest sustained layer, its audible spectrum largely sets the harmonic context a listener hears. At pace k and beat f, the ecology renews roughly every 10 s / (k * f / 2 Hz) of real time: about 0.6 s at k = 16 and 2 Hz. If that is shorter than the listener’s short-term pitch context (the global memory of the periodicity model behind follow_tonal_context has a 1.5 s half-life), the context is replaced faster than it can be held, and other parts heard against it lose a stable reference. In one study scene, pace 16 left an 8-second context correlation of 0.44 in the mixed sound, while pace 1 reached 0.78 (0.89 without the Flora layer). This describes what the quantity does; it is not a bound on pace.

Partial motion

flora().pitch_apply_mode("glide") keeps the default peak following. "rearticulate" holds each tonal lane’s birth frequency through its retirement tail. When the peak leaves the 50-cent claim radius, the old lane retires and a replacement can grow at the peak, subject to existing beat opportunities, birth slew and free lane capacity. The Flora handle also accepts live changes: sounding lanes survive, and the next allocation uses the new rule. Switching from glide holds the current pitch. Residual noise keeps its existing centroid motion. Unsupported names, including Voice’s "gate_snap", warn and retain the mode (initial default: glide).

Spans and gaps

flora().rest_on_habituation(0.25) lets a Flora stop and return in response to heard attack history. This initial-only weight defaults to 0; any finite nonnegative f32 value is accepted. Negative or nonfinite values, including f32 overflow, warn and use 0. Zero creates no private span state or random stream.

The shared habitat observer runs from scene start when any Voice or Flora needs it. A Flora’s exit rate reads habituation at its sounding tonal carrier frequencies, weighted by target power. Without sounding tonal targets, exit stops. Once the integrated rate reaches its private random target, a private beat crossing retires all tonal and residual lanes. Biomass, resource recovery, consumption and seeding continue during the gap, while new lanes are suppressed.

After every tail ends, a separate return rate uses private recovery driven only by actual lane births. The next eligible private crossing permits ordinary births from current biomass; it does not force them. Unknown acoustic observations freeze both integrals. The private clock still supplies fallback crossings when no beat is confirmed. Release and fade take priority. Reports use span_gap and flora_id; the reported heard value is the weighted mean, and reported frequencies summarize the tonal carriers. This author rule does not assert perceived phrases or endings.

Responding to heard onsets

flora().respond_to_onsets(w) lets a Flora’s ecology run faster after it hears new onsets from outside itself. This initial-only weight defaults to 0; any finite nonnegative f32 value is accepted. Negative or nonfinite values, including f32 overflow, warn and use 0. Zero creates no state and reads nothing.

The attack history runs from scene start. With sites, a self-excluding Flora responds to external attacks at its placement. A Flora that includes itself reads the full local mix. Rest always reads the full mix. Without sites the two controls read the shared habitat history. Inside the Flora’s extent it skips bins within 1.5 ERB of its own sounding lanes, retiring tails included, and reads how much the history rose since the previous observation. The history rises only when an onset reaches a band that is not yet habituated, so familiar attacks add less. With τ = satiation_sec / ln 10 (about 2.17 s by default), a rise ρ owes w·τ·ρ extra seconds of ecological time, spent at most w seconds per second. An unhabituated external onset therefore runs the clock up to 1+w times faster. The pace saturation still applies: once k·(1+w) reaches 20·r, a larger weight adds nothing.

Growth, spread, seeding, resource recovery, consumption and retirement share the faster time. Births and replacements still happen only at the Flora’s own beat crossings, and the field still decides where they grow. The word adds no onset, pitch, opportunity or random draw. Unknown observations and grid changes contribute nothing; the next known observation only re-primes the comparison, while time already owed is still spent. With [psychoacoustics.habituation] enabled = false the history stays flat and the run warns once. Reports add respond (weight, cumulative rise and extra seconds, pending seconds and listened bin count) only for positive weights. This author rule does not claim that a listener hears the response.

Voice and Landscape — Sound–Environment Feedback

A Voice routed to the habitat bus changes the Landscape. The changed Landscape then affects placement, movement, and viability. This chapter traces that runtime feedback path and the energy, death, and respawn processes it supports.

Voice bodies
    |-- presentation bus --> listener / Listener Twin
    |
    `-- habitat bus --> Landscape --> placement, movement, viability
                              ^                         |
                              `------ new sound <------'

By default every voice feeds both buses, so the audience and the ecology share the same physical event. Routing can split them deliberately; see Routing and the Listener Twin.

From sound to terrain

The Landscape analyzes the habitat bus in log-frequency space and computes:

  • roughness potential: interference and beating within critical bands;
  • harmonicity potential: periodicity and support for virtual roots;
  • Consonance Field: the combined terrain used to evaluate candidate frequencies.

A voice changes the spectrum on the habitat bus, which changes these scans. That is why consonance(...).peak() does not return a fixed scale degree: its answer depends on what is sounding now.

Score, level, mass, and density

Several representations are derived from the same terrain. They are related, but they are not interchangeable.

RepresentationRangeUsed for
potentialkernel-dependentRaw roughness and harmonicity output.
field scoreunbounded real valueComparing positions, hill-climb, and placement tension.
field level0..1Bounded behavior and viability signals.
density massnon-negativeWeight before normalization for stochastic placement.
density / PMFsums to 1 in the selected rangeSampling a density cloud.

.peak() selects an extremum. The default density placement samples a PMF, so several voices can form a cloud around supported regions instead of collapsing onto one bin. tension(degree) targets a field-score step below the strongest peak. A viability window reads a bounded or environment-relative fit signal.

The suffixes in reports preserve the same distinction: for example, mean_c_field_score and mean_c_field_level are different quantities.

Placement is not movement

Placement answers where a voice enters. Pitch behavior answers what happens after entry.

let fixed_strain = harmonic()
    .amp(0.035)
    .sustain()
    .anchor();

let resolving_strain = harmonic()
    .amp(0.035)
    .sustain()
    .seek_consonance()
    .glide(0.4);

section("two responses to dissonance", || {
    place(fixed_strain, dissonance(140.0, 900.0).count(3));
    place(resolving_strain, dissonance(140.0, 900.0).count(3));
    wait(6.0);
});

Both Populations enter a dissonant region. One holds it; the other treats it as a starting point for resolution.

Evaluate the environment, not the self

A voice contributes energy to the field it later evaluates. Without care, a strong voice could appear viable merely because it hears its own footprint. consonance_viability() therefore enables environment-relative evaluation by default: the system removes the Voice’s actual habitat PCM before analysing the remaining sound and judging its fit.

This is a survival rule, not a routing rule. The voice may still feed the habitat bus and reshape the terrain for every other voice. Use viability_scope("total") only when the intended question is explicitly whether the voice fits the total field including itself.

Pitch movement has its own switch, leave_self_out(true). Voice defaults to false, while Flora defaults to true because one Flora has many partials whose own harmonic lattice can sustain its growth and seed positions. Both consumers read one synchronized observation of the mixed habitat PCM minus that Voice’s actual habitat PCM. The remainder passes through the same causal auditory filterbank, hop statistics, frequency reassignment, critical-band compression, density smoothing and H/R/C pipeline as the mixed field. Habitat-routed Flora, including residual sound, stays in the remainder. All bodies use this method; there is no mode selector.

The default tail_roughness_aversion(0) keeps both H and R self-excluded. You can choose .tail_roughness_aversion(w) on a Population, initially or live, to avoid roughness with its outgoing sound. This is an Author rule, a composer disposition (DCC §5), not a change to sensation. A fast passage may ignore the overlap; a slow drone may avoid it; pedal-like overlap may be intended. Only actual held-Tone Off/On candidates with leave_self_out(true) blend external R and mixed R in proportions 1-w and w, retaining external H and the existing field coefficients and sigmoid. Zero preserves the original default, one the accepted VR-1 view. The author heard Undergrowth B as clearer, with less muddiness.

Use a finite weight in [0,1]. Invalid values warn and clamp: +infinity becomes 1, -infinity and NaN become 0. Positive weight with leave_self_out(false) has no effect and warns once per Population. Lock, rearticulate_above, final pitch bounds and onset eligibility decide the action; holds, Glide, GateSnap and proposals waiting for independent participation retain their previous views. Shared harmonic opportunities use the same rule. Environment recovery still excludes both H and R; shared observations, Flora and release are unchanged. This uses sound just before On, not a prediction of the future release or body.

Observers are reserved from birth for populations that use either consumer, including a later leave_self_out(true) patch. Before birth their state is the mixed stream’s state. Voice identity and generation bind the observation to its consumer. At the analysis-worker boundary, gaps reset the mixed and per-Voice histories; valid observations resume after the common analysis window fills if further PCM arrives. The field runtime currently ends the run when disconnected or invalidated observations leave no usable frame within its fixed one-hop lag limit. It does not keep generating warmup hops for automatic recovery.

Environment viability reads the current pitch even without pitch movement. The ordinary mixed-field level used for basal drain and telemetry is unchanged.

Energy, death, and replacement

The ecological lifecycle belongs to brain("entrain"). Its energy is normalized to 0..1:

  1. endurance(seconds) establishes the nominal zero-fit lifetime.
  2. Each attack spends attack_cost_fraction.
  3. A consonant attack can restore up to attack_recharge_fraction.
  4. recovery(seconds) enables continuous recovery; the viability window determines how much of that recovery is available at the current pitch.
  5. At zero energy the voice dies and enters its release tail.
  6. If a respawn policy exists, the Population may create a replacement.
let settlement = consonance(70.0, 1100.0).spacing(0.8);

let ecology = harmonic()
    .brain("entrain")
    .entrained()
    .cycles(2)
    .seek_consonance()
    .endurance(8.0)
    .recovery(4.0)
    .attack_cost_fraction(0.017)
    .attack_recharge_fraction(0.70)
    .consonance_viability(0.32, 0.82)
    .respawn_consonance()
    .respawn_capacity(8)
    .respawn_settle(settlement);

place(ecology, consonance(70.0, 1100.0).count(8));
wait(20.0);

Respawn policies answer different compositional questions:

  • respawn_random() creates no parent lineage. Candidates come from the Population’s original Placement and are weighted by the current scene score; it is not uniform random placement.
  • respawn_hereditary(sigma_oct) selects a living parent by energy, proposes offspring near it, and keeps the candidate with the best current Field level.
  • respawn_consonance() selects an energy-weighted living parent and chooses among high field-score peaks with a bias around that parent.
  • respawn_capacity(n) bounds how many living members the Population maintains; without it, the founder count is the capacity, and an explicit value cannot be lower than that founder count.
  • respawn_settle(placement) adds candidates from that Placement; the respawn policy’s own baseline still contributes one candidate.

Respawn preserves the Population and its population_id while individual voice_id and generation values change. The report stream makes that turnover observable.

Runtime feedback and human revision

Two different processes are involved:

  • Runtime feedback is automatic: sound reshapes the terrain, which changes voice behavior and survival.
  • Human revision happens between runs: run, listen, inspect a report, revise the scenario, and run again.

The practical run-and-revise procedure is described in Performance.

Consonance Field — A Terrain for Evaluating Pitch

Conchordal’s perception core (the Landscape) listens to the habitat bus, transforms it into log-frequency space, and computes two potentials: roughness (sensory dissonance from amplitude fluctuations within critical bands) and harmonicity (periodicity and template matching). Their combination is the Consonance Field: an evaluation terrain over frequency that placement, movement, prediction, and survival all read from.

Because the field is computed from the habitat bus, every voice routed to that bus deforms the terrain for every other voice. A presentation-only voice does not. That feedback loop — not a chord chart — is where harmony comes from. See Voice and Landscape — Sound–Environment Feedback for the relationship between potential, score, level, mass, and density.

Placing into the field: consonance, dissonance, edge, gap

A field-relative placement names a target — a region of the field — and is realized either as a cloud (the default) or as a deterministic extremum with .peak(). The targets are:

  • consonance — high-consonance positions (harmonic centers, fusion).
  • dissonance — low-consonance positions (tension, clusters, color).
  • edge — the consonance/dissonance boundary (the metastable middle).
  • gap — empty registers (fill the room, avoid masking).

consonance(root) takes a harmonic window around a root (multiples via range()); every target also takes an absolute (min_hz, max_hz) range.

Range bounds must be finite and within the synthesizer’s 1–20000 Hz range; reversed bounds are accepted. Initial placement stays inside those bounds, including jitter and all-zero or fully occupied fallbacks. Field targets use the intersection with the autonomous Voice pitch range, approximately 29.989–8000 Hz. This continuous range is independent of the wider auditory grid, provisionally approximately 20.015 Hz–12.5 kHz at 32/44.1/48 kHz; lower sample rates reduce its upper edge to keep the filterbank below Nyquist. Flora uses the full auditory grid. If a Voice placement has no intersection with its pitch range, it falls back to log-uniform sampling in the requested range. random() samples that requested range directly; at() and line() retain explicitly specified pitches. Placement does not constrain subsequent seek_consonance() movement to the placement range: autonomous candidates and targets use the separate Voice limits. Hereditary respawn retains its original requested range; it does not impose an additional 8000 Hz clamp on an explicitly specified parent.

let anchor = harmonic()
    .brain("drone")
    .amp(0.06)
    .sustain()
    .anchor();

let voice = harmonic()
    .amp(0.04)
    .sustain();

section("field placement", || {
    place(anchor, at(110.0));
    wait(1.0);

    place(voice, consonance(110.0).peak().range(1.0, 4.0).count(6).spacing(0.9));
    wait(6.0);
});

A target with no modifier is a density cloud: not “random but harmonic” but a normalized distribution derived from the consonance model, well-defined inside the range. Placement is independent of behavior — enter at dissonance and anchor() for a held cluster, or enter at dissonance and seek_consonance() for a resolution gesture.

let cloud = harmonic().amp(0.035).sustain();

place(cloud, consonance(90.0, 1200.0).count(10).spacing(0.8));
wait(8.0);

Placement tension: tension(τ)

Without tension, Consonance Placement uses its ordinary realization: .peak() chooses the strongest peak, while the default density produces the ordinary Consonance cloud. tension(τ) biases that Placement toward a field-score step below the maximum. τ ∈ [0, 1] is the tension degree; 0 leaves the ordinary realization unchanged, while larger values target progressively weaker, metastable steps (target = L_max − τ·(L_max − L_min) over the range, in field score). It is the placement twin of movement’s search temperature — the dial for how resolved a spawn should sit — and it reads the field’s score directly, so the degree rides the terrain’s own scale rather than the count of peaks that happen to be sounding. With .peak() it snaps to the nearest step; as a cloud it concentrates the distribution around the target.

let tense = harmonic().amp(0.035).sustain();

// A metastable step below the strongest peak — placed, not resolved.
place(tense, consonance(110.0, 1200.0).peak().tension(0.4).count(6).spacing(0.8));
wait(6.0);

The field-agnostic placements are random(min_hz, max_hz) (log-uniform) and the geometric at(hz) and line(start_hz, end_hz).

Naming frequencies: ratios of a root

at(hz) and line(start_hz, end_hz) take absolute frequencies, and the canonical idiom for filling them in is to name one sounding root in Hz and derive every other pitch as a ratio of it: root_hz * 1.5 for a fifth, root_hz * 4.0/3.0 for a fourth, root_hz * 2.0 for a register lift. A ratio is the physical quantity the field itself reads, so writing intervals this way keeps the thinking in frequency relationships.

Writing an equal-tempered decimal instead — 146.83 for a D3 — still runs, but it re-imports the twelve-tone symbol grid through the back door: the number stands in for a note name rather than describing a relationship to a sounding partial. Prefer ratios of a root that is actually sounding in the scene.

let root_hz = 110.0;
let voice = harmonic().amp(0.04).sustain();

place(voice, at(root_hz * 1.5));
wait(2.0);

Consonance Movement: seek_consonance

Use seek_consonance() when voices should actively seek better field positions. It sets free hill-climb movement with glide defaults. Use glide(tau_sec) when the musical thought is “same movement idea, slower or faster pitch motion”.

let mover = harmonic()
    .amp(0.045)
    .sustain()
    .seek_consonance()
    .glide(0.35)
    .avoid_neighbors(0.6)
    .global_peaks(8, 70.0)
    .ratio_candidates(5);

place(mover, consonance(80.0, 900.0).count(8));
wait(12.0);

avoid_neighbors(strength) adds crowding repulsion so movers spread out instead of collapsing onto the same peak.

The opposite of movement is anchor(): an anchored voice holds its pitch and only deforms the terrain for others. freq() sets an anchored pitch; use anchor() to freeze strategy-placed voices at their settled position.

at(hz) holds a fixed pitch unless the final PopulationSpec explicitly requests seek_consonance() and remains free. For that moving Voice, it sets only the initial position, just as line(hz, hz) does, and keeps the placement count. For example, place(mover, at(220.0)) starts the mover defined above at 220 Hz without cancelling its movement or glide settings. It specifies initial body pitch, not a guaranteed first audible pitch or a promise of movement.

Builder order matters when changing the pitch policy:

Final builder orderMeaning of at(hz)
seek_consonance() then freq()Fixed pitch
freq() then seek_consonance()Initial position
seek_consonance() then anchor()Fixed pitch
anchor() then seek_consonance()Initial position

Without explicit movement, at() still fixes pitch. A live Population’s freq() still locks pitch during performance.

How movement lands is resolved from phonation: sustained movers glide, re-attacking movers (pulse(), metric(), entrained(), steady(), flow()) snap to their new pitch at each onset. pitch_apply_mode("gate_snap") and pitch_apply_mode("glide") override that choice.

For sustained movers without a participation clock, pitch_apply_mode("rearticulate") gives each newly adopted pitch target a fresh attack. The old Tone releases while the new Tone starts directly at the adopted pitch, at the sample when movement begins. Rejected proposals, unchanged targets and intermediate glide updates do not create notes. The proposal interval controls opportunities to choose a target, not a fixed note clock; rearticulation does not wait for a beat.

let moving = harmonic().sustain().seek_consonance()
    .pitch_apply_mode("rearticulate");
let voices = place(moving, line(220.0, 440.0).count(3));
wait(12.0);
voices.pitch_apply_mode("glide");
wait(12.0);

A live switch between glide and rearticulate preserves the sounding Tone and does not trigger a note by itself. Unrendered rearticulation requests are cancelled by that switch; the new mode handles subsequent adoptions. The mode also belongs to the Population template used for replacements. glide(tau) sets the sliding time constant in glide mode and below a rearticulation boundary. Anchored Voices are unaffected by rearticulate.

Rearticulate requires free pitch and Hold phonation. Combining free-pitch Gated phonation with it is a script error, checked on the final placement spec regardless of builder order; an incompatible live call also fails before any state is changed. Use sustain(), or choose gate_snap or glide with Gated phonation. Hold without participation does not offer a separate same-pitch attack request. Sustained participation can re-attack its current body pitch at a sounded opportunity; autonomous per-note selection is not provided.

Choosing how pitch changes become notes

These choices distinguish target adoption from a participation opportunity. The boundary is a composer parameter of the founder Voice’s articulation, not a universal auditory threshold. Values such as 50 or 100 cents are examples; the composer chooses them.

IntentionExplicit formWhen an attack occurs
Legatosustain().pitch_apply_mode("glide")Initial onset; subsequent pitch movement slides
Every adopted targetsustain().pitch_apply_mode("rearticulate")Each adoption, with the boundary omitted or zero
Small moves slidesustain().pitch_apply_mode("rearticulate").rearticulate_above(50)Adoption strictly above 50 cents from the last sounded onset
Sustained participation with slidingsustain().entrained().pitch_apply_mode("glide")A sounded opportunity at its current body pitch; other movement slides
Sustained participation with jumpssustain().flow().pitch_apply_mode("gate_snap")A sounded opportunity consumes the latest pending target
Sustained participation with a movement boundarysustain().entrained().pitch_apply_mode("rearticulate").rearticulate_above(50)Small adoptions slide; large ones wait for a sounded opportunity

Entrained, steady and flow can each be used in any participation row. Steady keeps only due-time opportunities, including with Glide. See Rhythm for their clocks.

intrinsic_rate(hz) sets the body’s initial scale in any participation row, independently of the pitch-application choice. It does not command an onset interval or place a shared beat. proposal_interval(seconds) still controls pitch proposals, not that bodily scale. See Setting the body’s intrinsic rate.

Without participation, a positive rearticulate_above(cents) measures net displacement from the last actual onset, not accumulated path length. At or below the boundary, the existing Tone glides with glide(tau); above it, a new Tone attacks. That choice lasts until the next adoption. Exact Log2Space bin centers use their bin-distance in cents; off-grid endpoints use the continuous log2 distance, without rounding the target or adding an epsilon. Earlier legal attacks in the same output hop provide the reference, and cancelled requests never replace the last materialized onset.

Without participation, the boundary defaults to zero, retaining every-adoption rearticulation. Negative and nonfinite values become zero; no upper limit is imposed. Changing the boundary live causes no attack and applies at the next adoption. A call outside Rearticulate warns and is ignored. Builder order is independent at placement. Replacement Voices inherit the boundary, with no inherited onset-pitch memory.

let moving = harmonic().sustain().seek_consonance()
    .pitch_apply_mode("rearticulate").rearticulate_above(50).glide(0.03);
let voices = place(moving, consonance(220.0, 660.0).count(2));
wait(3.0);
voices.rearticulate_above(100);
wait(3.0);
release(voices);

With a participation clock, Rearticulate applies the same distance measure to each adoption but uses the clock for attacks. At or below a positive boundary, movement starts gliding immediately without an attack and cancels any older pending target. Above it, an active glide stops, body pitch is held, and the latest target waits for a sounded opportunity. That opportunity consumes the target and attacks there; with tie omitted or zero, it re-attacks the current body pitch without a target, which may have changed during a glide. Waiting and skipping retain sound and pending state while existing glides continue. Both kinds of attack update the last actual onset reference. Same-sample adoption precedes the opportunity. No adoption-time candidate is added, and the boundary does not filter clock attacks. Zero or omission uses the GateSnap behavior, including zero-distance adoptions. See Rhythm for mode switching.

The positive-boundary sustained-participation form also accepts initial-only articulation_persistence(p) to retain Base/Connect across existing events. This changes policy inertia, not the movement boundary or a prescribed legato proportion. See Retaining an articulation policy.

For gate_snap/rearticulate participation, tie(p) can extend a living Tone without a pending target instead of re-attacking. It leaves pending-target attacks intact, including small GateSnap moves. See Extending opportunities.

Sustained synchronization uses the same pending-target rules with a different omission default: free-pitch GateSnap/Rearticulate extends pending-free beats like tie(1). Write tie(0) to attack every legal beat. Fixed pitch and Glide remain unchanged; entrained/steady/flow participation keeps omitted tie at zero. See Sustained synchronization.

Cutting notes and leaving a rest

For sustained participation, rest() adds a finite end to every sounded note and an intentional pause after its sound has finished. Supply the note length with cycles(n) or adaptive_duration(). This length, explicit sustain(), entrained(), steady() or flow(), and rest() are retained independently of builder order. Placement requires an explicit finite length.

The scheduled Off starts the normal release, leaving tails intact. The rest begins only after the renderer confirms that every Tone of that Voice’s source ID and generation has finished. rest() then prohibits new notes for one intrinsic bodily period; rest(periods) uses the composer’s chosen multiple of the period at that completion. A known period with rest(0) waits for the tails only. An unknown period keeps waiting, as does unfinished sound, without a fallback or timeout. Negative and nonfinite arguments become zero; finite nonnegative values have no upper limit.

intrinsic_rate(hz) changes this bodily period and the finite note-length grid together. At different bodily rates, the same note-length and rest(periods) settings produce different lengths in seconds, independently of entrained cadence adaptation.

At the end of the rest, the existing participation decision can sound, wait or skip; the end itself does not force an attack. GateSnap retains the latest adopted target through sounding, release and rest, and consumes it at the next sounded opportunity. Rearticulate applies its small-adoption cancellation and large-target deferral during release and rest too. Its last actual onset remains the reference until the next sounded opportunity. Sliding changes body pitch after Off but never retunes released tails. Glide leaves released tails at their released pitch. Release, death and removal take precedence. Replacements inherit controls, with fresh performance state.

let notes = harmonic().sustain().entrained()
    .adaptive_duration().rest(2);
let voices = place(notes, at(330.0));
wait(3.0);
release(voices);

The example waits two bodily periods after each tail ends. rest is initial-only, like the note-length controls. It is valid only with explicit sustain plus entrained/steady/flow and a finite note length; Glide, GateSnap and Rearticulate are all available. Incompatible placements fail before state changes. Without rest, the existing rules remain. This form ends every note; choosing to sustain or release each individual note is not implemented by this control.

Mechanism-level controls (pitch_core() and the hill-climb / peak-sampler tuning in the API Reference) remain available for research scripts; prefer seek_consonance() and glide() in curated work.

Consonance Viability and Respawn

Viability makes field fit matter over time. consonance_viability(low, high) defines the consonance window, while recovery(seconds) states how long a full-scale recharge takes: a voice in a well-fitting place is sustained, a voice in a poor place approaches its nominal endurance(seconds).

By default viability uses environment-relative scoring: a voice is evaluated against the field with its own footprint approximately removed. Use viability_scope("total") only when the compositional question is explicitly total-field viability.

Respawn closes the loop into an ecology: when voices die, replacements appear according to a respawn policy. respawn_consonance() selects high field-score peaks with a bias around an energy-weighted living parent; respawn_capacity(count) sets the maximum living membership (defaulting to, and never lower than, the founder count); respawn_settle(placement) adds that Placement to the replacement candidate pool rather than replacing the policy’s baseline candidate.

let settle = consonance(70.0, 1100.0).spacing(0.8);

let ecology = harmonic()
    .amp(0.04)
    .repeat()
    .pulse(1.5)
    .cycles(3)
    .seek_consonance()
    .glide(0.45)
    .endurance(8.0)
    .recovery(4.0)
    .attack_cost_fraction(0.017)
    .attack_recharge_fraction(0.70)
    .consonance_viability(0.32, 0.82)
    .respawn_consonance()
    .respawn_capacity(14)
    .respawn_settle(settle);

place(ecology, consonance(70.0, 1100.0).count(14));
wait(30.0);

The full lifecycle surface (time-domain endurance/recovery and normalized per-attack fractions) and the respawn policies are documented in the API Reference. Population — A Persistent Unit of Voices separates articulation, phonation, pitch behavior, and survival; the Voice and Landscape — Sound–Environment Feedback follows the complete energy and respawn cycle.

Landscape-aware timbre

The field can shape timbre as well as pitch. The modal() body takes a mode pattern. landscape_density_modes() deterministically chooses the strongest separated density-mass positions; landscape_peaks_modes() chooses the strongest separated local Field-level peaks. Thus a bell’s partials can sit where the terrain already supports them.

let shimmer_modes = landscape_density_modes()
    .count(10)
    .range(1.0, 5.5)
    .gamma(1.6)
    .spacing(0.7);

let shimmer = modal()
    .amp(0.025)
    .sustain()
    .seek_consonance()
    .modes(shimmer_modes)
    .brightness(0.7);

place(shimmer, consonance(200.0, 1600.0).count(4));
wait(8.0);

Mode constructors include harmonic_modes(), odd_modes(), power_modes(beta), stiff_string_modes(stiffness), custom_modes([ratios]), modal_table(name), landscape_density_modes(), and landscape_peaks_modes() — see the API Reference.

Remembering periodicity heard in the scene

remember_pitch_set(weight) is an experimental, scene-wide author rule. Declare it before scene actions or scopes. Omission and remember_pitch_set(0) retain the existing behavior. A positive finite weight uses actual habitat PCM, including the Voice itself, to accumulate a distribution of heard periodicity. The IPEM observation is a Candidate; interpolation, cumulative averaging, peak proposals and score addition are author rules. This is not an established model of long-term human pitch learning.

Free seek_consonance() Voices can propose the strongest and nearest interior peaks within their legal range. The same memory also contributes to each candidate and the current target’s score. Existing proposal clocks, articulation, habituation and self-exclusion of the current field remain in force. Flora feeds the acoustic input but does not consult this memory when choosing lanes.

The supported input rate is 48 kHz, with memory queries at approximately 15.84–1378.13 Hz. Existing proposals outside that range remain available without a memory contribution. No note names, tuning grid, pitch-class folding, scale size, root progression or forgetting control is supplied. Peaks can represent subharmonics or move when observations are averaged; they are not a list of performed fundamentals. Gaps retain past experience and restart observation, while TC keeps its existing invalidation rule. Longer sessions adapt more slowly. The control is absent from both listener profiles; choosing a positive weight does not imply musical improvement or author adoption.

Rhythm: Evidence and Participation

A beat is a recurrent temporal reference inferred from sound. Sharing that reference does not require every Voice to attack at the same phase.

Timing relationships

A preset defines the relationship its timing policy keeps. An opportunity is distinct from an attack: lifecycle, phonation gates, finite duration, rest and articulation can prevent an onset or extend a living Tone.

PresetKeepsMay changeDoes not guaranteeMeaning of entrainment(x)
entrained()The intrinsic bodily rate, fixed during a Voice’s lifetimeThe participation period follows supported recurrence weighted by proximity to the bodily scale. Costs select a time near due, a wait up to one participation period, or a skipEqual onset intervals, permanently different onset rates between Voices, or alignment with a shared beat phaseInfluence of acoustic context on period adaptation and timing costs; omitted value 0.5
flow()The intrinsic scale of bounded, irregular renewal draws; no period adaptation to heard recurrenceRenewal intervals vary; acoustic costs can select a different time, wait, or skipA regular onset sequence, a beat, or an exact mean interval equal to the intrinsic periodInfluence of acoustic context on timing costs, not renewal-scale adaptation; omitted value 0.05
steady()The intrinsic period and later private due-time grid, with sample roundingContext selects sound or skip at due; execution constraints can remove onsetsAn attack count, a pitch outcome, or following another Voice’s timeInfluence of acoustic context on sound-or-skip costs; omitted value 0.5. It does not move due or adapt the period
metric()Attraction to the acoustically confirmed production beat, with the configured beat-phase offset; independent initial phase before confirmationEffective rate and phase follow the beat and its confidence. Before confirmation the clock free-runs; execution and articulation can withhold attacksThat a beat will be confirmed, exact phase coincidence, or independent noninteger tempo relationsConfidence-weighted attraction of rate and phase to the beat; omitted value 0.95

entrained(), steady() and flow() use local acoustic participation, while metric() uses beat synchronization. Setting entrainment(0) removes these acoustic timing influences; flow still draws irregular renewal intervals. The production meter has one beat reference and integer-ratio subdivision and measure layers; it does not implement a network of independent noninteger tempi.

Entrained period updates preserve the remaining fraction of a future, uncommitted cycle. New acoustic context does not move a committed onset time.

For entrained and flow timing, a causal observer reads past habitat audio. Each Voice also retains the sound it rendered, so the energy attributed to itself can be excluded from a predicted competitor. The Voice compares sounding near its due time, waiting up to a participation cycle, and omitting the current event. Overlap is integrated across an estimate of the planned hold and ADSR release. Successive voluntary omissions become more costly; an emitted onset resets that count. Only an emitted onset creates a pending context-memory update, which is applied when its matching actual audio is available. Waiting, skipping and an unexecuted plan do not count as an onset. Hold lengths remain tied to the intrinsic period, so cadence adaptation does not stretch each sound. The overlap preview uses the same hold duration. The three-band energy proxy is an engineering approximation, not a model of auditory masking or consonant fusion.

Continuous audio recurrence

The top-level TOML key temporal_meter_t2 = true lets the production meter infer recurrence from continuous habitat audio. Place it before any TOML section. The default false uses emitted onset events. This setting is independent of [temporal_t2], which controls group accents and arrival prediction.

Continuous audio proposes recurring intervals; subsequent sound supports or weakens them. Habitat spectral changes and actual onsets supply phase and intensity. Confidence starts at zero and expresses evidence for recurrence, not a probability that beat phase is correct. Missing audio contributes no evidence. metric() follows the resulting confidence-weighted beat. The ListenerTwin continues to estimate its own beat from presentation events. Offline rendering uses deterministic observation cutoffs; playback uses the observations available at each update.

Keeping private opportunities: steady()

Missed or illegal steady opportunities advance by whole intrinsic periods rather than shifting the grid. The initial sustained Hold onset remains immediate, before that grid’s later opportunities. At due time, the Voice compares sounding against skipping without moving the opportunity.

let voices = place(harmonic().steady().sustain().intrinsic_rate(2.0)
    .seek_consonance().pitch_apply_mode("gate_snap"), line(220.0, 330.0).count(2));
wait(6.0);
release(voices);

The last timing preset wins, so flow().steady() selects steady and steady().flow() selects flow; duration still follows its separate rules. Timing presets are initial-only. Either order with explicit sustain() keeps a Tone through skipped opportunities. Glide, GateSnap, Rearticulate, its movement boundary, tie (omitted zero), articulation_persistence and finite duration with rest retain their composition and priority. Even Glide adds no adoption-time candidate in this preset. Live pitch-mode changes retain the Tone without adding an onset. Replacements inherit the template’s policy and rate, with fresh phase, due, plan and performance state.

Director-level terrain

The director shapes the rhythmic terrain, symmetric to the consonance-field operations. These operations shape the production meter used by metric timing. They do not set the bodily rate or recurrence candidates of entrained/steady/flow participants:

  • meter_stability(value) — attractor depth in [0,1], default 0 (neutral): how readily a pulse forms and how strongly its reading favors a preferred tempo. The tempo-preference weight equals this depth. The preferred center is the center of temporal_basin, or 2 Hz in the default band. It only deepens the basin for a real periodicity; it never fabricates a beat from non-metric input. This is a composer-set cultural prior of the modeled listener.
  • temporal_basin(min_hz, max_hz) — a continuous tempo region for the emergent beat (the time-axis analogue of consonance(min, max)). It seeds the beat at the center and confines adaptation to the band. At stability 0, it adds no center preference or restoring pull. Higher stability strengthens both the preferred reading and confidence-weighted center restoring. It shapes the terrain; it does not place a beat, and it never forces a measure. The same sanitized band center also sets the intrinsic starting rate of metric() Voices, independently of stability. Without a basin, that rate remains 2 Hz.

The basin is one initial condition for the whole scene. The final declaration in the script applies to every metric Population and every Flora, through place(). Every Flora follows fresh confirmed acoustic beats and uses the basin center during unknown, stale or unconfirmed observations. Flora has no metric() switch.

A body’s initial tempo is distinct from a beat confirmed by the listener. Metric Voices start with independent phases. Until sound corroborates a beat, confidence and shared-beat attraction remain zero. After confirmation, the coupling follows the heard beat. Respawn starts from the Population’s resolved template; it does not inherit the parent’s current clock rate. Entrained/steady/flow bodily priors and explicit pulse(rate_hz) are unaffected.

From a cold start, a regular 4 Hz input in the default band is read as a 4 Hz beat at stability 0, and as duple subdivision of a 2 Hz beat at stability 1. Depth also retains its effects on forcing and evidence presence; it is not an independent control of tempo weighting. Confidence remains zero until the first interval hypothesis is corroborated. Chance corroboration in irregular input can still produce temporary rises afterward.

Per-voice presets and modifiers

The Tier-1 presets take no rate argument: metric(), entrained(), steady(), and flow(). Configure them on a PopulationSpec before calling place(). Their timing relationships and coupling defaults are listed above; intrinsic_rate(hz) sets the bodily scale of participating presets.

Do not confuse .entrained() with brain("entrain"). The preset controls onset timing; the brain selects the voice’s articulation life and metabolism. They are independent and may be used together. See Population — A Persistent Unit of Voices.

Per-voice modifiers refine these intentions:

  • entrainment(strength) — influence in [0,1], with the per-preset meanings and omission values in the table. Within a selected preset, it changes that influence rather than selecting another preset.
  • rhythm_role("beat"|"subdivision"|"accent"|"texture") — the voice’s metrical job. accent emits a stronger onset that drives the shared meter harder, so a recurring downbeat can seed an emergent measure.
  • microtiming(amount) — a signed metric beat-phase offset in [-0.5, 0.5]. A value of 0.5 targets the half-beat. It does not assign fixed positions to entrained/steady/flow participants.
  • measure_accent(amount) — weak onset emphasis following the detected measure, in [0,1] (default 0). The onset strength multiplier is 1 + 0.35 * amount * confidence * cos(phase). The phase origin follows observed accents, and no detected measure means no emphasis. It changes strength, not onset scheduling, and works independently of rhythm_role.
meter_stability(0.85);     // attractor depth: how readily a pulse forms
temporal_basin(1.8, 2.2);   // tempo region the emergent beat gravitates toward

let beat = harmonic()
    .metric()
    .rhythm_role("accent")  // a strong onset that drives the shared beat
    .cycles(2);

let entrained = harmonic()
    .entrained()
    .cycles(2);

let drift = harmonic()
    .flow()
    .cycles(1);

let offbeat = harmonic()
    .metric()
    .microtiming(0.5)       // a half-beat offset reads as syncopation
    .cycles(2);

place(beat, at(110.0));
place(entrained, consonance(110.0).peak().count(3));
place(drift, consonance(300.0, 1200.0).count(4));
place(offbeat, at(220.0));
wait(12.0);

Except for explicit sustain plus participation described below, calls on the same axis are last-write-wins: the last timing mode and the last duration mode determine the final behavior. cycles(n) counts the intrinsic bodily period for entrained/steady/flow and the effective beat period for metric timing; flow retains its threefold hold multiplier. Modifiers are remembered and applied when their matching preset is selected, so entrainment(0.8).metric() and metric().entrainment(0.8) are equivalent.

Setting the body’s intrinsic rate

intrinsic_rate(hz) sets the founder Voices’ bodily scale for entrained(), steady() or flow(). Its period is 1/hz. This is a body initial condition, not an onset-interval command or a common beat. Entrained timing adapts its participation period to heard recurrence without changing the intrinsic value. Steady keeps fixed opportunities; flow uses that value for irregular renewal. All can omit events, and entrained/flow can wait; different intrinsic rates do not guarantee permanently different onset rates.

Set it on a PopulationSpec before place(). Either order with the participation preset has the same meaning. It cannot be changed during performance. Replacements read the Population template, with fresh initial due and performance state rather than a parent’s adapted period, plan or articulation policy.

The same bodily period sets finite note lengths (cycles(n), adaptive_duration()), rest(periods) and the representative hold used for overlap prediction. Changing the rate therefore changes note lengths and rests in seconds together. Flow keeps its threefold hold multiplier; ADSR release remains in seconds. Explicit sustained notes without a finite duration stay alive until release.

let slow = harmonic().sustain().entrained().intrinsic_rate(0.5)
    .seek_consonance().pitch_apply_mode("gate_snap");
let quick = harmonic().intrinsic_rate(2.0).sustain().flow()
    .seek_consonance().pitch_apply_mode("gate_snap");
let a = place(slow, at(220.0));
let b = place(quick, at(330.0));
wait(6.0);
release(a);
release(b);

These rates are example inputs, not recommended values. A final entrained/steady/flow specification accepts finite values in 0.01..=200 Hz. Values outside that range or nonfinite values are script errors before placement. The range protects execution; it is not a musically recommended range. Flow’s renewal interval has separate limits of 0.035..=4 seconds, so extreme rates do not imply proportionally scaled intervals. Other final timing forms, including metric, pulse, repeat and once, warn and ignore this modifier even if its value is invalid. Omission uses 2 Hz; metric uses the scene’s basin.

rhythm_freq(hz) sets the Entrain articulation core oscillator and does not set this participation scale. proposal_interval(seconds) controls pitch proposals; it does not command an onset or change the body’s intrinsic rate.

Sustained sound with participation opportunities

Explicit sustain() plus entrained(), steady() or flow() keeps a Tone sounding while its Voice continues to consider participation opportunities. Either builder order has the same meaning: sustain().entrained() and entrained().sustain() are equivalent. At an opportunity, choosing to sound releases the old Tone and attacks a new Tone at the body’s pitch at that sample. Waiting or omitting an opportunity retains the ongoing Tone, so omission does not create a gap. An pitch can be re-attacked.

let p = place(
    harmonic().sustain().entrained().seek_consonance().glide(0.03),
    consonance(220.0, 660.0).count(1)
);
wait(3.0);
release(p);

With the default "glide" mode, a newly adopted pitch target also offers its sample as a candidate for an undecided, legal participation opportunity. The timing, acoustic-context and overlap costs choose among this candidate and the candidates; ties retain the candidate, and a committed plan is not moved. If the adoption is not selected for an attack, movement glides. An adoption and clock onset at the same sample produce one attack. A clock onset during a glide uses the current body pitch; it does not jump ahead to the unfinished target. Release, death and removal cancel pending requests. Emitted attacks enter the usual energy and acoustic paths once.

This uses an estimate of the note’s finite footprint for participation prediction; it does not compare an exact rendering of continuing against release plus a new attack. It does not add a phrase-boundary detector or a pitch-interval threshold.

For this combination the omitted pitch application mode resolves to "glide". Explicit "gate_snap" with free pitch instead holds one adopted target until the Voice chooses to sound at a participation opportunity. The old Tone then releases and a new Tone attacks at that target. A later adoption replaces the pending target. Waiting and omission retain the sounding pitch and the pending target; movement does not glide. With tie omitted or zero, an opportunity without a pending target re-attacks the same pitch. GateSnap offers no extra candidate at the adoption sample and uses the participation costs and skip rule. At the same sample, adoption precedes the opportunity; a future adoption cannot affect an earlier onset. Release, death and removal cancel the pending target.

let p = place(
    harmonic().sustain().flow().seek_consonance().pitch_apply_mode("gate_snap"),
    consonance(220.0, 660.0).count(1)
);
wait(3.0);
p.pitch_apply_mode("glide");
wait(3.0);
release(p);

Live Glide ↔ GateSnap ↔ Rearticulate switching keeps the sounding Tone and emits no extra attack. It cancels unrendered requests and the pending attack target. On returning to Glide, movement follows the controller’s retained target at the next control update. GateSnap and Rearticulate wait for subsequent adoptions. Calling the same mode again keeps its pending state. Replacement Voices inherit the mode, starting with no pending performance state. Timing presets remain initial-only.

With pitch_apply_mode("rearticulate"), rearticulate_above(cents) combines sliding and deferred jumps. A small adoption cancels old pending pitch and starts gliding; a large one stops sliding and defers the target to the next sounded opportunity. With tie omitted or zero, an opportunity without a target attacks at current body pitch. Waiting and skipping do not stop glides. The boundary uses the last actual onset pitch, updated by every attack, and does not suppress clock attacks. Zero or omission matches GateSnap. Unlike Hold without participation, Rearticulate here attacks at a sounded opportunity rather than at adoption. Boundary changes preserve the selected behavior until the next adoption. Mode changes clear unrendered requests, pending pitch and the selected glide without changing the Tone or the controller’s target. Builder order does not change this form; replacements inherit controls, not pending pitch, selected glide or last-onset memory.

Use explicit sustain() together with a participation preset to select this form. With pulse() or repeat(), sustain() still uses the last-write-wins rule. Explicit sustain() plus metric() selects sustained synchronization as described below. Without rest(), a later finite duration via cycles() or adaptive_duration() replaces the sustained form. With rest(), finite note length and sustained participation are retained independently, and each note releases before a pause measured from actual tail completion. See Cutting notes and leaving a rest.

rest_on_habituation(w) adds spans of playing and pauses to explicit sustain().entrained(), sustain().steady() and sustain().flow() (either builder order). The initial-only weight is finite and nonnegative, default 0. Values above 1 increase the exit rate proportionally without changing its law. Repeated attacks heard in habitat audio near the current pitch increase the chance of leaving a span. The next legal opportunity releases the Tone. After every tail has ended, a private state driven by this Voice’s actual attacks governs return. Return only permits a legal onset; tie, shape and other vetoes still apply. Clocks and pitch proposals continue during the pause, and a pending pitch is consumed only by an actual onset. This author rule does not model perceived phrases or cadences.

Unlike rest(periods), the pause has no fixed period count. With both methods, the fixed rest runs first while the span/gap integrals pause. The private attack state continues recovering. The shared habituation config supplies enabled, satiation and recovery times; disabling habituation prevents span exits. Invalid weights and unsupported timing modes warn and act as zero. Reborn Voices inherit the weight and start with fresh private state.

Retaining an articulation policy

Within free-pitch sustained participation, articulation_persistence(p) lets a Voice keep a private articulation policy across several pitch adoptions and participation opportunities. It requires sustain() plus metric(), entrained(), steady() or flow(), pitch_apply_mode("rearticulate"), and a positive rearticulate_above(cents). The value is set before placement; it is not a live Population method.

let p = place(
    harmonic().sustain().entrained().seek_consonance()
        .pitch_apply_mode("rearticulate").rearticulate_above(50)
        .articulation_persistence(0.75),
    consonance(220.0, 660.0).count(1)
);
wait(3.0);
release(p);

The boundary and persistence in this example are comparison inputs, not recommended values. The private policy starts in Base, using the boundary and participation rules. Connect slides adopted targets of either size while a Tone lives, and intentionally withholds opportunities that the participation policy selected to sound. It extends the current Tone rather than recording a cost skip. It creates no new Tone, onset recharge, or onset-derived context learning.

Small adoptions and cost skips propose Connect; large adoptions and newly selected sounded opportunities propose Base. For 0 < p < 1, a proposal against the current policy keeps it with probability p and changes it with probability 1-p. Matching proposals and waiting hops do not draw again. A future planned opportunity keeps its decision until execution. Entering Connect cancels pending pitch; the last actual onset remains the reference, and cancelled adoptions never replay.

Persistence is policy inertia, not a legato proportion. It acts on Base as well as Connect. Raising p need not increase Connect time or decrease the number of attacks monotonically. Duration follows events, not a fixed number of seconds or beats. These retained intervals are not tied to audible cadence, contour, or rests, and do not infer phrase boundaries.

The default 0 and endpoint 1 both use the path without a private policy or extra random draws; at 1, birth in Base never changes. Finite inputs clamp to [0,1]; positive infinity becomes 1, negative infinity and NaN become 0. An unsupported final Voice specification warns and ignores the modifier, regardless of builder order. Replacements inherit the template value and start in Base with fresh random and performance state. A live mode change resets Base; repeating the same mode or changing only the boundary retains the policy. While the boundary is zero, the private path is suspended.

Finite Off, rest(), tail completion, gaps, release, death and removal take priority. When no Tone lives, Connect allows the next legal onset, including the initial onset and return from a rest. The policy survives individual notes and rests; it does not decide whether each note should sustain or release.

Extending opportunities without a new pitch destination

tie(p) sets the probability of extending a living Tone instead of re-attacking at a selected participation opportunity without a pending target. It is an initial composer parameter for free-pitch sustain() with metric(), entrained(), steady() or flow() and explicit gate_snap or rearticulate, including a zero boundary. Omitted tie resolves to 1 for sustained synchronization and to 0 for sustained entrained/steady/flow participation, where the Voice can skip opportunities by cost. Explicit tie(0) keeps pending-free attacks, tie(1) always extends eligible Tones, and intermediate values mix the two per opportunity. Fixed pitch and Glide remain outside tie and re-attack each metric crossing. These choices do not claim a musical optimum.

A pending target still jumps and attacks. Small adoptions below a positive boundary already glide without pending pitch, so those gliding Tones can extend too: the condition is not exact pitch equality. GateSnap makes small and even zero-distance adoptions pending, so they still attack. Tie reduces attacks to a thinned sequence of opportunities; it neither moves the opportunities nor changes pitch proposals, costs or skip. It is not an overall legato amount, a phrase switch, or a response to heard phrase boundaries.

let voices = place(harmonic().sustain().entrained()
    .pitch_apply_mode("rearticulate").rearticulate_above(50).tie(0.5),
    line(220.0, 330.0).count(2));
wait(3.0);
release(voices);

The boundary and intermediate probability in this example illustrate composition, not recommended settings. Extension creates no new Tone, onset metabolism or onset-context learning; the opportunity is consumed, without cost-skip learning or later replay. With articulation_persistence, Connect withholds first without sampling tie. In Base, pending targets attack; only pending-free opportunities sample tie. Tie does not change Base/Connect proposals or retention. Connect’s sliding of large moves and withholding of attacks is a separate policy.

Initial onsets and legal onsets after finite Off, tail completion and rest() are never blocked when no Tone lives. Release, death, removal and rest legality take priority. The parameter cannot change during performance. Switching to Glide suspends it; returning to an applicable mode resumes it. Builder order is independent at place(); replacements inherit the template value with fresh random and performance state. Finite values clamp to [0,1], positive infinity becomes 1, negative infinity and NaN become 0; unsupported final forms warn and ignore the value. Zero has no tie state or draws, one has no draws, and intermediate values use a separate individual stream at execution only.

Explicit when/duration (Tier 2)

Set timing explicitly with once() or pulse(rate_hz). For finite note lengths, use cycles(n) or adaptive_duration().

Timing as survival

rhythm_freq(hz) sets the Entrain articulation oscillator. rhythm_coupling_vitality(lambda_v, v_floor) scales its influence by vitality. rhythm_reward(rho_t, "attack_phase_match") rewards phase-matched autonomous attacks only with brain("entrain") and continuous Hold phonation. Finite gated notes and sustained coupled opportunities use ordinary consonance recharge; an explicit reward there produces a warning and has no effect.

let living = harmonic().brain("entrain").sustain()
    .endurance(8.0).recovery(4.0)
    .rhythm_freq(2.0)
    .rhythm_coupling_vitality(0.8, 0.4)
    .rhythm_reward(0.4, "attack_phase_match");
place(living, at(165.0));
wait(8.0);

The body’s period sets finite note lengths and rests. Participating timing can adapt its cadence without stretching that period; flow multiplies finite holds by three. rhythm_freq() controls the articulation oscillator independently of intrinsic_rate(), which sets participating Voices’ bodily scale.

Scaffolds (research controls)

The scaffold functions impose an external pulse for comparison assays:

scaffold_off();
scaffold_shared(2.0);
scaffold_scrambled(2.0, 17);

They are useful for demos and assays. They are not the rhythm-composition abstraction: use them only when explicit synchronization is essential to the demo or assay. A dedicated beat carrier is not required for entrained/steady/flow participation.

Sustained synchronization

Explicit sustain() plus metric() keeps a live Tone and uses the coupling clock’s integer crossings as sounding opportunities. Either builder order has the same meaning. The shared beat is confirmed from sound; before confirmation the Voice free-runs with its basin-centered rate and independent phase. This combination does not place a beat from outside.

The first Hold onset is immediate. Later opportunities occur on every crossing. With free-pitch GateSnap/Rearticulate, the default attacks at a beat with a pending adopted destination and extends the living Tone on other beats, just like tie(1). Write tie(0) to re-attack on every legal beat. Fixed pitch and Glide still re-attack current body pitch at each crossing; Glide moves between attacks. GateSnap retains the latest adopted target for the next legal crossing. Rearticulate with boundary zero does the same; a positive boundary cancels pending pitch and glides small adoptions, while larger adoptions remain pending. Same-sample adoption precedes the crossing.

let wire = harmonic().brain("drone").sustain().metric().seek_consonance()
    .pitch_apply_mode("rearticulate");
let voices = place(wire, at(660.0));
wait(4.0);
release(voices);
wait(2.0);

For free-pitch GateSnap/Rearticulate, an explicit tie(p) uses its written probability on pending-free crossings. The omitted probability is resolved before placement and also applies while live mode switching enters the eligible range. Sustained entrained/steady/flow retains omission at zero; its cost policy can skip opportunities. No live tie setter is added. articulation_persistence retains Base/Connect as in participation, but only adoptions and sounding crossings offer proposals: synchronization has no cost skip or planned waiting. rest() combines explicit finite duration with tail completion and a gap; the clock keeps advancing and omitted crossings never replay. Role, measure emphasis and microtiming keep their meanings. Fixed pitch is accepted just as in sustained participation; tie and persistence remain limited to free pitch. Merely setting entrainment or a role does not select this combination.

The same rest_on_habituation(w) span/gap rule also applies to explicit sustain().metric(). It releases at an existing beat crossing and returns only on a legal crossing, with all ordinary vetoes retained.

Dwelling in the current environment

For a free-pitch Voice with seek_consonance(), dwell(w) ties pitch proposal frequency to the environment at its current sounding pitch. A high habituated consonance level slows proposals; a low level speeds them up. This is an author rule, not an implementation of tonal stability, motive formation or phrase closure.

let pluck = modal().sustain().metric().seek_consonance()
    .pitch_apply_mode("rearticulate").rearticulate_above(50)
    .proposal_interval(1.0).dwell(1.0);
place(pluck, consonance(196.0, 784.0).count(3));
wait(12.0);

The proposal phase advances at max{0, 1+w*(1-2*L)} per real second. L is the level obtained after interpolating the environment score, with shared habituation and pitch self-exclusion when a matching observation is available. Missing ownership evidence falls back to the mixed field. An observer used only for survival does not enable pitch self-exclusion. Private adaptation, crowding and movement costs are not part of this level. Invalid scores use neutral 0.5.

The default weight is zero. The builder is initial-only; finite nonnegative f32 weights have no upper clamp. Negative values warn and clamp to zero; values non-finite before or after f32 conversion become zero with a warning, and unsupported positive weights warn and become zero. Replacements inherit the weight and start a fresh phase. For w>1, proposals stop at L >= (1+1/w)/2; at L=0 speed is 1+w. At w=1, L=1 proposals stop until the level falls; habituation pulls evaluation toward 0.5 and does not guarantee departure. At constant L the result can remain periodic.

This changes the timing of proposals, not the decay of a plucked sound. Existing adoption, rearticulation thresholds, pending-target replacement, legal beats and vetoes determine actual On events. The clock continues through rest_on_habituation gaps and is not reset on return. Adaptation, glide and private attack recovery use real seconds; the movement-cost window retains its original meaning.

Responding to heard onsets

respond_to_onsets(w) brings a free Voice’s pitch proposals forward after it hears new onsets from outside its own sound. It is an initial-only author rule with default weight 0; zero creates no state and reads nothing.

let line = harmonic().sustain().seek_consonance()
    .pitch_apply_mode("rearticulate").leave_self_out(true)
    .respond_to_onsets(2.0);
place(line, at(196.0));
place(flora().pace(1.0), random(98.0, 1568.0));
wait(12.0);

A positive weight gives the Voice’s self-exclusion observer a copy of the shared attack detector, started from the mixed history before the Voice’s birth. That observer hears the habitat minus the Voice’s own PCM, so the Voice’s own attacks do not register and no other source is named. Inside the Voice’s pitch range, a rise ρ of this attack history owes w·τ·ρ seconds of proposal clock, with τ = satiation_sec / ln 10, spent at most w seconds per second. One new unhabituated onset lends at most w·τ·(1−e^(−period/τ)) seconds, where period is the onset drive (0.5 s for a basin centred at 2 Hz, about 0.45·w seconds); near w = 4.6 one onset lends a whole ordinary 2-second cycle.

After each pitch change, nothing is lent or spent until one ordinary proposal threshold of real time has passed, so a new note keeps its ordinary cycle and the shortest interval between new notes does not change. The response shortens only the wait after a proposal that stayed. An early proposal still uses the same field, costs and random stream to decide whether and where to move; no onset is forced.

Lent seconds bring the proposal clock to its threshold sooner, but a proposal still waits for its ordinary opportunity. Without proposal_interval(seconds), while the production meter holds a beat with positive confidence, that opportunity is the next crossing of the meter’s subdivision layer after the threshold is reached, not the threshold itself. Each proposal restarts the clock from zero, so lent seconds that carried it past the threshold are not kept for the next cycle. With proposal_interval(seconds) the clock keeps the part above the interval.

The supported form is free seek_consonance() with sustain(), pitch_apply_mode("rearticulate") and rearticulate_above(0), without follow_own_sequence() or melodic_continuity(); other forms warn and use 0. Without leave_self_out(true) the weight warns once and has no effect: the Voice never falls back to the shared history, which contains its own attacks. It combines with dwell(w), whose rate still applies. Unknown, future and regridded observations contribute nothing and re-prime the comparison. With [psychoacoustics.habituation] enabled = false the history stays flat and the run warns once. Reports add respond records (spent steps and proposals, with the cycle’s extra seconds and whether the proposal moved) only for positive weights. This author rule does not claim that a listener hears the response.

Following a Voice’s own pitch sequence

follow_own_sequence(w) favors pitch intervals that the Voice has learned from its own executed notes. It is an initial-only option with default weight zero. For example:

let voice = modal().sustain().metric().seek_consonance()
    .pitch_apply_mode("rearticulate").rearticulate_above(0)
    .follow_own_sequence(0.05);
place(voice, consonance(220.0, 880.0));
wait(12.0);

The candidate model is PPM-Decay (Harrison, Bianco, Chait, Pearce 2020). Mapping execution to symbols and coupling prediction to generation are author rules. This is not a validated theory of melodic composition. The initial goal is only that the order of self-executed pitches can change the next pitch choice. It does not learn duration, timing, rests or harmonic context, or create phrases.

The supported initial form is free seek_consonance() with explicit sustain() and metric(), entrained(), steady() or flow(). Pitch application must be gate_snap or rearticulate, with rearticulate_above(0) and without articulation_persistence(). Positive rearticulation thresholds can glide small movements and are therefore unsupported, as is pitch_apply_mode("glide"). Unsupported final configurations warn and ignore the word, independent of method order. A later loss of support closes the learning epoch; the next supported onset starts a new reference. A pause or release alone does not erase learning.

The first onset establishes a reference. Each later onset contributes the signed interval from the preceding executed pitch, rounded to 100 cents for learning only. The sound itself remains continuous in pitch space. One decision retrieves one fixed probability distribution. Existing candidates are generated first, then receive w * (log₂ p_candidate - log₂ p_current). Both symbols use the same last executed pitch. Higher weights can overpower the harmonic field and reinforce an accidental pattern; they do not guarantee stopping or variety. 0.05 score/bit is a small initial example, not a fitted or optimal value.

Finite nonnegative weights have no upper clamp. Negative and non-finite inputs warn and become zero. Replacements inherit the weight, with fresh learning and a separate random stream. With zero weight no sequence learning, retrieval or random draws occur. The initial resource envelope is 16 resident states, 600 seconds per Voice, 4,800 learned intervals, 38,400 decisions and 64 candidates per decision, with declared ranges inside 20–20,000 Hz. Exceeding support stops sequence scoring until replacement; small decayed traces are never silently discarded. Non-finite probability or score calculations disable that decision’s sequence term and are diagnostic failures, not successful predictions. Execution, learning and decision records distinguish actual onsets from unexecuted targets.

Responding to a local phrase boundary

phrase_boundary(w) softens one new Sine Tone after a local boundary in that Voice’s own executed notes. It is initial-only, finite and nonnegative, with weight zero by default. Unsupported final forms warn and ignore it. Use explicit sustain() with metric(), entrained(), steady() or flow(), and discrete gate_snap or rearticulate pitch application. For example:

let voice = sine().sustain().steady().seek_consonance()
    .pitch_apply_mode("rearticulate").rearticulate_above(0)
    .phrase_boundary(1.0);
place(voice, consonance(220.0, 880.0));
wait(12.0);

The candidate model is LBDM (Cambouropoulos 2001). Its interval truncation, change and proximity equations, and pitch/IOI/rest weights .25/.50/.25 are retained. Online adaptation and the post-boundary response are author rules. They do not infer the end of a future phrase, form a Todd expression arch or change release or clocks. The cap declaration is one octave and four initial bodily periods for IOI and rest, fixed at birth. Mapping one initial period to a quarter note is an author convention using the source’s whole-note example, not a psychological constant or a new seconds-valued composer control.

The adapter waits for six consecutive executed On events and the first five Tones’ effective Off events. Release tails may overlap: rest means the symbolic Off-to-On interval, not acoustic silence. Missing support, overlapping gates, simultaneous On events, pitch updates, or a new generation discard incomplete history and pending responses. The last Tone need not have released yet. Component profiles normalize over the three interior points; a positive strict central peak publishes once as final-local. Plateaus and unobservable endpoints do not create boundaries. This local result differs from normalization over an entire finished melody.

The boundary position and the time it becomes known are separate. PX-1 reads renderer execution receipts from the completed hop on the next hop. SQ-1 keeps its existing issuance-stage records and within-hop learning; the two features share identities and record representation, not one confirmed event stream. The first existing candidate opportunity after publication consumes the pending response even if rest, lifecycle, Connect, tie or another rule vetoes On. It expires one last observed, untruncated IOI after publication. A legal new On must also execute before that deadline, with matching identity and no intervening On or support loss. Cancellation never transfers a response to another Tone.

A successful reaction applies g = 1/(1+w*B) once to that Tone’s PCM, including its tail, habitat, presentation and self-exclusion capture. Existing strength, its direct metabolic update and candidate times remain unchanged. Updates retain the gain. Pending reservations have unsupported self forecasts; executed gains are carried by supported forecasts. Changed sound may change later perceptions and choices. Reports expose phrase_boundary and phrase_execution records. A sparse or absent reaction is possible; this word does not guarantee phrase planning or musical improvement. Corpus replication and author adoption are separate from implementation agreement.

Melodic continuity from your own pitch history

melodic_continuity(w) makes a stepwise Voice favor the next-pitch distribution predicted from its committed self onsets. Its weight is finite, nonnegative, and initial-only, in score/bit units. Zero is the default and creates no ME state. For example, append .melodic_continuity(0.1) to a sustained free seek_consonance() Voice using metric(), entrained(), steady() or flow(), with pitch_apply_mode("rearticulate") and rearticulate_above(0). The example weight is not an adopted listening preset. Gate snap is also supported; glide, positive rearticulation thresholds and articulation persistence are not. Unsupported final forms and invalid weights warn and disable the term.

Candidate: von Hippel (2000), Redefining Pitch Proximity, Eq. 1 and the stationary AR(1) explanation. In semitone coordinates the conditional mean is mu = m + r*(last-m) and variance is v = s²*(1-r²). These restore the mean and scale omitted from the printed distribution on p.324; this is a text-consistent interpretation, not an author-approved erratum. Author rules: full-prefix sample variance, Pearson correlation of adjacent series, committed self-On input and continuous log-density scoring. These records are commands, not heard PCM.

When a prediction is known, its weighted log2 density difference replaces both movement cost and fixed-center tessitura gravity. Those two terms are removed even from peak extraction; the new term scores only the resulting candidates. Candidates and the current baseline are mapped into the legal pitch range and duplicate mapped pitches are removed. The algorithm does not search exhaustively for the model mean. follow_own_sequence can be combined with it: it models interval order rather than full-prefix range and mobility. Each failure removes only the affected layer; ME failure restores the old candidate extraction. Positive weight starts a replacement, not a continuous fade of the old costs from zero.

At least four onsets and certifiably positive variance are needed. Degenerate or numerically uncertain statistics use the current old costs and retain history. There is no variance floor, correlation clip or forgetting window. Center, range and support changes start a new epoch after pending controls are flushed; a pause or a section boundary does not reset an unrelated surviving Voice. Replacements inherit the weight and start empty. Choices can indirectly change later onset times; this term adds no clock, pause, phrase detector or harmony model.

The supported runtime envelope is 16 resident ME states, including retiring Voices, 4,801 unique On identities, 38,400 decisions per Voice, 64 candidates per decision, and 600 seconds from Scenario sample zero (not from birth). Support is bounded to 20–20,000 Hz. Resource exhaustion stops ME until replacement and restores the old costs. ME and PPM states are counted separately; their producer is shared. Reporting adds melodic_continuity decisions and state records, including unknown reasons and the full old-path counterfactual. The optional tonal profile inherits an audition weight; sensory leaves ME disabled.

Following the heard harmonic context

follow_tonal_context(w) is an initial-only preference for pitches that fit recently heard sound. It is neutral at 0. For example:

let voice = modal().sustain().metric().seek_consonance()
    .pitch_apply_mode("rearticulate").rearticulate_above(0)
    .dwell(0.75).follow_tonal_context(0.25);
place(voice, consonance(196.0, 784.0));
wait(12.0);

The observation is a Candidate: the source-matched IPEM sensory short-term memory model, with 40-channel ANI, periodicity pitch and local/global half-lives of 0.1/1.5 seconds. This verifies an implementation of a hypothesis, not its truth or a replication of every human priming experiment. The standard sine probe, its precomputed approximation, raw-correlation readout, pitch preference and dwell coupling are Author rules.

The first implementation supports free seek_consonance() with stepwise sustained participation: metric(), entrained(), steady() or flow(), gate_snap or rearticulate, rearticulate_above(0), and no articulation persistence. Unsupported final forms warn and ignore the term. Negative and non-finite weights warn and become 0. Every finite nonnegative weight is accepted; large resulting scores saturate at the finite f32 score range. Cost does not set a weight ceiling. A live change to an unsupported form disables the term.

At 48 kHz, every received habitat hop advances the observation once. The Voice reads mixed context or actual mix - own PCM according to leave_self_out. Birth copies the complete pre-birth mixed state. A live ownership change starts a new epoch; a gap invalidates context for the run instead of filling silence. An active listener separately observes presentation PCM. Neither branch changes H/R, habituation, or generation RNG. At other sample rates the query is unknown.

Existing candidates are generated first. Within the executable pitch range, the term adds w*q to their existing scores and the current-target baseline; q averages local/global correlations over 200–600 ms of a 600 ms sine probe. One unknown candidate or baseline disables the whole rescoring pass. Dwell uses the current sounding frequency, adding the same term before its existing sigmoid. Its query can remain usable even when selection falls back. Reports retain snapshot sample times, epoch, known/unknown queries and selected targets.

For the first future default listener preset, require 0 <= dwell < 1. Advanced values at or above 1 remain possible and can stop the proposal clock. Positive clock speed does not guarantee a pitch change, departure or modulation. This term has not been adopted into a default listener preset.

The probe table uses a 1-cent log-frequency grid and linear frequency/time interpolation over approximately 29.99–8000 Hz. One shared table contains 9,673 nodes and about 1.05 GB of PP values; startup builds it only when enabled, taking about 80 seconds on the measured machine. These are cost estimates, not upper limits. Because of this cost, TC is not yet included in the default listener preset PRE-1. Each TC self-exclusion branch adds a full observation pipeline, including retiring Voices. Declared real-time support must include those branches, the listener, existing H/R/Flora and snapshot/query costs; query microbenchmarks alone do not establish a real-time load guarantee.

The declared approximation acceptance range is [0.25, 1], adopted from the full-scene comparison at weights 0.25, 0.5 and 1. Across 362 actual decisions, approximation changed 4–6 argmax choices (about 1–2%), at most one tenth of the TC effect. Dwell zero/positive changes were zero at every tested setting. Weights 0.125 and 2 failed the criterion; outside the declared range, approximation acceptance is unverified. The interval is an adopted operating range based on those three tested weights, not an exhaustive continuous sweep. The API still accepts every finite nonnegative weight, without an out-of-range warning. Acceptance scope is not a cost-based weight limit.

Shared opportunities for background changes

harmonic_rhythm(N) is a scene-wide initial premise. The last valid declaration applies to the whole scene, including when written after wait(); put it before placements for clarity. N is a nonnegative integer. Omission and 0 retain the ordinary path; 1 permits changes every beat. Larger integers space opportunities by N beats without choosing any pitches. N is a composer’s quantity, not a measure length inferred by the listener. This mechanism is an Author rule.

All Flora and Voices born with Once/WhileAlive, free pitch, rearticulation and a zero rearticulation threshold share one opportunity clock. Readiness can skip an opportunity. Initial Voice onsets retain their placement time; Flora births and resumption after a temporary pitch-range exit wait for an opportunity. Other Voices retain their timing. This structural selection is not a perceptual foreground/background classifier. Conflicting live pitch patches on participating Voices warn and retain the previous setting; independent amplitude changes apply.

Between opportunities, Flora holds amplitude, position, bandwidth and audible window targets while ecology, noise, slews and tails continue. Its private clock still drives rest transitions and ecological pace. Release and loss of support can retire sound between opportunities; becoming ready after rest does not itself start sound. The shared clock reads completed habitat audio and continues from its tempo prior through unknown intervals, without resetting on reacquisition. There are no chord tables, written progressions, live N changes, measure resets or new harmonic cues in the meter. Synchronizing target decisions does not certify perceptual simultaneity or improved harmonic connection.

Routing and the Listener Twin

Two buses

Each voice contributes to two independent mono buses:

  • presentation bus → cpal output / offline render / UI metering (the work as presented)
  • habitat bus → auditory analysis → landscape (what the ALife ecology responds to)

By default both buses receive the voice. Use send() when a voice should feed only one side, or combine buses with |:

// Reference anchor: sensed by the ecology, absent from the presented sound.
let anchor = harmonic().brain("drone").send(habitat_bus);

// Presented decor that does not influence the ecology.
let decor = sine().send(presentation_bus);

// Explicitly both (the default).
let normal = harmonic().send(habitat_bus | presentation_bus);

place(anchor, at(110.0));
place(decor, at(880.0));
place(normal, consonance(110.0).peak().count(3));
wait(4.0);

Keeping the buses separate is a composition tool. A hidden anchor on send(habitat_bus) can shape how the population organizes without ever becoming audible, and presented decor on send(presentation_bus) can be heard without perturbing the ecology.

Both buses receiving every voice is the default because it is Direct Cognitive Coupling: what the listener hears and what the ecology senses are the same physical event. Splitting the buses is a deliberate departure. send(habitat_bus) casts terrain — the director’s work, shaping the field without being heard. send(presentation_bus) casts decor — heard, but outside the ecology’s world. Pitch-reference anchors are distinct from dedicated synchronization support: beat carriers or temporal scaffolds belong only in samples where explicit synchronization is essential, even when they feed only the habitat bus.

The Listener Twin

conchordal keeps a ListenerTwin: a listener-side model of the presented sound only. It never reads the habitat bus, so hidden scaffolds cannot create fake listener tension. Its listener_state report contains four perceptual levels:

  • stability_level: how stable / consonant the current audible sound is.
  • resolvability_level: whether a nearby audible state offers a plausible, more stable continuation.
  • tension_level: (1 - stability) * resolvability — unstable now, but with a reachable path toward improvement.
  • attention_level: presentation-derived onset / spectral-flux salience.

It also contains the listener-side meter estimate:

  • beat_hz, beat_phase, and beat_confidence;
  • subdivision_ratio and subdivision_confidence;
  • measure_hz, measure_ratio, and measure_confidence.

generated_frame_id, analysis_frame_id, and analysis_lag_frames make the perceptual delay explicit. They matter when comparing a report event with the sound that caused it.

There is no scripting verb for the twin. It is observed, not commanded: when you run with reporting enabled it emits listener_state records, and the GUI shows the same state. Use it to check whether the tension you hear matches what the twin reports before coupling it back into generation.

DCC: coupling the twin back

That optional coupling is DCC, configured in config.toml (or the file selected with --config), not in script:

[dcc]
# Listener pressure is report/UI-only by default.
# coupling_strength = 0.0
# max_temperature_bonus = 0.10
  • coupling_strength (0.0–1.0, default 0.0): at 0.0 the twin is report/UI-only and generation is unchanged. Above 0.0 it applies tension_pressure = tension_level * coupling_strength as a transient pitch-exploration bonus only. Listener tension already includes resolvability, so the coupler does not apply it again. It never sets target pitches or changes rhythm synchronization.
  • max_temperature_bonus (default 0.10): ceiling on that transient bonus.

Raise coupling_strength gradually, and only after the reported listener_state looks musically legible. When coupling is active, dcc_pressure report records show both the pressure and the resulting temperature bonus.

Timeline and Structure

A scenario does not schedule individual audio samples. It advances a script cursor, places Populations at that cursor, and describes when they are patched or released.

place, wait, and flush

place() schedules founder Voices immediately at the current cursor and returns their stable Population handle. wait(seconds) emits pending live patches and moves the cursor forward. flush() emits pending live patches without moving time.

let spec = harmonic()
    .amp(0.04)
    .brightness(0.35)
    .sustain();

let population = place(spec, consonance(220.0).count(3));
population.amp(0.025); // Live patch at the same script time.
flush();               // Emit it; the cursor does not move.
wait(2.0);             // Advance two seconds.
release(population);

The semantic boundary is place(), not wait() or flush(). Initial body, behavior, lifecycle, and respawn settings belong to PopulationSpec; only live patches and release belong to Population.

release, section, and play

release(population) is explicit. section(name, callback) and play(callback, ...) create scopes and automatically release Populations created inside them when the callback returns. Scope exit emits any pending live patches before the automatic release.

Use section for named form. Its name becomes a scene_marker in reports. Use play for a reusable gesture that takes arguments.

let gesture = |root_hz, duration_sec| {
    place(
        harmonic().amp(0.035).sustain(),
        consonance(root_hz).peak().count(3)
    );
    wait(duration_sec);
};

section("two gestures", || {
    play(gesture, 110.0, 2.0);
    play(gesture, 165.0, 2.0);
});

The Populations created by each play are released at the end of that call. The outer section provides the report marker and owns anything created directly inside it.

Parallel timelines

parallel([callbacks]) forks several cursors from the current time. Every branch starts together. After all branches are described, the main cursor continues at the end of the longest branch. Each branch is also a scope: its Populations are released when that branch returns.

section("overlap", || {
    parallel([
        || {
            place(sine().amp(0.05).sustain(), at(220.0));
            wait(3.0);
        },
        || {
            wait(1.0);
            place(harmonic().amp(0.03).sustain(), at(330.0));
            wait(1.0);
        }
    ]);
});

The first branch ends three seconds after the fork. The second ends two seconds after it, so the main cursor advances by three seconds. Their Voices overlap only for the interval in which both branch scopes are active.

Script time and runtime behavior

The script cursor decides when control events occur. It does not predict the exact state of the terrain at those times. Movement, coupled rhythm, death, and respawn continue inside the runtime while wait() advances the scenario.

This distinction is central:

  • The script authors macro-structure.
  • The Community produces moment-to-moment behavior.
  • Reports show what actually happened during the authored interval.

Use the workflow in Performance to inspect the result and revise the scenario. Use seed(...) or --seed only when a particular realization must be replayed.

Scene settings and timed changes

Global parameter names describe when they apply. Bare names set scene-wide initial conditions: meter_stability, temporal_basin, control_update_mode, scaffold_off, scaffold_shared, scaffold_scrambled, seed, and output_gain. In finite scenarios their last declaration wins, even after wait(). temporal_mode is also a scene setting, but must be declared once at top level before events.

The set_ verbs schedule parameter changes at the current cursor: set_roughness_aversion, set_harmonicity_preference, set_support_focus_preference, set_support_conflict_preference, set_related_novelty_preference, set_global_coupling, and set_pitch_objective. Use wait() to choose when those changes take effect. Placement, release and scope verbs continue to describe actions rather than parameter settings.

Choosing a room

Use room("presentation") to add stereo reflections to the audience output while the habitat hears the dry bus. Without any sites the audience hears every source at 12 m in presentation. In both the original 23.5 m balance is used for a score without sites. With room("both"), the habitat also hears reflections and self-exclusion uses each source’s reflected sound. Both wet modes require 48 kHz. room("off") selects dry mono. With no declaration, the score uses TOML [room].mode, which defaults to "off".

The last declaration in a finite score applies from the first sample, even if it follows a wait(). In an endless score declare the room before advancing time. Strict self-return in both requires a finite score to reserve source histories.

Placing sources and ears

In a finite score for conchordal-render, attach site(x, y) to a placement. Coordinates are in metres. Here the audience hears the same direct level from the line at either end of a 12 m radius, while the moss hears the line much more strongly beside it.

room("both");
let moss = place(flora().respond_to_onsets(2), random(200, 1000).site(12, 0));
let line = place(sine().sustain(), at(500).site(-12, 0)); // try (12, 0)
wait(4);

One explicit placement enables distance from the first sample, including for earlier voices. Unspecified placements then share (0, 12). The audience and shared habitat observer are at (0, 0). Direct amplitude at an ear is divided by distance, with a minimum divisor of 1 m. The reflection send has a fixed gain of 1/23.5. In both, moving a source farther away thus increases the proportion of reflections an individual hears. In every mode, distance changes the relative levels of competing sources and whether a weak sound clears the analysis floor. With only two participants, the normalization in harmonicity and roughness largely cancels the level change for an ear hearing a single external source in off or presentation. Absolute resource consumption and overlap still depend on level. Positions stay fixed throughout a note. Placing every source at (0, 12) gives the same audience balance as omitting sites in presentation. Local observations can still change the performance. The model adds no travel delay or directional panning.

Shared habituation, acoustic beat learning and pitch-set memory listen at the origin. A close source can dominate the common habituation and beat even when distant individuals hear little of it. The origin and the audience use a sensitivity of 12. Several close voices can saturate the IPEM input to tonal and pitch-set analysis, which clips to [−1, 1). The left-channel max_p warning measures the audience signal before final gain and limiting. Individual ears retain their one-metre source level. Spatial scores require a finite offline render and support zero weights for follow_harmonic_relations and follow_harmonic_continuation.

Scene playback level

output_gain(db) sets one playback gain for the whole scene. It accepts integer and floating-point dB values; omission means 0 dB. As with seed, the last declaration wins in finite scenarios, including declarations after wait(). It does not schedule a fade.

output_gain(3.0);
play(|| {
    place(sine().amp(0.04).sustain(), at(220.0));
    wait(2.0);
});

The scene value adds to [audio].output_gain_db (default +4.0 dB for off, −5.0 dB for presentation or both with sites, and −10.5 dB for both without sites). The output amplitude multiplier is 10^((config dB + scene dB)/20). Both the instrument’s speakers and the offline renderer’s WAV apply it immediately before their output limiter, including when the limiter is disabled. A scene value of 0 preserves the configured playback level. The limiter can reduce peaks at higher gains.

This controls playback only: analysis, ListenerTwin, ecology, reports and UI bus meters receive the original audio levels. To change a Population’s emitted sound and its effect on the ecology, use its amp() instead.

The value must be finite and convert to a finite, positive f32 amplitude multiplier. The sum with the config gain must meet the same condition. Invalid values report the declaration’s source position. These limits follow f32 representation; there is no additional artistic dB range or loudness target.

Expression toward a known end

expressive_section(name, arch_weight, ritard_weight, callback) gives the final explicit interval a loudness arch and a common slowing clock. It has the same ownership and automatic releases as section. Both weights are finite, nonnegative and initial-only. Zero is neutral; values at or above one saturate at full application. Omitting the term changes nothing, and two zero weights use the existing section path.

temporal_basin(1.6, 2.4);
meter_stability(0.55);
let pluck = modal().metric()
    .modes(stiff_string_modes(0.004).count(12))
    .brightness(0.42).adsr(0.004, 0.18, 0.0, 0.35).amp(0.04);
let pulse = place(pluck, line(196.0, 392.0).count(3));
section("opening", || { wait(4.0); });
expressive_section("ending", 1.0, 1.0, || {
    wait(8.0);
    release(pulse);
});

This uses candidate curves from Todd (1992, single-layer intensity) and Friberg–Sundberg (1999, q=3 timing). Assigning them to an authored interval, adding the amplitude floor and freezing the generation clock are author rules. It does not infer a phrase or assert a perceived ending. No listener preset activates it automatically.

The initial supported scene contains Once Voices without free-pitch rearticulation, or non-sustained synchronized metric() Voices. Flora, participating clocks, sustained metric Voices, follow_own_sequence, and rest are outside this scope. Unsupported scenes warn and ignore the entire expression effect, preserving their other controls. One nonzero interval is allowed, and all populations must be released by its end. Outer populations need explicit release, as in the example; scope exit releases only its own populations. There can be no later spawn or patch. Invalid weights or intervals also warn and ignore the effect. At device setup, colliding Once onset/release hops and transformed durations above 600 seconds are diagnosed before applying the map.

The arch changes emitted source PCM in both buses, including already sounding tails; it does not multiply articulation energy directly. At full application its midpoint amplitude is multiplied by square root of two. Ritard stretches nominal time by about 1.403 at full application and reaches 0.3 of its entry rate. It freezes each synchronized clock’s entry phase velocity and renewal, while sensory observation, ecology and body envelopes retain physical time. Gate durations follow the same time map; releases start later but their fades retain physical seconds. Pending Off commands issued before entry stay at their original physical ticks. A positive ritard, however small, freezes the clock; zero ritard leaves the original clock active. Section names and the known end are never evidence for ListenerTwin’s perception of closure.

Once voices must start immediately; phonate_when_viable() on Once is outside this initial support.

Open-ended performances

Call endless() once at top level, before any playback event and before time advances. The script can return while the Community keeps sounding: an empty event queue does not stop Voices or respawn. Releasing everything leaves a silent performance that still waits for an end request.

endless();
let drone = place(sine().amp(0.04).anchor().sustain(), at(220.0));
wait(2.0);
drone.amp(0.025);
flush();

Use End in the GUI or press Ctrl-C once to release the remaining Populations, Flora and Rain with their configured fades. Existing fades finish too. Exit, window close, or a second Ctrl-C stops immediately. --duration <sec> requests the same graceful end at a score time; events due in that hop run first. The output can continue beyond that time through release fades and renderer tails. A finite scenario that finishes earlier still ends normally.

conchordal-render requires --duration for an open-ended scenario. The instrument also requires it when using --report or --profile with an open-ended scenario. Profiles have a fixed hop capacity, so leave room for fades. WAV output is checked against the RIFF size limit both at startup for the duration and during writing. The instrument never records audio.

Three rules apply to every endless scenario:

  • Declare seed, output_gain, temporal_mode, scaffold_*, control_update_mode, meter_stability, and temporal_basin before the first advancing wait(). These values configure the whole performance.
  • Enable leave_self_out(true) on the PopulationSpec before placement if that Population will ever need it. A later patch may disable and re-enable that capability, but cannot introduce it.
  • parallel is unavailable in an endless scenario.

Endless scripts run on a dedicated thread, just ahead of the performance. An unbounded loop must advance score time with wait():

endless();
loop {
    section("breath", || {
        let p = place(sine().sustain(), at(220));
        wait(4);
    });
    wait(2);
}

The first advancing wait() publishes the scene header; a script that returns without advancing publishes it on return. Events at time zero remain hidden until then, and metric founders use the final declared temporal basin. A header may have an empty event prefix, for example endless(); wait(4); place(sine(), at(220));. A script error after the header stops new score production; committed events still run and the ecology continues. System shows evaluation progress, completion, errors and coalesced warnings. A performer end request discards pending score items and starts the runtime’s release sequence.

For repeated placement, release each Population or Flora explicitly, or create it inside a section or play that returns and releases it. Natural Voice death does not retire an unreleased Population. Retaining new placements or growing Rhai arrays forever grows retained state; those values belong to the composer.

Compile-only and offline render of endless scripts require --duration. A wait that crosses that bound stops evaluation at the bound and unwinds scopes there, so their release actions run before the duration end request. Compile-only prints end: open (evaluated through t=…). Finite pieces still evaluate eagerly, including parallel. The score outbox limits actions and retained payload per dispatch hop; exceeding either limit is a deterministic score error in render and compile-only.

Scenario capabilities

All scenarios, including finite ones, disable eval and filesystem import. sleep and timestamp raise an error: use wait() for score time. A scenario cannot read wall-clock time through timestamp/elapsed or block evaluation with sleep. These boundaries keep the score determined by the script and seed. print and debug remain available for diagnostics.

Reserving tonal context

In an endless piece, call observe_tonal_context() before time advances and before placing a positive follow_tonal_context weight. This Author rule reserves tonal observation and its table from the beginning, so later Voices inherit the heard history. A late declaration or an unreserved positive placement is a positioned script error. Finite pieces need no declaration: writing it warns and has no effect; their placements determine observation as before.

Endless pieces always observe shared onset habituation from run start, including before a later rest_on_habituation placement. Finite pieces reserve this observer only when a positive consumer appears in the script. harmonic_rhythm also belongs before the first advancing wait() in endless pieces.

The three support preferences default to zero. Focus and conflict accept signed finite weights; related novelty accepts nonnegative finite weights. They are author rules that integrate the heard first-order support fields over the body’s partials. A moving Voice needs leave_self_out(true); otherwise positive weights warn once and movement ignores them. Peak, density and tension births and Flora lane choices also read these preferences. Flora growth, habituation and ListenerTwin retain their existing inputs. Partial densities come from the body’s spectral self-report and are cached at birth or reconfiguration. Without a self-report, the body reads a labeled single partial at its fundamental. This valuation does not predict the density of a hypothetical PCM mixture.

follow_harmonic_relations(w) and follow_harmonic_continuation(w) are cursor events with finite signed dispositions in [-1,1], both defaulting to zero. Relations value support (positive) or departure (negative) among changing destinations. Continuation values learned support for retaining, waiting or declining birth, with negative values preferring departure from that support. Relations alone cannot change the baseline act/retain class. Both are Author rules: paired consequences are added to existing scores, retaining habituation and bodily costs. Unknown evidence is neutral. Both zero preserve the old path and random stream. No fixed key or progression profile is used; weight changes retain memory. Use wait() before a change intended later in the scene.

Endless harmony observation reservations

Endless scenes publish vertical support scans from sample zero, including while all three valuation weights are zero. The temporal observer is separately reserved by observe_harmonic_relations(max_sources) before time advances. The positive integer bounds simultaneous Voice and Flora lane sources, including retiring sources; its ceiling is the existing structural-record capacity of 38,400, not a musical limit. Both signed nonzero temporal controls require this declaration; missing or late reservation is a positioned script error. Finite scenes warn and ignore the declaration, retaining event pre-scanning for observer and source capacity. Observation does not activate either valuation weight. The declaration is an Author rule and does not change the existing 600-second rolling history or the supported event density.

API Reference

This page is generated from the engine’s registered scripting surface joined with the documentation registry (src/scripting/docs.rs). A CI test fails whenever this page drifts from the engine. Regenerate with:

cargo run --bin gen_rhai_defs

Enum names are case-sensitive canonical lowercase names; aliases and surrounding whitespace are rejected. Invalid names stop evaluation at their source position.

Builder methods return their receiver and are chainable. Integer and float literals are interchangeable wherever both overloads are registered; the generated LSP definitions (rhai-defs/conchordal.d.rhai) list the exact overloads.

The surface is split into four tiers. Core API is the curated composing surface — it is enough for every top-level sample (together with Experimental). Experimental contains candidate Core verbs under audition. Mechanism Tuning adjusts the mechanisms behind the core verbs when a piece needs a behavior the core surface does not express. Research Controls exist for studying the instrument, not composing with it.

Evidence labels describe parts of a mechanism, independently of disclosure tiers. See Mechanism evidence and choices. Labels do not change defaults or certify acceptance.

Types

TypeDescriptionEvidence
FloraSpecReusable spectral-growth definition built by flora(); placed as a Flora over a frequency extent.Not a mechanism (API container): use the labels of the constructor and operations on this type.
FloraPlaced spectral growth; supports pending amplitude and pace patches and release.Not a mechanism (API container): use the labels of the constructor and operations on this type.
RainSpecReusable impact-texture definition built by rain(); placed as a Rain over a frequency extent.Not a mechanism (API container): use the labels of the constructor and operations on this type.
RainPlaced impact texture with its resonant objects; supports live amp, rate, sway, hit, width and ring patches and release.Not a mechanism (API container): use the labels of the constructor and operations on this type.
PopulationSpecReusable population definition: founder voice traits plus lifecycle, respawn, and demographic rules.Not a mechanism (API container): use the labels of the constructor and operations on this type.
PopulationPlaced population returned by place(); one stable handle across its voices, deaths, and respawn generations.Not a mechanism (API container): use the labels of the constructor and operations on this type.
PlacementWhere voices enter the field: built by at(), consonance(), dissonance(), edge(), gap(), random(), or line().Not a mechanism (API container): use the labels of the constructor and operations on this type.
ModePatternFrequency pattern for modal synthesis bodies; built by *_modes() constructors.Not a mechanism (API container): use the labels of the constructor and operations on this type.
BusOne of the two mono output buses; combine with `into aBusSet`.
BusSetCombination of buses produced by `busbus, accepted by send()`.

Built-in Constants

ConstantTypeDescriptionEvidence
habitat_busBusAnalysis bus: auditory analysis -> landscape; what the ecology senses.Not a mechanism (routing): selects or combines buses; see leave_self_out for the independent self-perception rule.
presentation_busBusPresentation bus: cpal output, recording, UI metering; what the listener hears.Not a mechanism (routing): selects or combines buses; see leave_self_out for the independent self-perception rule.

Core API

The curated composing surface. These verbs are enough for every top-level sample (together with Experimental).

Flora

Flora grows spectral mass over a frequency extent using authored dynamics driven by the Landscape. It is not a model of auditory cognition.

amp

amp(level)

Applies to: FloraSpec, Flora.

Set Flora’s nominal target-amplitude scale in [0, 1], a ceiling rather than a guaranteed level. Squared lane target amplitudes sum to at most amp squared; this does not bound transients or output power. Numeric arguments must be finite before and after f32 conversion. Invalid values raise script errors. Live patches emit at wait, flush or scope end and glide to the new level over this Flora’s fade() seconds (at least 80 ms).

Evidence: Not a mechanism (initial body): Flora body, amplitude or fade choices; see flora and pace.
Author rule: underlying spectral growth, consumption and retirement ecology; not an auditory cognition model.

pace

pace(multiplier)

Applies to: FloraSpec, Flora.

Set Flora’s ecological speed relative to its private beat clock with a minimum of 1/64 and no cost-based upper bound (default 1). Ecological speed is (f/2 Hz)min{k,20r}: one 10-second renewal per nominal opportunity. Ratio r is 1 for beats/fallback; k>20 enables confirmed subdivisions of 2, 3 or 4. Supported tonal/residual amplitude targets and joint normalization follow biomass each hop through the existing slew; confirmed opportunities gate births and discrete replacements. Fallback retains continuous allocation. Retirement shares saturation; beat phase, birth slew and macro fade keep their clocks. Finite f32 values above the minimum are retained. Subminimum values, NaN and negative infinity warn and use 1/64; positive infinity/overflow warn and use f32::MAX. Live patches emit at wait, flush or scope end. Whole-scene real-time cost remains the composer’s responsibility. See the Flora chapter for details.

Evidence: Principle: beat perception as input (§9.3.56).
Author rule: ecology speed, action opportunities, the default multiplier 1 and the 10-second ecological saturation per opportunity (§9.3.97–99, §9.3.102).

leave_self_out

leave_self_out(enabled)

Applies to: FloraSpec.

Exclude Flora’s own habitat PCM from growth consonance and seed harmonicity. Default true, unlike Voice’s false: one Flora has many partials whose own harmonic lattice can sustain its growth and seed positions. Set false before placement to read mixed C/H without an H/R observer. External resource power always excludes own PCM. Presentation-only Flora reads mixed C/H regardless of this setting.

Evidence: Principle: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: self-exclusion. Voice defaults false, Flora true. Voice H/R both exclude self by default; tail_roughness_aversion optionally mixes R for actual Off/On pitch candidates. Environment recovery and Flora retain their contracts (§9.3.95, §9.3.120).

send

send(bus_or_set)

Applies to: FloraSpec.

Route Flora to a Bus or BusSet, using the same buses as Populations. Default: habitat_bus | presentation_bus.

Evidence: Not a mechanism (routing): selects or combines buses; see leave_self_out for the independent self-perception rule.

place

place(flora_spec, placement) -> Flora

Place a Flora over a consonance or random frequency extent. Consonance seeds from the base consonance density mass before habituation; random seeds uniformly. Requires count 1, density sampling, zero tension and target-default spacing. Bounds follow field placements and must span at least 1/96 octave, one initial Log2Space bin. Scoped Flora releases at scope end.

Evidence: Not a mechanism (macro form): scenario timing, placement or release; input mechanisms retain their own labels.

release

release(flora)

Mark a Flora for release using its spec’s fade. The next wait, flush or scope end emits its pending patch before ReleaseFlora in one event. Repeated release and release after scope end warn and are ignored.

Evidence: Not a mechanism (macro form): scenario timing, placement or release; input mechanisms retain their own labels.

pitch_apply_mode

pitch_apply_mode(name)

Applies to: FloraSpec, Flora.

Choose tonal peak following (glide, default) or fixed-pitch replacement (rearticulate). Rearticulate holds each tonal lane at birth frequency through its tail, including between beat crossings. Beyond the 50-cent claim radius, lanes retire and replacements follow existing beat, slew and pool rules. Live changes preserve sounding lanes; the next allocation applies the new rule, holding current pitch when switching from glide. Residual noise keeps its centroid motion. Unsupported names, including gate_snap, warn and retain the previous mode. Patches emit at wait, flush or scope end.

Evidence: Author rule: pitch movement, proposal selection or search cost (§9.3.57, §9.3.98–99); existing base defaults remain active.

rest_on_habituation

rest_on_habituation(weight)

Applies to: FloraSpec.

Alternate Flora spans and gaps using heard attack habituation (finite nonnegative weight, default 0). Zero creates no private span state. Positive weights use the full habitat attack history (at the placement in a spatial score), averaged over sounding tonal frequencies by target power. Exit requests retire all tonal and residual lanes at a private beat crossing. Ecology continues during gaps; births wait until a return crossing after every tail ends. Actual lane births alone drive private recovery. Release and fade take priority. Invalid values warn and use zero. This is initial-only; the observer starts at scene start, including before later Flora placements.

Evidence: Principle: habituation as an input function (§9.3.60).
Author rule: current habituation erosion law and engineering time/drive constants (§9.3.60).
Author rule: probabilistic span exit and private recovery/return; neutral at weight 0 (§9.3.96, §9.3.101).

Rain

Rain draws every impact fresh from distributions over a frequency extent; the placement selects a free or Landscape-following distribution. Every impact strikes one material with fresh small variations. Its resonant objects start on consonance peaks, ring when impacts land on them, and drift toward consonance unless anchored. It is an authored texture rule, not a model of auditory cognition.

amp

amp(level)

Applies to: RainSpec, Rain.

Set Rain’s output scale in [0, 1]. Scales impacts and objects together. Live patches ramp over 80 ms and emit at wait, flush or scope end.

Evidence: Not a mechanism (initial body): Rain amplitude, fade, impact material or object body; see rain.

anchor

anchor()

Applies to: RainSpec.

Hold Rain’s objects at their placement pitches. Without it, an object drifts toward higher consonance by at most a semitone each time it is struck.

Evidence: Principle: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: objects start on consonance peaks and drift toward consonance with the Voice movement-cost defaults when struck; anchor() holds them.

send

send(bus_or_set)

Applies to: RainSpec.

Route Rain to a Bus or BusSet, using the same buses as Populations.

Evidence: Not a mechanism (routing): selects or combines buses; see leave_self_out for the independent self-perception rule.

place

place(rain_spec, placement) -> Rain

Place a Rain over a field or random frequency extent. random(lo, hi) draws impact centres log-uniformly. consonance, dissonance, edge and gap follow the same density masses as Voice placement, rebuilt each hop; zero mass falls back to log-uniform. Count must be 1, with density sampling, no tension and the default spacing.

Evidence: Not a mechanism (macro form): scenario timing, placement or release; input mechanisms retain their own labels.

release

release(rain)

Mark a Rain for release using its spec’s fade.

Evidence: Not a mechanism (macro form): scenario timing, placement or release; input mechanisms retain their own labels.

Population Specs

A PopulationSpec defines founder voice traits and population-level lifecycle rules. Constructors return a PopulationSpec; builder methods refine it; place() creates a Population.

sine

sine() -> PopulationSpec

PopulationSpec whose founder voices use a pure sine body.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

harmonic

harmonic() -> PopulationSpec

PopulationSpec whose founder voices use a harmonic-series body.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

modal() -> PopulationSpec

PopulationSpec whose founder voices use a resonator-based modal body; shape it with modes().

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

saw

saw() -> PopulationSpec

Harmonic-body preset with brightness 0.85.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

square

square() -> PopulationSpec

Harmonic-body preset with brightness 0.65.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

noise

noise() -> PopulationSpec

Harmonic-body preset with brightness 1 and motion 1 (mainly vibrato; jitter is not perceptible in the measured configuration).

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

Placement

Placements decide where voices enter the frequency field. Constructors return a Placement; modifiers refine it before it is passed to place().

site

site(x, y)

Applies to: Placement.

Give a placement fixed coordinates in metres in a finite offline score. The audience and shared habitat observer are at (0,0). Any placed site enables distance for the whole score; all other placements use (0,12). With no sites, the audience hears every source at 12 m in presentation and at the original 23.5 m balance in both. Direct amplitude is divided by distance with a one-metre minimum. In both mode distance changes the balance between direct sound and reflections at each ear. See Choosing a room for hearing, output level and restrictions.

Evidence: Principle: free-field direct pressure falls with distance; direct and reflected sound add linearly.
Author rule: the one-metre minimum, uniform diffuse send, shared sensitivity and fixed positions are compositional choices.

at

at(freq_hz) -> Placement

Place at a fixed frequency in Hz, or start an explicitly moving voice here. With explicit seek_consonance() and free pitch, this sets the starting position. Otherwise it locks the pitch. freq() and anchor() lock it; seek_consonance() enables movement.

Evidence: Not a mechanism (placement): initial position, extent or population count (§9.3.56).

consonance

consonance(root_hz) -> Placement
consonance(min_hz, max_hz) -> Placement

Target consonance maxima. Density cloud by default; .peak() for the extremum. consonance(root) takes a harmonic window around a root (default 1x-4x, set multiples with range()); consonance(min, max) takes an absolute range. Default spacing is 1.0 ERB.

Evidence: Not a mechanism (placement): reads H/R and the authored Consonance Field valuation; see set_roughness_aversion, set_harmonicity_preference and set_pitch_objective.
Principle: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: extrema, density, spacing or tension-based selection (§9.3.56).

dissonance

dissonance(min_hz, max_hz) -> Placement

Target consonance minima (tension, clusters). Density cloud by default; .peak() for the most dissonant point.

Evidence: Not a mechanism (placement): reads H/R and the authored Consonance Field valuation; see set_roughness_aversion, set_harmonicity_preference and set_pitch_objective.
Principle: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: extrema, density, spacing or tension-based selection (§9.3.56).

edge

edge(min_hz, max_hz) -> Placement

Target the consonance/dissonance boundary (C near its midpoint). The metastable region between fusion and beating. Density band by default; .peak() for the point closest to the boundary.

Evidence: Not a mechanism (placement): reads H/R and the authored Consonance Field valuation; see set_roughness_aversion, set_harmonicity_preference and set_pitch_objective.
Principle: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: extrema, density, spacing or tension-based selection (§9.3.56).

gap

gap(min_hz, max_hz) -> Placement

Target empty registers (low subjective intensity); fill the room. Density cloud by default; .peak() for the emptiest position.

Evidence: Not a mechanism (placement): reads H/R and the authored Consonance Field valuation; see set_roughness_aversion, set_harmonicity_preference and set_pitch_objective.
Principle: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: extrema, density, spacing or tension-based selection (§9.3.56).

peak

peak()

Applies to: Placement.

Realize a field target as its deterministic extremum.

Evidence: Not a mechanism (placement): reads H/R and the authored Consonance Field valuation; see set_roughness_aversion, set_harmonicity_preference and set_pitch_objective.
Principle: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: extrema, density, spacing or tension-based selection (§9.3.56).

density

density()

Applies to: Placement.

Realize a field target as a stochastic cloud (the default).

Evidence: Not a mechanism (placement): reads H/R and the authored Consonance Field valuation; see set_roughness_aversion, set_harmonicity_preference and set_pitch_objective.
Principle: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: extrema, density, spacing or tension-based selection (§9.3.56).

tension

tension(degree)

Applies to: Placement.

Bias Consonance placement toward a field-score step below the in-range maximum (degree 0..1). Consonance placement only. 0 leaves ordinary Consonance placement unchanged: peak() selects the strongest peak, while the default density remains the ordinary Consonance cloud. Higher values target a weaker, more tense step (target = L_max - degree*(L_max - L_min) over the range, in field_score). Pairs with peak() (nearest step, sharp) or density (a broader cloud around it).

Evidence: Not a mechanism (placement): reads H/R and the authored Consonance Field valuation; see set_roughness_aversion, set_harmonicity_preference and set_pitch_objective.
Principle: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: extrema, density, spacing or tension-based selection (§9.3.56).

random

random(min_hz, max_hz) -> Placement

Log-uniform random placement inside a frequency range.

Evidence: Not a mechanism (placement): initial position, extent or population count (§9.3.56).

line

line(start_hz, end_hz) -> Placement

Linear interpolation of positions between two frequencies.

Evidence: Not a mechanism (placement): initial position, extent or population count (§9.3.56).

count

count(n)

Applies to: Placement.

Positive number of founder voices to place (default 1).

Evidence: Not a mechanism (placement): initial position, extent or population count (§9.3.56).

range

range(min_mul, max_mul)

Applies to: Placement.

Multiplier range relative to the root; only valid on consonance(root).

Evidence: Not a mechanism (placement): initial position, extent or population count (§9.3.56).

spacing

spacing(min_erb)

Applies to: Placement.

Minimum ERB distance between placed voices; valid on field placements.

Evidence: Not a mechanism (placement): reads H/R and the authored Consonance Field valuation; see set_roughness_aversion, set_harmonicity_preference and set_pitch_objective.
Principle: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: extrema, density, spacing or tension-based selection (§9.3.56).

Timeline & Populations

place() creates a Population at the current script time. wait() advances the cursor; flush() emits pending live patches without advancing it; scopes release their populations automatically.

place

place(population_spec, placement) -> Population

Create a Population at the current script time. place() is the sole Population boundary. Configure initial-only properties on the PopulationSpec first; the returned Population exposes only live patches and release.

Evidence: Not a mechanism (macro form): scenario timing, placement or release; input mechanisms retain their own labels.

observe_harmonic_relations

observe_harmonic_relations(max_sources)

Reserve harmonic relation observation before time advances in an endless scenario. Required for either signed nonzero follow_harmonic_relations or follow_harmonic_continuation weight in endless scenes. max_sources is the declared maximum simultaneous Voice and Flora lane sources, including retiring sources; it is a positive integer bounded by the 38400 structural-record capacity. The background observer starts at sample zero. A late declaration or an unreserved nonzero control is a positioned script error. Finite scenes warn and ignore the declaration and retain event pre-scanning. Vertical support scans run from the start of every endless scene without a declaration.

Evidence: Author rule: reserve harmonic relation history and source capacity from the start of an endless performance.

observe_tonal_context

observe_tonal_context()

Reserve tonal-context observation before time advances in an endless scenario. Required before placing a positive follow_tonal_context weight in endless scenarios. A late declaration or an unreserved positive placement is a positioned script error. Finite scenarios warn and ignore this declaration; their placements still determine observation and table construction.

Evidence: Author rule: reserve tonal-context observation from the start of an endless performance.

endless

endless()

Declare an open-ended performance before playback events and time advances. Call once at top level. After the script returns, the ecology keeps sounding, even with no queued events. End with the GUI End button, the first Ctrl-C, or –duration; Exit and the second Ctrl-C stop immediately. Evaluation runs incrementally on a dedicated thread. Unbounded loops must advance score time with wait(). Declare scene headers before time advances; parallel is unavailable. Release repeated placements or scope them with section/play. Compile-only and render require –duration.

Evidence: Not a mechanism (macro form): scenario timing, placement or release; input mechanisms retain their own labels.

wait

wait(seconds)

Emit pending live patches, then advance the timeline cursor.

Evidence: Not a mechanism (macro form): scenario timing, placement or release; input mechanisms retain their own labels.

flush

flush()

Emit pending live patches without advancing time.

Evidence: Not a mechanism (macro form): scenario timing, placement or release; input mechanisms retain their own labels.

release

release(population)

Close a live Population; its voices enter their release phase and fade out. Release is terminal at the scripting surface: later live patches on the same Population are ignored.

Evidence: Not a mechanism (macro form): scenario timing, placement or release; input mechanisms retain their own labels.

listener_profile

listener_profile(name)

Choose the scene’s initial listener profile: sensory (default) or tonal. Call before scene actions/scopes. Sensory preserves the author-rule base. Tonal inherits follow_own_sequence=0.05, melodic_continuity=0.00076066292, phrase_boundary=1, and final-section arch/ritard=1/1. These are audition weights, not author-adopted values; ME matches the displaced terms’ mean absolute contribution. Candidate models and author-rule adapters retain their individual evidence labels. TC is excluded: its table costs about 1 GB/80 seconds and approximation acceptance covers [0.25,1] at measured weights 0.25/0.5/1. Explicit Population values, including zero, win. Unsupported final Voices are silently skipped. Expression requires existing whole-scene PE support; absent/unsupported sections are silent. Explicit expressive_section, including zero, wins. Individual axes default to zero; sensory remains the default until separate author adoption.

Evidence: Not a mechanism (profile selection): see follow_own_sequence, melodic_continuity, phrase_boundary and expressive_section for candidate models and author rules.

expressive_section

expressive_section(name, arch_weight, ritard_weight, callback)

Give a known final section a loudness arch and a shared slowing clock. Initial-only finite nonnegative weights, neutral at zero and saturated at one. Same scope and releases as section. Acts on all Voice PCM, including outer populations and tails. Supports immediate Once without free rearticulation and non-sustained synchronized metric voices; Flora, participation, sustained metric and rest are unsupported. Every population must be released by the end. Unsupported scenes warn and ignore the whole effect. Ritard freezes generation phase velocity and renewal while auditory observation continues; gate durations follow the score map, body envelopes and release tails keep physical seconds. Only one nonzero final section; both zero follows the unchanged section path. This is authored form, not perceived closure.

Evidence: Candidate: Todd (1992) single-layer intensity and Friberg–Sundberg (1999) q=3 timing curve; not a verified brain mechanism.
Author rule: known final interval, weight saturation, amplitude floor, frozen generation clock and supported voice restrictions (§9.3.109).

section

section(name, callback)

Named scope; populations placed inside are released when the callback returns.

Evidence: Not a mechanism (macro form): scenario timing, placement or release; input mechanisms retain their own labels.

play

play(callback)
play(callback, arg1)
play(callback, arg1, arg2)
play(callback, arg1, arg2, arg3)
play(callback, [args])

Scoped callback execution with automatic population release. Accepts 0-3 positional arguments, or an array of arguments.

Evidence: Not a mechanism (macro form): scenario timing, placement or release; input mechanisms retain their own labels.

parallel

parallel(callbacks)

Run an array of closures on parallel timelines from the current cursor. Each branch starts at the current cursor; the cursor advances to the latest branch end.

Evidence: Not a mechanism (macro form): scenario timing, placement or release; input mechanisms retain their own labels.

room

room(mode)

Select the acoustic room for the whole piece. Use off for dry mono, presentation for stereo reflections at the audience, or both to include reflections in the habitat. Without sites, presentation uses a 12 m audience distance and both keeps the original 23.5 m balance. The last finite declaration overrides [room].mode from the beginning of the piece. Wet modes require 48 kHz. In endless scores declare room before time advances; both requires a finite score.

Evidence: Principle: direct sound and reflections superpose linearly. The fixed responses approximate one measured acoustic setting.
Not a mechanism (composition): the composer chooses which buses hear the room.

output_gain

output_gain(db)

Set scene-wide playback gain in dB (default 0). The last declaration wins for the whole scene, even after wait(). Added to [audio].output_gain_db; amplitude = 10^((config dB + scene dB)/20), applied immediately before the cpal/WAV output limiter, including limiter none. Analysis, listener, reports and UI bus meters remain unchanged. Accepts integers and floats; values and the combined gain must yield a finite, positive f32 amplitude gain. Invalid values report the declaration position; limits come from f32 representability, not a loudness target.

Evidence: Not a mechanism (operation): output, reproducibility or research execution settings (§9.3.56).

seed

seed(value)

Set the random seed for reproducible scenarios. For a scene, initial RNG seed; a script declaration overrides the CLI seed, and the last declaration wins. For a ModePattern, sets that pattern’s private seed. Integer >=0; no fixed seed in top-level composing samples.

Evidence: Not a mechanism (operation): output, reproducibility or research execution settings (§9.3.56).

Body & Timbre

Sound body parameters of a voice: level, spectrum, detuning, and envelope.

amp

amp(value)

Applies to: PopulationSpec and Population. Live-patchable: updates running voices in a Population.

Amplitude in 0.0-1.0.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

freq

freq(hz)

Applies to: PopulationSpec and Population. Live-patchable: updates running voices in a Population.

Frequency lock in Hz; implies an anchored pitch (see anchor()).

Evidence: Author rule: pitch movement, proposal selection or search cost (§9.3.57, §9.3.98–99); existing base defaults remain active.

brightness

brightness(value)

Applies to: PopulationSpec and Population. Live-patchable: updates running voices in a Population.

Spectral brightness in 0.0-1.0 (harmonic/modal bodies).

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

attack_noise

attack_noise(db)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Add a short band-limited noise burst on every harmonic attack. Initial RMS in dB relative to the note amplitude at unit impulse, up to 0 dB. Omitted or −80 dB is silent. The burst starts at the strike and decays independently of the note envelope with a 15 ms time constant.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

spread

spread(value)

Applies to: PopulationSpec and Population. Live-patchable: updates running voices in a Population.

Amount of unison layering in [0,1], default 0: width and depth together. With unison(n) above one, the copies spread up to ±24·value cents around the centre, and a copy at relative offset u (−1 to 1) has relative amplitude value^|u|. With an odd count a small value gives narrow, shallow layering around the centre copy; an even count has no centre copy, so its central pair keeps equal weight and beats at full depth. 1 gives equal copies. The copies’ powers sum to the uncopied power, so the mean level stays the same. Zero leaves a single copy.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

unison

unison(count)

Applies to: PopulationSpec and Population. Live-patchable: updates running voices in a Population.

Number of unison copies (1-9, default 1); spread sets how far and how strongly they layer.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

modes

modes(pattern)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Set the mode pattern of a modal body. See the Mode Patterns section for constructors and modifiers.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

adsr

adsr(attack_sec, decay_sec, sustain_level, release_sec)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

ADSR amplitude envelope. Attack, decay and release are nonnegative seconds; sustain level is in [0,1]. Omission uses the selected body’s envelope. An explicit envelope alone does not add a mortality drain.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

Phonation & Rhythm

When and how long a voice sounds. Tier 1 picks a region on the rhythm timing presets (metric(), entrained(), steady(), flow()); Tier 2 sets explicit when/duration; Tier 3 is expert tuning. Calls on the same axis are last-write-wins, and modifiers are remembered and applied when their matching preset is selected.

brain

brain(name)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Articulation life: "entrain" (default), "seq", or "drone". Selects articulation life independently of onset timing. entrain responds to consonance and metabolism. seq holds for 1 second, ignoring metabolic controls. drone lives until release, with a 0.05 Hz sway whose base amplitude multiplier ranges from 0.3 to 1.0 before rhythm relaxation gain. A drone that declares endurance() also runs the continuous energy economy (endurance, recovery, consonance_viability) and leaves when its energy is spent; its amplitude does not follow its energy. Other explicit metabolic and articulation-rhythm controls ignored by seq/drone produce warnings.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

sustain

sustain()

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Sustain phonation mode (default). The default is a continuous note until release. Explicit sustain() combined with metric(), entrained(), steady() or flow(), in either order, retains the sounding Tone between opportunities. A selected attack replaces it; waiting or skipping retains it. Add cycles() or adaptive_duration() with rest() for finite notes separated by pauses. See the Rhythm chapter for pitch application, tie and persistence.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

phrase_boundary

phrase_boundary(w)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Soften one new Sine onset after a confirmed local self boundary. Initial-only finite nonnegative weight, default 0. Requires Sine, sustained metric/entrained/steady/flow and discrete pitch; unsupported final forms warn and disable it. Candidate model: LBDM (Cambouropoulos 2001). Online adaptation and the post-boundary response are author rules. Renderer execution receipts are published after each hop, separately from SQ-1 issuance records. A six-onset window uses pitch/IOI/rest weights .25/.50/.25. Caps are one octave and four initial bodily cycles (an author mapping to a whole note), fixed at birth. The first existing opportunity consumes the response even if vetoed. A legal new Tone receives gain 1/(1+w*B), without changing strength, clocks or release. See Rhythm for support, expiry and evidence limits.

Evidence: Candidate (LBDM, Cambouropoulos 2001): local boundary model with pitch/IOI/rest weights .25/.50/.25; implementation checks do not reproduce the original program or corpus results (§9.3.106).
Author rule: finite-sequence completion, six-onset online adaptation, birth-fixed caps and post-boundary gain 1/(1+w*B) on one later legal Sine onset. Weight defaults 0; no default listener preset adoption (§9.3.106).

rest_on_habituation

rest_on_habituation(w)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

End sustained spans probabilistically as heard attacks become familiar. Initial-only finite nonnegative f32 weight, default 0. Values above 1 proportionally increase exit rate without changing its law. Requires explicit sustain() with metric(), entrained(), steady() or flow(). Shared habitat attack habituation drives exit; private executed attacks govern return after all tails end. Onsets remain on existing legal opportunities and may be vetoed. rest() adds its fixed tail-following gap before recovery resumes. Uses habituation enabled/satiation_sec/recovery_sec; disabled habituation prevents exits. This is an author rule, not phrase perception. Invalid or unsupported values warn and are ignored. Replacements inherit the weight but reset private state.

Evidence: Principle: habituation as an input function (§9.3.60).
Author rule: current habituation erosion law and engineering time/drive constants (§9.3.60).
Author rule: probabilistic span exit and private recovery/return; neutral at weight 0 (§9.3.96, §9.3.101).

rest

rest()
rest(periods)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Release each finite participation note, then leave a rest after all its tails finish. Requires explicit sustain() with metric/entrained/steady/flow and an explicit finite duration (cycles() or adaptive_duration()), in either builder order. After release, wait until all tails finish, then wait the requested number of intrinsic body periods. Default 1 period; finite nonnegative values have no upper cap, invalid values become zero. Without a known period it keeps waiting. The next legal opportunity may sound; expiry never forces an onset. Released tails keep their pitch.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

repeat

repeat()

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Repeated/pulsed phonation mode.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

metric

metric()

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Confidence-weighted rate and phase attraction to the acoustically confirmed beat. Attracts rate and phase to the beat confirmed from sound; before confirmation, each Voice free-runs with an independent phase. Default entrainment 0.95. The starting rate is the scene’s final tempo-basin center, or 2 Hz without a basin. Every crossing is an opportunity, subject to lifecycle, gates and rests. Explicit sustain() retains a Tone between crossings. See pitch_apply_mode() and tie() for how pitch and attacks meet.

Evidence: Principle: beat perception as input (§9.3.56).
Candidate (source match pending): Large neural-resonance oscillator form and Large & Jones (1999) simulation gains; source agreement and candidate acceptance are not established here.
Author rule: participation, coupling defaults and priors; metric uses entrainment 0.95, meter_stability defaults 0 and an unspecified basin centers on 2 Hz. These values are not derived principles.

entrained

entrained()

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Adaptive acoustic participation with a lifetime-fixed bodily scale. Uses the intrinsic body period (default 2 Hz) as a starting scale, then adapts participation to heard recurrence. At each opportunity, acoustic context selects sounding, waiting or skipping. Default entrainment 0.5. intrinsic_rate() sets the body scale. Explicit sustain() retains a Tone while opportunities continue; without it, notes have finite duration.

Evidence: Principle: beat perception as input (§9.3.56).
Author rule: participation, skip and recurrence policies and coupling values; intrinsic_rate supplies an initial body scale (§9.3.55–57).

steady

steady()

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Fixed private due times; acoustic context selects sound or skip. Keeps a private due-time grid at the intrinsic body period (default 2 Hz). Acoustic context selects sounding or skipping at due time; it does not shift the grid. Default entrainment 0.5. intrinsic_rate() sets the body scale. Explicit sustain() retains a Tone between opportunities.

Evidence: Principle: beat perception as input (§9.3.56).
Author rule: participation, skip and recurrence policies and coupling values; intrinsic_rate supplies an initial body scale (§9.3.55–57).

flow

flow()

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Irregular bodily renewal with acoustic timing choices. Draws irregular renewal intervals at the intrinsic body scale (default 2 Hz), with acoustic context selecting sounding, waiting or skipping. Default entrainment 0.05. intrinsic_rate() sets the body scale. Finite note lengths use three times the body period. Explicit sustain() retains a Tone between opportunities.

Evidence: Principle: beat perception as input (§9.3.56).
Author rule: participation, skip and recurrence policies and coupling values; intrinsic_rate supplies an initial body scale (§9.3.55–57).

intrinsic_rate

intrinsic_rate(hz)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Set the intrinsic bodily rate at creation for entrained()/steady()/flow(), in Hz. Initial-only body rate for entrained(), steady() and flow(), in Hz. Default 2 Hz; finite range 0.01..=200 Hz protects execution. Either builder order works. It scales cycles(), finite durations and rest() together; ADSR release stays in seconds. Replacements start from the Population template. Other timing forms warn and ignore it. This sets a body scale, not a required onset rate.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

entrainment

entrainment(strength)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Preset-specific acoustic timing influence or beat-rate and phase attraction. Order-independent with presets: entrainment(0.8).metric() and metric().entrainment(0.8) are equivalent. Within a selected preset it changes the timing influence, not the preset. For entrained(), it weights acoustic period adaptation and timing costs; for flow(), acoustic timing costs while the renewal scale stays fixed; for steady(), sound-or-skip costs without adapting the period or moving due. For metric(), beat confidence weights its attraction of both effective rate and phase toward the confirmed beat. Omitted values are 0.95 for metric(), 0.5 for entrained()/steady() and 0.05 for flow(). Zero removes these acoustic timing influences; flow still draws irregular renewal intervals. Without an already coupled timing specification, a bare call initializes Coupled timing with its defaults.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

rhythm_role

rhythm_role(name)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Metrical job: "beat", "subdivision", "accent", or "texture". accent emits a stronger onset that drives the shared meter harder, so a recurring downbeat can seed an emergent measure.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

measure_accent

measure_accent(amount)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Weak onset emphasis following the emergent measure, amount 0-1 (default 0). Scales onset strength by 1 + 0.35 * amount * measure confidence * cos(measure phase). Zero phase follows observed accents. With no detected measure, strength stays unchanged. Does not schedule onsets or impose a grouping. Order-independent with metric/entrained/steady/flow presets.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

microtiming

microtiming(amount)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Signed beat-phase offset for metric timing, in -0.5..0.5. A value of 0.5 offsets the synchronized target by half a beat. Does not place entrained/steady/flow participants at fixed offsets.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

cycles

cycles(n)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Duration of n rhythm cycles. For entrained/steady/flow, duration uses the intrinsic bodily period set by intrinsic_rate(hz), or 2 Hz when omitted, independently of acoustic cadence adaptation. Metric timing uses its effective beat period. Flow retains its threefold hold multiplier. With rest(), this finite duration is retained independently of sustain() and the participation preset, and each sounded note releases at its scheduled end.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

tie

tie(p)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Extend a living Tone with probability p at an opportunity without pending pitch. Initial-only probability in [0,1] for free-pitch explicit sustained metric/entrained/steady/flow with gate_snap or rearticulate. At a selected opportunity without pending pitch, extend the living Tone with probability p; otherwise attack. Pending targets and initial/post-rest onsets still attack. Default 1 for sustained metric, 0 for sustained participation. Finite Off, tails, rest and release take priority. Unsupported explicit settings warn and are ignored. This thins opportunities; it does not select phrases or move their timing.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

articulation_persistence

articulation_persistence(p)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Retain a Voice’s private articulation policy across pitch adoptions and sustained clock opportunities. Initial-only policy inertia in [0,1], default 0. Requires free-pitch sustained metric/entrained/steady/flow, rearticulate and a positive boundary. Base follows that boundary; Connect glides adoptions and extends living Tones at sounded opportunities. Small moves and cost skips propose Connect; large moves and selected sounding propose Base. For 0<p<1, opposing proposals retain the policy with probability p. Endpoints use Base. Rest, release and legal initial onsets take priority. Unsupported settings warn and are ignored. This is policy inertia, not a legato proportion.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

Pitch Movement

How a voice moves through the consonance field. seek_consonance(), glide(), and temperature() (movement tension) form the curated surface; the rest tunes the hill-climb and peak-sampler mechanisms.

dwell

dwell(w)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Slow pitch proposals while the current environment level is high. Initial-only author rule for free seek_consonance(), default 0. Finite nonnegative f32 weights have no upper clamp; negative, non-finite or unsupported values warn and become 0. Proposal phase advances at max{0,1+w*(1-2L)}; L is the habituated environment level at the current pitch, using pitch self-exclusion when available. For w>1 it stops at L>=(1+1/w)/2; maximum speed is 1+w at L=0. Replacements inherit weight and reset phase. Gap preserves the clock. Adaptation and movement costs retain their time units. Proposals never force onsets or change sound duration. See the Rhythm chapter for interpolation, conversion and why habituation does not guarantee departure.

Evidence: Principle: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Principle: habituation as an input function (§9.3.60).
Author rule: current habituation erosion law and engineering time/drive constants (§9.3.60).
Author rule: proposal delay driven by the habituated field level; neutral at weight 0 (§9.3.98).

follow_tonal_context

follow_tonal_context(w)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Favor pitches that fit the recently heard harmonic context. Initial-only finite nonnegative weight, default 0. At 48 kHz, adds w*q after candidate generation and before the current-pitch dwell sigmoid; ownership follows leave_self_out. Requires free, stepwise sustained seek_consonance(), rearticulate_above(0), no glide/persistence; unsupported forms warn and ignore it. Declared approximation range [0.25,1], based on weights 0.25/0.5/1: 4-6/362 argmax changes (1-2%), within 1/10 of TC effects; dwell sign changes zero. 0.125 and 2 failed. Outside this range acceptance is unverified; values remain valid without warnings. When enabled, the shared 9,673-node table costs about 1 GB and 80 seconds, estimates rather than limits. This cost excludes TC from PRE-1. See Rhythm for unknown fallback and scope.

Evidence: Candidate (source matched): IPEM sensory short-term memory, 40-channel ANI, periodicity pitch and 0.1/1.5-second half-lives. This implements a hypothesis, not an established brain mechanism.
Author rule: sine probe, tabulated approximation, raw correlation readout, candidate rescoring and dwell coupling; default weight 0 (§9.3.110).

melodic_continuity

melodic_continuity(w)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Favor pitches predicted by the range and mobility of committed self onsets. Initial-only finite nonnegative score/bit weight; default 0. Requires free seek_consonance(), stepwise sustained participation and rearticulate_above(0), without glide or persistence. Invalid or unsupported final forms warn and disable it. Candidate: von Hippel (2000), text-consistent AR(1) equations. Prefix estimation and generation coupling are author rules. A known snapshot replaces movement cost and fixed-center gravity before candidate extraction; its log-density difference is added after extraction. Unknown statistics restore the current old terms. Four or more onsets and certified positive variance are required. SQ-1 can coexist independently. Replacements inherit only the weight. No rhythm, harmony or phrase learning. See Rhythm for support and resource limits.

Evidence: Candidate: von Hippel (2000), text-consistent AR(1) mean and variance; not an author-approved erratum.
Author rule: finite-prefix Pearson estimation, committed self-onset adapter, continuous log-density scoring and replacement of movement cost and fixed-center gravity (§9.3.108).

follow_own_sequence

follow_own_sequence(w)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Favor continuations learned from this Voice’s executed pitch intervals. Initial-only finite nonnegative score/bit weight; default 0, example 0.05. Negative or non-finite values warn and become 0. Requires free seek_consonance(), sustained metric/entrained/steady/flow, gate_snap or rearticulate, and rearticulate_above(0). Glide and unsupported final forms warn and disable it. Existing tie behavior remains. Candidate model: PPM-Decay (Harrison, Bianco, Chait, Pearce 2020). Symbol encoding and generation coupling are author rules. Learns rounded intervals from committed self onsets; output stays unquantized. Adds follow after candidate generation. Replacements inherit weight but start empty. No rhythm, harmony or phrase learning. See Rhythm for resource limits and numerical failures.

Evidence: Candidate (PPM-Decay, Harrison et al. 2020): fixed published-analysis model; source fixtures cover distributions, information content and learning state, not R API or RNG equivalence (§9.3.105).
Author rule: executed-interval encoding, execution adaptation and follow scoring after candidate generation; weight defaults 0. No default listener preset adoption (§9.3.105).

anchor

anchor()

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Hold the voice at its pitch: an anchored voice never moves. at() anchors implicitly unless the final spec explicitly seeks consonance and remains free; in that case it sets only the initial position. freq() still sets an anchored pitch. A later anchor() or freq() overrides movement, while a later seek_consonance() restores it. Use anchor() to hold strategy-placed voices (consonance(), dissonance(), …) at their settled position, or to state the intent explicitly.

Evidence: Author rule: pitch movement, proposal selection or search cost (§9.3.57, §9.3.98–99); existing base defaults remain active.

seek_consonance

seek_consonance()

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Free movement toward better field positions; defaults to hill-climb and a 0.30-second glide. With this explicit intent and a final free pitch mode, at(hz) sets only the initial position. A later freq() or anchor() restores the lock; calling seek_consonance() after either restores movement. How pitch decisions land is resolved at placement unless pitch_apply_mode() was called: sustained voices glide, re-attacking voices (pulse(), metric(), entrained(), steady(), flow()) snap at onsets. Explicit glide() and pitch_core() choices override these defaults in either builder order.

Evidence: Principle: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: consonance valuation and local search, including weights and glide defaults (§9.3.98).

glide

glide(tau_sec)

Applies to: PopulationSpec and Population. Live-patchable: updates running voices in a Population.

Pitch glide time constant in seconds. Glide time constant in seconds, nonnegative. seek_consonance() defaults to 0.30 seconds unless explicitly set; otherwise the control default is 0 seconds. Applies in glide mode and to small moves in rearticulate mode.

Evidence: Author rule: pitch movement, proposal selection or search cost (§9.3.57, §9.3.98–99); existing base defaults remain active.

rearticulate_above

rearticulate_above(cents)

Applies to: PopulationSpec and Population. Live-patchable: updates running voices in a Population.

Nonnegative boundary in cents from the last sounded pitch; default 0. Distance boundary in cents, nonnegative, default 0. Requires rearticulate mode; other modes warn and ignore it. Adopted moves at or below a positive boundary glide; larger ones wait for a sounded opportunity, or attack at adoption in continuous Hold without coupled timing. The reference is the last actual onset pitch. Zero uses gate_snap behavior for sustained coupled timing. A live boundary change applies at the next adoption.

Evidence: Author rule: pitch movement, proposal selection or search cost (§9.3.57, §9.3.98–99); existing base defaults remain active.

pitch_apply_mode

pitch_apply_mode(name)

Applies to: PopulationSpec and Population. Live-patchable: updates running voices in a Population.

"gate_snap", "glide" or "rearticulate": choose how adopted pitch targets are applied. Choose gate_snap, glide or rearticulate. Moving continuous and explicitly sustained voices default to glide; finite gated voices default to gate_snap. Gate_snap holds the latest adopted target for a sounded opportunity. Glide slides continuously. Rearticulate uses rearticulate_above() to glide small moves and defer larger ones; continuous Hold without coupled opportunities attacks at adoption. Free-pitch finite gated rearticulate is an error. Live mode changes keep the sounding Tone, clear pending attacks and emit no attack. Sustained metric uses shared-beat crossings; sustained participation can wait or skip.

Evidence: Author rule: pitch movement, proposal selection or search cost (§9.3.57, §9.3.98–99); existing base defaults remain active.

temperature

temperature(value)

Applies to: PopulationSpec and Population. Live-patchable: updates running voices in a Population.

Search temperature shared by both pitch cores: 0 settles greedily, higher is more exploratory. The single stochastic-search knob. At 0 the hill-climb is greedy (move only on a clear improvement, otherwise stay) and the peak sampler takes the argmax candidate. Higher values let the hill-climb accept downhill moves (Metropolis) and soften the peak sampler’s candidate choice. Musically the movement-tension dial; its placement twin is tension().

Evidence: Author rule: pitch movement, proposal selection or search cost (§9.3.57, §9.3.98–99); existing base defaults remain active.

proposal_interval

proposal_interval(seconds)

Applies to: PopulationSpec and Population. Live-patchable: updates running voices in a Population.

Proposal generation interval in seconds. Controls opportunities to propose a pitch target, not the bodily participation rate set by intrinsic_rate(hz). A proposal or adoption is not necessarily a sounded onset.

Evidence: Author rule: pitch movement, proposal selection or search cost (§9.3.57, §9.3.98–99); existing base defaults remain active.

tail_roughness_aversion

tail_roughness_aversion(w)

Applies to: PopulationSpec and Population. Live-patchable: updates running voices in a Population.

Choose how strongly pitch avoids roughness with one’s outgoing sound. Author rule, default 0, initial and live. Finite [0,1]; invalid values warn and clamp with the existing unit-interval rule: positive infinity becomes 1, negative infinity and NaN become 0. Only leave_self_out(true) candidates that actually replace a held Tone with Off/On blend external R and mixed R with weights 1-w and w; H stays self-excluded, with the existing field coefficients and sigmoid. Zero preserves the original default path; one uses the accepted VR-1 view. Lock, holds, Glide, GateSnap and deferred candidates without proposal-triggered On are unaffected. Positive weight with leave_self_out(false) has no effect and warns once per Population. Shared harmonic opportunities use the same eligibility. No future release or candidate-body prediction; environment, Flora, routing and release remain unchanged.

Evidence: Author rule: composer-selected aversion to roughness with one’s outgoing sound, default 0; sensation is unchanged (DCC §5, §9.3.120).

Neighbor Awareness

How a voice perceives other voices and its own spectral footprint when evaluating the field.

avoid_neighbors

avoid_neighbors(strength)
avoid_neighbors(strength, sigma_cents)

Applies to: PopulationSpec and Population. Live-patchable: updates running voices in a Population.

Crowding repulsion from neighboring voices. With one argument the repulsion width uses the default; the two-argument form sets it explicitly in cents.

Evidence: Author rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).

leave_self_out

leave_self_out(enabled)

Applies to: PopulationSpec and Population. Live-patchable: updates running voices in a Population.

Exclude one’s actual habitat sound when choosing pitch. Default false, unlike Flora’s true. Actual habitat PCM is removed before the auditory front end. With the default tail_roughness_aversion(0), both H and R exclude all own sound, as before. Positive tail_roughness_aversion optionally blends mixed R into actual Off/On pitch candidates while retaining external H. Environment recovery, shared snapshots and Flora remain unchanged.

Evidence: Principle: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: self-exclusion. Voice defaults false, Flora true. Voice H/R both exclude self by default; tail_roughness_aversion optionally mixes R for actual Off/On pitch candidates. Environment recovery and Flora retain their contracts (§9.3.95, §9.3.120).

Lifecycle & Viability

Time-domain survival and recovery. endurance() states nominal zero-fit lifetime; recovery() states full-scale continuous recovery time. consonance_viability() defines the recovery window, with environment-relative scoring by default.

endurance

endurance(seconds)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Nominal survival time at zero field fit, excluding the release tail. Energy is normalized to 0-1. The runtime drain rate is derived at spawn; actual lifetime varies with field fit, attacks, recovery, and release time.

Evidence: Author rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).

recovery

recovery(seconds)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Time to refill normalized energy from empty at full viability. Optional. If omitted, continuous recovery is disabled. This does not govern the separate per-attack economy.

Evidence: Author rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).

attack_cost_fraction

attack_cost_fraction(value)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Fraction of normalized energy spent by a full-strength attack.

Evidence: Author rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).

attack_recharge_fraction

attack_recharge_fraction(value)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Maximum normalized energy restored by a fully consonant attack.

Evidence: Author rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).

sustain_drive

sustain_drive(value)

Applies to: PopulationSpec and Population. Live-patchable: updates running voices in a Population.

Nonnegative dimensionless continuous drive for sustained voices, default 0.

Evidence: Author rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).

consonance_viability

consonance_viability(low, high)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Viability window in unbounded Consonance Field scores. Thresholds are finite Consonance Field scores, not bounded levels. Below low the continuous fitness is zero; above high it is one. Defaults to total without a viability window, environment with one; explicit viability_scope() overrides that default in either builder order.

Evidence: Author rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).

dissonance_penalty

dissonance_penalty(value)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

How strongly good field fit extends life beyond zero-fit endurance. The zero-fit endurance remains fixed; the penalty changes how much longer a well-fit voice survives.

Evidence: Author rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).

Respawn

Population turnover. A respawn policy decides where replacements appear when voices die; capacity and acceptance thresholds shape ecology-scale behavior.

respawn_random

respawn_random()

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Respawn without parent inheritance. Candidates come from the Population’s original Placement and, when set, respawn_settle() adds alternative candidates. The current scene score weights the final choice, so this is not uniform random placement.

Evidence: Author rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).

respawn_hereditary

respawn_hereditary(sigma_oct)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Respawn near an energy-weighted living parent with Gaussian standard deviation sigma_oct in octaves. Candidates share one selected parent. The candidate with the highest current Consonance Field level is used.

Evidence: Author rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).

respawn_consonance

respawn_consonance()

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Respawn from high field-score peaks, biased around an energy-weighted living parent. When living members exist, one parent is selected by energy. Candidate peaks come from the current Consonance Field and are weighted by scene score and their relation to the parent; without a usable peak, the policy falls back to the parent or original Placement.

Evidence: Author rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).

respawn_capacity

respawn_capacity(count)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Maximum number of living members in the Population. Defaults to the number of founder Voices created by place() and cannot be lower than that founder count.

Evidence: Author rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).

respawn_settle

respawn_settle(placement)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Add a Placement source to the replacement candidate pool. The policy’s own baseline still supplies one candidate; this Placement supplies the remaining alternatives. Requires a strategy-bearing placement: consonance(), dissonance(), edge(), gap(), random(), or line() (not at()).

Evidence: Author rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).

respawn_min_consonance

respawn_min_consonance(level)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Minimum consonance level for respawn acceptance. Minimum Consonance Field level in [0,1]; omitted means no level threshold. A level is a bounded sigmoid view of a score.

Evidence: Author rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).

respawn_spacing

respawn_spacing(cents)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Keep each replacement at least this many cents from every living Voice. Applies to respawn_consonance(); default 0 disables it. A replacement that would land closer moves to the nearest free frequency on a 0.05-semitone grid within 1.5 semitones, so Voices that gather on one pitch beat against each other instead of fusing. Negative or non-finite values become 0.

Evidence: Author rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).

respawn_background_death_rate

respawn_background_death_rate(rate)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Background turnover rate per second.

Evidence: Author rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).

Mode Patterns

Frequency relationships for modal() bodies. Constructors return a ModePattern; modifiers are chainable. Landscape-aware patterns deterministically select supported positions from the live field.

harmonic_modes

harmonic_modes() -> ModePattern

Harmonic series: f, 2f, 3f, …

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

odd_modes

odd_modes() -> ModePattern

Odd harmonics: f, 3f, 5f, …

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

power_modes

power_modes(beta) -> ModePattern

Power law: f * n^beta.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

stiff_string_modes

stiff_string_modes(stiffness) -> ModePattern

Stiffness-adjusted harmonics.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

custom_modes

custom_modes(ratios) -> ModePattern

Custom frequency ratios from an array.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

modal_table(name) -> ModePattern

Named mode table lookup. Canonical names: uniform_aluminum_bar, uniform_wooden_bar, xylophone, vibraphone_1, vibraphone_2, wine_glass. Names are case-sensitive; an unknown name is a script error.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

landscape_density_modes

landscape_density_modes() -> ModePattern

Modes selected from the strongest live landscape density-mass positions. Selection is deterministic: after each strongest position is chosen, nearby weights are suppressed according to spacing(). Falls back to harmonic modes when live landscape data yields no usable position.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).
Principle: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: selecting body modes from landscape density or peaks; valuation remains authored.

landscape_peaks_modes

landscape_peaks_modes() -> ModePattern

Modes selected from the strongest local peaks of the live Consonance Field level. Selection is deterministic and enforces the ERB separation from spacing(). Falls back to harmonic modes when live landscape data yields no usable peak.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).
Principle: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: selecting body modes from landscape density or peaks; valuation remains authored.

count

count(n)

Applies to: ModePattern.

Number of modes.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

range

range(min_mul, max_mul)

Applies to: ModePattern.

Frequency multipliers relative to the fundamental; only valid on landscape_*_modes().

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

spacing

spacing(min_erb)

Applies to: ModePattern.

Minimum ERB distance between modes; only valid on landscape_*_modes().

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

gamma

gamma(g)

Applies to: ModePattern.

Density sharpening exponent; only valid on landscape_density_modes().

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

jitter

jitter(cents)

Applies to: ModePattern.

Randomize mode frequencies by up to the given cents.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

seed

seed(value)

Applies to: ModePattern.

Random seed for jittered patterns (>= 0). For a scene, initial RNG seed; a script declaration overrides the CLI seed, and the last declaration wins. For a ModePattern, sets that pattern’s private seed. Integer >=0; no fixed seed in top-level composing samples.

Evidence: Not a mechanism (initial body): synthesis traits and initial conditions; see the selected body and behavior terms (§9.3.56).

Routing

Each voice contributes to two independent mono buses: the presentation bus (the work as heard) and the habitat bus (what the ecology senses through auditory analysis). By default a voice feeds both.

send

send(bus)

Applies to: PopulationSpec only.

Route the voice to specific buses; accepts a Bus or a BusSet. PopulationSpec only. send(habitat_bus) makes a voice sensed by the ecology but absent from the presented sound; send(presentation_bus) is heard without perturbing the ecology; send(habitat_bus | presentation_bus) feeds both (the default).

Evidence: Not a mechanism (routing): selects or combines buses; see leave_self_out for the independent self-perception rule.

Director & Global Parameters

Scene-global terrain shaping and research controls. Director verbs are soft priors: they shape the terrain and never schedule a beat or force a measure.

harmonic_rhythm

harmonic_rhythm(N)

Allow background changes on shared opportunities every N beats; zero is neutral. Author rule. Nonnegative integer N is a composer quantity. The last valid declaration is an initial premise for the entire finite scene, even after wait(). Endless scenes require it before time first advances. All Flora and birth-time Once/WhileAlive/Free stepwise Voices with zero rearticulation threshold participate. Respawn replacements enter one per shared opportunity, each after hearing the previous one; departures are not delayed. Pitch choice remains local. Unknown acoustic beats retain the shared prior clock. Release and support loss take priority. Other Voices retain their own timing; this is not perceptual foreground/background classification. No live N setter, chord table, measure alignment or harmonic cue is added.

Evidence: Author rule: shared opportunities for background changes. Zero is neutral; N is a composer quantity, not an inferred measure or a perceptual constant.

meter_stability

meter_stability(value)

Attractor depth in 0-1: how readily a pulse forms. Scene-wide initial condition in [0,1], default 0; the last declaration wins. Shapes how readily a beat forms and the influence of the tempo basin. It does not schedule onsets.

Evidence: Principle: beat perception as input (§9.3.56).
Candidate (source match pending): Large neural-resonance oscillator form and Large & Jones (1999) simulation gains; source agreement and candidate acceptance are not established here.
Author rule: participation, coupling defaults and priors; metric uses entrainment 0.95, meter_stability defaults 0 and an unspecified basin centers on 2 Hz. These values are not derived principles.

temporal_basin

temporal_basin(min_hz, max_hz)

Set the beat’s tempo band and metric Voice/Flora pace prior. Scene-wide initial condition: the last declaration applies to every metric Population and every Flora, regardless of cursor position. Bounds are Hz, sanitized to the supported tempo band; their center initializes metric Voices and attracts the inferred beat according to meter stability. Every Flora follows confirmed acoustic beats and otherwise returns to the center. Without a basin the center is 2 Hz. Participating presets use their own intrinsic rate. This does not schedule a beat.

Evidence: Principle: beat perception as input (§9.3.56).
Candidate (source match pending): Large neural-resonance oscillator form and Large & Jones (1999) simulation gains; source agreement and candidate acceptance are not established here.
Author rule: participation, coupling defaults and priors; metric uses entrainment 0.95, meter_stability defaults 0 and an unspecified basin centers on 2 Hz. These values are not derived principles.

set_roughness_aversion

set_roughness_aversion(weight)

How much the modeled listener minds roughness (default 1.0). Cursor event: changes roughness valuation from this script time onward. Dimensionless, nonnegative; zero removes aversion. Does not change raw roughness sensation.

Evidence: Author rule: consonance evaluation, sign or roughness preference; does not alter H/R sensation (§9.3.56). Existing valuation defaults remain active.

set_support_focus_preference

set_support_focus_preference(weight)

Signed preference for support focus. Cursor event; Author rule, default 0, finite values without an upper clamp. Voice movement requires leave_self_out(true). C/N adds time-averaged action differences to native scores/costs at supported opportunities. Holds use existing clocks; unsupported onset plans/horizons are neutral. Flora requires residual(false), preserves rearticulate pitch, and compares joint lanes/tails over common W; birth subtracts the selected trajectory. Merge densities before N. Static positioning, D, growth and clocks are unchanged. Temporal continuation is optional. Nonzero C/N adds integration and joint-comparison cost, varying with individuals/lanes/candidates, W and refinement; smaller nonzero weights need not cost proportionally less. Composers must check whole-scene real-time cost. See technote: C/N action computation cost.

Evidence: Author rule: support focus, template conflict and related novelty of candidate density addition. No symbolic harmony; movement requires actual PCM self-exclusion.

follow_harmonic_relations

follow_harmonic_relations(weight)

Signed preference for learned relations among changing destinations. Author rule cursor event; finite [-1,1], default 0. Positive favors support, negative favors departure. Paired consequences relative to the existing winner add to native scores, retaining habituation and bodily costs. With continuation zero this cannot turn movement into hold, wait or no-spawn. Unknown paired columns contribute zero. Both dispositions zero preserve choices and RNG bit-for-bit. Weight changes retain memory; no fixed key profile, chord label, progression table or corpus prior. Existing harmonic_rhythm, TC, PS, SQ, ME, PX and PE meanings remain unchanged.

Evidence: Author rule: signed relation and continuation consequences learned during the performance add to existing scores. Support is not a root or chord label; no fixed key profile, progression table or corpus prior is used.

follow_harmonic_continuation

follow_harmonic_continuation(weight)

Signed preference for learned support of continuation or departure. Author rule cursor event; finite [-1,1], default 0. Adds the bounded, paired continuation consequence to the existing score. Positive can favor holding, waiting at a legal opportunity, retaining a Flora lane or declining spawn when the learned continuation supports it; negative favors departure from that support. It does not create off-grid opportunities. Unsupported evidence is neutral. Both dispositions zero bypass prediction, preview and new random draws. Invalid values warn and are ignored; weight changes retain memory.

Evidence: Author rule: signed relation and continuation consequences learned during the performance add to existing scores. Support is not a root or chord label; no fixed key profile, progression table or corpus prior is used.

set_support_conflict_preference

set_support_conflict_preference(weight)

Signed preference for conflicting template support. Cursor event; default zero, finite values only, no upper clamp. Author rule integrating heard first-order support fields over body partials. Voice movement requires leave_self_out(true); spawn and Flora lane placement also consume the preference. Habituation and Flora growth keep their existing inputs. Partial densities are cached from the body spectral self-report at birth or reconfiguration. A body without a self-report uses a labeled single partial at its fundamental.

Evidence: Author rule: support focus, template conflict and related novelty of candidate density addition. No symbolic harmony; movement requires actual PCM self-exclusion.

set_related_novelty_preference(weight)

Nonnegative preference for related new spectral content. Cursor event; Author rule, default 0, finite values without an upper clamp. Voice movement requires leave_self_out(true). C/N adds time-averaged action differences to native scores/costs at supported opportunities. Holds use existing clocks; unsupported onset plans/horizons are neutral. Flora requires residual(false), preserves rearticulate pitch, and compares joint lanes/tails over common W; birth subtracts the selected trajectory. Merge densities before N. Static positioning, D, growth and clocks are unchanged. Temporal continuation is optional. Nonzero C/N adds integration and joint-comparison cost, varying with individuals/lanes/candidates, W and refinement; smaller nonzero weights need not cost proportionally less. Composers must check whole-scene real-time cost. See technote: C/N action computation cost.

Evidence: Author rule: support focus, template conflict and related novelty of candidate density addition. No symbolic harmony; movement requires actual PCM self-exclusion.

set_harmonicity_preference

set_harmonicity_preference(weight)

How much the modeled listener values harmonic support (default 1.0). Cursor event: changes harmonicity valuation from this script time onward. Dimensionless, nonnegative; finite weights are clamped to [0,100] and non-finite values are ignored. Zero removes the field’s harmonicity term and makes spawn density independent of harmonicity. The interaction term remains controlled by set_roughness_aversion. Does not change harmonicity sensation.

Evidence: Author rule: multiply the field’s a coefficient by the weight and use it as the exponent of density H01. H/R sensation is unchanged (§9.3.56).
Principle: Western consonance preference tracks harmonicity and grows with musical experience (McDermott, Lehr & Oxenham 2010); Tsimane listeners show no consonance preference (McDermott et al. 2016). This motivates a layer-3 valuation weight, not its mathematical form.

set_pitch_objective

set_pitch_objective(name)

Cursor event: choose consonance or dissonance valuation. Cursor event: changes pitch valuation from this script time onward. Canonical names: consonance (default) and dissonance (negative consonance). Does not change the sensation model.

Evidence: Author rule: consonance evaluation, sign or roughness preference; does not alter H/R sensation (§9.3.56). Existing valuation defaults remain active.

Experimental

Candidate core verbs under audition: composing surface by intent, but with research-grade stability until validated.

Flora

flora

flora() -> FloraSpec

Build a FloraSpec for spectral growth over a frequency extent. Defaults: pace 1, amp 0.03, fade 2 s, sine tone, residual disabled, leave_self_out true, both buses. Every Flora uses the shared habitat audio-only meter and a private CouplingClock (0.95). Fresh confirmed beats guide lane opportunities and ecological pace; unknown, stale or unconfirmed evidence restores continuous allocation and temporal_basin center pace (default 2 Hz). At frequency f and pace k, growth is 4kf/s, recovery is 20/(kf) seconds and consumption is 0.6/(kf) seconds. Pending windows reserve current excess once. While fresh confirmed beat observations are available, births occur at sample crossings. Support loss and release retire immediately. Birth ticks mark allocation; amplitude slew delays acoustic onset detection. All retiring lanes use a finite metabolic tail, bounded by macro fade; fade(0) ends immediately.

Evidence: Not a mechanism (initial body): Flora body, amplitude or fade choices; see flora and pace.
Author rule: underlying spectral growth, consumption and retirement ecology; not an auditory cognition model.

fade

fade(seconds)

Applies to: FloraSpec.

Set Flora’s placement and release fade in [0, 60] seconds. Requires a finite value before and after f32 conversion; invalid values raise script errors.

Evidence: Not a mechanism (initial body): Flora body, amplitude or fade choices; see flora and pace.
Author rule: underlying spectral growth, consumption and retirement ecology; not an auditory cognition model.

tone

tone(name)

Applies to: FloraSpec.

Choose Flora’s tonal atom: exactly “sine” or “resonant”. Other strings raise script errors.

Evidence: Not a mechanism (initial body): Flora body, amplitude or fade choices; see flora and pace.
Author rule: underlying spectral growth, consumption and retirement ecology; not an auditory cognition model.

residual

residual(enabled)

Applies to: FloraSpec.

Enable or disable rendering diffuse Flora mass as band noise. Disabled by default; residual(true) opts in.

Evidence: Not a mechanism (initial body): Flora body, amplitude or fade choices; see flora and pace.
Author rule: underlying spectral growth, consumption and retirement ecology; not an auditory cognition model.

respond_to_onsets

respond_to_onsets(w)

Applies to: FloraSpec.

Speed the Flora’s ecological time while new external onsets are heard inside its extent (finite nonnegative weight, default 0). Zero creates no state and reads nothing. Reads habitat attacks inside the extent (with sites: local external sound for self-exclusion, otherwise the full local mixture), skipping bins within 1.5 ERB of the Flora’s sounding lanes. A rise rho owes wtaurho extra ecological seconds (tau = satiation_sec/ln 10), spent at most w seconds per second, so unhabituated external onsets run the clock up to 1+w times faster; pace saturation still applies. Births stay on the Flora’s own crossings and the field chooses where; no onset, pitch or random draw is added. Unknown or regridded observations only re-prime. Disabled habituation warns once. Invalid values warn and use zero. Initial-only; the observer starts at scene start, including before later Flora placements.

Evidence: Principle: habituation as an input function (§9.3.60).
Author rule: current habituation erosion law and engineering time/drive constants (§9.3.60).
Author rule: faster Flora ecological time after rises in heard attack history outside its own partials; neutral at weight 0 (§9.3.138).

Rain

rain

rain() -> RainSpec

Build a RainSpec: impacts drawn one by one over a frequency extent, and resonant objects they strike. Defaults: amp 0.02, fade 2 s, rate 40 impacts/s, sway 0, hit 0.06, wine_glass impacts with width 0.05 octave, 3 objects with vibraphone_1 modes, object_decay 2 s, both buses. Impacts are Poisson, with no beat. Every impact strikes the same material at a centre drawn from the placement’s distribution, with fresh level, decay and mode offsets; it rings for tens of milliseconds at a new centre each time, so the texture has no musical pitch. Objects start on consonance peaks, at least 1 ERB apart, and drift toward higher consonance by at most a semitone each time they are struck, unless anchored. An impact lands on a uniformly chosen object with probability hit and strikes it at the same instant.

Evidence: Author rule: impact texture; impacts drawn one by one from distributions and resonant objects they strike; a composition rule, not an auditory model (docs/design-notes/rain.md).

fade

fade(seconds)

Applies to: RainSpec.

Set Rain’s placement and release fade in [0, 60] seconds.

Evidence: Not a mechanism (initial body): Rain amplitude, fade, impact material or object body; see rain.

rate

rate(impacts_per_second)

Applies to: RainSpec, Rain.

Set the mean impact rate in [0, 2000] per second. Impact times form a Poisson process at this rate, swayed by sway(); 0 stops new impacts. The bound limits per-sample work. Live patches take effect at once.

Evidence: Author rule: impact texture; impacts drawn one by one from distributions and resonant objects they strike; a composition rule, not an auditory model (docs/design-notes/rain.md).

sway

sway(octaves)

Applies to: RainSpec, Rain.

Let the impact rate fluctuate with a 1/f spectrum; depth in [0, 4] octaves, default 0. The rate becomes rate * 2^(depth * g), where g has unit variance and a 1/f spectrum from about 100 s down to 2.5 s periods; faster than that would read as a pulse. Depth is one standard deviation in octaves: 1 doubles or halves the rate at one deviation. The swayed rate is capped at 2000 per second. Struck objects follow the swayed rate.

Evidence: Author rule: 1/f fluctuation of activity from nine AR(1) processes between 0.4 and 102 s; motivated by auditory-cortex tuning to 1/f dynamics (Garcia-Lazaro et al. 2006), not a model of it.

hit

hit(probability)

Applies to: RainSpec, Rain.

Set the probability in [0, 1] that an impact strikes one of the objects. A struck object is driven at the impact’s own onset, scaled so its onset peak matches the impact’s level; the impact and the ring share their start.

Evidence: Author rule: impact texture; impacts drawn one by one from distributions and resonant objects they strike; a composition rule, not an auditory model (docs/design-notes/rain.md).

width

width(octaves)

Applies to: RainSpec, Rain.

Set the half range in [0, 5] octaves by which each impact mode strays from impact_modes. Each impact draws a fresh offset for every mode. At the default 0.05 (60 cents) every impact is recognisably the same material. Wider ranges scatter the modes until impacts lose their material and become crackles; 0 repeats the pattern exactly. Live patches apply to the next impacts.

Evidence: Not a mechanism (initial body): Rain amplitude, fade, impact material or object body; see rain.

ring

ring(octaves)

Applies to: RainSpec, Rain.

Let impacts that land on more consonant places ring longer; up to 2^octaves at the most consonant place of the extent, in [0, 4], default 0. Each hop the eroded consonance score inside the extent is normalised to u in [0, 1]; a flat or silent extent gives u = 0. An impact reads u where its first mode sounds and lengthens the decay of all its modes by 2^(octaves * u). Level is unchanged, decays never shorten, and the pitch objective sign does not invert it. At 0 the field is not read. The bound 4 keeps the longest decay near a minute, within f32 precision. Live patches apply from the next hop.

Evidence: Principle: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: an impact’s decay lengthens by 2^(ring * u), where u is the eroded consonance score where its first mode sounds, normalised within the extent; one-sided, level unchanged.

follow_meter

follow_meter(focus)

Applies to: RainSpec, Rain.

Gather impacts where the meter heard in the habitat expects its beat, subdivision and measure; finite and non-negative, default 0. Each hop the Rain reads the habitat meter that Flora reads. For the beat, and for the subdivision and measure when detected, the confidence c (how closely heard onsets lock to that level) gives the von Mises concentration kappa whose resultant is c; focus multiplies it, up to 512. The impact rate is multiplied by e^(sum kappa (cos phi - 1)), normalised to mean 1 over a measure, so impacts move in time but are not added. Focus 1 reproduces the heard concentration and larger values sharpen it; the meter hears the impacts, so a beat they gather on gains confidence. An unknown or unconfident meter leaves the rate unweighted. Live patches apply from the next hop.

Evidence: Principle: beat perception as input (§9.3.56).
Candidate (source match pending): the habitat meter’s Large neural-resonance oscillator form, as for metric(); source agreement is not established here.
Author rule: the impact rate is weighted by e^(w * sum kappa (cos phi - 1)) over beat, subdivision and measure, normalised to mean 1, with kappa the von Mises concentration whose resultant equals each level’s confidence; neutral at weight 0.

objects

objects(count)

Applies to: RainSpec.

Set the number of resonant objects, 0 to 16. Objects start on eroded consonance-level peaks inside the extent, at least 1 ERB apart; missing peaks are filled by log-uniform positions. Each hop an object proposes the best eroded consonance score within one semitone, less the Voice movement cost, and moves there when next struck. Objects stay inside the extent and 1 ERB apart. anchor() holds them.

Evidence: Principle: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: objects start on consonance peaks and drift toward consonance with the Voice movement-cost defaults when struck; anchor() holds them.

object_modes

object_modes(pattern)

Applies to: RainSpec.

Set the objects’ ModePattern; default modal_table(“vibraphone_1”). Mode k has gain 0.5^k. Landscape-aware patterns read the Landscape at placement.

Evidence: Not a mechanism (initial body): Rain amplitude, fade, impact material or object body; see rain.

impact_modes

impact_modes(pattern)

Applies to: RainSpec.

Set the impacts’ material as a ModePattern; default modal_table(“wine_glass”). The pattern’s ratios are taken once at placement, at the extent’s geometric centre, and at most eight are used. Mode k has level 0.85^k with a 3 dB spread. Decay is 25 ms at 3.2 kHz, longer at lower centres as (3.2 kHz / f)^0.5, with a log-normal spread; higher modes decay as ratio^-0.5. Each impact starts with a raised-cosine onset of 0.5 to 1.5 ms.

Evidence: Not a mechanism (initial body): Rain amplitude, fade, impact material or object body; see rain.

leave_drops_out

leave_drops_out(enabled)

Applies to: RainSpec.

Let Rain read a habitat field without its own impacts; its objects stay in that field. Default false: Rain reads the mixed field, including its impacts. When true, the actual habitat PCM of this Rain’s impacts is removed before the auditory front end, and impact positions under consonance, dissonance and edge, object drift and ring read the remaining field with the shared habituation applied. gap still reads mixed occupancy. Before the first render the mixed field is read; a missing observation keeps the previous distribution. Presentation-only Rain warns and has no effect. Set before placement.

Evidence: Principle: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: which sound Rain excludes from the field it reads; only its own impacts’ actual habitat PCM, while its objects stay in the field.

objects_follow_drops

objects_follow_drops(enabled)

Applies to: RainSpec.

Let an object hold its pitch only while it rings; once silent, it takes the centre of the next impact that strikes it. Default false. An object is silent when its longest mode’s T60 (object_decay for the default body) has passed since its last strike, or before its first strike. A silent object struck by an impact retunes to that impact’s centre, clamped to the extent; if the centre lies within 1 ERB of another object, it keeps its pitch and is struck as usual. A ringing object drifts as before. No random number is added, so impact times, levels and struck objects are unchanged. How long a pitch holds follows rate, hit, objects and object_decay: with long decays or frequent strikes, objects rarely fall silent. anchor() wins and warns. Set before placement.

Evidence: Author rule: an object holds its pitch only while it rings; once its T60 has passed since its last strike, it takes the centre of the next impact that strikes it, keeping 1 ERB from the other objects.

object_decay

object_decay(seconds)

Applies to: RainSpec.

Set the T60 of an object’s first mode in [0.01, 30] seconds. Higher modes decay faster, as ratio^-0.7.

Evidence: Not a mechanism (initial body): Rain amplitude, fade, impact material or object body; see rain.

Phonation & Rhythm

sway

sway(octaves)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Let the Population’s participation density sway with a 1/f spectrum; depth in [0, 4] octaves, default 0. The Population shares one process g with unit variance and a 1/f spectrum from about 100 s down to 2.5 s periods, as Rain’s sway. Each Voice takes an otherwise eligible onset opportunity with probability 2^(depth * g), capped at 1, and otherwise lets it pass, in every timing mode. The composer’s density is the ceiling; the sway thins it. Sustained notes, pitch and loudness are not changed. Out-of-range values warn and are clamped.

Evidence: Author rule: 1/f fluctuation of activity from nine AR(1) processes between 0.4 and 102 s; motivated by auditory-cortex tuning to 1/f dynamics (Garcia-Lazaro et al. 2006), not a model of it.

phonate_when_viable

phonate_when_viable()

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Withhold the first onset until perceived consonance is viable. Silently settles into the field until consonance reaches the low bound of the voice’s consonance-viability window (consonance_viability(), or always-viable if that window was never set), then phonates normally and never re-gates. A voice that never settles dies unheard and the respawn policy replaces it – there is no timeout parameter, the energy economy is the timeout.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

Pitch Movement

respond_to_onsets

respond_to_onsets(w)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Bring pitch proposals forward while new onsets are heard outside the Voice’s own sound (finite nonnegative weight, default 0). Zero creates no state and reads nothing. Positive weights seed the Voice’s external attack detector from the habitat history at its placement. It excludes the Voice’s own PCM. A rise rho inside the pitch range owes wtaurho proposal-clock seconds (tau = satiation_sec/ln 10), spent at most w seconds per second; one unhabituated onset lends about 0.45*w seconds with a 2 Hz basin. After each pitch change nothing is lent until one ordinary proposal threshold of real time passes. The field still decides whether and where to move; no onset or random draw is added. Requires free seek_consonance(), sustain(), rearticulate, rearticulate_above(0) and no follow_own_sequence()/melodic_continuity(); otherwise warns to 0. Without leave_self_out(true) it warns and has no effect.

Evidence: Principle: habituation as an input function (§9.3.60).
Author rule: current habituation erosion law and engineering time/drive constants (§9.3.60).
Author rule: earlier pitch proposals after rises in the attack history heard without the Voice’s own PCM; one ordinary proposal cycle is kept after each pitch change; neutral at weight 0 (§9.3.138).

Director & Global Parameters

remember_pitch_set

remember_pitch_set(weight)

Reuse peaks of the periodicity distribution heard in habitat; zero is neutral. Author rule, Experimental. Set a finite nonnegative weight before scene actions or scopes. Default 0. At 48000 Hz, actual mixed habitat PCM, including self, supplies an IPEM periodicity observation (Candidate). Continuous-lag interpolation, normalization, cumulative listening-time averaging, two peak proposals and score addition are author rules. Free HillClimb Voices consume it; Flora does not. No pitch names, fixed scale, octave folding, forgetting control, or listener-profile adoption. Peaks can be subharmonics or shift under averaging; they are not a record of emitted fundamentals. Gaps retain experience and restart only PS observation; TC remains invalid. Long sessions adapt slowly.

Evidence: Author rule: cumulative periodicity experience, continuous-lag adapter, peak proposals and scoring. Zero is neutral (§9.3.114).
Candidate (source): IPEM ANI/periodicity observation. The complete control is not a published learning model or an established brain mechanism.

Mechanism Tuning

Fine-grained control over the mechanisms behind the core verbs. Defaults are calibrated; reach for these when a piece needs a specific behavior the core surface does not express.

Phonation & Rhythm

once

once()

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Single trigger.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

pulse

pulse(rate_hz)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Pulse at an explicit rate in Hz.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

adaptive_duration

adaptive_duration()

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Duration follows field support. With rest(), retain this finite duration independently of sustain() and entrained()/steady()/flow(), in any builder order.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

pulse_lock

pulse_lock(depth)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Low-level pulse phase weighting in 0-1.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

social

social(coupling)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Social coupling for participation or pulse(), in 0-1.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

rhythm_freq

rhythm_freq(freq_hz)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Internal theta/rhythm oscillator frequency. Sets the Entrain articulation core oscillator; it does not set the entrained()/steady()/flow() participation scale. Use intrinsic_rate(hz) for that bodily rate.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

rhythm_coupling_vitality

rhythm_coupling_vitality(lambda_v, v_floor)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Vitality-modulated rhythm coupling.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

rhythm_reward

rhythm_reward(rho_t, metric)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Energy reward for timing fit; metric is "attack_phase_match" or "none". Gain rho_t and metric attack_phase_match or none (default). Effective only for brain entrain, continuous Hold phonation and autonomous attacks (glide or gate_snap, without sustained coupled timing). Gated or coupled opportunities use ordinary consonance recharge and ignore this reward, producing a warning when explicitly requested.

Evidence: Author rule: phonation, participation, duration or articulation policy (§9.3.57); existing base defaults remain active.

Pitch Movement

move_cost

move_cost(coeff)

Applies to: PopulationSpec and Population. Live-patchable: updates running voices in a Population.

Nonnegative dimensionless movement-cost coefficient, default 0.5.

Evidence: Author rule: pitch movement, proposal selection or search cost (§9.3.57, §9.3.98–99); existing base defaults remain active.

global_peaks

global_peaks(count)
global_peaks(count, min_sep_cents)

Applies to: PopulationSpec and Population. Live-patchable: updates running voices in a Population.

Global field peaks as movement candidates, with optional minimum separation.

Evidence: Author rule: pitch movement, proposal selection or search cost (§9.3.57, §9.3.98–99); existing base defaults remain active.

ratio_candidates

ratio_candidates(count)

Applies to: PopulationSpec and Population. Live-patchable: updates running voices in a Population.

Ratio-based movement candidates; 0 disables.

Evidence: Author rule: pitch movement, proposal selection or search cost (§9.3.57, §9.3.98–99); existing base defaults remain active.

Lifecycle & Viability

viability_scope

viability_scope(name)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

"environment" or "total": choose the field used for viability. Environment uses the PCM self-removal observation at the current pitch for the continuous-recharge score. Both H and R stay self-excluded here; the rearticulation pitch view does not feed recovery. It is independent of leave_self_out. Use "total" only when selection should include the voice’s own contribution.

Evidence: Author rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).

Director & Global Parameters

set_global_coupling

set_global_coupling(value)

Cursor event: nonnegative dimensionless Voice interaction strength (default 1). Cursor event: changes interaction strength from this script time onward. Dimensionless, nonnegative, default 1.

Evidence: Author rule: coupling weight; Voice social coupling and listener DCC feedback are distinct paths (§9.3.57).

Research Controls

For studying the instrument, not composing with it. Normal composing never touches this tier, and it has the weakest stability guarantee: entries may change or disappear as their research questions settle.

Timeline & Populations

observe_felt_beat

observe_felt_beat()

Reserve habitat felt-beat observation before time advances in an endless scenario. Required for positive syncopate in endless scenes. Late declarations and unreserved placements are positioned errors. Finite scenes warn and ignore the declaration; placement pre-scanning reserves observation only when needed. Research only.

Evidence: Author rule: reserve felt-beat observation for endless performances. Input: read only onsets with a sustained level rise of at least 1 dB across 60 ms.

temporal_mode

temporal_mode(name)

Select off or observe for new temporal cognition before playback. Declare once at top level before events or time advance. Default off keeps behavior. Observe currently tracks ordered NSGT evidence on both buses; relation inference remains unknown and no new action pressure is applied. Participate is rejected until implemented and calibrated. Run a new scenario to change mode.

Evidence: Not a mechanism (operation): output, reproducibility or research execution settings (§9.3.56).

Phonation & Rhythm

syncopate

syncopate(w)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

Confirm an uncertain felt beat, defer to a half beat, or omit an opportunity (default 0). Finite nonnegative weight, without an upper bound. Requires metric() and microtiming(0); otherwise warns and uses zero. After existing vetoes, draws with a private Voice RNG: beat probability (1-c)^w, otherwise half-beat probability m_plus, otherwise omission. Unknown observation bypasses without drawing. Positive consumers read habitat frequency, felt phase and beat probability times R for coupling; the oscillator phase stays continuous. Half-beat targets expire after that cycle and do not change microtiming. Template values inherit; respawn resets private state. Zero owns no state/RNG and requests no observation. Initial-only; research only.

Evidence: Author rule: independent beat confirmation and hypothetical half-onset support. Observation: Candidate (Cannon 2021 figure parameters); grid inference and half-cycle template placement: Author rules. Input: Author rule; read only onsets with a sustained level rise of at least 1 dB across 60 ms.

Pitch Movement

pitch_core

pitch_core(name)

Applies to: PopulationSpec only. Initial-only: configure the PopulationSpec before place().

"hill_climb" or "peak_sampler". Research control.

Evidence: Author rule: pitch movement, proposal selection or search cost (§9.3.57, §9.3.98–99); existing base defaults remain active.

move_cost_time_scale

move_cost_time_scale(name)

Applies to: PopulationSpec and Population. Live-patchable: updates running voices in a Population.

"legacy"/"integration_window" or "proposal"/"proposal_interval". Canonical names: legacy (default, integration-window scaling) and proposal_interval. Research control; changes the time scale used for movement cost.

Evidence: Author rule: pitch movement, proposal selection or search cost (§9.3.57, §9.3.98–99); existing base defaults remain active.

Director & Global Parameters

control_update_mode

control_update_mode(name)

"snapshot_phased" (default) or "sequential_rotating". Scene-wide research control. Scene-wide initial condition; the last declaration wins. Canonical names: snapshot_phased (default) and sequential_rotating.

Evidence: Not a mechanism (operation): output, reproducibility or research execution settings (§9.3.56).

scaffold_off

scaffold_off()

Disable the external rhythm scaffold. Scene-wide initial condition; the last declaration wins. Scaffolds are external comparison controls for demos and assays, not the rhythm-composition abstraction.

Evidence: Author rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).

scaffold_shared

scaffold_shared(freq_hz)

Shared external scaffold pulse. Scene-wide initial condition; the last declaration wins. Frequency is nonnegative Hz; the default scene has no external scaffold.

Evidence: Author rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).

scaffold_scrambled

scaffold_scrambled(freq_hz, seed)

Per-voice scrambled scaffold pulse. Scene-wide initial condition; the last declaration wins. Frequency is nonnegative Hz; the default scene has no external scaffold.

Evidence: Author rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).

Configuration evidence

These are AppConfig leaf keys, not additional Rhai functions. Research settings retain their layer-1/4 restrictions; raw consonance valuation coefficients are not exposed as Rhai controls. Optional records remain optional. Bus combination (|) is not a mechanism (routing); see send() and the built-in buses.

KeyEvidence
body_metabolism.enabledAuthor rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).
body_metabolism.updates_per_hopAuthor rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).
body_metabolism.observation_framesAuthor rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).
body_metabolism.representative_hold_secAuthor rule: metabolism, viability, neighbor interaction or lifecycle/respawn; sensory input does not establish an auditory model for this ecology (§9.3.57).
render_prototypeNot a mechanism (operation): output, reproducibility or research execution settings (§9.3.56).
temporal_meter_t2Author rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
audio.latency_msNot a mechanism (operation): output, reproducibility or research execution settings (§9.3.56).
audio.sample_rateNot a mechanism (operation): output, reproducibility or research execution settings (§9.3.56).
audio.limiterNot a mechanism (operation): output, reproducibility or research execution settings (§9.3.56).
audio.output_gain_dbNot a mechanism (operation): output, reproducibility or research execution settings (§9.3.56).
analysis.nfftNot a mechanism (operation): output, reproducibility or research execution settings (§9.3.56).
analysis.hop_sizeNot a mechanism (operation): output, reproducibility or research execution settings (§9.3.56).
analysis.tau_msAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
analysis.kernel_alignNot a mechanism (operation): output, reproducibility or research execution settings (§9.3.56).
psychoacoustics.loudness_expPrinciple: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: adopted sensory implementation scale; the label neither certifies every coefficient nor opens layer-1 sensation to composing (§9.3.94).
psychoacoustics.roughness_kPrinciple: auditory H/R functions as input; this does not certify every kernel equation or constant (§9.3.56, §9.3.104).
Author rule: adopted sensory implementation scale; the label neither certifies every coefficient nor opens layer-1 sensation to composing (§9.3.94).
psychoacoustics.consonance.field.kernel.aAuthor rule: consonance evaluation, sign or roughness preference; does not alter H/R sensation (§9.3.56). Existing valuation defaults remain active.
psychoacoustics.consonance.field.kernel.bAuthor rule: consonance evaluation, sign or roughness preference; does not alter H/R sensation (§9.3.56). Existing valuation defaults remain active.
psychoacoustics.consonance.field.kernel.cAuthor rule: consonance evaluation, sign or roughness preference; does not alter H/R sensation (§9.3.56). Existing valuation defaults remain active.
psychoacoustics.consonance.field.kernel.dAuthor rule: consonance evaluation, sign or roughness preference; does not alter H/R sensation (§9.3.56). Existing valuation defaults remain active.
psychoacoustics.consonance.field.level.betaAuthor rule: consonance evaluation, sign or roughness preference; does not alter H/R sensation (§9.3.56). Existing valuation defaults remain active.
psychoacoustics.consonance.field.level.thetaAuthor rule: consonance evaluation, sign or roughness preference; does not alter H/R sensation (§9.3.56). Existing valuation defaults remain active.
psychoacoustics.consonance.density.roughness_gainAuthor rule: consonance evaluation, sign or roughness preference; does not alter H/R sensation (§9.3.56). Existing valuation defaults remain active.
psychoacoustics.habituation.enabledPrinciple: habituation as an input function (§9.3.60).
Author rule: current habituation erosion law and engineering time/drive constants (§9.3.60).
psychoacoustics.habituation.satiation_secPrinciple: habituation as an input function (§9.3.60).
Author rule: current habituation erosion law and engineering time/drive constants (§9.3.60).
psychoacoustics.habituation.recovery_secPrinciple: habituation as an input function (§9.3.60).
Author rule: current habituation erosion law and engineering time/drive constants (§9.3.60).
psychoacoustics.habituation.ref_drivePrinciple: habituation as an input function (§9.3.60).
Author rule: current habituation erosion law and engineering time/drive constants (§9.3.60).
dcc.coupling_strengthAuthor rule: coupling weight; Voice social coupling and listener DCC feedback are distinct paths (§9.3.57).
dcc.max_temperature_bonusAuthor rule: coupling weight; Voice social coupling and listener DCC feedback are distinct paths (§9.3.57).
playback.wait_user_exitNot a mechanism (operation): output, reproducibility or research execution settings (§9.3.56).
playback.wait_user_startNot a mechanism (operation): output, reproducibility or research execution settings (§9.3.56).
temporal_ridge.meansAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_ridge.deviationsAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_acoustic.group_meansAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_acoustic.group_deviationsAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_acoustic.accent_meansAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_acoustic.accent_deviationsAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_acoustic.group_retirement_secAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_acoustic.inactive_energy_maxAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_acoustic.correlation_window_secAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_acoustic.min_pairsAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_acoustic.min_coverageAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_acoustic.persistence_hopsAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_period.modelAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_period.horizon_secAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_t2.component_weightsAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_t2.gainAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_t2.thresholdAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_t2.weight_gainAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_t2.windowAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_t2.combinationAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_t2.attributionAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_t2.unknownAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_body.meansAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_body.deviationsAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_body.accent_meansAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_body.accent_deviationsAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_body_prototypes.model_versionNot a mechanism (observation data): frozen descriptors, identifiers or acquisition geometry; data are not cognitive constants.
temporal_body_prototypes.sample_rateNot a mechanism (observation data): frozen descriptors, identifiers or acquisition geometry; data are not cognitive constants.
temporal_body_prototypes.nfftNot a mechanism (observation data): frozen descriptors, identifiers or acquisition geometry; data are not cognitive constants.
temporal_body_prototypes.hop_sizeNot a mechanism (observation data): frozen descriptors, identifiers or acquisition geometry; data are not cognitive constants.
temporal_body_prototypes.meansAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_body_prototypes.deviationsAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_body_prototypes.accent_meansAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_body_prototypes.accent_deviationsAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_body_prototypes.medoids.record_idNot a mechanism (observation data): frozen descriptors, identifiers or acquisition geometry; data are not cognitive constants.
temporal_body_prototypes.medoids.raw_valuesNot a mechanism (observation data): frozen descriptors, identifiers or acquisition geometry; data are not cognitive constants.
temporal_body_prototypes.medoids.maskNot a mechanism (observation data): frozen descriptors, identifiers or acquisition geometry; data are not cognitive constants.
temporal_onset_comparison.footprintAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_onset_comparison.arrivalAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).
temporal_onset_comparison.arrival_weightAuthor rule: research model, comparison, normalization or control; not a composer control over internal learning (§9.3.55–57).

Samples

Sixteen samples in two groups, kept together in samples/. Samples 1–12 introduce the instrument’s capabilities one at a time: API and behavior demonstrations, not musical works. Samples 13–16 are longer scenes written as compositions combining those capabilities. Run and read both groups.

cargo run --release -- samples/01_a_single_voice.rhai

Capability demonstrations (1–12)

  1. A Single Voice — one voice appears, holds its breath, and leaves.
  2. Constellation — six ways to enter: a line, the peaks, the density, the strain, the gaps, and chance.
  3. Gravity — the same root under two suns; the peaks listen to what is sounding, not to a chart.
  4. Tension — the voices settle onto consonance, grow restless and stray, then cool and settle again.
  5. Settling — scattered voices glide to where the field can hold them.
  6. Bells — struck bodies; the last bell lets the field choose its partials.
  7. Heartbeat — a dedicated downbeat Voice supports an explicit synchronization demonstration.
  8. Murmuration — a flock without a conductor: each voice keeps its own pace and leans toward the recurrences it hears; no shared beat is targeted.
  9. Rain — time without a beat, falling along the field.
  10. Generations — voices live, starve, and are reborn where harmony can hold them.
  11. Autumn Cycle — a directed harmony; the season turns and comes home.
  12. Emergence and Resolution — a colony heats up and settles, with rhythmic input from its own onsets and no dedicated beat carrier.

Composed scenes (13–16)

  1. Three Windows — three lines attack on pitch adoption and leave by their own doors.
  2. Stone and Wire — two metrical voices turn while an independent line crosses.
  3. Folded Air — a companion rests and returns, changing articulation across sections.
  4. Open Court — a denser crowd fills the court around two independent paths.

Reading and running

Samples 1–6 walk the consonance terrain (placement, gravity, tension, movement, timbre). Samples 7–9 introduce three timing intentions: coupling to a shared beat (metric()), participation informed by heard sound without targeting shared-beat phase (entrained()), and non-metric clustered renewal (flow()). Sample 10 closes the loop into life; 11–12 combine several mechanisms. Samples 13–16 combine adoption-driven attacks, metrical voices with a crossing line, a resting companion with changing articulation, and a denser crowd. All samples are compile-checked by the test suite, so they always match the current API. Top-level samples intentionally do not call seed(...): each run starts from a fresh scenario seed. Research assays keep fixed seeds so comparisons remain reproducible.

Terrain anchors generally feed the habitat bus without being heard; in Gravity, the sounding drone is itself the subject. Heartbeat includes a dedicated beat carrier because synchronization is the demonstration’s subject. The other top-level samples have no dedicated beat carrier.

Research assays

samples/research/ holds comparison fixtures — heredity/selection ablations, external-scaffold rhythm controls, and mechanism studies. They study the instrument rather than play it, and are not part of the path. Dedicated synchronization support is limited to demonstrations or assays where explicit synchronization is essential. Sending that support only to the habitat bus does not make it suitable for other samples.

Offline rendering

The conchordal instrument never writes audio to disk — performances are ephemeral by design. For offline WAV rendering use the separate conchordal-render binary, which shares the core engine but is not the instrument.