Skip to content

MoonLight effect migration + buffer-persistence render model, driver-doc consolidation, module attribution#32

Merged
ewowi merged 11 commits into
mainfrom
next-iteration
Jul 1, 2026
Merged

MoonLight effect migration + buffer-persistence render model, driver-doc consolidation, module attribution#32
ewowi merged 11 commits into
mainfrom
next-iteration

Conversation

@ewowi

@ewowi ewowi commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

A full MoonLight-migration cycle (10 commits) plus the render-loop rework it drove. Originally opened as "Add HueDriver + WaveEffect"; the branch grew to cover the effect library, a buffer-persistence model change, driver-doc consolidation, and per-module attribution. Every commit was gated and carries a KPI line; CodeRabbit batches were processed along the way.

Effect / light domain

  • MoonLight effect library migrated — ~40 effects across the MoonLight / WLED / MoonModules / FastLED origins (GEQ / GEQ3D / FreqMatrix / FreqSaws / Blurz / NoiseMeter / PaintBrush audio effects, GameOfLife, RubiksCube, Particles, StarField, Fire, Plasma, Praxis, Lissajous, Tetrix, …), each written fresh against projectMM's EffectBase + shared primitives (not traced from source). 60 palettes, a demo-reel showcase, text/font draw primitives.
  • 12 layouts + 6 modifiers (Block/Circle/Mirror/Multiply/Pinwheel/Region/RippleXZ/Rotate/Transpose/RandomMap/Checkerboard), the draw:: primitive library (line/glyph/fade/blur/blendPixel/addPixel).
  • HueDriver — Philips Hue bulbs as effect-output pixels (v1 HTTP API, room/light filter, Devices listing).

Render-loop model (the significant architecture change)

  • The Layer buffer now persists frame-to-frameLayer::loop() no longer clears it (the FastLED/WLED/MoonLight convention). Effects own their background: full-grid overwrites, trail effects fade, sparse effects self-clear. This fixed ~13 effects whose fade/scroll/read-prior behaviour a per-frame clear had silently broken (FreqMatrix lit only one row, fade controls did nothing).
  • Collected fadeLayer::fadeToBlackBy MINs the requested amounts and applies one buffer pass per frame (MoonLight's VirtualLayer model), so N fading effects on a layer cost one pass, not N.
  • 1D-runs-along-Y dimensionality convention fixed across effects/modifiers; Layer::extrude fans a D1/D2 effect across the unused axes.

Core

  • AudioModule — I²S mic → FFT → AudioFrame (16 bands + raw/smoothed level + peak); a simulate control (synth music/sweep) so audio effects run mic-less; two-mic active_ re-election.
  • FilesystemModule owns the filesystem-usage bar (moved off SystemModule); the redundant sdkDate control removed (build date already on the firmware card).

Docs / drivers

  • drivers.md — the six drivers consolidated into one page like effects.md; detail pages keep the wire-contracts / memory / troubleshooting / self-test material.
  • Attribution — every effect/modifier/layout credits its original author + MoonLight source, in both the .h and the .md.
  • June 2026 friend-repo activity digests; the digest prompt now also investigates the month's issues.

Tests / gates

  • New: unit_Layer_persistence (persistence + collected-fade MIN + reset), unit_PinwheelModifier (1D petal-axis), two-mic AudioModule re-election, plus updated extrude/zero-grid/render coverage.
  • All commit gates green (desktop build 0-warnings, ctest, scenarios, platform boundary, ESP32 build for P4/S3/S31/classic, KPI). Flashed + boot-verified on all 4 ESP32 boards.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added Hue bridge support for discovering, pairing, and driving compatible lights.
    • Added a global palette system with a new palette selector in the UI.
    • Introduced several new light effects and layouts, including waveform, 3D audio, starfield, text, and new grid/shape layouts.
  • Bug Fixes

    • Improved frame persistence and fade handling for smoother lighting transitions.
    • Updated effect dimensionality and extrusion behavior for more consistent 1D/2D/3D rendering.
    • Refined audio and palette-driven rendering for more stable visuals.
  • Documentation

    • Expanded and reorganized docs for light effects, drivers, layouts, and UI assets.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant