AtlatestRenderedmarkdown
Readme

sigil-dsp Releases

v0.3.4 — 2026-09-22

One 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.

Upgrade notes

Nothing changes for existing callers.

v0.3.3 — 2026-09-21

One 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.

Upgrade notes

No 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.

v0.3.2 — 2026-09-18

This 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.

Changes

  • 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.
  • 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.
  • 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.
  • 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.
  • The new declarations carry specs and docstrings, so sigil exports and the MCP tools show their signatures.
  • 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.

Upgrade notes

No 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.

v0.3.1 — 2026-07-12

Add a first-class web (wasm32-wasi) build config so sigil-dsp compiles for the browser via sigil build --config web, alongside the native build.

v0.3.0 — 2026-06-25

Changed

  • Toolchain requirement raised to Sigil 0.17. The package now declares sigil: "^0.17" and pins sigil-stdlib to ^0.17. Sigil 0.17 makes the sigil: field mandatory and ties the native codegen runtime header (sigil-lib) to that field, so building against the 0.17 compiler requires this bump. Consumers caret-pinning sigil-dsp must move to the 0.17 line, which is why this is a minor release rather than a patch.

Added

  • sigil-test and sigil-test-runner dev-dependencies so sigil test can build a native test harness under Sigil 0.17.

v0.2.0 — 2026-04-18

Added

  • Karplus-Strong plucked string primitive exposed through (sigil dsp osc): make-ks freq decay excite-gain, ks-compute, ks-trigger!, ks-set-freq!, ks-set-decay!, ks-set-excite-gain!.

Feedback delay-line physical model with a 2-tap averaging lowpass in the feedback path. Per-trip gain derived from the requested -60 dB decay time. Delay line is sized for the lowest supported fundamental (20 Hz) at creation, so retuning upward via ks-set-freq! is a pointer trick, not a realloc. Rising-edge gate retriggers excitation — callers driving a continuous gate can invoke ks-trigger! manually per note.

Exposed struct layout (src/c/ks.h) stays public so downstream render loops (motif) can pick up the node as a graph primitive.

v0.1.0 — 2026-03-26

Initial release. SoundPipe-backed oscillators, filters, envelopes, effects, noise generators, and utility modules exposed through (sigil dsp {core,osc,filter,env,fx,noise,util}).