Tech
How it is put together
Repo Structure
A monorepo: everything that ships from here is in here. There is one
submodule, JUCE 9.0.3 at external/JUCE, and the engines are subtrees, not
submodules — so a clone plus git submodule update --init --recursive is the
whole checkout.
engines/<product>/crates the core, and its wrappers
engines/shared/crates ni-dsp, ni-schwung, music-core — shared, product-free
plugins/<product>/ the VST3 on the JUCE shell
plugins/<product>/editor/ the product's native editor, on the kit
plugins/_shared/juce/ ni::Processor, ni::PluginEditor, the state codec
plugins/_shared/ni/ host-free helpers: ni::wire, the scope capture
plugins/_shared/ui/ the native Ultraviolet kit (JUCE), and its gallery
modules/<product>/ the Schwung module's shell and packaging
site/ this documentation site
design/scheme/ the Ultraviolet design system, vendored
design/designs/ the "NI Plugin Layouts" canvas, mirrored
tests/ the cross-cutting suite; tests/ui the native UI's
tests/fixtures/iplug2/ what the earlier VST3 builds saved: the compatibility contract
cmake/ the Rust toolchain resolver, NiRust.cmake (Corrosion) and NiJucePlugin.cmake
tools/docker/, tools/cross/ the cross-build kit: Linux and Windows build images,
the Windows toolchain, the JUCE smoke plugin
versions.json one version per product
A crate belongs to exactly one product
The product engines never depend on each other. engines/trance-gate/crates
holds tg-core and its two wrappers; engines/spectro/crates holds
spectro-core and its one. They are all members of a single Cargo workspace
rooted at the repository, which is what lets .cargo/config.toml apply one set
of target flags to all of them.
engines/audio-bus is the exception that names the rule, and it is worth being
explicit about rather than letting it look like drift. It is not a product
engine — it is the house transport, shared as the native kit is shared, and it
exists precisely so that two products can share one thing: a Listen-In publishes
audio into a shared-memory bus and a Spectrogram reads it out. Any product may
depend on it; it depends on no product in return, which is the direction that
actually matters. spectro-core knowing about tg-core would still be a
coupling nobody asked for.
engines/ground, engines/shell and engines/shared follow the same rule.
engines/shared/crates holds what two products would otherwise each keep a
copy of: ni-dsp (C-compatible formatting and parsing, the rate parser, the
envelope curves, the one-pole and the glide, the transport-following phase,
the capi C helpers) and ni-schwung (the Schwung audio_fx v2 glue every
*-move crate is built on). Each names no product. A piece moves
there once it is truly identical in two products; what differs stays in the
product, as each product’s rate list does.
One shell for every plugin
plugins/_shared/ is to the plugins what modules/_shared/ is to the Schwung
modules: what every product’s shell would otherwise repeat. ni::Processor
(juce/Processor.h) is the JUCE processor all five derive from, and
ni::PluginEditor the window a host opens; juce/Nist.h is the state codec
and juce/ParamSpec.h the parameter table. ni/Wire.h holds the buffer and
number helpers (the float round trip, the passthrough, locale-free numbers) and
ni/Scope.h the capture a plot draws. None of it knows a product, and
cmake/NiJucePlugin.cmake compiles it into every plugin.
A plugin’s CMakeLists.txt is one ni_add_juce_plugin call naming its sources,
its engine and its editor.
One version per product
versions.json is where a version is decided, and it is the only place. A
product’s version otherwise appears in several files in three languages — the
bundle’s Info.plist and moduleinfo.json, module.json, and every crate of
its engine — and nothing held them together until they had already come apart.
ctest -R versions asserts the agreement rather than generating it. That is
this repository’s habit throughout: the curve and envelope oracles pin the
engine to its own measured output, and the kit’s tokens are tested against the
vendored design system. A generator hides a disagreement by overwriting it; a test
names it.
Where the documentation lives
Each product’s manual is the README.md in its own plugins/<product>/
directory, with the two interface documents beside it in docs/. This site
renders those files directly — there is no second copy. Browsing the repository
on GitHub and reading the site show the same text, because they are the same
text.
Architecture
Four layers, and each one exists because the layer above it cannot do the job.
Rust core the DSP, on the shared ni-dsp and established crates
├── C ABI extern "C", for the plugin
└── Schwung the audio_fx vtable (ni-schwung), for the Move
C++ shell JUCE 9 — the VST3 for macOS, Windows and Linux, and the host plumbing
Native editor JUCE Components, drawing the Ultraviolet design system
Three decisions shaped these layers. Each is recorded with its context and what it costs:
- 0001: the licence is GPL-3.0-or-later rather than MIT.
- 0002: JUCE is the shell, and the editors are native JUCE Components.
- 0003: established Rust crates replace hand-written code.
The Rust core
One Cargo workspace at the repository root. A dependency on this repository’s
own code is a path: to a sibling inside the same engine, or to one of the
product-free shared crates (engines/shared, ground, shell, audio-bus).
Those are rlibs. Each product’s single static library absorbs them, and the
crates from crates.io with them, so a plugin still links exactly one archive.
Having no external crates was a rule, kept so that the MIT licence audit
finished in one sitting. 0003
reversed it. The FFT is realfft’s, the Spectrogram’s rings are rtrb’s, the
float atomics are atomic_float’s, the bus maps its memory through libc and
windows-sys, the Side-Chain decodes MIDI with wmidi, the Trance Gate reads its
formats with serde_json, and the engines read numbers with lexical-core. The
shell’s command queue is rtrb’s too, its snapshot triple_buffer’s and its
handoff basedrop’s (see Threads below). Each is under a licence on the
allowlist, and its version is written once, in the root Cargo.toml’s
[workspace.dependencies]. The C headers are next. The one-archive rule
stays.
[profile.release] sets panic = "abort", and that one is load-bearing rather
than a size tweak: unwinding out of an extern "C" function into a C or C++
host is undefined behaviour. Aborting also removes the landing pads, which
matters for a module that ships to a device.
The C ABI
tg-capi exports the tg_core_* C ABI (trance_gate_core.h) — byte for byte the surface
the original C engine exported, and grown since. That was a deliberate
constraint when the DSP was ported to Rust: keeping the ABI identical meant the
existing C tests (engines/trance-gate/tests/test_core.c and test_gate.c)
were relinked against the new engine rather than rewritten, so the port was
checked by tests that had never seen Rust.
The C headers are generated. Each *-capi crate’s build.rs writes its own
with cbindgen from the Rust it declares (engines/shared/cbindgen/capi_header.rs,
configured by the crate’s cbindgen/*.toml), into the build’s
cargo/include directory, so a header cannot drift from the Rust side. What a
generated header can still do is compile and mean something else to a caller,
so the plain-C tests call through every one of them, and tests/spectro_columns.c
exercises the analyzer’s boundary specifically: argument order, the meaning of
bands, and who owns the output buffer. The Trance Gate’s headers have a caller
outside this repository, the archived Max for Live external, so their last
hand-written versions are fixtures (tests/fixtures/tg-capi) that
capi_compat_tg and capi_compat_tg_names hold the generated ones to,
declaration for declaration. Only C++ with no Rust behind it stays hand-written:
engines/shell/include’s state header and denormal guard, and Schwung’s own
headers vendored for the Move-side tests.
The JUCE shell
The build recipe is three files. cmake/NiRust.cmake builds the engines through
Corrosion, pinned in
cmake/NiCorrosion.cmake; cmake/NiJucePlugin.cmake builds the plugins around
them.
ni_add_rust_engine(<target> CRATE <crate> LIB <lib> [INCLUDE <dir>]) registers
a product’s C ABI, and ni_build_rust_engines() imports every registered crate
with Corrosion, which runs cargo once per crate in one target directory, so the
crates they share (ni-dsp, ground, shell, audio-bus) compile once:
- Corrosion builds each product’s static library for the build’s target triple, which it takes from the C++ toolchain, so a Linux or Windows build selects its triple through its CMake toolchain file
- a universal macOS build is the one thing Corrosion does not do: it builds
one triple per CMake project. So each further slice is a sub-build
(
cmake/rust-slice, the same import forx86_64-apple-darwin), andlipo -createjoins each product’s two slices into one universal.a - each is exposed as a CMake
INTERFACElibrary its plugin and tests link
It is still one static library per plugin: each product’s capi crate is a
staticlib that absorbs the rlibs it depends on, because two Rust staticlibs in
one binary each carry the Rust runtime. The cargo step always runs — cargo is the
dependency scanner, not CMake — and Corrosion copies an archive out with
copy_if_different, so an unchanged engine keeps its timestamp, lipo does not
run again, and the plugin does not relink.
A plugin’s CMakeLists.txt is one ni_add_juce_plugin(<product> TARGET … NAME … CODE … ENGINE … [EDITOR] SOURCES …) call. It decides once, for every product:
VST3 only, from Neon Ingvy; the version from versions.json; the licence
notices copied into the bundle; on macOS an ad hoc signature as the bundle’s
last build step; the bundle collected in build/out, where every test and
validator loads it, and copied into the system’s VST3 folder only with
-DNI_DEPLOY_PLUGINS=ON. A product that took over an earlier bundle keeps its
VST3 class ID (VST3_CLASS, or IPLUG2_CLASS from
tests/fixtures/iplug2/ids.json) and its parameter IDs (LEGACY_PARAM_IDS), so
a saved set finds it exactly as it found the old one.
The shared shell
Every processor derives from ni::Processor (plugins/_shared/juce), a
juce::AudioProcessor with the house’s answers to what every product would
otherwise answer on its own:
- Prepare.
prepareToPlayisfinal: it calls the product’sprepare(), then sizes what the shell itself needs for the host’s longest block. - The block.
processBlockisfinal: it runs the product’sprocess()underjuce::ScopedNoDenormals, and a bypassed block — the host’s bypass or the product’s own Bypass parameter — goes toprocessBypassed(), which a product whose engine must keep hearing MIDI overrides. - The Bypass fade. The product’s own Bypass moving is a 10 ms linear
crossfade between
process()and the input, never a jump; at rest a bypassed block is the input bit for bit. A product whoseprocess()leaves the audio as it came (an analyser) says so withpassesAudioThrough()and switches at the block. The input is faded undelayed, so a product that reports latency gets no fade until it delays that input to match. - The clock.
readClock()reads the host’s transport into a plain value, allocation-free, for the engines’ block clocks and the ground’s beat clock (GroundClock.h) — its loop included:ni::wire::for_each_spansplits a block where the loop wraps, so an engine fed the transport chunk by chunk hears the loop’s start the frame after its end. - The state.
getStateInformationandsetStateInformationarefinaland callwriteStateandreadState. A product that took over an earlier bundle reads and writes that bundle’s chunk throughni::nist(Nist.h), one codec for every product’s layout; its parameters are a table (ParamSpec.h) built intoni::Parameters that hold plain values exactly, so a fixture loaded and saved again is the same bytes. - Dirty.
nonParameterStateChanged()tells the host that state it cannot see changed — an import, a pasted pattern — so the set is marked unsaved.
ni::PluginEditor is the window a host opens: the product’s editor at its
design size, scaled by its Zoom, in the kit’s look. MachineSettings keeps what
belongs to the machine rather than the set, such as the Motion switch.
plugins/_shared/ni holds the host-free helpers: ni/Wire.h (the float round
trip, the passthrough, locale-free numbers) and ni/Scope.h (the capture a plot
draws), which tests/cpp links without a host.
Threads
A plugin’s engine belongs to the audio thread, and to nothing else. The
editor’s messages, the host’s state calls and the idle timer all run elsewhere,
and the engines have no locks in them, by design. So there are exactly two doors,
built once in engines/shell and used by every product:
- In, as a command. A non-audio thread posts an edit; the audio thread
applies it at the top of its next block. Each product has its own command
type, and whatever arrives as text — an edit’s key and value, a host’s blob,
the clipboard, a slot file — is read on the posting thread, so the audio
thread applies values and never parses. The commands cross on rtrb’s
wait-free ring; anything heavy they carry rides in a basedrop
Shared, whose last release only queues it, so the audio thread neither allocates nor frees. - Out, as a snapshot. The audio thread formats what readers need into preallocated text and publishes it through triple_buffer’s triple buffer. The message thread’s timers, the editor and the state calls read that — never the engine.
A save must be right even with the host’s audio engine off, so an edit that has
not been applied yet is still visible to readers: they are answered from the
latest snapshot replayed through the outstanding edits — each edit once, as it
arrives, however long the engine stays off. tg_shell.h and sc_shell.h are
the per-product surfaces.
Objects the main thread builds and frees — a Listen-In’s bus pusher, a
Spectrogram’s receiver — are lent to the audio thread through
shell_handoff.h, on basedrop as well: a block holds a counted copy, and the
release function runs only where the main thread collects.
The Trance Gate’s also keeps the host’s parameters on the right slot. Every
parameter but Slot is stored per slot in the engine (tg-core’s sound.rs), so
the fifteen host parameters are a window onto the current slot:
- A host value is pushed when the host moved it (
tg_shell_push), into the current slot. A value the host has not moved is never re-asserted, so a slot switched to keeps its own values while the host still holds the last slot’s. - On a switch the engine wins. The block the host’s Slot moves — automation,
the editor, the host’s UI — writes nothing else; the frame with the new slot is
published, and the next idle tick moves every host parameter to it
(
tg_shell_take_params,Processor::followEngine), so automation lanes, the host’s UI and the editor all show the recalled sound. A paste is the same. - A state load is one edit (
tg_shell_load): the blob, then the restored parameters into the current slot. The parameters are the exact values the project saved — the blob holds them rounded — so a project reopens bit for bit, and a blob from before slots had sounds of their own (state v6 and older) takes them in all eight slots. - A save writes what the next block will hold (
tg_shell_save_with_params): the engine’s blob with the host’s values applied the way the next push would apply them, so a project saved before any audio has run still has the parameters the host shows, in the slot they belong to. The parameters beside the blob come from the same snapshot of the engine — the latest frame, with the record of what the engine last heard from the host published in it — so after a Slot switch, until the host has followed it, the save holds the new slot’s values beside the new slot’s blob, never the slot that was left.
Slot files (.nitgslot, one slot; .nitgbank, all eight) are the engine’s
text, written and strictly read by tg-core’s slotfile.rs — the state blob’s
own per-slot fields under a format id and a version. NI Trance Gate is on the
JUCE shell, and its native editor shows the system’s save or open panel itself
(juce::FileChooser, behind editor/FilePanels.h), remembering the last
folder in the processor’s model; the model turns a slot into text and back
(EngineModel: tg_shell_export, tg_shell_import), and the editor words the
outcome in the hint bar. An import is checked on the message thread and queued
whole (tg_shell_import), with the slot the host showed, as a paste is
(below): a refused file changes nothing, and an accepted one is followed by the
host exactly like a paste, and marks the set unsaved.
Copy and paste are the editor’s too: it reads and writes the system’s
clipboard (juce::SystemClipboard, behind editor/Clipboard.h, so the
editor’s tests stand a fake in). Copy is the current slot as a slot file’s text
(tg_shell_export). Paste hands whatever is there to the engine, which
classifies it whole (tg-core’s paste.rs, through tg_shell_paste): a slot
replaces the slot the host showed when it was pasted — carried in the command,
because the host may move its Slot in the very block the paste is applied in —
a bank all eight, and a whole state blob, the pre-slot Copy’s text and the
Move’s patch, everything. Anything else is refused with a reason and changes
nothing; an accepted paste is applied at the top of the next block, the host
follows it as it follows a switch, and the set is marked unsaved
(ChangeDetails::withNonParameterStateChanged).
On the Move the module has no host parameters to mirror: the knob grid reads
get_param, and the module’s editor re-reads the grid (revalue()) when the
slot — carried as the ui readout’s last field — changes.
Objects the shell builds and frees on the main thread — the audio thread’s half
of Listen-In’s bus claim (its abus_pusher_t; the main thread keeps the
abus_writer_t), the Spectrogram’s receiver — reach the audio thread through
shell_handoff.h, which frees a replaced one only once the audio thread has let
go of it. The Spectrogram’s receiver also owns a worker thread, which runs its
transforms off both the audio and the UI thread; freeing the receiver joins it.
Nothing that allocates, maps memory or talks to the editor runs on the audio thread;
it only records what it wants, and a timer on the message thread does it.
The host’s state calls get the same treatment, because the host picks their
thread: a DAW restoring a session may call setStateInformation from a thread
of its own, and validators do. A state load therefore never calls a
message-thread API and never touches an editor: it records the load, and the
editor’s model catches up on its next tick. NI Spectrogram
records the load in its Session (plugins/spectrogram/State.h), and its
processor’s next service on the message thread hands the receiver whatever
moved; writeState reads the same Session, so a save straight after a load
writes the load. The receiver’s
own C ABI serialises its message side as a floor beneath this, so a caller that
gets it wrong waits its turn instead of deadlocking (spectro_recv.h).
Every plugin’s state chunk starts with shell_state.h’s versioned header. A
chunk without it is an older build’s and loads as that build wrote it. A chunk
is read whole before any of it is applied, and one no build could have written
— empty, a parameter that is not a number of its kind, a string running off
the end — is refused and changes nothing. The chunk is ni::nist
(plugins/_shared/juce/Nist.h), and the processor tests save and reload it the
way a host does.
ni::Processor::processBlock runs a product’s block under
juce::ScopedNoDenormals: flush-to-zero for the block, the engines included,
and the host’s floating-point mode back on the way out.
The editor
Every editor is a native JUCE Component built from the Ultraviolet kit
(plugins/_shared/ui), drawn to the published Ultraviolet 1.1.0 design system.
An editor reads the processor through its model on the message thread and
never touches the engine; its parameters are host parameters, and what is not a
parameter — the Trance Gate’s pattern, the Spectrogram’s columns — travels
through the engine’s own snapshot. The kit, its components and its tests are on
the Native UI page.
One engine, two shells, and a test that says so
tg-capi and tg-move are members of the same workspace and both reach
tg-core by relative path. They cannot drift apart — not by policy, by
construction. tg-move links tg-capi for the tg_core_* surface its C tests
use, without the crate’s default shell feature: the plugin’s shell and the
ground have no caller on the Move, so its .so does not carry them. The
Side-Chain’s two do the same.
tests/render_plugin.c then proves it after the fact. It sets the identical
patch the module’s reference render uses, generates four seconds of a 220 Hz
sine quantised to int16 before gating (the Move hands the module an int16
buffer; without the quantisation the test would be measuring rounding rather
than the port), and drives the plugin’s own audio path — tg_core_process_f32_split
in 128-sample blocks against a DAW-shaped transport at 123 BPM. The result is
hashed and compared to a golden constant.
The two sides hash differently on purpose — FNV-1a over float-split output here,
md5 over int16-interleaved output there — and both goldens are re-recorded
together whenever the sound legitimately moves. The last time it moved, the
cause was tracked down to FMA contraction and verified: C with clang’s default
gave one hash, C with -ffp-contract=off gave another, and Rust agreed with the
second.
Build & CI — Schwung
The Move module is a Linux cross-build. It is not built by the CI workflow — that would double the CI time for a target whose own release workflow already builds and verifies it on every tag.
Locally
cmake --build build --target schwung # -> dist/trance-gate-module.tar.gz
cmake --build build --target schwung-side-chain # -> dist/ni-side-chain-module.tar.gz
Every module is built by the same script, modules/_shared/package.sh <module>,
where <module> is the directory under modules/. What differs between modules
— the catalog id, the title and the *-move crate — is in that directory’s
module.env; tests/release.test.mjs holds it to module.json and the Cargo
workspace.
The script re-execs itself inside Docker unless it is already in a container.
The image (modules/_shared/Dockerfile) is Ubuntu 22.04 with
gcc-aarch64-linux-gnu and a pinned Rust toolchain targeting
aarch64-unknown-linux-gnu, installed by a rustup-init that is pinned by
version and verified by SHA-256 — never curl | sh. The C toolchain is still
there because the aarch64 linker is gcc’s.
Inside, it runs cargo build --release -p <crate> --target aarch64-unknown-linux-gnu
from the repository root, so cargo walks up to the one workspace and picks
up .cargo/config.toml — which sets target-cpu=cortex-a72 for that target and
nothing else.
Two things in that script are load-bearing and commented as such:
- The
.sofilename matters. For acomponent_type: audio_fxmodule the chain host builds the pathmodules/audio_fx/<id>/<id>.soitself and never readsmodule.json’sdspfield. -Ofastis gone permanently. Clang’s FMA contraction made the shipped.soand its tests non-bit-identical, which is exactly the failure the render A/B exists to catch.
The tarball carries LICENSE and THIRD_PARTY_LICENSES.md beside the .so:
what reaches a device has no repository near it, and the GPL asks that every
copy come with the licence.
Testing on the Move’s architecture
./modules/_shared/test.sh trance-gate # or: ctest --test-dir build -L move
./modules/_shared/test.sh side-chain
First, on the Mac side, test.sh verifies the pinned Schwung and holds the
vendored host headers to it (schwung.sh headers, Host compatibility
below) — there, because the image has no git, and as a failure rather than a
skip, because this is the final verification. Then it builds the module with
package.sh in the same image and tests it there, on aarch64 Linux — Docker
on Apple Silicon runs the image as arm64; on an x86_64 host the script stops
rather than test the wrong architecture:
- The tarball as a device receives it. The
.sois aarch64, exportsmove_audio_fx_init_v2and the engine’s C ABI and nothing of the plugin’s (tg_shell_*,sc_shell_*,gnd_*: the capi crates’shellfeature is off for the Move);module.jsonsays GPL-3.0-or-later and theui_chainit names is in the tarball;THIRD_PARTY_LICENSES.mdhas a notice for every crates.io cratecargo treesays the.solinks. - The module’s crates (
MODULE_TEST_CRATESinmodule.env: the core and the vtable crate) undercargo test: thechain_paramscontract — every engine parameter declared, or deliberately absent and named as such — the host panic, CC 120 or CC 123, which resets the Side-Chain and which the Trance Gate accepts without changing a sample, and the render A/B (below). - The module’s test script (
MODULE_TEST_SCRIPT), the Trance Gate’sengines/trance-gate/tests/run.sh: its C suites against the engine’s ABI, the golden render’s md5, and the state blob’s time budget (below).
The full tier runs it for every module (ctest -L move), one at a time, since
both build into target/aarch64-unknown-linux-gnu/.
modules/_shared/install.sh <module> scps the result to ableton@move.local.
It refuses to create the base directory if it is not already there — a wrong
path silently creating a tree is worse than an error — and leaves the module
owner-writable but never world-writable.
Host compatibility
The pinned Schwung
Every module is tested against one Schwung release, named once in
modules/_shared/schwung.version:
SCHWUNG_REPO=charlesvestal/schwung
SCHWUNG_TAG=v1.7.3
SCHWUNG_COMMIT=a6f7ec9e5cf4d0df172a1dbc00b29d0b5eb67124
The format is deliberately trivial, for scripts and CI to read: KEY=VALUE
lines, no quotes or spaces, # comment lines — split on the first =, or
source it from a POSIX shell. ctest -R schwung_versions holds it to that.
modules/_shared/schwung.sh is the only way in:
modules/_shared/schwung.sh checkout # prints the verified checkout's path
modules/_shared/schwung.sh headers # vendored headers == the pin's, byte for byte
It fetches the tag once (git fetch --depth 1) into a cache outside every
checkout — ~/Library/Caches/neon-ingvy/schwung/<tag>-<commit> on macOS,
$XDG_CACHE_HOME/neon-ingvy/schwung/… elsewhere, NI_SCHWUNG_CACHE to
override — and refuses it unless the tag still names the pinned commit. A
cached copy is verified locally on every use (HEAD is the commit, git status
is clean), so it works offline once fetched. NI_SCHWUNG_REMOTE fetches from a
mirror or a local clone instead; the commit check is the same, so it can supply
the pinned Schwung but never another. Exit 1 is a mismatch, 77 (ctest’s skip)
is “not cached and not fetchable”.
The SHA is upstream’s, and that matters: v1.7.3 was re-tagged after a
history rewrite, so a clone fetched before then has v1.7.3 at 911136d, the
same tree with another parent. The pin is what GitHub serves now, and a local
clone with the old tag is refused as a source.
Who uses it: engines/trance-gate/tests/ui.sh (the editor’s smoke test, on the
pin’s src/shared), ctest -R schwung_pin (the headers), and test.sh on the
Mac side before the container. They used to search for any schwung/ checkout
above the repository and test against whatever version it was on.
To move the pin: change all three keys, run schwung.sh headers and vendor
what it reports, then the quick tier — ni_schwung_abi says whether the
tables still match the Rust (below).
The host’s tables
ni-schwung mirrors host_api_v1_t and audio_fx_api_v2_t in Rust.
Their LP64 offsets, sizes and version numbers are written down once, in
engines/shared/crates/ni-schwung/abi/layout.def, an X-macro both sides read:
ni_schwung_abi compiles every entry as a _Static_assert against the
vendored headers (engines/trance-gate/include), and ni_shared’s cargo test
holds the Rust mirrors to the same entries — every field, in order, with a
destructuring that makes a field missing from the list a compile error.
What init believes of the table:
api_versionmust be 1 (MOVE_PLUGIN_API_VERSION). Anything else is a table this mirror cannot read, and init returns null — the failure every loader on the device handles (the chain logs “V2 API version mismatch” and dlcloses). A refused init changes nothing already kept.sample_rateis the instances’ rate when it is 8 kHz to 384 kHz; otherwise, and with no table, 44.1 kHz.
The minimum host
module.json’s min_host_version is the oldest Schwung a module runs on — for
the Trance Gate 1.5.0, found by running its editor’s smoke test against
every release from 1.0.0: before 1.3.0 ui_chain.js does not load
(isHardwarePadPress and claims_ccs arrive in 1.3.0); on 1.3.x and 1.4.x it
loads, but the controller’s page carries no canvas, so the editor’s redraw
gate cannot see its extra keys (ui, rate) and the ring can sit stale until
the next input; from 1.5.0 every check passes. The DSP itself needs nothing
newer than 1.0.0 (get_beat_position is in every 1.x). Paging past step 32
needs more than any release has (schwung#633), and is documented as such
rather than encoded here. The Side-Chain declares none: it is not in the
catalog, and has only been tested on the pin.
What enforces it is the catalog, not this file. Schwung Manager checks
min_host_version from the catalog entry (checkHostCompat, and the on-device
store’s installModule); an install from a GitHub URL reads only id and
component_type from module.json. Schwung’s own MODULES.md asks for the
field in both places, so it is declared here and the catalog entry must carry
the same number — at the time of writing it says 1.3.0.
ctest -R schwung_versions holds min_host_version to no newer than the pin,
and the module’s help and docs to both numbers.
The plugin and the Move, in one test
tg-move’s render_ab renders the same patch, input and transport through
the plugin’s path (tg_core_process_f32_split_tap, float, split channels, its
output rounded half away from zero) and the Move’s (move_audio_fx_init_v2’s
vtable, int16 interleaved, the clock behind the host’s callbacks) in one
process, and requires byte-identical int16 — no golden, so an intended
change to the sound changes nothing here. Two scripts: the golden patch, and a
set played live (stopped transport, a mid-bar start, tempo changes, a jump
back, slot switches and edits while playing, the fade, ms stages, every
curve). It runs in the quick tier on the Mac (tg_core_rs) and on aarch64 in
test.sh.
The state blob’s time budget
engines/trance-gate/tests/state_budget.c (run by run.sh, so on aarch64 in
test.sh) times set_param("state") and get_param("state") through the
vtable on the largest realistic patch — eight slots of 128 steps, shuffled
orders, every depth, tie and sound value off its default, ~5.3 KB — and holds
the median to 5% and the 90th percentile to 25% of a 128-frame block
(2902 µs). The margin is for the Move’s Cortex-A72 being several times slower
than the Apple core Docker runs on; the worst call is printed but not held to
anything, since on a shared machine it is the scheduler’s number. Release
build, as shipped.
Releasing
A tag <product>-<version> for a product with a module — trance-gate-v* or
side-chain-v* — triggers .github/workflows/release-schwung.yml, one workflow
for every module. The same tag also triggers the plugin release, because the
module and the plugin are one product in two shells — one tag ships both, and
their versions cannot drift apart.
The workflow, in four jobs:
check, before anything is built (ubuntu-24.04):- The tag matches the source.
scripts/release.mjs resolvechecks it againstversions.jsonand the module’smodule.json. Sincectest -R versionsalready holds every other spelling toversions.json, checking those two checks all of them. (The previous inline check stripped the version’s ownvalong with the product prefix, so no correct tag could pass it;ctest -R releasenow runs the parser against every product’s current tag.) A beta Schwung Manager would never offer is refused here (Betas, below). - The commit was tested locally: a passing
scripts/test.sh product <product>orfullrecorded on it underrefs/notes/ni-testsand pushed before the tag (Build & CI — Live, The order of a release). - The supply chain:
cargo deny check advisories licenses bans sources— the licence gate every local tier runs, and RustSec’s advisories as of the release day.
- The tag matches the source.
test, on the Move’s architecture (ubuntu-24.04-arm):modules/_shared/test.sh <module>builds the tarball withpackage.shin the module image and runs every check in Testing on the Move’s architecture on it, asctest -L movedoes on a Mac. A module that ships aui_chain.jsthen has its editor test (engines/<product>/tests/ui.sh,tg_move_ui) run against Schwung’s shared modules from the release pinned inmodules/_shared/schwung.version, whichmodules/_shared/schwung.shfetches and verifies by commit; on the runner a skip is a failure. The tarball it built and tested is the job’s artifact.release(ubuntu-24.04), with that tarball — never one built again:- Verify the artifact. It must exist, must contain
<id>/<id>.so,module.json,LICENSEandTHIRD_PARTY_LICENSES.md, andfilemust report the.soas ARM aarch64. The release action warns on a missing file rather than failing, so a build that produced nothing would otherwise publish an empty release the catalog happily points at. - Attach the tarball.
prereleaseis set explicitly and never inferred: without that, a-beta.tag publishes as a normal release and GitHub shows it as Latest. - Record it in
release.jsononmain, withscripts/release.mjs release-json, run from the tagged tree onto main’s current file.
- Verify the artifact. It must exist, must contain
pages: the site, rebuilt frommainnow that itsrelease.jsonnames this release (Build & CI — Live, Deploying this site).
The image the module is built in is pinned twice over: its base by digest
(ubuntu:22.04@sha256:…), and its Rust by rust-toolchain.toml’s version,
which the Dockerfile installs and sets as RUSTUP_TOOLCHAIN, so the plugin and
the module of one product are built by one compiler.
release.json
One repository publishes two catalog modules, so the file uses Schwung’s
multi-module shape, keyed by each module’s catalog id (module.json’s id):
{
"version": "…", "download_url": "…", "channels": { … },
"modules": {
"trance-gate": { "version": "…", "download_url": "…", "channels": { "stable": { … } } },
"ni-side-chain": { "version": "…", "download_url": "…", "channels": { "stable": { … } } }
}
}
The top-level fields mirror the Trance Gate, for managers and catalog entries
that predate the modules map. A -beta. version goes to that module’s
channels.beta and touches nothing else; anything else is stable and also
moves the entry’s own version/download_url.
Versions here have no leading v — 2026.09.29.3, and the same in
module.json. Schwung Manager compares versions with parseInt on each dotted
part, and parseInt("v2026") is NaN, read as 0: with the v, the year would
be ignored and a January release would sort before December’s.
Betas
A beta, v2026.10.11.1-beta.2, is 2026.10.11.1-beta.2 in module.json and
release.json, and goes to the module’s channels.beta. Schwung Manager
(schwung-manager/module_channel.go, versionNewer) offers it to a device
on the beta channel only when it is newer than the stable entry, and its order
is right for this spelling with one exception:
| the manager says | ||
|---|---|---|
2026.10.11.1-beta.1 vs stable 2026.10.10.3 | newer | the date decides |
2026.10.10.1 vs 2026.10.10.1-beta.2 | newer | the release replaces its beta |
2026.10.10.1-beta.2 vs 2026.10.10.1-beta.1 | newer | |
2026.10.10.2-beta.1 vs stable 2026.10.10.1 | older | Go’s Atoi("2-beta") is 0 |
So a beta of a later subversion on the stable’s own day would be
published and offered to nobody. scripts/release.mjs resolve refuses that
tag before anything is built, and says to release it under the next day’s
date or as stable. tests/release.test.mjs holds a port of the manager’s
compare to every row above.
The module store on the device (src/shared/store_utils.mjs) reads only the
stable entry, and compares with parseInt per dotted part, which reads
1-beta as 1: a device that installed a beta through the manager is not
offered the release that replaces it by the on-device store — the manager’s
own pages offer it.
Rolling back
The catalog is release.json on main, so rolling a module back is a commit
there; the release on GitHub can stay, or be withdrawn as the plugin’s is
(Build & CI — Live, Rolling back).
- A stable release: set the module’s entry in
modules— itsversion,download_urlandchannels.stable— back to the previous release, and for the Trance Gate the top-level mirror too (ctest -R versionsfails if the two disagree). A device that installed the withdrawn version is not downgraded — the manager offers only newer versions — so the fix forward, a new subversion, is what reaches it. - A beta: remove the module’s
channels.beta, or point it at the previous beta. Beta users then resolve to stable. - Commit (
Schwung catalog: revert <id> <version>), push tomain, and run Pages by hand so the site’s link follows.
ctest -R versions checks every entry is one the manager can use and is not
ahead of versions.json; a rollback only ever moves an entry backwards, so it
passes.
Protecting main (the owner’s step, not yet taken)
main is not protected, and the release records each module in
release.json by pushing to it as github-actions[bot] with the workflow’s
own token, beside the agent sessions that also push there. When it is
protected, the protection must still admit that one push, or every module
release publishes its tarball and then fails to record it (GH006; the step
prints what to do by hand). In the repository’s Settings → Rules → Rulesets, a
ruleset on the default branch:
- block force pushes and restrict deletions — these stop nothing the workflow does;
- if it also requires a pull request, add the GitHub Actions app to the ruleset’s bypass list, or the push is rejected. The alternative is for the step to open a pull request instead of pushing, which is a workflow change, not a setting.
The upstream catalog entry
charlesvestal/schwung’s module-catalog.json names this repository for the
Trance Gate (github_repo: graebe/neon-ingvy-audio-plugins, checked
2026-10-10), so installing from the catalog resolves against the releases
here. Its min_host_version still says 1.3.0. The module declares 1.5.0
(module.json, see “Host compatibility”), and only the catalog’s value is
enforced, so raising it is a one-line upstream pull request (the owner’s
call). NI Side-Chain is not in the catalog yet.
Build & CI — Ableton Live
Locally
Everything is built and tested on the developer’s machine first; GitHub Actions
only publish. The presets in CMakePresets.json are the builds:
| preset | directory | what |
|---|---|---|
dev | build-dev/ | this machine’s architecture, RelWithDebInfo, no LTO: the loop to iterate in |
release | build/ | Release with LTO, universal on macOS: what ships |
coverage | build-coverage/ | instrumented for llvm-cov, never shipped |
macOS, natively:
git submodule update --init --recursive # JUCE 9. The engines are subtrees.
cmake --preset release # universal, LTO: what ships (build/)
cmake --build build # the five VST3s, into build/out
scripts/test.sh quick # the developer loop (build-dev/)
scripts/test.sh full # everything, the validators included
scripts/test.sh product side-chain # one product, as its release runs it
Developer and standard builds are macOS only, and so are the releases. Linux and Windows are not released: the cross-build kit (see Cross-platform builds) stays in the repository, and they rejoin later, then only as part of the full build.
Artefacts land in build/out/, where every test and validator loads them by
path. No build copies a bundle into the system’s VST3 folder unless it is
configured with -DNI_DEPLOY_PLUGINS=ON, so a build never replaces what a host
has installed.
-DNI_SANITIZE=thread (or address, undefined) instruments every C and
C++ test — never a plugin. It needs one slice:
cmake -B build-tsan -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DNI_SANITIZE=thread -DCMAKE_OSX_ARCHITECTURES=arm64
cmake --build build-tsan && ctest --test-dir build-tsan -L full -LE host
Needs cargo. If it is installed and not found, the error names where it
looked — cmake/RustToolchain.cmake searches every layout rustup.rs, Homebrew
and a bare toolchain use, because Homebrew’s keeps its shims in
/opt/homebrew/opt/rustup/bin, which is not ~/.cargo/bin.
CI
.github/workflows/ci.yml runs by hand only. Every change is built and
tested locally before it is pushed (scripts/test.sh quick and full); that
is the gate, and Actions publish rather than discover. Started by hand, it
checks a clean runner on a pinned macos-15 image, with a newer run cancelling
the older one. Three jobs: quick and full run scripts/test.sh in each
tier, and tsan builds the tests under ThreadSanitizer and runs them.
The suite is the asset here, and it is not a smoke test:
tg_render_ab | four seconds through the plugin’s audio path, hashed against the Move module’s reference render. The check that a refactor did not change the sound. |
tg_curves, tg_envelope | the editor’s envelope maths against the engine’s own measured output — the engine is run with a DC input at amount 1, where the gain it applies is the envelope |
ui_tokens_native | the kit’s generated tokens agree with the vendored design system, and no colour is spelled anywhere else |
versions | every spelling of a product’s version agrees with versions.json: the build, the bundle’s plist and moduleinfo.json, module.json and every crate |
release | a tag means what the release workflows think it means |
licenses | everything that ships has a notice, and every bundle carries them (licenses_bundle_*) |
spectro_core | the FFT against a naive DFT, the band mapping, and assert_no_alloc’s guard proving the audio path allocates nothing |
The JS suites skip rather than fail when node is absent: a C++ developer building the plugin should not need a JS toolchain to run the C tests.
Releasing
trance-gate-v2026.09.29.3 — one product per tag, the prefix says which, and
the rest is the version exactly as versions.json spells it. A bare v*
namespace would make a Spectrogram tag publish a Trance Gate, which is the kind
of mistake only ever noticed by whoever downloads the wrong thing. The tag is
parsed by scripts/release.mjs, which both release workflows use and
ctest -R release tests.
The order of a release
git status # clean: nothing uncommitted, nothing untracked
scripts/test.sh product side-chain # or scripts/test.sh full -- on the commit to be tagged
git push origin main
git push origin refs/notes/ni-tests # the proof that run passed, BEFORE the tag
git tag side-chain-v2026.10.10.2
git push origin side-chain-v2026.10.10.2
When main has moved by a catalog commit only. A module release commits
Schwung catalog: <module> <version> to main, so git push origin main can
be refused after a test run that took an hour. Do not rebase onto it: that
makes a new commit, and the note is on the old one. Merge it, and tag the
commit you tested:
tested=$(git rev-parse HEAD)
git pull --no-rebase origin main # brings in release.json, nothing else
git push origin main
git push origin refs/notes/ni-tests
git tag side-chain-v2026.10.10.2 "$tested"
git push origin side-chain-v2026.10.10.2
That is safe because the tagged tree’s release.json is never what gets
published. The catalog step writes the new entry onto main’s release.json,
whatever main has gained since. The beta check reads the tagged tree’s copy,
and an older copy is only wrong if it predates a release of the same
module, which a catalog commit for another module cannot be. If main gained
anything else, the commit you tested is not the one main will hold; test the
merge, and tag that.
A release proves its tests. The owner’s rule is that everything is built
and tested locally and GitHub Actions publish, and a workflow cannot see a
local run — so the run leaves its proof on the commit. When
scripts/test.sh full (with coverage) or scripts/test.sh product <product>
passes on a clean tree, it appends one JSON line to a git note on HEAD
under its own ref, refs/notes/ni-tests:
{"tier":"product","products":["side-chain"],"sha":"…","date":"…","host":"…",
"rustc":"rustc 1.99.0 (…)","result":"pass",
"results":{"duration_s":1650,"build_type":"Release","archs":"arm64;x86_64",
"gaps":0,"waived":"docker","untested":"docker"}}
git notes --ref=ni-tests show HEAD prints them. Nothing is recorded for a
tree with uncommitted or untracked changes (at the start or the end of the
run), a HEAD that moved during it, full --no-coverage, or a run on a
GitHub runner; the run says so in its last lines and stays green. Both release
workflows fetch the notes first and stop, before they build anything,
unless the tagged commit carries a passing product run of the tag’s product
or a full run (scripts/release.mjs attested), with no gap left unwaived.
gaps counts the tests that could not run on that machine, Docker’s or
Rosetta’s say, less the ones waived by name with --waive (see
Testing). A product run passes with gaps, but it does not release
with them: run it where the capability exists, or waive the gap so it is on the
record. A note from before gaps were recorded does not count. There is no
override: a commit that has not been tested is tested, then tagged.
If a release stops here, push the missing note and re-run the failed jobs in the Actions tab. The tag is already on GitHub, so pushing it again starts nothing.
The notes push is refused only if notes were recorded on two machines. Join them, then push again — each line is one run, so concatenating is the whole merge:
git fetch origin refs/notes/ni-tests:refs/notes/ni-tests-origin
git notes --ref=ni-tests merge -s cat_sort_uniq refs/notes/ni-tests-origin
git push origin refs/notes/ni-tests
What the workflow does
release-plugins.yml checks the tag against the tree, asks for the tested-run
note above, then checks the supply chain — cargo deny check advisories licenses bans sources, RustSec’s advisories as of the release day included —
and runs scripts/test.sh product <product> on macOS — the same command a
developer runs locally (Testing). It builds that product alone: its
VST3 and the test programs of it and of the shared code, never another
product’s. It runs that product’s tests and the shared ones of both tiers (a
tag is the worst possible moment to discover the render A/B moved), then the
validators over its one bundle — pluginval at strictness 10 with its editor
tests, Steinberg’s VST3 validator and codesign --verify --deep --strict. It
stages the bundle with LICENSE and THIRD_PARTY_LICENSES.md beside it, and
packs <product>-<version>-macOS.zip. Beside the zip the release carries
<product>-<version>-macOS-tests.md: the run’s own summary of what it tested
and what it did not (Testing, What a run did not test), so what
a published build was tested with stays on the record.
Linux and Windows are not released for now; they rejoin as part of the full
build.
One product’s failing test holds that product’s release and no other. The job used to build everything and run the whole full tier, one to two hours on GitHub’s runner, so a race in one product’s state test held up the release of every product. A failing shared test still holds every release, because what it checks ships in all of them. The full tier remains the gate before anything is tagged.
Its last job redeploys this site (Deploying this site, below).
Every action in every workflow is pinned by its full commit SHA, with the
release it is beside it (# v4.4.0): a tag is a pointer its owner can move,
a commit is the code that was reviewed. The Rust toolchain is pinned by
rust-toolchain.toml (1.99.0, both Apple targets, llvm-tools), which the
runners install with rustup toolchain install and the Move module’s image
installs too; ctest -R release holds all of it.
Betas
v2026.10.10.2-beta.1 is a beta of v2026.10.10.2: it orders below it
and above everything before it. Every spelling is derived as for a release
(tests/versions.test.mjs), with one limit: CFBundleShortVersionString and
CFBundleVersion are three integers each, with no room for a prerelease, so a
beta and the release it precedes share them, and only the version string the
editor shows says “beta”. Cargo’s spelling is 2026.10.10-beta.1+2.
The tag is side-chain-v2026.10.10.2-beta.1, and versions.json must say the
same. It is published as a GitHub prerelease (never Latest), the site
never links it, and a Move module’s beta goes to its beta channel
(Build & CI — Schwung).
Seven releases a day
CFBundleVersion is y.m.(day*8+n): the subversion lives in the last field’s
three low bits, so n runs .1 to .7 — at most seven releases of a
product a day. An eighth would wrap into the next day’s number and read as
older than it is, so configure refuses it (cmake/NiJucePlugin.cmake) and
ctest -R versions does too. Release it as the next day’s .1.
Rolling back
A release that should not have shipped is withdrawn, then fixed forward: a version number is never reused, because a host or a Move that installed it cannot tell two builds with one number apart.
- The VST3. On GitHub, edit the release and either mark it a
prerelease (it stops being Latest and leaves the site’s links at the
next deploy) or delete it (the zip’s URL then 404s for anyone holding the
link). Keep the tag: it is the source the GPL promised for every copy
already downloaded.
gh release edit <tag> --prereleaseorgh release delete <tag>(the tag stays unless--cleanup-tagis given). - The Move module, if the tag shipped one: revert its
release.jsonentry onmain(Build & CI — Schwung, Rolling back). - The site. Run Pages by hand (Actions → Pages → Run workflow, or
gh workflow run pages.yml): it links the newest published release that is not a prerelease, so the withdrawn one disappears. - Fix forward: the fix, the full tier, a new subversion
(
v2026.10.10.3), its note, its tag — as any release.
Signing and notarisation
Gated on six repository secrets, and skipped cleanly without them:
| secret | |
|---|---|
MACOS_CERTIFICATE_P12 | base64 of the Developer ID Application certificate and key, as a .p12 |
MACOS_CERTIFICATE_PASSWORD | that .p12’s password |
MACOS_SIGNING_IDENTITY | e.g. Developer ID Application: Torben Gräber (TEAMID) |
NOTARY_APPLE_ID, NOTARY_TEAM_ID, NOTARY_PASSWORD | the Apple ID, team and an app-specific password for notarytool |
With them, the staged macOS bundle is signed with codesign --options runtime --timestamp after its notices are inside it (a signature seals every file in
the bundle), submitted with notarytool --wait, and stapled. The certificate lives in a throwaway keychain that is deleted at the
end of the job. Without them the bundle ships with the ad hoc signature the
build gave it, and the release notes carry the one command that gets macOS to
load it:
xattr -dr com.apple.quarantine ~/Library/Audio/Plug-Ins/VST3/NITranceGate.vst3
Deploying this site
.github/workflows/pages.yml builds site/ from main and deploys it to
GitHub Pages. Both release workflows call it as their last job, after the
release is published, and it runs by hand (workflow_dispatch). It used to
listen for release: published and never once ran for one: the releases are
published with the default GITHUB_TOKEN, and GitHub starts no workflow from
an event that token caused. One deploy runs at a time, in the order they
started (a tag with a plugin and a module calls it twice).
The download links are the published releases, not versions.json:
each product’s newest release on GitHub that is not a prerelease, a beta, or
ahead of versions.json (gh release list, read by
scripts/release.mjs latestStableRelease). A bump that is not tagged yet, a
tag whose release failed, and a beta are never linked. A local build of the
site uses the checkout’s tags instead.
Two settings, once:
- Settings → Pages → Source: GitHub Actions. Until it is, the deploy step fails with a message that does not obviously say so.
- Settings → Environments →
github-pages→ Deployment branches and tags: besidesmain, allow the release tags (*-v*). A deploy called from a release runs on the tag’s ref, and the environment refuses any ref it does not list. Or:gh api -X POST repos/graebe/neon-ingvy-audio-plugins/environments/github-pages/deployment-branch-policies -f name='*-v*' -f type=tag
The Animated Ground
Every window in this repository has the same background: violet dot paper over a fine grain. That background keeps time with the song: while the host’s transport plays it rings on every beat, a little harder on the first beat of each bar, and while the transport is stopped it is perfectly still.
This page is about how it works and how to turn it off. If you just want the switch, it is called Motion and it sits in the hint bar at the bottom of every window.
What you see
Press play in Live and watch the background rather than the controls. Every beat makes each panel edge — and the window border itself — emit one slow ring. The rings travel outward through the background, bounce off the panels and off the border, cross each other, and fade out over about twenty seconds. Where a ring peaks the dots grow a little and brighten and the grain thickens; in the trough between two rings they shrink and dim and it thins. The ring on a bar’s downbeat is the tall one; the others are visibly smaller, so the bar reads in the background as one strong pulse and its lighter beats.
Three things it deliberately does not do:
- It never idles. With the transport stopped the field rings out to exactly zero, the picture is the static background, and the render loop stops entirely.
- The grain never travels. Only its local density changes. Moving grain reads as television static.
- Rings do not cross a panel. Panels, wells and the step grid are solid to the field, which is what keeps the motion feeling like it is behind the interface rather than on top of it.
When it rings
The rule is short, and it is the whole of it:
- one ring on every quarter note, from the host’s song position, while the transport plays;
- a strong ring on each bar’s downbeat, from the host’s time signature — a bar is numerator × 4 ÷ denominator quarter notes, and a host that reports no time signature is taken to be in 4/4;
- nothing while the transport is stopped.
It reads no audio. Every plugin rings identically — NI Side-Chain on a bass, NI Spectrogram on a silent return track — because all of them read the same clock.
How the edges behave, because they are the ones people notice:
- Bars count from the start of the song. In 6/8 a bar is three quarters, so every third ring is the strong one. In 7/8 a bar is three and a half: the rings fall on quarters 1 2 3 4, the next downbeat lands half a beat after the fourth and rings there, and the bar after it starts on a quarter again.
- Pressing play on a beat rings it once, at once. Pressing play between two beats waits for the next one.
- A loop or a jump never rings the beats it skipped. Landing on a beat rings that beat; landing between two rings nothing until the next. A loop back to bar 1 rings bar 1’s downbeat, once.
- A tempo change simply changes the spacing. Very slow and very fast tempos work the same way; a beat cannot be lost or doubled between two audio blocks.
- It keeps time only while the window is open. With the window closed the plugin skips the clock entirely and it costs the audio thread nothing; reopening the window mid-song picks up at the next beat, with no backlog.
The strengths are 1.0 for a downbeat and 0.4 for any other beat. The
field is linear in strength, so a beat’s ring is two fifths the height of a
downbeat’s. Measured in the field, at its peak a downbeat ring moves about 53 %
of the window’s dots two levels or more from rest, and a beat ring about 14 %:
plainly there, plainly the lesser. 0.55 was the first candidate and moved 34 %,
which at 120 BPM — where each ring is still swelling when the next one starts —
read too close to the downbeat. tests/ui/groundfield.cpp holds the field
linear in strength, at the design’s beat strength.
The design followed the plugins here. Ultraviolet 1.0.0’s Motion spec drove the ground by sound, not by time: a 20–80 Hz onset detector on each plugin’s own input. That made four backgrounds that disagreed — each heard only its own track, so a plugin on a pad or a silent return never moved — and it needed an audio feed per plugin. The plugins moved to the host’s tempo by the owner’s decision, and Ultraviolet 1.1.0 adopted the same rule. Its reference strength for a beat is 0.55, “about half”, which the system lets a plugin tune; 0.4 is that tuning, for the reason above.
Turning it off
The Motion switch in the hint bar stops it immediately: the field flattens to zero and the loop stops. The setting is remembered per plugin, on your machine.
It is deliberately not a plugin parameter. Whether a background animates is a property of your view, not of the sound — so it is not automatable, it is not saved into presets, and a project you send to somebody else will not turn their background off.
If your system is set to reduce motion (macOS: System Settings → Accessibility → Display → Reduce motion), the ground never animates at all and the Motion switch cannot override that.
Where it lives in the code
engines/ground | the beat clock, in Rust, on the audio thread |
plugins/_shared/juce/GroundClock.h | feeds it the host’s transport once a block, and hands its rings to the editor |
plugins/_shared/ui/src/GroundField.h | the wave field — a port of the design system’s own reference implementation |
plugins/_shared/ui/src/Ground.h | the component: its timer, its sizing and the panels it reflects from |
plugins/_shared/juce/MachineSettings.h | the Motion switch’s remembered state |
plugins/_shared/ui/src/ReducedMotion.h | the system’s reduce-motion setting |
design/scheme/project/README.md | the design system’s Motion section |
The beat is found in Rust, on the audio thread, because only there is the
host’s transport exact: an editor’s timers are neither sample-accurate nor
running when the host renders offline. In every audio block the processor’s
ni::GroundClock hands the clock the host’s position, tempo, time signature
and play state (gnd_tick); the clock counts the beats and downbeats that block
crossed. The editor’s model takes that count on the message thread
(EditorModel::takeRings) and the Ground turns each new one into a ring.
engines/ground/crates/ground-capi/src/lib.rs, which ground.h is generated
from, spells out the whole contract, including why it is a count and not a
flag, and engines/ground/crates/ground-core/src/beat.rs the rule, down to how
a block tells a loop from rounding.
The field’s clock is a timer — never a display frame. A plugin window in a
real host gets few or no display refreshes while it is open, and a field
clocked by them never moved in Live. So the Ground runs its own timer at the
design’s frame rate, steps the simulation by the time that really passed, and
stops once the field rings out; with the window closed, the plugin stops
counting beats altogether.
The physics is the damped 2D wave equation on a 6 px grid, one Ricker wavelet per
ring, reflecting at every panel edge. The parameters — wave speed, damping,
source strength, dot and grain response — all come from the design system:
scripts/gen-tokens.mjs reads them from its reference implementation into
UvTokens.h, and ui_tokens_native checks them against it.
To review it without a host, open the kit’s gallery
(plugins/_shared/ui/gallery): its Ground page shows the ground at rest, after
a downbeat and through a bar of 4/4 at 120 BPM.
What moves, exactly
Both the dots and the grain respond, and neither of them travels.
As a ring passes, the dots grow from 1.0 px to about 1.3 px and brighten by roughly a fifth, and the grain thickens from 5 % to about 9 %; in the trough behind it they shrink, dim and thin.
The grain tile itself never moves — only its local density changes. That is a design rule rather than an optimisation: grain that travels reads as television static rather than as a surface responding to the beat.
Testing
Two tiers, one entry point. The quick tier is the loop you run while working; the full tier is the verification before you call something done. A product run is one product’s share of the full tier: what its release builds and tests.
scripts/test.sh quick [--build DIR] # npm run test:quick
scripts/test.sh full [--build DIR] [--bundles DIR] [--no-coverage] # npm run test:full
scripts/test.sh product PRODUCT [--build DIR] # npm run test:product -- PRODUCT
Each configures its build directory from a preset if it does not exist yet:
quick from dev into build-dev/, full and product from release into
build/ (below). --build DIR names another one — one per person or agent building
at the same time — and a directory that exists is used as it was configured.
No build installs anything: a bundle is copied into <build>/out, where every
test and validator loads it by path, and into the system’s VST3 folder only
with -DNI_DEPLOY_PLUGINS=ON, which no preset sets. Every stage of either
tier is timed into the timing log (below).
Presets: which build when
CMakePresets.json names the three builds this repository makes. All three
use Ninja.
| preset | directory | what it is | use it |
|---|---|---|---|
dev | build-dev/ | this machine’s architecture only, RelWithDebInfo, no link-time optimisation (NI_LTO=OFF) | while you work: scripts/test.sh quick, and full --no-coverage --build build-dev to host and validate what you changed. Its bundles pass every test and pluginval, but are never the ones released |
release | build/ | universal (arm64 and x86_64), Release, link-time optimisation — what ships | the gate: scripts/test.sh full, and every bundle that is installed or released |
coverage | build-coverage/ | Debug, one architecture, instrumented | scripts/coverage.sh alone, which configures it |
cmake --preset dev && cmake --build --preset dev # or: scripts/test.sh quick
cmake --preset release && cmake --build --preset release
Gates between steps run scripts/test.sh full --no-coverage: everything
in the full tier but the coverage stage, which builds the whole tree again
instrumented. Coverage runs once, at the final gate, as plain
scripts/test.sh full.
Build speed
Every C, C++ and Objective-C++ compile goes through ccache when it is
installed (brew install ccache; -DNI_USE_CCACHE=OFF turns it off), and its
hits work across build directories and worktrees: cmake/NiCcache.cmake gives
ccache the checkout as base_dir, so paths are hashed relative to the build
directory, and maps the build directory to . in debug info, so the compile
directory a -g build records is the same in every one. A debugger then finds
the sources with settings set target.source-map . <build dir> (lldb). The
coverage build keeps its absolute paths, because llvm-cov reads its sources
back through them, and hits only in its own directory. ccache -s shows what
the cache did; its default size, 5 GiB, holds the dev and release builds of a
checkout several times over (both together take about 0.6 GiB).
The Rust side needs nothing more. Within a checkout, ctest’s cargo suites
and a cargo test typed at the root already share the workspace’s own
target/, and each build directory keeps its own cargo target for the
engines. Measured, a shared cache would buy little: sccache 0.18 took a fresh
cargo test --no-run --workspace from 18 s to 15 s and the engines’ release
build from 17 s to 10 s, because the workspace’s own crates compile
incrementally and staticlibs, proc-macros and build scripts are not cached —
not worth a resident server whose path settings are per user rather than per
checkout. A shared CARGO_TARGET_DIR across checkouts would rebuild each
checkout’s own crates anyway and make every checkout’s cargo runs wait on one
lock.
Neither unity builds nor precompiled headers. The bulk of a cold build is JUCE’s modules, which are already one file per module, and ccache serves their repeats: each module is compiled into every plugin and test program that uses it, with the same flags in most, so two thirds of the compiles of a cold build with an empty cache are already hits. What is left for either to win is an edit’s recompile, at most the seven seconds below; a unity file would recompile its neighbours with every edit, and a precompiled header needs a ccache configuration of its own to be cached at all.
Measured
On a 10-core M1 Pro (16 GB, Apple clang 21), one run after another, with
Ableton Live and a Docker VM running beside them throughout (load average
35–50), so read the ratios rather than the seconds. “Before” is the old
configuration on today’s tree: Unix Makefiles, universal, Release, LTO, no
ccache. Each “after” starts from an empty ccache.
| before | after: dev | after: release | |
|---|---|---|---|
| cold build, everything (configure and build) | 3230 s | 692 s | 1045 s |
| the same in a second new build directory | 3230 s | 127 s (98.8% hits) | 255 s (98.9% hits) |
| rebuild after touching one kit file: everything | 104 s | 11 s | 92 s |
the same, the test programs only (--target ni_tests) | 19 s | 7 s | — |
| quick tier, warm | 28 s | 16 s | — |
full tier --no-coverage, warm | 264 s¹ | 180 s | 182 s |
¹ 102 s of it relinking the plugins after the kit file touched in the row above; the tests and validators take about the same time in every column, some 170 s.
“Touching one kit file” is plugins/_shared/ui/src/Button.cpp, recompiled
for real (CCACHE_DISABLE=1, since an unchanged file is a cache hit): the kit
is compiled into every editor, plugin and test program that uses it, so one
file is 18 compiles and a link per program, each of them twice over and
each plugin’s link with link-time optimisation in release. The second new build directory is the
case of a new worktree, or a build directory wiped: a checkout elsewhere on
disk hit 97.5% of the same compiles. The cache held 0.6 GiB after all of
this, of its default 5 GiB.
Quick — the developer loop
cmake --build build-dev --target ni_tests builds the test programs and the
engine archives they link, and no plugin bundle; then ctest -L quick runs:
- every Rust crate’s tests (
cargo test, crate by crate) — among them the no-allocation checks, the two-thread stress runs and the property tests, whose seed is fixed so the tier’s verdict never changes without a commit; music-core’s twice, withstdand without (music_core_rs,music_core_no_std) — andcargo_deny, the licence gate over their dependency graph (below), - the C tests against each engine’s generated ABI (
tg_core,sc_core,cd_core,spectro_columns,srecv_api,abus_roundtrip,gnd_roundtrip,shell_handoff), the Trance Gate’s ABI held to its last hand-written headers (capi_compat_tg*), and the oracles that pin each engine’s curves, envelopes and fades to a table it measured itself (engines/<product>/tests/fixtures:tg_curves,tg_envelope,tg_fade,sc_shape,sc_envelope), - the C++ units: the plain helpers every processor shares (
tests/cpp:ni_wire), the JUCE shell’s state codec over every fixture an earlier build saved (nist_fixtures), and each product’s processor, model and editor in one program with its audio callback under an allocation guard (macOS) — NI Trance Gate’stg_processorandtg_rt, and intests/<product>NI Spectrogram’s (sg_processor,sg_rt,spectro_state,spectro_wire), NI Listen-In’s (li_processor,li_rt, on a bus namespace of its own), NI Side-Chain’s (sc_processor,sc_rt, its MIDI and panic and its key bus included) and NI Chord-Detector’s (cd_processor: a chord named, silence out, and the lane still heard while the host bypasses it), - the Move module’s editor (
tg_move_ui):ui_chain.jsrun against Schwung’s own shared modules and the module’s realchain_params— every step of every length reachable through the pads and the arrows, the ring, the pad colours and the redraw gate. It needs a Schwung checkout beside this one (orSCHWUNG_SHARED) and is reported Skipped without one, - the native kit’s and the editors’ unit tests (
tests/ui:ni_ui_tests_*_unit) — every control, every editor on its fakes, and every info line held to 72 characters; their snapshot goldens are in the full tier, - the lint-like checks over the tree:
versions,release(the tag parser, release.json and the release staging),licenses(the tree, not the bundles),licenses_resolve(the feature resolutionlicensesdecides what ships with, on a graph small enough to read),spdx(every source file opens with its licence and copyright),design_paths(every path intodesign/that a tracked file names exists), the token guards (ui_tokens_native: the generatedUvTokens.hagainst the design system;site_tokens: the site’stokens.cssagainst it, and no colour spelled anywhere else in the site),ground_shells(the order of the ground’s calls in every processor),timing(the timing log’s helper and its summary),toolchain(the Move and Linux images build withrust-toolchain.toml’s Rust, and every base image is pinned by digest) andtest_summary(the report below).
No bundle, no host, no second process. Warm, it takes under twenty seconds (Build speed, above).
Full — final verification
Everything quick runs, and:
| label | what |
|---|---|
render | the render A/B goldens: four seconds through each engine’s plugin audio path, hashed against the Move module’s reference |
host | every VST3 from build/out, hosted by JUCE as a DAW hosts it. juce_host_* runs, saves and opens every bundle. NI Trance Gate’s (tg_host): its earlier class, its parameters through the controller, every earlier build’s fixture reopened as Live reopens a set and saved back byte for byte, the golden render through its audio path, the host’s Bypass passing the audio through bit for bit, and the window under a running transport with a set loaded on another thread. NI Spectrogram’s (sg_host) the same, its audio through bit for bit; NI Listen-In’s (li_host) the same, its audio read back off the bus, a reopened set’s bus claimed under its name, and nothing published while bypassed; NI Side-Chain’s (sc_host) the same, the engine’s golden render through it, a note, CC 120 and CC 123 through the host’s event list and MIDI-CC mapping, the Bypass passing audio while the engine still hears the notes, and a key on its sidechain bus |
snapshot | the kit’s and every editor’s snapshot goldens (tests/ui/baselines), drawn with JUCE’s createComponentSnapshot; they are macOS renders |
ipc | the bus written in one process and read in another — and, on an arm64 Mac with Rosetta, between the x86_64 and arm64 slices both ways round |
bundles | per bundle: it carries its notices (licenses_bundle_*); its signature verifies as Live’s scanner checks it (codesign_*: codesign --verify --deep --strict); its version spellings (versions_bundle_*); the release staging, dry-run against it (release_bundle_*) |
site | every root-relative link on the built site resolves |
advisories | cargo_deny_advisories: cargo deny check advisories against RustSec’s database as it is today — a vulnerable, unsound or unmaintained crate, or a yanked version, anywhere in the graph. Fetched at run time, so it is here and not in quick (Licences, below) |
coverage | the coverage floor, in the instrumented build |
move | every Schwung module (move_<module>, one per modules/<module>/module.env), built and tested by modules/_shared/test.sh in the module image on aarch64 Linux: the tarball’s .so is aarch64 and exports nothing of the plugin’s shell or ground, it carries LICENSE and a notice for every crate it links, the module’s crates’ cargo tests (the vtable, chain_params, the host panic on CC 120/123) pass on the Move’s architecture, and the Trance Gate’s golden render (engines/trance-gate/tests/run.sh) keeps its md5 there. Needs Docker running as arm64 (Apple Silicon); not registered without Docker |
scripts/test.sh full builds everything and the site, runs ctest -L full,
then scripts/coverage.sh with the floor enforced (skipped with
--no-coverage, for the gates between steps), then the validators over the
bundles in build/out (or --bundles DIR).
A passing run is recorded on the commit it tested. full (with
coverage) and product <product> append one JSON line — tier, products,
commit, date, host, rustc --version, and the run’s test count, duration and
build — to a git note on HEAD under refs/notes/ni-tests
(scripts/release.mjs attest). The release workflows refuse a tag whose
commit carries no passing note for its product
(Build & CI — Live, The order of a release), so a run is
only recorded when it tested exactly a commit: not with uncommitted or
untracked changes at its start or end, not when HEAD moved under it, not
with --no-coverage, and not on a GitHub runner. The run stays green either
way and says in its last lines why it was not recorded.
The validators (scripts/validate-plugins.sh, VST3 only) are the hosts’
own rules rather than ours: pluginval at strictness 10 with its editor
tests, Steinberg’s VST3 validator built from the SDK at the tag JUCE
vendors, and on macOS codesign --verify --deep --strict again, on exactly
the bundles validated — every one in the directory, or the ones named
(run <tools> build/out NISideChain). pluginval is pinned to one release with a SHA-256 per
platform, and the script runs on macOS, Linux (under xvfb-run without a
display) and Windows (Git Bash). Nothing they read is installed: every bundle
is validated where the build left it.
The compatibility fixtures in tests/fixtures/iplug2 are what the last
builds before the JUCE shell (v2026.10.06.5) saved, captured through the calls Live makes
(README,
FORMAT). Every product’s processor
test loads each to its exact parameters, nist_fixtures writes each back
byte for byte, and each host test reopens each in the built VST3. They cannot
be captured again from this tree: the README names the commit that can.
What a run did not test
A green ctest says nothing that ran failed. It does not say what did not run:
a test whose tool is missing is not registered at all (Docker for the move
tests, Rosetta for the bus across architectures, node for the tree checks),
and a test whose input is missing reports Skipped (schwung_pin and
tg_move_ui when the pinned Schwung is neither cached nor fetchable;
shell_handoff while a Listen-In in Live holds the bus slot it tests on). So
every tier writes down what it covered.
Configure records each missing capability in <build>/ni-capabilities.txt
(ni_missing_capability, cmake/NiTest.cmake); ctest writes its JUnit report;
and scripts/test-summary.mjs reads both into <build>/test-summary.md: the
counts, every test that did not run and why, every capability the build
lacked, by product, with the commit and the toolchain. A release attaches it
beside its zip (<product>-<version>-macOS-tests.md).
The full tier is the gate on it. It fails while anything did not run, unless the run waived it by name:
scripts/test.sh full --waive rosetta # a capability this Mac lacks
scripts/test.sh full --waive schwung_pin,tg_move_ui # several, comma-separated
NI_WAIVE=rosetta scripts/test.sh full # the same, from the environment
A waiver is written into the summary too, so a gap that was accepted is still
a gap on the record. The quick tier and a product run report and do not gate.
Nothing to read is not a clean slate: under the gate, a JUnit report with no
test cases in it, or a build with no ni-capabilities.txt, fails the run,
because neither can say what ran. A full or product run’s note
(refs/notes/ni-tests, Build & CI) carries the verdict as
well — gaps, waived and untested — so a release shows what the run it
relies on did not test, and a release refuses a run with gaps above 0: the
product run passes, but it releases nothing until every gap is waived or
closed.
Product — one product, as its release runs it
scripts/test.sh product side-chain # the versions.json key: trance-gate, spectrogram ...
Every test belongs to one product, or is shared (Labels, below).
A product run builds that product’s bundle and the test programs of that
product and of the shared code — <Bundle>_VST3, ni_tests_<product> and
ni_tests_shared, and nothing of another product’s — then runs
ctest -L '^product:(<product>|shared)$' over both tiers, and the validators
over that one bundle. No coverage, no site, no other product’s tests.
| belongs to | |
|---|---|
| a product | its engine’s cargo and C tests and oracles, its render A/B, its processor and audio-callback tests, its editor’s units and snapshots, its Move module (move_<product>), and every test that opens its bundle: juce_host_<Bundle>, codesign_<Bundle>, its own host test (sc_host …), and the tree checks run against the bundle (versions_bundle_<Bundle>, release_bundle_<Bundle>, licenses_bundle_<Bundle>) |
| shared | what every product is built on: audio-bus, ground, the shell plumbing, engines/shared (ni_shared, music_core_*), the JUCE shell’s state codec over every product’s fixtures (nist_fixtures), the plain C++ (ni_wire), the kit’s units and snapshots and its token guard, the bus across processes, and the checks over the tree — cargo_deny, versions, release, licenses, spdx, design_paths and the rest |
This is what a release runs (release-plugins.yml, Build & CI):
a failing test of another product cannot hold a product’s release, and a tag
builds one bundle rather than all five. A shared test still holds every release, as it
should: what it checks ships in all of them.
It is not the gate. A change to shared code is verified by the full tier, which runs every product’s tests against it; the product run is for releasing a product the full tier has already passed.
Windows and Linux. Developer and standard builds are macOS only, and so
are the releases. The cross-build kit (scripts/build-all.sh,
cross-build) still builds the plugins for Linux in Docker and
for Windows with clang-cl, and runs their ctest and pluginval there — Windows
under Wine, which is an approximation, labelled as such — but neither is
released. They rejoin later, and then only as part of the full build.
Licences
The project is GPL-3.0-or-later (docs/adr/0001-gpl-3.0-or-later.md), and four quick-tier tests hold it to that:
| test | what it holds |
|---|---|
spdx | every source file this repository owns opens with SPDX-License-Identifier: GPL-3.0-or-later and Copyright (C) 2026 Torben Gräber, in its own comment syntax. tests/spdx.test.mjs lists what is excluded and why: external code, the design mirrors, Schwung’s vendored headers |
cargo_deny | cargo deny check licenses bans sources: every crate in the graph is under a licence on deny.toml’s allowlist and comes from crates.io, and a crate in two versions is shown |
licenses | LICENSE is the unmodified GPLv3; THIRD_PARTY_LICENSES.md lists exactly what ships — JUCE at the submodule’s version and the VST3 SDK at the version of JUCE’s copy, what JUCE compiles in, the fonts, the engines, and exactly the crates and versions a build of the workspace links; and every C and C++ library’s licence is on the allowlist (AGPL-3.0 for JUCE alone) |
licenses_resolve | how licenses decides what a build links: cargo metadata unifies each package’s features over normal, build and dev edges alike, so a build dependency asking for serde’s derive (cbindgen does) would make serde_derive look shipped. resolveFeatures (scripts/licenses-lib.mjs) resolves them again through normal edges only, as cargo’s resolver does for a real build; this test holds it to each rule on a synthetic graph |
The allowlist is deny.toml’s, the one policy: MIT, Apache-2.0, BSD-1/2/3,
ISC, Zlib, MPL-2.0, Unicode-3.0, CC0, Unlicense, GPL-3.0, and libpng-2.0, IJG
and MIT-Modern-Variant for the libraries JUCE compiles into every bundle.
about.toml accepts the same list, and licenses holds the two equal.
The Rust crates’ section of THIRD_PARTY_LICENSES.md is generated, never
written by hand:
scripts/gen-rust-notices.sh # after anything changes Cargo.lock
It runs cargo-about with about.toml and the template
scripts/rust-notices.hbs, and replaces the text between the section’s two
markers. licenses fails until it has been run.
The two tools are pinned: cargo-deny 0.20.2 and cargo-about 0.9.2.
deny.toml’s schema has changed under cargo-deny before, and two versions of
cargo-about may render the same graph differently. scripts/licence-tools.sh
is the one place the versions are spelled:
scripts/licence-tools.sh install # cargo install --locked, both, at their pins
scripts/licence-tools.sh verify # names what is missing or at another version
They are developer tools, installed into cargo’s own bin directory and
linked into nothing. Without cargo-deny, cargo_deny fails rather than
skipping, and configure warns first. The generator refuses any cargo-about but
the pinned one.
Advisories are not part of the quick tier. They come from a database
fetched at check time, so the verdict would change without a commit.
cargo deny check advisories is the separate question: cargo_deny_advisories
in the full tier and each product’s run, and both release workflows on the
day they publish. deny.toml’s [advisories] says what fails it: any
vulnerability, a crate declared unmaintained or unsound, a yanked version.
Labels, not lists
Every test is placed in a tier and a product by ni_test_tiers() at the end
of the CMakeLists.txt that registers it (cmake/NiTest.cmake), in a
PRODUCT <product> section — or PRODUCT shared — with the programs its
tests run:
ni_test_tiers(
PRODUCT side-chain
PROGRAMS sc_processor sc_rt sc_host
QUICK sc_processor sc_rt
FULL sc_host:host)
A quick test carries quick;full, so ctest -L full is literally
everything; a full-only test carries full and a label saying why —
ctest -L host runs one kind alone. Each also carries product:<product>
or product:shared, and ctest -L product:side-chain runs one product’s
alone. The programs are what ni_tests_<product> builds. A test placed in no
tier and product, a test placed twice, or a program in no product stops the
configure: a new test is placed on purpose, never by default — and never
into every product’s release by accident.
The timing log
Every build and test entry point logs how long each of its stages took:
scripts/test.sh (each stage, and the whole run as total),
scripts/coverage.sh, scripts/validate-plugins.sh (each validator on each
bundle), the cross-build scripts (build-macos.sh, build-linux.sh,
build-windows.sh — inside their containers too — and each platform of
build-all.sh) and modules/_shared/package.sh. They all do it through one
helper, scripts/timing.sh:
. scripts/timing.sh
ni_time_stage build --build build-dev -- cmake --build build-dev
It runs the command unchanged — its output, its exit status, set -e as the
caller had it — and appends one JSON line to a log outside every
checkout, so removing a worktree or a build directory never removes it:
| macOS | ~/Library/Logs/neon-ingvy/build-timings.jsonl |
| Linux, elsewhere | $XDG_STATE_HOME/neon-ingvy/build-timings.jsonl (~/.local/state by default) |
| any | NI_TIMING_LOG=<file> instead |
A record holds time (the start, UTC), run (one id for every stage of one
invocation, the scripts it calls included), sha, branch, worktree,
script, stage, preset, build_type, generator, archs, duration_s,
exit_code, ccache_hits and ccache_misses (what ccache --print-stats
counted during the stage — the machine’s counters, so a build running beside
it counts too), cpus, load1 (the one-minute load average at the start) and
host. A build stage also leaves its build directory’s .ninja_log beside
the log, as ninja/<time>-<script>-<stage>.ninja_log, for per-target
analysis (ninja -t, or ninjatracing for a Chrome trace).
scripts/build-timings.py # per stage, per day, the slowest, ccache
scripts/build-timings.py --since 2026-10-08 --stage ctest
scripts/build-timings.py --json # the same, for a program
It reads the log with Python’s standard library alone: per stage (by script)
the count, median, 90th percentile and last duration and the failures; per
day the stages, their total time and failures; the slowest single stages
with their commit and checkout; and ccache’s hit rate. --since, --stage
and --script filter. The quick tier’s timing test runs the helper and the
summary into a log of their own.
Coverage
scripts/coverage.sh measures the Rust and our C and C++ — the engines, the
JUCE shell, the native kit, every editor and every processor, in the test
programs and inside the bundles the host tests load — into one report in
build/coverage/ (coverage.json for a program, summary.txt and
html/index.html for a person, lcov.info for an editor’s gutter). JUCE and
the other submodules are not counted. It builds instrumented into
build-coverage/ with the coverage preset, so nothing instrumented can be
shipped.
tests/coverage.floors.json holds the 80 % floor, and it is enforcing:
a unit below it, a total below it, or a first-party file no test loads fails
coverage_floor and the script. Units are read off the path — each engine
crate, each plugin directory (plugins/_shared is one), each module — so a
new crate or plugin is judged from its first file. An exemption is for what
cannot be built into anything a test runs, never for what is merely
untested, and each carries its reason, audited for a reason and a path that
still exists:
| exempt | why |
|---|---|
modules/trance-gate (unit) | ui_chain.js runs on the Move inside Schwung’s shadow UI and imports Schwung’s own modules by their paths on the device, which this repository does not carry; engines/trance-gate/tests/smoke_ui.mjs runs every entry point against them (tg_move_ui). Its DSP and C shell are counted |
plugins/_shared/ui/src/ReducedMotion.cpp (file) | every line is outside macOS (#if ! JUCE_MAC), and coverage runs on macOS; ReducedMotion.mm is counted |
plugins/_shared/ui/gallery/Main.cpp (file) | the gallery application’s entry point, a window for a person to look at; every page it shows is counted through the kit’s tests |
Native UI
The editors are native JUCE 9 Components, built to the published
Ultraviolet 1.1.0 system (design/scheme/project). Nothing an editor does
depends on a display refresh: every clock in it is a timer.
Where things are
| Path | What |
|---|---|
plugins/_shared/ui/src/ | the kit: ni_ui, every *.cpp here, globbed |
plugins/_shared/ui/fonts/, assets/ | JetBrains Mono 2.304 (OFL), the ground’s grain tile |
plugins/_shared/ui/gallery/ | the gallery app and its pages (pages/*.cpp, globbed) |
plugins/<product>/editor/ | one editor: Model.h, the editor, its parts (globbed) |
tests/ui/ | the test programs, the snapshot harness, the fakes, baselines/ |
scripts/gen-tokens.mjs | writes UvTokens.h and the grain tile from the design mirror |
Build and test
The kit, every editor, the gallery and their tests are part of the root build, so the presets build them (see Build & CI — Ableton Live):
scripts/test.sh quick # unit tests and the token guard, build-dev/
scripts/test.sh full --no-coverage # and the snapshot goldens, build/
cmake --build build-dev --target ni_ui_gallery # the gallery app
Every source list is a CONFIGURE_DEPENDS glob, so a new component, page,
editor file or test is a new file and no CMake changes.
ni_ui and each ni_editor_<product> are interface libraries that carry
their sources: a JUCE module is compiled once in each binary, with that
binary’s flags, and so is the kit. The root build
add_subdirectory(plugins/_shared/ui)s it and calls
ni_ui_add_editor(<product>) for each product, whose plugin links the editor.
The tests are doctest, like every other C++ test here. ni_ui_tests is the
kit’s (every tests/ui/*.cpp that is not an editor’s), ni_ui_tests_<product>
an editor’s (tests/ui/<product>_*.cpp, the product as its directory is
named), so a half-written editor breaks only its own program. Each program is
registered twice: <program>_unit (quick) and <program>_snapshots (full), a
golden being any test case declared with NI_SNAPSHOT_TEST. The token guard,
ui_tokens_native, is quick.
Two namespaces
uv:: is the design system as code: no state, no behaviour.
| Header | Gives |
|---|---|
UvTokens.h | uv::tok: every token, generated, the only file that may spell a colour |
UvType.h | uv::fonts(), the six styles (uv::type::value() …), draw, drawValueWithUnit |
UvIcons.h | uv::icon(name, colour), uv::drawIcon, uv::tint, the fifteen names |
UvLight.h | uv::light::glowLed, glowFocus, glowArc, shadow, dropShadow |
UvGround.h | uv::ground::paint, the window ground at rest |
UvLookAndFeel.h | uv::LookAndFeel, uv::ReadoutLabel, uv::SharedLookAndFeel |
ni::ui:: is the kit’s machinery, and where its components go.
| Header | Gives |
|---|---|
EditorModel.h | the part of every editor’s model that is not the product’s |
ParamBinding.h | a host parameter as a control sees it |
FrameClock.h | the one display-rate tick of an editor |
Fit.h | FixedDesign, fitScale, constrainToDesign |
Keys.h, Detents.h | the keyboard map and the detents |
Focus.h | FocusVisibility: focus that shows only for the keyboard |
Info.h | the Hint’s info: setInfo, InfoText, InfoState, InfoTracker, InfoHost |
Luminous.h | light past a component’s edge, painted by its parent |
The music views
Five components and a model, for any editor that shows notes (NI Chord-Detector’s first). Each takes a plain value State and draws only from the tokens; the words and the spelling are always the owner’s, from the engine.
| Header | Gives |
|---|---|
Music.h | music::NoteSet (128 bits), isBlack, Bravura and its SMuFL glyphs (drawGlyph at a glyph’s own origin, the em four staff spaces) |
Keyboard.h | whole octaves from a C, held keys lit uv (uv-deep dimmed), the bass marked under; lowestToShow follows the notes. Display only |
CircleOfFifths.h | twelve keys clockwise in fifths: the key’s seven tinted, sounding ones lit, the root filled, the tonic’s amber ring; onTonicSelected from a click or the arrows (a fifth a step), one Tab stop; centre() for the owner’s mode select. Luminous |
ChordReadout.h | the readout (28/32), the roman numeral chip, the HELD LED, the words in capitals, NOTES and ALSO. Display only |
NoteHistory.h | the model: notes with start and end on a clock that only goes forward, chord names at each change, the clock’s tempo and bar lines; bounded |
HistoryView.h | what both views share: now at the right edge, span quarters across, the host’s bar lines |
GrandStaff.h | proportional notation on a grand staff with the key signature: a head at each onset, a tail for its length, an accidental where the key differs; seconds side by side. Where a note sits is the owner’s Writer (the engine’s cd_write_note) |
PianoRoll.h | one numbered line per note over the played range (at least 24), a bar per note |
Bravura is embedded as JetBrains Mono is (fonts/bravura/README.md), and a
bundle that draws notation carries its OFL.txt (NI_UI_MUSIC_FONT_LICENSE).
The gallery’s Music section shows each in its states; tests/ui/music.cpp
holds their behaviour and pictures.
The plots
Plot.h is the PlotWell card: ni::ui::PlotWell, the well an editor’s plot
derives from and draws in (paintPlot), and in ni::ui::plot the marks the
card allows inside it (curve, under, ghost, dry, wet, rule), the
millisecond Axis, and band, the min/max envelope of an engine’s capture.
A plot draws what its engine rendered or captured, never a second model of the
DSP.
An audio trace follows its material. A well that draws one calls
enableLevelRange() and feeds followLevel(peak, nowMs) from its frame tick,
with the capture’s peak (plot::peak); it builds its bands on
levelRange().fullScale() (BandGeometry::fullScale) and again whenever
followLevel says the range moved or levelChanged() is called.
plot::LevelRange is the rule: one filtered level in dB, aiming 3 dB over the
loudest level shown in the last two seconds (250 ms buckets), between −48 dBFS
and +3 dB, gliding up with a 35 ms time constant and down with a 1.5 s one, so
an overshoot is clipped at the edge for at most about 100 ms and steady material
holds it still. Only the label rounds, to whole decibels. The well writes the
range (“−12 dB”)
at the far end of its caption band, and a double-click — or an accessible press
— holds it at full scale (“0 dB fixed”) for the life of the editor. Only the
audio zooms: a gain, gate or envelope over it stays on its own scale. The Side-Chain’s
well and the Trance Gate’s Signal plot use it; tests/ui/plot.cpp holds the
rule on a clock the test turns.
The design layer
Tokens are generated. node scripts/gen-tokens.mjs reads tokens.json
and the motion constants ground.js publishes, and writes UvTokens.h
(uv::tok::colour::ink, uv::tok::space::space4, uv::tok::size::controlH,
uv::tok::type::label, uv::tok::shadow::glowLed,
uv::tok::motion::ground::fps …). The names are the system’s, camel-cased.
tests/ui_tokens_native.test.mjs fails while the file is stale, and while any
kit or editor source spells a colour: a hex word, a Colours:: name, a colour
of literals, a #rrggbb in a string. Derive instead (.withAlpha(),
.interpolatedWith()); a colour the system lacks goes to the design first.
Every glyph is an embedded face. The kit’s fonts carry JetBrains Mono’s
own faces, never a name for the system to resolve, and uv::LookAndFeel
answers any font JUCE makes for itself with them. Sizes are CSS px, so a
style’s size is the em square (withPointHeight), and tracking is CSS
letter-spacing. Title and label are capitals (uv::type::cased).
Icons are currentColor. uv::icon("copy", colour) is the design mirror’s
own SVG in the colour of its control: ink, on-uv on a lit button, ink-dim
disabled, bg-000 on red.
Light is drawn as the design system draws it. glow-led and the arc glow
are CSS drop-shadow() filters there, whose length is the standard deviation;
glow-focus is a box-shadow, whose blur is a radius. UvLight.h reproduces
both, the chain of glow-led’s two filters included. A component cannot paint
past its bounds, so a control whose light reaches past them is Luminous:
it paints only its light in paintLight(), and every container ends its
paint() with ni::ui::paintChildLights(g, *this), over its background and
under its children.
The model
An editor talks to its plugin through its model, and nothing else.
plugins/<product>/editor/Model.h derives from ni::ui::EditorModel:
- Parameters:
parameter(index)is ajuce::RangedAudioParameter&, in VST3 ID order, which is the earlier builds’ index (tests/fixtures/iplug2/<product>/parameters.jsonlists them). A control binds one withni::ui::ParamBinding, overjuce::ParameterAttachment: a drag isbegin()on its first move,input()per move andend(); a click or a key iscommit(), one complete gesture that writes nothing when nothing changes;reset()goes to the plugin’s default; host and automation changes arrive on the message thread through its callback. - Display text is the parameter’s:
getTextandgetValueForText, which the processor takes from the Rust engine. The editor holds no units, precisions or enum labels. Tests supply the text throughni::ui::test::FakeParameters(tests/ui/fakes.h), which also records every gesture the host would see. - Product data is plain C++: snapshot getters (the pattern, the playhead, a scope, the buses) and commands (toggle a step, copy a slot, name a bus). No message tags, no strings where the data is a number. Every call is on the message thread; a getter returns the latest snapshot already copied (the processor reads the engine’s triple-buffered snapshots), a command returns at once and shows in a later snapshot.
- The Ground’s rings come from
takeRings(), counted by the plugin from the host’s transport; Motion is remembered per machine, never in the host’s state.
Tests implement the model with fakes; the processor implements it later.
Rules every editor keeps
State lives in the model and the controls; timers only repaint. One
ni::ui::FrameClock per editor ticks on juce::VBlankAttachment, with a
timer standing in when no vblank comes, and only while something
subscribes. A missed tick leaves a picture late, never wrong.
A fixed design size, scaled to fit. The editor lays out at its design
size, always; ni::ui::FixedDesign scales it from the top-left corner to
whatever the host gives, and constrainToDesign keeps the window in
proportion. Nothing reflows and nothing scrolls.
Every pointer control takes the keyboard. Arrows step (Shift fine),
Page Up/Down take large steps or jump between detents, Home/End go to the
ends, Enter presses, opens a menu and chooses in it, and types into a readout;
a step grid is one Tab stop (Keys.h). Every keystroke is its own gesture. A
control’s focus ring (glowFocus) and its info show only for keyboard focus
(FocusVisibility).
Space is the host’s. Space always starts and stops Live’s transport, also
when the plugin window has focus, so no control answers it, with or without a
modifier: Keys.h has no Space key, and a keyPressed returns false for it.
The mechanism is JUCE’s own. The plugin’s view is the first responder once it
is clicked (EDITOR_WANTS_KEYBOARD_FOCUS, which typing needs); its peer gives
a key to the focused component and then to each parent
(ComponentPeer::handleKeyPress), and a key nobody uses goes back to Cocoa
unused, where keyDown: passes it to the superclass and up the responder
chain to the view the host gave the plugin, Live’s. The VST3 view’s
onKeyDown answers kResultFalse, so a host that asks first is told the same.
The exception is a text field being typed into (TextField, a Readout’s
field, EditField): there Space is a character, and the field has the
keyboard only while the edit lasts. A modal component would swallow every key
(the macOS peer’s rule), so only a field being typed into is ever modal.
tests/ui/hostkeys.h walks a key through the window as the peer does; the kit
sweeps every gallery page and each editor its window, before and after a click
on every control.
Every control says what it does, in at most 72 characters. One line,
Name — what it does, set with ni::ui::setInfo; it is also the control’s
accessible description. Each editor keeps its lines together in one place,
written as ni::ui::InfoText constants, which fail to compile past the limit.
The editor’s root is an ni::ui::InfoHost with an InfoTracker: the bar shows
an outcome first, then the line under the pointer, then the one on the
visible keyboard focus, then the window’s conventions, and a line leaves
after a 150 ms grace. Each editor’s test runs NI_CHECK_INFO_LIMIT on each of
its states.
Snapshots and the gallery
tests/ui/snapshot.h: NI_CHECK_SNAPSHOT(component, "name") renders with
JUCE’s software renderer and compares with
tests/ui/baselines/<name>-<os>.png (darwin, linux, windows: glyph outlines
differ by platform). A pixel differs when a channel is more than 4 of 255
away; a picture fails when more than 0.01 % of its pixels do. A missing
baseline fails. On a failure <name>-<os>.actual.png and .diff.png are
written to <build>/tests/ui/snapshots/. NI_UPDATE_BASELINES=1 writes the
baselines of the snapshots that run instead; narrow it with doctest’s
--test-case, and look at every picture before committing it. An editor’s
baselines are named after it: <product>-<state>.
The gallery (NI UI Gallery) shows every registered page. A page is a file
in plugins/_shared/ui/gallery/pages/ that registers itself with
NI_GALLERY_PAGE("Controls", "Knob", factory) and shows a component in each of
its states. "NI UI Gallery" --shots <dir> writes every page as a PNG at 2x,
for looking at without a screen.
Cross-platform builds
A plugin is built and checked for all three desktop platforms on one Mac, before anything reaches GitHub: macOS natively, Linux and Windows in Docker. GitHub Actions only publishes.
Linux and Windows are not released for now. Developer and standard builds
are macOS only, and so are the releases (release-plugins.yml). This kit stays
in the repository so they can rejoin later, and then only as part of the full
build. One command builds a JUCE plugin project for
each platform, runs its tests, validates every VST3 it produced with
pluginval, and sums up. For the five products, which the repository’s own
CMake project builds:
scripts/build-all.sh . -- -L full -LE 'move|site' -E '^cargo_deny$'
tools/cross/smoke is the kit’s own proof, small enough to try a toolchain
change on: a JUCE 9.0.3 VST3 whose processBlock hands every channel to a
twenty-line Rust static library through a C ABI — the shape every product
here has. It ships nowhere.
What runs where
| macOS | Linux | Windows | |
|---|---|---|---|
| Script | scripts/build-macos.sh | scripts/build-linux.sh | scripts/build-windows.sh |
| Where | natively | tools/docker/linux, linux/amd64 | tools/docker/windows, linux/amd64 |
| C++ | Apple clang (Xcode) | clang 20 | clang-cl 20 and lld-link, against the MSVC 14.44 C runtime and Windows SDK 10.0.26100 |
| Rust | aarch64- and x86_64-apple-darwin, joined with lipo | x86_64-unknown-linux-gnu | x86_64-pc-windows-msvc, static C runtime |
| Artefact | universal .vst3 | .vst3 holding x86_64-linux/*.so | .vst3 holding x86_64-win/*.vst3 |
| ctest | natively | in the container | under Wine |
| Signature | ad hoc, signed last; codesign --verify --deep --strict on every bundle | none (Linux has no bundle signing) | none locally |
| pluginval 1.0.4 | strictness 10, editor tests included | strictness 10, editor tests under Xvfb | pluginval.exe under Wine and Xvfb: a smoke test |
| Build directory | <project>/build-macos-universal | <project>/build-linux-amd64 | <project>/build-windows-x64 |
| Status | built and validated | built and validated | not built yet: waits for the owner’s licence acceptance (below) |
Prerequisites
- macOS: Xcode’s command-line tools, CMake 3.22 or later, Ninja, and Rust
with both Apple targets (
rustup target add aarch64-apple-darwin x86_64-apple-darwin) — what the plugins already need. - Docker Desktop, with Use Rosetta for x86_64/amd64 emulation on Apple silicon (both images are linux/amd64), at least 8 GB of memory for its VM, and about 3 GB of disk for the two images — the Windows image is built on the Linux one — plus Docker’s build cache.
- JUCE at tag 9.0.3: the submodule at
external/JUCE, which is the default (git submodule update --init external/JUCE), or another checkout of the same tag passed as--juce <dir>. - For Windows, the owner’s acceptance of Microsoft’s licence for the C runtime and the Windows SDK — see below. Without it the Windows build stops before anything of Microsoft’s is downloaded.
Running it
scripts/build-all.sh [--juce <dir>] <project> [-- <ctest args>] # all three, then the summary
scripts/build-macos.sh [--juce <dir>] <project> [-- <ctest args>]
scripts/build-linux.sh [--arch arm64] [--juce <dir>] <project> [-- <ctest args>]
XWIN_ACCEPT_LICENSE=yes scripts/build-windows.sh [--juce <dir>] <project> [-- <ctest args>]
<project> is any CMake project inside the repository that takes its JUCE
from -DNI_JUCE_DIR: the repository itself (.), whose root build makes
every product, or the smoke plugin. Each script configures
<project>/build-<platform> (Release, Ninja), builds, runs ctest — all of
it, or what the arguments after -- select — then runs pluginval on every
.vst3 the build produced and exits non-zero if any of that failed, having
run all of it. A project that collects its bundles in <build>/out, as
ni_add_juce_plugin does, is validated there, so JUCE’s own copy in the
artefacts directory is not validated twice. build-all.sh runs the three in
turn and ends with a table:
| Platform | Artefact | Size | ctest | pluginval | Wall time |
Each platform leaves its full output in cross-build.log and its per-stage
timings in cross-result.tsv, both in its build directory; every pluginval
run has its own pluginval-<name>.log beside them.
Which tests, for the products
-L full is the full tier: every quick test, the render goldens, the five
bundles hosted as a DAW hosts them (juce_host_*, and each product’s
*_host against the sets earlier builds saved), the snapshot goldens, the bus across
processes, and on macOS each bundle’s signature. Three things are left out,
because they are the tree’s rather than the platform’s, and scripts/test.sh full runs them:
move: the Move modules, built and tested on aarch64 in images of their own — a container cannot start another;site: the documentation site’s links, which need the site built with Node;cargo_deny: the Rust licence gate, which needs cargo-deny at its pin, and the images do not carry it. It answers for the dependency graph, which is the same on every platform.
The Linux image carries no Node either, so the tree checks written for Node (versions, licences, SPDX, tokens) are not registered there: the tests’ own CMake skips them without Node, as it does for a C++ developer’s checkout. On Linux ctest runs under one Xvfb server, since a hosted bundle’s editor and the kit’s pages open windows.
How it works
One contract, three scripts
scripts/cross-common.sh holds what the three share: the arguments, the
configure-build-test sequence, pluginval over every bundle, the result file and
the image handling. The Linux and Windows scripts run twice: on the host, where
they make sure the image exists and start a container, and inside it, where
they build. The container runs as the invoking user with the repository at
/work/repo and JUCE at /juce (read-only), and everything it writes —
objects, CARGO_HOME, HOME with its caches, the Wine prefix — lands in the
build directory, never in the image. The repository is one level below the
root on purpose: Corrosion names cargo’s target directory after the
workspace’s directory relative to its parent, and for a workspace at /work
that name comes out absolute (/work_<hash>), where nobody may write.
Nothing is installed anywhere: pluginval loads each bundle where the build
left it, and nothing is copied into ~/Library.
Images: pinned, and built only when they change
An image is tagged with a digest of its Dockerfile (and build arguments), so a
missing tag means a changed Dockerfile: a moved pin builds a new image on the
next run, and an unchanged one costs a docker image inspect. A build
directory names the image it was built in, in cross-image, and the first run
in a new image empties it: Ninja rebuilds what changed in the sources or the
commands, and a new clang at the old one’s path changes neither, so the old
image’s objects would otherwise be validated as the new one’s. Everything in
the images is pinned:
| What | Pin | Where |
|---|---|---|
| Dockerfile frontend | docker/dockerfile 1.27 by digest | both Dockerfiles |
| Base | ubuntu:24.04 by index digest | tools/docker/linux/Dockerfile |
| Every Ubuntu package (clang, CMake, Ninja, the -dev packages, Xvfb, Wine, the root certificates) | one archive snapshot, 20261001T000000Z, from snapshot.ubuntu.com | the same |
| LLVM | 20 (20.1.2 in that snapshot) | the same, LLVM_MAJOR |
| Rust | rustup-init 1.29.1 by SHA-256, toolchain 1.99.0 (rust-toolchain.toml) | the same, and modules/_shared/Dockerfile, which move together |
| pluginval | 1.0.4 by SHA-256, per platform | the Linux and Windows Dockerfiles; scripts/validate-plugins.sh for macOS |
| xwin | 0.10.0 by SHA-256 | tools/docker/windows/Dockerfile |
| MSVC C runtime, Windows SDK | 14.44.17.14 and 10.0.26100, from the Visual Studio 2022 channel | the same |
A snapshot rather than per-package versions, because Ubuntu removes a version
from its archive as soon as it supersedes it, and a snapshot never changes.
The snapshot service is HTTPS-only, and the base image has no root
certificates to reach it with, so a throw-away stage takes ca-certificates
from the live archive; its bundle is mounted for the one step that fetches the
snapshot’s own, and nothing of it lands in the image.
macOS: signed last
JUCE signs a bundle ad hoc and then writes Contents/Resources/moduleinfo.json
into it, which breaks the seal. pluginval loads such a bundle; Live’s scanner
rejects it (“a sealed resource is missing or invalid”). So a project signs as
the last of its bundle’s post-build steps — ni_add_juce_plugin does it for
every product, and the smoke plugin does the same — and build-macos.sh holds
every bundle to codesign --verify --deep --strict before pluginval runs, so a
project that forgets fails here rather than in a host.
Linux
The packages are those JUCE 9.0.3’s docs/Linux Dependencies.md asks for, for
a plugin with JUCE_WEB_BROWSER=0 and JUCE_USE_CURL=0: FreeType and
Fontconfig (juce_graphics), X11 with Xcursor, Xext, Xinerama, Xrandr and — new
in JUCE 9 — Xi (juce_gui_basics), and ALSA (juce_audio_devices, for a plugin
that links juce_audio_utils). No WebKit, no curl, no GL: only juce_opengl needs
it, and no plugin here uses it. Xrender and Xcomposite are not needed either:
JUCE only includes them with JUCE_USE_XRENDER, which is off by default.
pluginval runs under xvfb-run, so its editor tests open the editor for real.
--arch arm64 builds the same image for linux/arm64 and the project in it,
natively on Apple silicon. pluginval publishes no arm64 Linux build, so those
bundles are reported as not validated, never as passed.
Windows
The image has two stages. tools adds, to the Linux image, the rest of
the same LLVM (clang-cl, lld-link, llvm-lib, llvm-rc, llvm-mt), Rust’s
x86_64-pc-windows-msvc standard library, Wine 9.0 (64-bit only) and
pluginval.exe; it holds only open-source tools. sdk adds the MSVC C
runtime and the Windows SDK, downloaded by xwin — and only with the owner’s
XWIN_ACCEPT_LICENSE=yes.
tools/cross/windows-clang-cl.cmake is the toolchain file: it names the
compilers and tools, adds the CRT and SDK headers with /imsvc (so their
warnings are not ours) and their libraries with /libpath:, sets
-fms-compatibility-version to the CRT’s compiler (19.44), and keeps CMake’s
library and header searches inside the splat. The Rust side needs nothing for
a static library — nothing is linked — but cargo is configured for the target
through the image’s environment (CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_*:
lld-link, the splat’s library paths, Wine as the runner), so cargo test for
Windows links and runs too. None of that is in a committed
.cargo/config.toml: it means nothing outside the image.
Two things differ from a native Windows build. JUCE writes a VST3’s
moduleinfo.json by compiling a helper with the plugin’s compiler and running
it on the build machine; a cross-compiled helper is a Windows program, so the
cross build turns that step off (VST3_AUTO_MANIFEST) and hosts scan the
plugin instead. And ctest’s Windows executables run under Wine, through
CMAKE_CROSSCOMPILING_EMULATOR.
Rust in every build
tools/cross/RustStaticLib.cmake builds a crate for whichever platform the C++
build targets — never the machine cargo runs on — and hands it over as an
interface library: one slice per macOS architecture joined with lipo, the host
triple on Linux, the MSVC triple on Windows. On Windows the C runtime follows
the C++: a project on the static runtime (CMAKE_MSVC_RUNTIME_LIBRARY without
DLL, as the smoke plugin and every plugin here) gets Rust built with
+crt-static, or the link would pull in both runtimes. cargo’s target
directory is the build directory’s own, so the three platforms’ builds of one
checkout never share objects. ni_add_rust_test adds the crate’s cargo test,
for the same target, to ctest.
The Microsoft licence
The Windows image’s sdk stage downloads Microsoft’s C runtime and Windows
SDK, which are not free software and are not in this repository.
tools/docker/windows/README.md says what xwin asks to be accepted, where the
licence terms are, and how the acceptance is given: as
XWIN_ACCEPT_LICENSE=yes, by the owner, once per image build. No script or
agent gives it on the owner’s behalf. The image built that way is local
only: it is never pushed to a registry.
What the Wine run covers, and what it does not
It has not run on a plugin yet: there is no Windows binary until the
owner accepts the licence. All that is established is that pluginval.exe
1.0.4 starts under the image’s Wine and Rosetta and prints its version, which
the image build checks. What follows is what the run is set up to do, not
what it has been seen to do.
pluginval.exe under Wine is to load the real Windows DLL and drive it
through the same strictness-10 suite as the other platforms: scanning and
instantiation, audio at 44.1, 48 and 96 kHz in blocks of 64 to 1024 samples,
state save and restore, automation and parameter fuzzing, bus layouts — and,
with Xvfb, the editor tests. A pass would mean the binary loads and behaves
through Wine’s implementation of Windows, under x86_64 emulation.
It is not Windows. Wine’s Direct2D, DirectWrite and window management are its own, so a drawing or DPI fault on real Windows can pass here and a Wine shortcoming can fail here; there is no real audio device, no Windows host, and no code signing. The run that counts will be a native Windows one, once Windows rejoins the releases.
The run is set to strictness 10 with the editor tests, like the other two
platforms; should Wine fail the editor tests on a plugin that passes them natively, the plan is to drop to
--skip-gui-tests for Windows and say so in the verdict — the editor then
being checked on macOS and Linux only, and natively on Windows once it is
released.
Timings
Measured on 2026-10-06 on this machine (Apple silicon, Docker Desktop with 10
CPUs, 8 GB and Rosetta), on the smoke plugin, with scripts/build-all.sh.
Cold is a first build: empty build directory, JUCE compiled from scratch.
| Step | macOS | Linux amd64 | Windows x64 |
|---|---|---|---|
| Image, first build (once per Dockerfile change) | — | 4 min 15 s – 4 min 34 s | tools stage 1 min 27 s; sdk stage not built (licence) |
| Configure (JUCE builds its juceaide helper here) | 13 s | 60 s | — |
| Build, cold | 2 min 24 s | 6 min 38 s | — |
| ctest | 2 s | 3 s | — |
| pluginval, strictness 10 | 21 s | 14 s | — |
The platform in build-all.sh, images present | 3 min 04 s | 7 min 58 s | stops at the licence gate |
| The same, nothing changed since | 19 s | 20 s | — |
The whole cold build-all.sh took 11 min 03 s. The Linux image is 1.46 GB
(linux/arm64: 1.36 GB, built in 6 min 12 s, and the smoke plugin natively in
it in 2 min 06 s); the Windows tools stage adds 1.03 GB to it, and the sdk
stage the CRT and SDK — about 0.6 GB for an x86_64 splat, by xwin’s own count.
Linux builds under x86_64 emulation, at one compile job per GiB of the Docker
VM’s memory (7 here): JUCE’s module translation units are large, and more jobs
than memory allows end in the out-of-memory killer. CMAKE_BUILD_PARALLEL_LEVEL
overrides it. About a third of a cold Linux build is the plugin’s final link:
JUCE’s recommended flags turn on link-time optimisation.
Known limits
- The Windows build is unproven until the owner accepts Microsoft’s
licence. Everything before that gate is built and checked — the
toolsstage, the Rust static library forx86_64-pc-windows-msvc,pluginval.exestarting under Wine — but compiling and linking JUCE with clang-cl, ctest under Wine, and the Wine pluginval run on the result wait for that first run. - The Visual Studio channel manifest is read live. The CRT toolset and the SDK line are pinned, and xwin checks every download against the manifest’s digests, but Microsoft may service a pinned SDK under the same version, and will eventually drop an old toolset from the channel; that build then fails and names the version.
- No
moduleinfo.jsonin a cross-compiled Windows bundle (above). - No validator for linux/arm64: pluginval publishes no build for it.
- Debug builds on Windows link Rust’s release-CRT objects into a debug-CRT C++ build; the kit builds Release.
Cleaning up
Build directories are build-macos-*/, build-linux-*/ and build-windows-*/
inside the project, ignored by git; delete them freely. Images are
ni-cross-linux:* and ni-cross-windows:*, one per Dockerfile version:
docker images 'ni-cross-*'
docker image rm <image> # an old version
docker builder prune -a # the build cache too (every project's)Compatibility Promises
Everything NI Trance Gate has promised to keep working, in one place, with what holds each promise to account. The product is three weeks old and has already been a C engine, a Rust engine, a JUCE plugin, an iPlug2 plugin, a JUCE plugin again and a Max for Live device. Each of those left something behind that users’ files or other programs depend on. A promise costs something every time the format changes, so this page is also where one is retired.
The promises
| # | Promise | Why | Held by |
|---|---|---|---|
| 1 | The 15 parameters keep their index, ID, name, range, default and units | A Live set stores plain values by index; the host shows the names | tg_core::schema (the_host_columns_are_what_the_iplug2_build_reported), tests/tg_processor.cpp, tests/fixtures/iplug2/NITranceGate/parameters.json |
| 2 | Parameters, rates and readout fields are only ever appended | The index is the C ABI, the automation ID and a saved value | comments at tg-core/src/params.rs and rates.rs; schema::tests::the_table_is_in_abi_order |
| 3 | The plugin’s VST3 class ID is the iPlug2 build’s | Old Live sets find the plugin | IPLUG2_CLASS in plugins/trance-gate/CMakeLists.txt; tests/tg_host.cpp |
| 4 | Every layout of the NIst chunk loads (15, 14 and 12 parameters, headerless and versioned) | Projects saved by every released build | tests/nist_fixtures.cpp, tests/tg_processor.cpp |
| 5 | State blobs from v0 to v7 load, and a newer one is read best-effort | Projects and Move presets from every build | tg-core/tests/fixtures.rs (about 50 blobs), tests/state_round_trip.rs |
| 6 | A v7 blob is written byte for byte as v7 writes it | Older builds and the Move read it | tg-core/tests/fixtures.rs |
| 7 | Slot and bank files, format version 1 | Files users saved | tg-core/src/slotfile/tests.rs |
| 8 | Every clipboard form ever written pastes (slot, bank, whole patch, pre-v2026.10.06.2 copy) | Text users keep in notes | tg-core/src/paste/tests.rs |
| 9 | The tg_* C ABI is source-compatible with its last hand-written headers | The archived Max for Live external (archive/trance-gate-m4l) | capi_compat_tg, capi_compat_tg_names |
| 10 | Plugin and Move render the same bytes for the same patch | One engine, two shells | tests/tg_render_golden.h, engines/trance-gate/tests/run.sh, and the in-process A/B in tg-move |
| 11 | The Move module runs on released Schwung of its declared minimum | Devices in the field | modules/trance-gate/module.json, modules/_shared/schwung.version |
| 12 | Users who had the earlier bundle named TranceGate are told to delete it | The same plugin ID in two bundles confuses Live | plugins/trance-gate/docs/live.md |
What each costs
- 1–4 (Live sets) cost nothing day to day. They only forbid renaming or reordering, and the schema now states them once.
- 5–8 (saved text) cost a reader per version. Eight readings of the blob
live in
Patch::from_fields,Instance::loadandread_pattern. - 9 (the Max for Live ABI) freezes the
tg_*surface for a device the archive itself calls unfinished (“pattern persistence and layout were open”). Every addition must be appended to a fixture by hand, and nothing may ever be removed. - 10 moves on purpose with every intended sound change, and is cheap.
- 11 depends on a host whose API has no version contract (see
docs/tech/ci-schwung.md).
Proposal (owner’s decision)
- Retire promise 9. The Max for Live device was archived unfinished on
2026-09-29 and has no users. Without it, the C ABI is a private boundary
between two parts of one build, and
capi_compat_tgcan shrink to “the generated header compiles against the plugin”.- Keep the tag, so the device can still be built against the commit it was written for.
- Keep 1–8 and 10–12. They protect real users’ files and devices.
- Set a floor for promise 5 once the oldest blob versions (v0–v2, from before the first public tag) are known not to exist in the field. Until then, keep them: a reader is cheap, and a project that silently loads wrong is not.