Files
nvrl ec6cbce579 Add the Elastic Matter and Sigil Tunnel modes
Elastic Matter (`--mode elastic`): twisted thin-film membranes, an
inflating cutaway bubble and 24 spring-driven droplets that strikes tear
loose and springs pull back. Gaps slow physical time, drops expand the
scene. Direct audio response, no modulation graph.

Sigil Tunnel (`--mode sigil-tunnel`): a flight down a corridor of rings,
each the live sigil figure (spine, ribs, debris, spokes) spun and
flattened on the CPU, repeated along a bending axis with a per-ring
twist and shaded with sigil's closest-approach glow, colours and
feedback. Closest approach to each capsule is solved analytically
(14 rings x 48 segments per pixel, no raymarch). Near rings fade out
before they turn into end-on bands, the vanishing point stays dark so a
sigil drawn over it reads, and the trail is short. Shares sigil's
generator, backbone picker and modulation graph; the UBO gains one
flight row.

Both modes are in the live cycle, the launcher's Shape section, the
preview, timeline scenes and offline render.
2026-11-11 23:48:53 +01:00

194 lines
12 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# sigil-gui
Launcher for the [`sigil`](../audio-visualizer) audio visualiser. Drag an
audio file onto the window, pick a look, tweak colours and motion while the
preview plays the track, then hit **Render video**. It spawns
the existing `sigil` binary as a subprocess — it does **not** link sigil, and
sigil itself is untouched.
## Build / run
```sh
cargo run --release # dev (from sigil-gui/ — its own workspace)
cargo build --release # ../target/release/sigil-gui[.exe], next to sigil
```
Windows: builds a windowed `.exe` (no console pops up). Cross-build with the
same `--target x86_64-pc-windows-gnu` flow you use for sigil.
It does **not** link the `sigil` binary (it shells out to it), but it **does**
link the `sigil-model` crate for the shared modulation-graph + FX types, so the
routes it emits can't drift from what `sigil` reads.
## Usage
The launcher is one page. The **rail** on the left lists the sections, the
**editor** next to it shows the selected one, and the **stage** fills the
rest:
- **Preview.** Drop a track (anywhere, or Browse…) and sigil analyses it and
shows the first frame. Play / pause (the button, a click on the picture,
or Space) plays the track with the visual in sync; the bar scrubs. Every
edit shows up straight away: colours, gains and effects apply in place, a
new visualiser, form or aspect redraws after a short warm-up. It is the
same analysis, seed and frame a render produces, drawn smaller (360p /
540p / 720p — pick a smaller one on a slow GPU) and without the render's
supersampling. A transparent render previews over a checkerboard.
- **Render bar.** The track, a summary of the video (size, fps, format,
file), and the big **Render video** button. A render pauses the preview
and shows progress with ETA and Cancel, then "Open folder". Closing the
window mid-render asks to cancel first.
- **Live window ▾** opens sigil's own window for playing live: with the
track, the microphone, system audio or loopback.
- **Look** — the genre looks (Angelcore, Ophanim, Synth Club, Jersey Club,
Hoodtrap, Mylancore, Riddim, Tearout, Melodic Dubstep — each a mode +
form + gains + effects + modulation preset + palette from
`sigil_model::looks`) and **your looks**: save the current setup under a
name, apply it later, right-click to rename or delete. A look keeps the
visual settings; the track, output and paths stay as they are.
- **Colours** — a palette (Auto, Seraph, Neon, Club, Ember, Moon, Toxic),
then your own colours on top: a bass colour and a bright colour (the music
sweeps the hue between them), an accent, a highlight and a background,
each with a colour picker and a hex field, plus saturation and brightness.
A gradient previews the sweep. Save a set as your own palette.
- **Shape** — the visualiser (`sigil`, `tunnel`, `field`, `ophanim`,
`ferro`, `elastic` / Elastic Matter, `sigil-tunnel` / Sigil Tunnel) and its forms: sigil backbone families, tunnel shapes (cards with
animated thumbnails) or ferro's bass style.
- **Timeline** — the song's sections as the engine reads them off the track
(the preview sends its analysis), also shown as a strip under the scrub
bar. Click a section to pick it, drag a border to move it, double-click to
play from it. Per section: its kind (ambient / build / drop / breakdown /
groove), which earlier section it repeats (same letter = same shots), its
intensity, and which visualiser it shows. Split at the play head, merge
with the next, reset to the analysis. Edits are kept per track; the preview
follows them at once and a render gets them as `--score`.
- **Text** — sigil's text layer: a title card (title and artist from the
track's tags, or typed over them; how long it holds), synced lyrics (the
`.lrc` next to the track, a picked file, or the track's lyrics tag; the
lines are listed with their times and the current one lit, click one to
play from it), kinetic type (words punch on kicks during drops, the title
slams in at each drop), up to four captions (own text with `{title}` /
`{artist}`, placed, sized, pulsing on kicks, shown the whole song, between
times, during / from / until a kind of section, e.g. "from the first drop
to the end"), where the card and lyrics sit, the font and the letter /
glow colours. The style is part of a look; the words belong to the track.
A track without lyrics can be **transcribed** (whisper.cpp, see below):
the words come back as timed lines, and **Edit lines** lets you fix them —
retime a line (drag, type, or "now" = the play head), reword it, remove
it, add one at the play head, shift them all. **Fit to the vocals** ends
each line where the singing stops and clears the screen in the gaps (for
a hand-made `.lrc` whose lines hang on into the drop). Edits go to the
launcher's own copy (never to your `.lrc`) and the preview follows as you
type.
- **Motion** — the expressive gains, **relabelled per visualiser** (e.g.
`ca` = RGB split in sigil, on the trails in tunnel), each with ↺ reset.
- **Effects** — the screen effects as toggle cards, bloom strength, phosphor
feedback, transparent background and the matte clean-up. Turning
transparency on switches an MP4 render to ProRes (MP4 has no alpha).
- **Modulation** — two views of one graph. **Matrix**: a sources×targets grid
editing how live audio drives each parameter (bipolar amounts + right-click
response curve; trigger thresholds for freeze/strobe/morph/blink). field
has no routable parameters, so it has no matrix. **Nodes**: a
TouchDesigner-style node editor — wire audio sources through control nodes
(Math, Shape, Remap, Lag, Envelope, Counter, Integrate, LFO, Noise, Hold)
into the targets, and chain image ops (Feedback, Transform, Displace, Level,
Composite) from the rendered scene into "image out" to post-process the
frame — their parameters take the same control wires.
Presets: Default/Minimal/Hyper/Psychedelic/Patched/Trails. With
**live patch** on (default), a live run always gets `--routes`, and every
edit rewrites that file while sigil runs, so changes show up in the running
visualiser within ~¼ s. The preview always gets the routes file, so it
follows graph edits the same way. Otherwise a graph left at its default emits no
`--routes`.
- **Output** — GPU load (laptop / desktop / ultra); the video: platform
presets, resolution, fps, format (H.264 MP4, ProRes 4444 MOV, VP9 WebM),
CRF or bitrate, x264 preset, and the output file (default: next to the
track); the live window: target fps, aspect or a custom size;
controllers for live runs: a MIDI input (picked from the list sigil
reports, knob CCs typed or learnt) and an OSC port. Their knobs and pads
are the `ctl1`…`ctl8` / `pad` rows in Modulation. Kept with the session,
not a look.
- **Settings** — dark / light / system theme and an accent colour for the
launcher, the sigil binary in use, speech to text (the whisper.cpp
program, its model — pick one or download base / small / medium /
large-v3-turbo — the language, and vocal isolation: sigil-vocals and its
model), the exact command (copy, dry run),
and the live-window keys.
## Finding sigil and ffmpeg
The launcher looks for `sigil` (and, for renders, `ffmpeg`) **next to
itself** first, then on PATH — the Windows zip and the AppImage ship all of
them side by side, so moving or re-extracting the folder just works. The
launcher's folder also goes first on sigil's PATH, so a bundled ffmpeg is
used. Settings → Engine can point at another sigil; "Use bundled" goes back,
and a path that stops existing is ignored rather than blocking launches.
## Speech to text
Transcription runs whisper.cpp's `whisper-cli`, found like ffmpeg (next to
the launcher, then PATH; Settings can point at another). Install it with your
package manager (`whisper.cpp`) or drop the release's `whisper-cli` next to
sigil-gui. Models are ggml files in the launcher's data folder (`models/`,
where Settings downloads them with curl), in a `models/` folder next to the
launcher, or anywhere you pick. The track is decoded to 16 kHz mono with
ffmpeg, whisper's word timings are regrouped into lines (breaks at
punctuation, pauses and ~42 characters; `[Music]`, `♪` dropped; a blank
stamp in long gaps), and the result is saved as
`<data>/lyrics/<track>-<hash>.lrc`. Sung words are hard: expect to correct
lines, and prefer `small` or larger models.
**Vocal isolation** (on by default) runs first: `sigil-vocals` (the
workspace's `sigil-vocals` crate, found like whisper-cli) pulls the vocals
out of the mix with an MDX-Net model from the Ultimate Vocal Remover set, so
whisper hears the words instead of the drop. The stem is cached in
`<data>/vocals/` (16 kHz mono, rebuilt when the track changes). Models:
`UVR_MDXNET_1_9703` (29 MB, the default, ~1 min per minute of audio on a
laptop CPU) or `Kim_Vocal_2` (64 MB, a little cleaner, ~2.5× slower);
Settings downloads them into `<data>/models/`, and `models/` next to the
launcher works too. sigil-vocals runs the model with ONNX Runtime, loaded at
run time: `$ORT_DYLIB_PATH`, else `libonnxruntime.so` / `onnxruntime.dll`
next to it (the bundles ship it), else the system's (`onnxruntime` package).
Without sigil-vocals or a model, transcription runs on the full mix.
The same stem drives **Fit to the vocals**: a line ends 0.35 s after the
singing stops (a pause of 1.2 s or more), holds at least a second, and a
blank stamp clears the screen when the next line is a second or more away.
Only the end times change; the start stamps are yours.
The bundles (`scripts/build-appimage.sh`, `scripts/build-windows.sh`) ship
all of it ready to use: whisper-cli built from source, sigil-vocals, ONNX
Runtime and the `base` + `UVR_MDXNET_1_9703` models in `models/`. Set
`WITH_STT=0` to leave it out, `WITH_MODELS=0` to ship the programs without
models (the launcher downloads them on demand), `WHISPER_MODEL=small` /
`VOCAL_MODEL=Kim_Vocal_2` to ship other models; `WHISPER_VERSION` and
`ORT_VERSION` pin the releases. Microsoft's `onnxruntime.dll` needs the
Visual C++ runtime, which most Windows PCs have; `VCRT_DIR=<folder>` copies
`msvcp140*.dll` / `vcruntime140*.dll` into the zip as well.
## Persistence
The launcher remembers your choices between runs via eframe's storage (the
`persistence` feature): the whole state, your looks and your palettes are
serialised on close and restored at startup, so it reopens where you left
off. Timeline edits and a track's words (title/artist overrides, a picked
`.lrc`) are stored per track path (and never in a saved look). This lives entirely in the launcher — sigil itself reads no config file.
## What it maps
sigil is **fully CLI-driven and stateless** — it reads no config file, so the
launcher passes *everything* on argv: `--mode --quality --live-w/h --render-w/h
--supersample --march-cap --target-fps --low --warp --fade --ca --drive
--render-fps --crf --x264-preset --no-feedback --backbone --lattice --no-fx
--palette --hue-from --hue-to --accent --highlight --background --saturation
--brightness --bloom --render --out` + the positional source (file / `monitor` / `loopback` /
default mic). A non-default modulation graph (or any live run with live patch
on, and the preview) is serialised to a temp `.ron` and passed via
`--routes`. The preview runs `sigil --preview --preview-h <h>` with the
render's flags minus the encoder ones, and gets every later change as a new
argument list on its stdin. The expressive gains (`low/warp/fade/ca/drive`) are
first-class `--low …` flags, so there is no `sigil.cfg` to write and nothing
rides in a side channel — the command in Settings is the complete
invocation.