AtlatestRepositorysigil-dsp
1# sigil-dsp Releases
2
3## v0.3.4 — 2026-09-22
4
5One addition: `sp_zitarev_compute_block(sp, p, in1, in2, out1, out2, n)` renders n samples of the zitarev reverb in one call. `sp_zitarev_compute` hands the Faust-generated `computezitarev` a count of 1, so its ~40 control-rate coefficients — a dozen `powf`/`expf`/`cosf` among them — are recomputed for every sample; a profile of motif's render on 2026-09-22 put 16 % of the whole render in them, silence or not. The block call computes them once per block. The samples are the ones n single calls give while the parameters hold; a parameter set mid-block takes effect at the next block. No generated code is touched; the header declares the new entry beside `sp_zitarev_compute`. No Scheme binding yet: motif calls it from C.
6
7## Upgrade notes
8
9Nothing changes for existing callers.
12## v0.3.3 — 2026-09-21
14One fix: `(dsp-init sr)` sets the shared context's sample rate on every call that gives one, not only the first. The nodes cache the rate when they are built (soundpipe's oscillators and filters at init, the fm4 voice, the chorus, the comp), so a program that renders at more than one rate in its life — motif's player opened at 48000 and then at 24000 when a slow phone asks for a cheaper render (Crash The Stack's live soundtrack) — built every later graph with the first rate's increments and played it at the new rate: a 24000 render sounded an octave down. Now a `(dsp-init sr)` before a graph is built gives that graph `sr`; graphs already built keep theirs. A call without a rate still changes nothing once the context exists. The test entry checks a 440 Hz fm4 voice built after `(dsp-init 24000)` and one after `(dsp-init 48000)` both cross zero 880 times in a second.
16## Upgrade notes
18No binding changed. A program that called `(dsp-init sr)` more than once with different rates and relied on the first winning gets the last one from now on.
21## v0.3.2 — 2026-09-18
23This release gives motif the primitives for a fat, FM-heavy tracker sound: a real multi-operator FM voice instead of the two-operator `fosc`, and the three effects a demoscene mix is made of. Everything is plain C99, builds for wasm32-wasi as well as native, and renders the same samples on both.
25## Changes
27- `make-fm4` / `fm4-compute` in `(sigil dsp osc)`: four sine operators, an eight-entry DX/OPL-style algorithm table (stack, two-into-one, branch, three-into-one, pairs, stack-plus-one, one-into-three, additive), per-operator ratio, level and ADSR, feedback on operator 4, a modulation index that is a per-sample argument, and a velocity-to-index curve. With index 0 every carrier is a pure sine, so a `fosc`-style patch is a special case.
28- `make-chorus` / `chorus-compute` in `(sigil dsp fx)`: two LFO-modulated taps on one delay line, with rate, depth and mix as per-sample arguments.
29- `make-crush` / `crush-compute`: tanh drive, bit-depth quantisation and sample-and-hold rate reduction in one node; drive 0, 16 bits and rate 1 pass the signal through untouched.
30- `make-comp` / `comp-compute`: a feed-forward peak compressor with one-pole attack and release; threshold and ratio are per-sample arguments, attack, release and makeup are set at creation. It is mono; a host that wants linked stereo runs one instance on a shared detector or waits for a stereo variant.
31- The new declarations carry specs and docstrings, so `sigil exports` and the MCP tools show their signatures.
32- `src/c` is now an exported include directory, so a consumer that links the static library can `#include "fm4.h"`, `"fx4.h"` or `"ks.h"` instead of mirroring the structs.
34## Upgrade notes
36No existing binding changed. Consumers that mirror `sp_ks` in their own C can switch to `#include "ks.h"` now that the header is on the include path.
38## v0.3.1 — 2026-07-12
40Add a first-class web (wasm32-wasi) build config so sigil-dsp compiles for the browser via `sigil build --config web`, alongside the native build.
42## v0.3.0 — 2026-06-25
44### Changed
45- **Toolchain requirement raised to Sigil 0.17.** The package now declares
46 `sigil: "^0.17"` and pins `sigil-stdlib` to `^0.17`. Sigil 0.17 makes the
47 `sigil:` field mandatory and ties the native codegen runtime header
48 (`sigil-lib`) to that field, so building against the 0.17 compiler requires
49 this bump. Consumers caret-pinning sigil-dsp must move to the 0.17 line,
50 which is why this is a minor release rather than a patch.
52### Added
53- `sigil-test` and `sigil-test-runner` dev-dependencies so `sigil test` can
54 build a native test harness under Sigil 0.17.
56## v0.2.0 — 2026-04-18
58### Added
59- **Karplus-Strong plucked string** primitive exposed through `(sigil dsp osc)`:
60 `make-ks freq decay excite-gain`, `ks-compute`, `ks-trigger!`,
61 `ks-set-freq!`, `ks-set-decay!`, `ks-set-excite-gain!`.
63 Feedback delay-line physical model with a 2-tap averaging lowpass in
64 the feedback path. Per-trip gain derived from the requested -60 dB
65 decay time. Delay line is sized for the lowest supported fundamental
66 (20 Hz) at creation, so retuning upward via `ks-set-freq!` is a
67 pointer trick, not a realloc. Rising-edge gate retriggers
68 excitation — callers driving a continuous gate can invoke
69 `ks-trigger!` manually per note.
71 Exposed struct layout (`src/c/ks.h`) stays public so downstream
72 render loops (motif) can pick up the node as a graph primitive.
74## v0.1.0 — 2026-03-26
76Initial release. SoundPipe-backed oscillators, filters, envelopes,
77effects, noise generators, and utility modules exposed through
78`(sigil dsp {core,osc,filter,env,fx,noise,util})`.