diff --git a/db/custom.db b/db/custom.db index 84df7b8..30d5575 100755 Binary files a/db/custom.db and b/db/custom.db differ diff --git a/src/lib/ava/embedded-presets.ts b/src/lib/ava/embedded-presets.ts index 33e9d9d..12ddc7a 100755 --- a/src/lib/ava/embedded-presets.ts +++ b/src/lib/ava/embedded-presets.ts @@ -18,9 +18,12 @@ // (v7.10: em dashes in descriptions/script comments replaced with '--'; // v7.12: eleventh Zai-Magic preset "osc-rotations" added; v7.13.1: Beat // Matrix grid endpoint fix — the last point no longer lands one column past -// the wall and the rightmost column keeps its bottom dot). +// the wall and the rightmost column keeps its bottom dot; v7.14: Arctic +// Rainbow re-imagined as a music-driven water spray — slower rise, arching +// fall, music-gated drop count, per-drop bass-hit hue shifts, falling-only +// RGB tails). -export const EMBEDDED_SEED_VERSION = '7.13.1' +export const EMBEDDED_SEED_VERSION = '7.14' export interface EmbeddedPreset { folder: string @@ -119,10 +122,10 @@ export const EMBEDDED_LIBRARY: EmbeddedPreset[] = [ folder: "root/embedded/Amp Picks", name: "Arctic Rainbow", author: "S_KuPeRS", - description: "Auto-ported from the Winamp AVS preset \"S_KuPeRS - Arctic Rainbow.avs\" by S_KuPeRS. The original is driven by BlitterFeedback, DynamicMovement, Movement, which the script engine cannot run -- replaced with a generated \"rain\"-style visual, uniquely parameterized for this preset (beat & band reactive).", + description: "Re-imagined (v7.14) from the Winamp AVS preset \"S_KuPeRS - Arctic Rainbow.avs\" by S_KuPeRS. The original's BlitterFeedback/DynamicMovement chain cannot run in the script engine -- this hand-tuned stand-in sprays water droplets skyward: each drop rises slowly, hangs, arches left or right and falls back down. The drop count follows the music's intensity (silence runs dry), every bass hit re-tints each droplet's own hue, and only falling drops trail a tapered RGB tail.", originalFile: "/avs-originals/embedded/root/embedded/Amp Picks/S_KuPeRS - Arctic Rainbow.avs", approx: true, - content: "name: \"Arctic Rainbow\"\nmode: dots\nblend: additive\npersist: 0.789\nlinewidth: 1.877\n\n[init]\ncols = 48\nn = 918\n\n[frame]\nfall = fall + dt * (0.855 + vol_att * 1.119)\nhue = hue + dt * 0.034\n\n[point]\ncol = floor(i * cols)\nci = frac(i * cols)\nxx = (col / cols - 0.5) * 1.9\nyf = frac(rand(col * 3.7 + 1) + fall * (0.55 + rand(col + 5) * 0.5))\ntail = rand(col * 1.3 + 9) * 0.297 + 0.04\nyy = (yf * 2 - 1) * 1.05 + ci * tail\nx = xx / aspect\ny = yy\nred = (1 - ci) * (0.2 + treb * 0.85) + 0.04 * 0.85\ngreen = (1 - ci) * (0.2 + treb * 0.85) + 0.04 * 0.92\nblue = (1 - ci) * (0.2 + treb * 0.85) + 0.04\nskip = if(above(abs(yy), 1.02), 1, 0)\n", + content: "# Arctic Rainbow -- re-imagined (v7.14) as a music-driven water spray.\n# Droplets launch from below the bottom edge, rise slowly, hang at the top,\n# arch left or right and fall back down, like water sprayed skyward. The\n# NUMBER of airborne drops follows the music's intensity: silence runs dry,\n# loud passages spray hard. Every droplet owns a hue that shifts on each\n# bass hit, and only falling drops grow a tapered RGB tail -- rising drops\n# stay crisp dots.\n#\n# Slot layout (mode lines): each drop owns S consecutive points --\n# slot 0 separator (always skipped; breaks the pen between drops)\n# slot 1 the head (a crisp dot while rising)\n# slots 2..S-1 trail samples reaching 0.014s..0.44s back along the arc\n# Trail samples draw only once the drop is falling (vy < 0), so the tail\n# fades in exactly as the arch turns downward.\nname: \"Arctic Rainbow\"\nmode: lines\nblend: additive\npersist: 0.12\nlinewidth: 2\n\n[init]\ndrops = 120\ntailn = 12\nS = tailn + 2\nn = drops * S\ndtT = 0.042\nacts = 0\n\n[frame]\n# music intensity -> how many drops are airborne (fast attack, slow release)\nvolish = min(1, max(vol_att, bass_att * 0.9) * 1.25)\nwant = clamp((volish - 0.06) / 0.5, 0, 1)\nrate = if(above(want, acts), 6, 1.2)\nacts = acts + (want - acts) * (1 - exp(-dt * rate))\nactn = floor(acts * drops + 0.001)\n# brightness rides the volume; every bass hit flashes the spray brighter\nflash = exp(-beatage * 7)\nbright = 0.62 + 0.38 * min(1, vol_att * 1.6) + flash * 0.3\n\n[point]\n# slot map through cell centers (dust-proof floor; v7.13.1 lesson)\nq = i * (n - 1) + 0.5\nd = floor(q / S)\nslot = floor(q - d * S)\n\n# stable per-drop character: apex height, flight time, hue, per-beat shift\nhbase = 1.26 + rand(d * 7.13 + 3) * 0.62\ntf = 1.9 + rand(d * 5.31 + 11) * 1.5\nhue0 = rand(d * 3.7 + 23)\nhsh = 0.09 + rand(d * 9.17 + 31) * 0.17\n\n# flight clock: period P per drop, phase-staggered; every new splash\n# re-rolls its origin, drift and arch from the cycle index\nP = tf * 1.18\nct = time + rand(d * 1.7 + 43) * P\ncyc = floor(ct / P)\na = ct - cyc * P\nxr = d * 12.77 + cyc * 17.31\nx0 = rand(xr + 1) * 2 - 1\ndrift = (rand(xr + 2) * 2 - 1) * 0.16\narch = (rand(xr + 3) * 2 - 1) * 0.55\n\n# projectile parabola: y(u) = -1.06 + 4*h*u*(1-u), apex h above the launch\nvy0 = 4 * hbase / tf\ngrav = 8 * hbase / (tf * tf)\n\n# this slot's sample age: the head is \"now\", trail slots reach back in time\nlag = if(above(slot, 1.5), 0.014 + (slot - 2) * dtT, 0)\naj = a - lag\nuj = aj / tf\nyj = -1.06 + 4 * hbase * uj * (1 - uj)\nxj = x0 + drift * uj + arch * uj * uj\n\n# music gate + dead window + off-screen cull\nskip = if(above(slot, 0.5), if(above(d, actn - 0.5), 1, 0), 1)\nskip = if(above(a, tf * 1.15), 1, skip)\nskip = if(below(aj, 0), 1, skip)\nskip = if(above(abs(xj), 1.05), 1, skip)\n\n# tail gate: 0 the whole way up, fading in as the fall accelerates\nvy = vy0 - grav * a\ntgate = smoothstep(0, 0.35, -vy / vy0)\n\n# per-drop hue, shifted by every bass hit; older trail samples drift back\nhue = hue0 + beats * hsh + time * 0.012 - (slot - 1) * 0.008\nred = hsvr(hue, 1, bright)\ngreen = hsvg(hue, 1, bright)\nblue = hsvb(hue, 1, bright)\n\ndsz = 1.6 + rand(d * 2.9 + 51) * 1.1 + bass_att * 1.4\nu = (slot - 2) / tailn\nif(above(slot, 1.5),\n if(above(slot, 2.5),\n (alpha = tgate * pow(1 - u, 1.5) * 0.85;\n size = dsz * (1 - 0.72 * u);\n skip = if(below(tgate, 0.03), 1, skip)),\n (alpha = max(1 - tgate, tgate * 0.85); size = dsz)),\n (alpha = 1; size = dsz))\nx = xj\ny = yj\n", }, { folder: "root/embedded/Amp Picks", diff --git a/src/lib/release-notes.ts b/src/lib/release-notes.ts index f26fabe..b25afc7 100755 --- a/src/lib/release-notes.ts +++ b/src/lib/release-notes.ts @@ -39,6 +39,16 @@ export interface ReleaseNote { } export const RELEASE_NOTES: ReleaseNote[] = [ + { + version: '7.14', + name: 'Arctic Rainbow re-sprayed', + changes: [ + { + kind: 'improved', + text: 'The old Arctic Rainbow was just white dots sweeping upward. I rebuilt it as a music-driven water spray: droplets rise slowly, hang at the top, arch left or right and fall back down. The drop count now follows the music -- silence runs completely dry, loud passages throw a full spray of up to 120 droplets -- every droplet carries its own color that shifts on each bass hit, and falling droplets trail a tapered RGB tail while rising ones stay crisp dots.', + }, + ], + }, { version: '7.13.1', name: 'Beat Matrix grid fixed', diff --git a/src/lib/version.ts b/src/lib/version.ts index dcf2c40..0254743 100755 --- a/src/lib/version.ts +++ b/src/lib/version.ts @@ -12,6 +12,25 @@ // warns in the console when the two drift apart. // // History: +// 7.14 — Arctic Rainbow re-imagined (user request): the old stand-in was +// plain white columns of rain dots sweeping upward. Rebuilt as a +// music-driven water spray, stateless projectile physics in the +// [point] program: each of up to 120 droplets is a deterministic +// parabola (own apex height 1.26..1.88, own flight time 1.9..3.4 s, +// phase-staggered clock; every splash cycle re-rolls its origin, +// drift and arch) -- launch from below the bottom edge, slow rise, +// hang, arch left or right, fall back off-screen. Drop count +// follows the music (vol_att/bass_att envelope, fast attack 6/s, +// slow release 1.2/s: silence = 0 drops, loud = all 120). Each +// drop owns a hue that shifts by its own per-drop amount on every +// detected beat, plus a subtle gradient along its tail. The tail +// is 12 explicit trail samples (0.014..0.44 s back along the arc) +// drawn as a tapered polyline in lines mode, gated by smoothstep +// on the fall speed: nothing while rising (crisp dot), fading in +// as the arch turns downward -- no persistence smear (persist +// 0.12). Slot map through cell centers (the v7.13.1 lesson), 14 +// slots per drop (separator + head + 12 trail), n = 1680. +// EMBEDDED_SEED_VERSION 7.13.1 -> 7.14 re-seeds the library. // 7.13.1 — Beat Matrix endpoint fix (user report): the rightmost column // of dots sat one row short -- its bottom dot missing -- while a // phantom dot spilled one column past the wall's right edge at @@ -431,4 +450,4 @@ export const APP_NAME = 'Open Visualization Engine' export const APP_SHORT = 'OVE' -export const APP_VERSION = '7.13.1' +export const APP_VERSION = '7.14' diff --git a/worklog.md b/worklog.md index 2cdc63b..e72cefc 100755 --- a/worklog.md +++ b/worklog.md @@ -2356,3 +2356,37 @@ BROWSER E2E (agent-browser + 8-frame max-brightness composite + VLM, ALL PASS): Stage Summary: - v7.13.1 shipped: Beat Matrix's wall is whole -- every column carries its full 10 dots, the bottom edge is straight across all 16 columns, and the phantom dot that spilled past the right edge is gone. The fix lives in the preset's grid math (cell-center mapping, immune to the inclusive-endpoint and float dust alike); the engine's AVS-correct i convention is untouched, and the library re-seed delivers the fixed preset to every visitor. + +--- +Task ID: 42 +Agent: main (Z.ai Code) +Task: v7.14 (user request, preset-revamp session 2): rework "Arctic Rainbow" (Amp Picks, S_KuPeRS stand-in). The old auto-generated version was plain white columns of rain dots sweeping upward. Requested: keep upward motion but slower, then the drops "turn left and right" and fall back down like water sprayed skyward; drop COUNT driven by music intensity (silence = no drops, loud = many); each drop its own RGB color that shifts to the bass hit; a small blur/RGB tail behind each dot ONLY once it starts falling (no blur while rising). + +DESIGN (stateless projectile physics, no per-particle memory needed): +- Each of up to 120 droplets is a deterministic parabola: own apex height 1.26..1.88 (apex lands y 0.20..0.82, upper half of screen), own flight time 1.9..3.4 s (rise 0.95..1.7 s -- "a bit more slowly" than the old rain), phase-staggered clock (period P = tf*1.18). y(u) = -1.06 + 4*h*u*(1-u), x(u) = x0 + drift*u + arch*u*u -- drift and arch re-rolled from the cycle index every splash, so each flight arcs a different direction and distance (the "turn left and right"). Dead window a > 1.15*tf lets drops slide off the bottom edge (no pop at wrap; the whole block skips once fully off-screen). +- Music gating in [frame]: volish = min(1, max(vol_att, bass_att*0.9)*1.25), want = clamp((volish-0.06)/0.5, 0, 1), smoothed acts with fast attack 6/s / slow release 1.2/s, actn = floor(acts*drops). Silence (vol_att decays to 0 on idle) -> actn 0 -> zero drops; loud demo track -> 110+ heads; moderate -> ~48. +- Per-drop hue: hue0 = rand(d-seed); every detected beat (env.beats) advances it by a per-drop hshift 0.09..0.26 -- 86 distinct shift amounts across the spray; plus a subtle 0.008/sample gradient along each tail. hsvr/hsvg/hsvb at full saturation; brightness rides vol_att with an exp(-beatage*7) bass flash. +- Falling-only tail, drawn (not smeared): mode lines, persist 0.12 (crisp rise, no ghost). Each drop owns 14 consecutive point slots: slot 0 separator (breaks the pen between drops), slot 1 head, slots 2..13 trail samples at 0.014..0.44 s back along the same parabola. While rising (vy > 0) only head + slot 2 (a ~1-frame shadow, so the head renders as a dot in lines mode) draw; tail gate tgate = smoothstep(0, 0.35, -vy/vy0) fades the 12-sample tapered polyline in exactly as the arch turns downward. Slot map through cell centers (q = i*(n-1)+0.5 -- the v7.13.1 lesson), bijective 1680 -> (120 drops x 14 slots). +- Headless validator iterations fixed two artifacts in the VALIDATOR itself (flight-window spanning splash boundaries; tail-alpha threshold 0.05 above the legitimate fade-in value 0.0225) -- the script needed no changes. + +Work Log: +- embedded-presets.ts: Arctic Rainbow entry replaced (new description documenting the revamp, keeps S_KuPeRS credit + originalFile + approx badge); EMBEDDED_SEED_VERSION 7.13.1 -> 7.14; header changelog note added. +- version.ts: APP_VERSION 7.14 + full history entry. release-notes.ts: 7.14 "Arctic Rainbow re-sprayed" (improved, first-person, -- not em-dash). + +HEADLESS VALIDATION (/home/z/tmp-validate/arctic/validate.mts, REAL parser/compiler, 28/28 PASS): +- Regression: all 106 presets still compile. n = 1680; slot bijection 1680 unique (d, slot), d<=119, slot<=13, every block starts with its skipped separator. +- Gating: 5 s of silence -> 0 drawn points; loud -> 110 airborne heads; moderate volume -> 48. All drawn |x| <= 1.05, positions finite, colors clamped 0..1. +- Physics: 65 tracked flights, every one rises monotonically to apex then falls; apex heights match the per-drop parabola to max err 0.0000; 28 flights visibly reverse lateral direction (arch). +- Tails: 12,422 rising-drop frames with ZERO tail slots drawn; 14,579 falling-drop frames with monotonically tapering alphas and a full-alpha head. +- Hues: 112/112 airborne drops advanced hue on a beat, 86 distinct per-drop deltas, RGB spreads > 0.4 across the spray. Rise >= 0.95 s to apex for all 120 drops. + +BROWSER E2E (agent-browser + VLM, ALL PASS): +- Fresh boot: title "OVE -- Open Visualization Engine (v7.14)"; version gate re-seeded the library (observed in dev.log: deleteMany + 106 inserts + seed upsert); tree 106 presets intact. +- Arctic Rainbow dblclick-loaded from Amp Picks, demo track playing: footer "SRC: DEMO · Demo Track 1 · FPS 51-58 · PTS: 1680 · BPM: 132.5 locked · SCRIPT: Arctic Rainbow"; HUD and footer both read 1680 PTS (VLM had misread the tiny HUD text as 1080). +- VLM on two action captures: dozens of airborne droplets; clear PARABOLIC ARCS (water-spray shape); full rainbow palette (red/orange/yellow/green/cyan/blue/magenta); comet-like streaks -- bright head with a fading, CURVED tail following the trajectory; no UI defects. +- Stop -> SRC: IDLE, BPM: -- (tracker standby); VLM on the silent capture: canvas "essentially pure black -- no colored dots, droplets or streaks" outside the re-appeared audio-source panel. (A naive pixel-strip scan was confounded by that centered panel overlay; crop + VLM resolved it.) +- Script tab: editor carries the new 3457-char v7.14 script (water spray / drops = 120 / tgate all present). What's New dialog: 7.14 "Arctic Rainbow re-sprayed" first with CURRENT badge. +- Console 0 errors / 0 warnings; dev.log clean this session (only ancient EADDRINUSE lines from a pre-session stale start). Responsive: 375x812 no horizontal overflow (footer pushed, docH 3051); 1280x800 footer sticks to viewport bottom (docH 800 = innerH 800). + +Stage Summary: +- v7.14 shipped: Arctic Rainbow is now a music-driven water spray -- slow parabolic rises, left/right arching falls, drop count tracking the music's intensity (dry silence), per-drop bass-hit hue shifts, and tapered RGB tails that appear only on the way down. All behavior is stateless script math (deterministic rand-seeded parabolas), so it is fully deterministic and reproducible; the library re-seed delivers it to every visitor, and the old white-rain version is gone.