From 0a17b3e76e3cc17cf2de1749ee108e76346660e3 Mon Sep 17 00:00:00 2001 From: monkey-w1n5t0n Date: Sun, 28 Jun 2026 04:42:27 +0200 Subject: [PATCH] feat(animations+firmware): /next/animations showcase (videos + interactive demos), in-app Help link, Arch firmware build script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - assets/media/showcase/index.html: standalone showcase on Manifold tokens — the 4 Manim explainers + 2 live interactive demos (knob->number, XY->two sliders). - Help drawer links to it (animations/). - scripts/build-firmware-arch.sh: Omarchy/Arch firmware build (pacman deps + arduino-cli + delegates to setup-firmware-toolchain.sh; clear error on the unreachable memllib pin). --- assets/media/showcase/index.html | 187 +++++++++++++++++++++++++++++++ manifold/src/console/Drawers.tsx | 20 ++++ scripts/build-firmware-arch.sh | 96 ++++++++++++++++ 3 files changed, 303 insertions(+) create mode 100644 assets/media/showcase/index.html create mode 100755 scripts/build-firmware-arch.sh diff --git a/assets/media/showcase/index.html b/assets/media/showcase/index.html new file mode 100644 index 0000000..e539ebd --- /dev/null +++ b/assets/media/showcase/index.html @@ -0,0 +1,187 @@ + + + + + +Manifold — How it works + + + +
+
+
Manifold · meml.lnfinitemonkeys.org/next
+

Manifold — how it works

+

A few short explainers of the core idea: a control is just a number; a network in the middle turns a few input numbers into many output numbers; and your thumbs-up/down shapes that mapping live.

+

back to the instrument

+
+ + +
+
Try it · interactive
+

A control is just a numberlive

+

Drag the knob. The number is the knob — one value in [0,1]. Every control in Manifold is, underneath, exactly this.

+
+ +
+
value
0.50
+
drag up/down or around the knob
+
+
+
+ + +
+
01 · Knob = 1:1 mapping
+

Knob → one number

+

A knob rotates while a paired 0–1 number rises and falls in lockstep — a control is a readout of one number.

+ +
+ + +
+
Try it · interactive
+

An XY pad is two numberslive

+

Move the dot. The pad projects to two independent values A (X) and B (Y). Two inputs — the smallest manifold.

+
+ +
+
A · x
0.50
+
B · y
0.50
+
drag anywhere in the pad
+
+
+
+ + +
+
02 · XY pad → two numbers
+

XY pad → A and B

+

A 2-D pad projects to two independent 0–1 values, each shown as a slider, as the dot moves.

+ +
+ + +
+
03 · Dimensionality fan-out
+

A few inputs → many outputs

+

The same 2-D control driving 3 → 4 → 5 outputs, then the control type cycled across knob, fader, touchpad, and 2-D / 3-D joysticks. A few input dimensions map to many outputs through the learned mapping.

+ +
+ + +
+
04 · Feedback & training
+

How your verdicts reshape the mapping

+

Training on the mapping surface, and how a verdict reshapes it — contrasting the two feedback modes: geometric push-away (directed repulsion from what you like) versus explore-and-place (randomise → audition → place → interpolate, the recommended default).

+ +
+ +
+ Videos rendered with Manim CE (1920×1080 · H.264). The two “live” demos above are interactive; the + same idea drives the real instrument at /next. Sources in assets/media/src/. +
+
+ + + + diff --git a/manifold/src/console/Drawers.tsx b/manifold/src/console/Drawers.tsx index 1325a15..cd1561e 100644 --- a/manifold/src/console/Drawers.tsx +++ b/manifold/src/console/Drawers.tsx @@ -668,6 +668,26 @@ function HelpDrawer() { re-roll (set the behaviour in the Learning drawer). Went too far → undo. The dock reveals exactly as much machinery as you reach for.

+ Learn more + + ▶ Watch the explainers + interactive demos + ); } diff --git a/scripts/build-firmware-arch.sh b/scripts/build-firmware-arch.sh new file mode 100755 index 0000000..14e434a --- /dev/null +++ b/scripts/build-firmware-arch.sh @@ -0,0 +1,96 @@ +#!/usr/bin/env bash +# +# build-firmware-arch.sh — build the MEMLNaut RP2350 firmware on Arch Linux +# (incl. Omarchy). Checks + installs system deps via pacman/yay, brings up the +# arduino-cli toolchain + rp2040 core, and compiles a firmware variant. +# +# Idempotent: safe to re-run. This is a thin Arch-specific front-end around the +# cross-platform scripts/setup-firmware-toolchain.sh + scripts/build-firmware.sh. +# +# Usage: +# scripts/build-firmware-arch.sh [VARIANT] # default VARIANT=PAFSynth +# scripts/build-firmware-arch.sh --setup-only # toolchain only, no compile +# scripts/build-firmware-arch.sh --list # list firmware variants +# +# The rp2040 core download is large (hundreds of MB — it bundles arm-none-eabi +# GCC). Run on your laptop, on mains power, with a good connection. + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" + +VARIANT="PAFSynth" +SETUP_ONLY=0 +for arg in "$@"; do + case "$arg" in + --setup-only) SETUP_ONLY=1 ;; + --list) grep -oE '"[A-Za-z0-9]+"' "$REPO_ROOT/scripts/build-firmware.sh" 2>/dev/null | head; exit 0 ;; + -h|--help) sed -n '2,18p' "$0"; exit 0 ;; + -*) echo "unknown flag: $arg" >&2; exit 2 ;; + *) VARIANT="$arg" ;; + esac +done + +log() { printf '\n\033[1;36m==> %s\033[0m\n' "$*"; } +warn() { printf '\033[1;33mwarning: %s\033[0m\n' "$*" >&2; } +die() { printf '\033[1;31merror: %s\033[0m\n' "$*" >&2; exit 1; } + +# ---- 0. sanity: are we on Arch? ---------------------------------------- +command -v pacman >/dev/null 2>&1 || die "pacman not found — this script is for Arch Linux / Omarchy. Use scripts/setup-firmware-toolchain.sh on other distros." + +# ---- 1. system deps via pacman ----------------------------------------- +# The rp2040 core ships its own arm-none-eabi GCC, so we only need the basics +# (git/curl/unzip) + python (some core post-install steps want it). +need_pkgs=() +for bin_pkg in "git:git" "curl:curl" "unzip:unzip" "python:python"; do + bin="${bin_pkg%%:*}"; pkg="${bin_pkg##*:}" + command -v "$bin" >/dev/null 2>&1 || need_pkgs+=("$pkg") +done +if (( ${#need_pkgs[@]} )); then + log "Installing system deps via pacman: ${need_pkgs[*]}" + sudo pacman -S --needed --noconfirm "${need_pkgs[@]}" +else + log "System deps present (git, curl, unzip, python)" +fi + +# ---- 2. arduino-cli ----------------------------------------------------- +# Prefer the official binary (matches the cross-platform setup script's pin); +# fall back to AUR (yay) if the user already has arduino-cli from there. +if ! command -v arduino-cli >/dev/null 2>&1; then + if command -v yay >/dev/null 2>&1; then + log "Installing arduino-cli from the AUR (yay)" + yay -S --needed --noconfirm arduino-cli || warn "yay install failed; the toolchain script will fetch the official binary into ~/.local/bin" + else + log "arduino-cli not found; the toolchain script will install it into ~/.local/bin" + fi +fi + +# ---- 3. submodule sanity (the orphan-pin footgun) ----------------------- +# memllib provides the audio/synth/hardware tree; if its pin is unreachable the +# build cannot be assembled. Fail loudly with the fix rather than 100 cryptic +# missing-header errors deep in the compile. +log "Checking the memllib submodule" +if ! git -C "$REPO_ROOT" submodule update --init --recursive 2>/tmp/mf-submod.err; then + cat /tmp/mf-submod.err >&2 || true + die "git submodule update failed. If this is the 'not our ref' / unreachable-pin error, the recorded memllib commit is on an unpushed branch (feat/nisps-core-swap). Push that memllib branch to a reachable remote, or bump the submodule pointer to a published commit, then re-run." +fi +if [[ ! -e "$REPO_ROOT/firmware/MEMLNaut-NISPS/src/memllib/hardware/memlnaut" ]]; then + die "src/memllib looks empty after submodule init — the memllib pin is unreachable. See the message above." +fi + +# ---- 4. toolchain bring-up (delegates the heavy lifting) ---------------- +log "Bringing up the arduino-cli toolchain + rp2040 core + libraries" +if (( SETUP_ONLY )); then + "$REPO_ROOT/scripts/setup-firmware-toolchain.sh" --no-build + log "Setup complete (--setup-only). Run without --setup-only to compile." + exit 0 +fi +"$REPO_ROOT/scripts/setup-firmware-toolchain.sh" --no-build + +# ---- 5. build the requested variant ------------------------------------ +export PATH="$HOME/.local/bin:$PATH" +log "Building firmware variant: $VARIANT" +"$REPO_ROOT/scripts/build-firmware.sh" "$VARIANT" + +log "Done. Flash with: scripts/flash-firmware.sh (hold BOOTSEL while plugging in the RP2350)."