Skip to content

feat(hydropack): add adaptive LED audio preview - #3712

Merged
zackees merged 10 commits into
masterfrom
feat/hydropack-led-audio
Jul 16, 2026
Merged

zackees merged 10 commits into
masterfrom
feat/hydropack-led-audio

Conversation

@zackees

@zackees zackees commented Jul 16, 2026 •

Copy link
Copy Markdown
Member

Summary\n- replace HydroPack's EL preview primitives with an 18-pixel ordinary-LED < | >\ screenmap\n- use two independent thresholds over the same adaptive Vibe bass input: the sensitive center bar fires first, then a loud hit reaches both triangles after 5 ms\n- quiet input is fully dark; FastLED noise-floor tracking suppresses microphone hiss\n\n## Validation\n- \�ash compile wasm --examples hydropack\n- JSON screenmap contract: 18 mapped LEDs\n- ASCII source check and \git diff --check\n\nThe local WASM preview is running at http://127.0.0.1:59610/.

Summary by CodeRabbit

  • New Features
    • Added a HydroPack addressable-LED audio prototype that renders a fixed screen-map with a center-sensitive stage and outward-launching triangle visuals (including a timed launch delay).
    • Improved audio triggering using calibrated SPL thresholds combined with music-only responsiveness for more consistent, audience-safe behavior.
    • Added a new “triangles-bar” LED layout configuration.
  • Documentation
    • Updated HydroPack lesson guidance with clearer visual-layers interpretation and revised SPL/musical detection recommendations.
    • Added a HydroPack LED audio prototype checklist for validation and launch readiness.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026 •

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

HydroPack now renders a coordinate-mapped addressable-LED prototype with separate center and triangle audio envelopes, calibrated SPL and musical-presence gating, and delayed triangle activation. Supporting geometry configuration, task tracking, and implementation lessons were added.

Changes

HydroPack LED prototype

Layer / File(s) Summary
LED preview layout and prototype records
examples/hydropack/hydropack.ino, examples/hydropack/data/leds-triangles-bar.json, agents/tasks/lessons.md, agents/tasks/todo.md
The prototype defines coordinate-based center and triangle geometry, adds matching layout data, and records related lessons and checklist items.
Audio indicators and LED rendering
examples/hydropack/hydropack.ino
Separate center and triangle thresholds and envelopes drive brightness for the center bar and two triangle clusters, with delayed triangle triggering, calibrated SPL gating, and music-presence checks.
Preview initialization and timed updates
examples/hydropack/hydropack.ino
Setup configures the FastLED preview, audio processor, noise-floor tracking, and vibe callback; the loop handles envelope decay, delayed activation, rendering, and display updates.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant AudioProcessor
  participant onVibeLevels
  participant renderPreview
  participant FastLED
  AudioProcessor->>onVibeLevels: deliver bass levels
  onVibeLevels->>renderPreview: update center and delayed triangle envelopes
  renderPreview->>FastLED: write mapped LED colors
  FastLED->>FastLED: show LED array
Loading

Possibly related issues

Possibly related PRs

  • FastLED/FastLED#3694 — Also changes HydroPack screen and geometry mapping, including the EL-panel rendering path replaced here.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: an adaptive LED audio preview for HydroPack.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/hydropack-led-audio

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@examples/hydropack/hydropack.ino`:
- Line 43: Update examples/hydropack/hydropack.ino lines 43-43 by setting
kTriangleLaunchDelayMs to 35, and update lines 88-88 so the associated comment
documents the 35 ms delay instead of 5 ms.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1285941d-fd06-4789-9538-d6faf57cc06d

📥 Commits

Reviewing files that changed from the base of the PR and between 01a52b6 and 8358ebb.

📒 Files selected for processing (3)
  • agents/tasks/lessons.md
  • examples/hydropack/data/leds-triangles-bar.json
  • examples/hydropack/hydropack.ino

constexpr uint8_t kCenterStart = 6;
constexpr uint8_t kRightTriangleStart = 12;
constexpr uint8_t kPreviewLedCount = 18;
constexpr uint32_t kTriangleLaunchDelayMs = 5;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Align launch delay with the PR objective.

The PR objective states that loud hits should launch both triangles after 35 ms, but the delay is currently implemented and documented as 5 ms. At the loop's 10 ms rendering pacing (EVERY_N_MILLIS(10)), a 5 ms delay will often just elapse by the very next frame, effectively acting as a 1-frame delay and failing to create a perceptible outward visual launch.

  • examples/hydropack/hydropack.ino#L43-L43: update kTriangleLaunchDelayMs to 35.
  • examples/hydropack/hydropack.ino#L88-L88: update the comment to reflect the 35 ms delay instead of 5 ms.
📍 Affects 1 file
  • examples/hydropack/hydropack.ino#L43-L43 (this comment)
  • examples/hydropack/hydropack.ino#L88-L88
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@examples/hydropack/hydropack.ino` at line 43, Update
examples/hydropack/hydropack.ino lines 43-43 by setting kTriangleLaunchDelayMs
to 35, and update lines 88-88 so the associated comment documents the 35 ms
delay instead of 5 ms.

@zackees
zackees merged commit c27c63e into master Jul 16, 2026
5 of 6 checks passed
@zackees
zackees deleted the feat/hydropack-led-audio branch July 16, 2026 16:13
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant