Expand description
Deterministic graph → samples renderer.
Rendering is a pure function of (graph, seed, sample_rate). Each node is
evaluated into a block of f32 samples; combinators combine those blocks.
Processors transform the signal flowing through a chain.
Structs§
- Layer
Stats - Post-fader, pre-master snapshot of one layer’s contribution to the stereo bus — the balance numbers an agent mixes by. “Pre-master” matters: a master compressor / reverb reshapes the bus AFTER these are measured. Energy and peak are measured per channel (pan-invariant: hard-panned and centered layers of equal power read equal).
- Render
Product - A finished render: the mono mid (what analysis and mono export consume)
plus the true stereo bus when the document is a
tracksmixer. Producing both from ONE render keeps the author/refine/export paths from paying the full synthesis cost twice. Plain documents carry no pair here — theirstereotreatment (Haas / Wide) is applied at write time bystereoize. - Tracks
Render - A finished mixer render: the stereo bus plus per-layer contribution stats captured from the same pass (free — no extra render).
Functions§
- loop_
seam_ db - The loop-seam discontinuity in dB: the sample jump from the last sample back to the first (lower ⇒ a cleaner seamless loop).
- make_
loop_ buffer - Extract the loop region
[start_secs, end_secs)and equal-power crossfade its lastcrossfade_secsonto its head, returning a buffer that repeats seamlessly. The output length is the region minus the crossfade. - render
- Render a sound document to normalized mono samples in [-1, 1].
- render_
product - Render a sound document once, yielding the mono mid plus the stereo bus for mixer documents. Every consumer that needs both (analysis + the WAV on disk) should call this instead of rendering twice.
- render_
tracks - Render a
tracksdocument to a finished stereo pair: each track is rendered mono and equal-power panned onto the bus (sampler tracks keep their native stereo), the master chain runs per channel (the reverb with decorrelated tails), then loop/normalize apply jointly. - stereoize
- Turn a finished mono render into a stereo (left, right) pair per the doc’s
Stereomode. Mono is the identity; Haas / Wide add width. The pair is jointly peak-limited so widening never clips.