Skip to content

feat(audio): Vibe adopts silence gate (#2253) - #2312

Merged
zackees merged 1 commit into
masterfrom
feat/audio-silence-gate-vibe
Apr 18, 2026
Merged

zackees merged 1 commit into
masterfrom
feat/audio-silence-gate-vibe

Conversation

@zackees

@zackees zackees commented Apr 18, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes Vibe::getVol() (and all 7 other user-visible getters) converging to 1.0 in silence. MilkDrop self-normalization (mImm / mLongAvg → noise/noise → 1.0, plus the < 0.001f clamp pinning to 1.0) was never gated by the silence flag. Route each of the 3 bands' mImmRel/mAvgRel through a SilenceEnvelope (tau=0.3s → ~1s to fully gate).

  • Pass-through during audio — MilkDrop dynamics preserved exactly
  • Exponential decay to 0 when Context::isSilent() is true
  • Snap-back on silence→audio transition — no attack lag on re-entry
  • < 0.001f startup clamp stays intact (envelope handles silence downstream)

Part 2/4 of #2253 silence-gate rollout. Builds on #2306 (Context::isSilent + SilenceEnvelope). Sibling PR #2309 (Reactive) landed independently.

Test plan

  • bash test fl_audio --debug — 211/211 test cases pass
  • bash test fl_audio_detector_vibe --debug — 34/34 vibe test cases pass including 3 new silence-gate tests
  • bash lint on all 3 modified files — clean
  • New test asserts getVol() < 0.05f after ~1s silence (90 frames @ 512/44100 Hz)
  • New regression test asserts default behavior unchanged when isSilent stays false (pass-through)
  • New test asserts no attack lag on silence→audio transition
  • CI green on push

Files

  • src/fl/audio/detector/vibe.h — 6 new lines (+include, +6 SilenceEnvelope members)
  • src/fl/audio/detector/vibe.cpp.hpp — ~30 new lines (constructor seeding, Step 4b gate, reset)
  • tests/fl/audio/detector/vibe.hpp — 3 new FL_TEST_CASE blocks

160 insertions, 2 deletions.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added silence-gating capability to the audio detector to accurately track and report audio levels during silent periods and maintain proper detection behavior during audio playback.

Vibe's MilkDrop self-normalization (imm/longAvg) drove getVol() toward
1.0 during silence (noise/noise → 1.0, plus the <0.001f clamp pinning
to 1.0). LED effects driven by getVol()/getBass()/getMid()/getTreb()
never calmed down when music stopped. Route each band's mImmRel and
mAvgRel through a SilenceEnvelope (tau=0.3s → ~1s to fully gate) so
when Context::isSilent() is true the values exponentially decay toward
0.0. Pass-through during audio preserves MilkDrop dynamics exactly.
The <0.001f startup clamp stays intact — envelope handles silence
downstream. All 8 user-visible getters now decay to near-zero in
silence: getBass, getMid, getTreb, getVol, getBassAtt, getMidAtt,
getTrebAtt, getVolAtt.

Part 2/4 of #2253 silence-gate rollout. Builds on the
Context::isSilent() + SilenceEnvelope plumbing in #2306.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Apr 18, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4c112d54-995d-4975-bb33-a3a463459fee

📥 Commits

Reviewing files that changed from the base of the PR and between 125c7cc and 5502276.

📒 Files selected for processing (3)
  • src/fl/audio/detector/vibe.cpp.hpp
  • src/fl/audio/detector/vibe.h
  • tests/fl/audio/detector/vibe.hpp

📝 Walkthrough

Walkthrough

The PR adds silence-gating functionality to the Vibe audio detector by introducing two new SilenceEnvelope member arrays that decay relative-level measurements toward zero when audio silence is detected via Context::isSilent(), while preserving normal behavior during active audio.

Changes

Cohort / File(s) Summary
Silence Gate Header
src/fl/audio/detector/vibe.h
Added include for silence_envelope.h and two private member arrays (mImmRelEnv[3], mAvgRelEnv[3]) to serve as silence gates for immediate and average relative levels.
Silence Gate Implementation
src/fl/audio/detector/vibe.cpp.hpp
Initialized silence-gate envelopes in constructor with 0.3s decay time and zero target; inserted new "Step 4b" processing stage in update() to conditionally decay relative-level bands via envelope updates when silent; extended reset() to reinitialize envelope arrays.
Silence Gate Tests
tests/fl/audio/detector/vibe.hpp
Added three test cases: silence decay verification, regression test for normal operation, and transition test confirming envelope behavior during silence-to-audio transitions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 When silence falls on audio streams,
The gates decay like fading dreams,
Envelopes guard each bass and treble,
From noise that's barely heard or felt,
A whisper hush, precise and subtle! 🔇✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/audio-silence-gate-vibe

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 and usage tips.

@zackees
zackees merged commit 0639db4 into master Apr 18, 2026
62 of 85 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📊 Header Compilation Performance

Total Time: 753.96ms

Top 5 Slowest Headers

  1. FastLED.h - 568.78ms
  2. fl/fastled.h - 241.46ms
  3. fl/task/executor.h - 183.73ms
  4. crgb.h - 133.14ms
  5. fl/gfx/crgb.h - 132.16ms

Warnings

⚠️ Header FastLED.h exceeds 150ms (568.8ms)
⚠️ Header fl/fastled.h exceeds 150ms (241.5ms)
⚠️ Header fl/task/executor.h exceeds 150ms (183.7ms)
⚠️ Header crgb.h exceeds 50ms (133.1ms)
⚠️ Header fl/gfx/crgb.h exceeds 50ms (132.2ms)
⚠️ Header fl/math/ease.h exceeds 50ms (128.9ms)
⚠️ Header fl/math/fixed_point.h exceeds 50ms (127.5ms)
⚠️ Header fl/task/scheduler.h exceeds 50ms (95.8ms)
⚠️ Header fl/stl/singleton.h exceeds 50ms (89.3ms)
⚠️ Header fl/stl/thread_local.h exceeds 50ms (88.8ms)
⚠️ Header fl/stl/thread.h exceeds 50ms (88.0ms)
⚠️ Header platforms/thread.h exceeds 50ms (88.0ms)
⚠️ Header platforms/stub/thread_stub.h exceeds 50ms (88.0ms)
⚠️ Header platforms/stub/thread_stub_stl.h exceeds 50ms (87.9ms)
⚠️ Header fl/ui.h exceeds 50ms (79.0ms)
⚠️ Header fl/task/promise.h exceeds 50ms (78.7ms)
⚠️ Template instantiation time is high (45.3%)

Full Report
================================================================================
FASTLED COMPILATION PERFORMANCE REPORT
================================================================================
Generated: 2026-04-18 17:17:10
Compiler: clang++-17
File: ci/perf/test_compile.cpp

SUMMARY
--------------------------------------------------------------------------------
Total Compilation Time:    1,698.49 ms
Frontend Time:             11.14 ms (0.7%)
Backend Time:              35.29 ms (2.1%)

COMPILATION PHASES
--------------------------------------------------------------------------------
Source                    14229.65 ms (837.8%)
Templates                   355.46 ms ( 20.9%)

FASTLED HEADERS (Level 1 - Direct Includes)
--------------------------------------------------------------------------------
  1510.6 ms - FastLED.h (SLOW)
   949.7 ms - fl/task/executor.h (SLOW)
   501.2 ms - fl/task/scheduler.h (SLOW)
   494.5 ms - fl/stl/singleton.h (SLOW)
   494.0 ms - fl/stl/thread_local.h (SLOW)
   493.1 ms - fl/stl/thread.h (SLOW)
   493.0 ms - platforms/thread.h (SLOW)
   493.0 ms - platforms/stub/thread_stub.h (SLOW)
   492.9 ms - platforms/stub/thread_stub_stl.h (SLOW)
   438.8 ms - fl/task/promise.h (SLOW)
   407.4 ms - fl/fastled.h (SLOW)
   406.8 ms - fl/stl/function.h (SLOW)
   240.5 ms - fl/stl/vector.h (SLOW)
   214.1 ms - crgb.h (SLOW)
   213.2 ms - fl/gfx/crgb.h (SLOW)
   209.9 ms - fl/math/ease.h (SLOW)
   208.5 ms - fl/math/fixed_point.h (SLOW)
   203.5 ms - fl/math/math.h (SLOW)
   200.0 ms - fl/stl/undef.h (SLOW)
   150.9 ms - fl/stl/variant.h (SLOW)

FASTLED HEADERS (Nested Includes - Up to 10 Levels)
--------------------------------------------------------------------------------
FastLED.h (1510.6ms)
  ├─  949.7 ms - fl/task/executor.h
  │ ├─  501.2 ms - fl/task/scheduler.h
  │ │ ├─  494.5 ms - fl/stl/singleton.h
  │ │ │ └─  494.0 ms - fl/stl/thread_local.h
  │ │ │   └─  493.1 ms - fl/stl/thread.h
  │ │ │     └─  493.0 ms - platforms/thread.h
  │ │ │       └─  493.0 ms - platforms/stub/thread_stub.h
  │ │ │         └─  492.9 ms - platforms/stub/thread_stub_stl.h
  │ │ │           └─  486.4 ms - thread
  │ │ │             ├─  298.3 ms - std_thread.h
  │ │ │             └─  155.6 ms - this_thread_sleep.h
  │ │ └─    6.1 ms - fl/task/task.h
  │ │   └─    2.4 ms - fl/trace.h
  │ │     ├─    1.5 ms - fl/stl/chrono.h
  │ │     └─    0.6 ms - fl/stl/tuple.h
  │ ├─  438.8 ms - fl/task/promise.h
  │ │ ├─  406.8 ms - fl/stl/function.h
  │ │ │ ├─  240.5 ms - fl/stl/vector.h
  │ │ │ │ ├─  203.5 ms - fl/math/math.h
  │ │ │ │ │ └─  200.0 ms - fl/stl/undef.h
  │ │ │ │ │   └─  336.5 ms - stdlib.h
  │ │ │ │ │     ├─  176.9 ms - cstdlib
  │ │ │ │ │     │ └─  336.5 ms - stdlib.h
  │ │ │ │ │     │   ├─  176.9 ms - cstdlib
  │ │ │ │ │     │   ├─    9.1 ms - types.h
  │ │ │ │ │     │   └─    0.5 ms - floatn.h
  │ │ │ │ │     ├─    9.1 ms - types.h
  │ │ │ │ │     │ ├─    9.1 ms - types.h
  │ │ │ │ │     │ │ ├─    9.1 ms - types.h
  │ │ │ │ │     │ │ ├─    1.7 ms - pthreadtypes.h
  │ │ │ │ │     │ │ ├─    1.5 ms - select.h
  │ │ │ │ │     │ │ └─    1.3 ms - endian.h
  │ │ │ │ │     │ ├─    1.7 ms - pthreadtypes.h
  │ │ │ │ │     │ │ └─    1.3 ms - thread-shared-types.h
  │ │ │ │ │     │ ├─    1.5 ms - select.h
  │ │ │ │ │     │ └─    1.3 ms - endian.h
  │ │ │ │ │     └─    0.5 ms - floatn.h
  │ │ │ │ ├─   18.1 ms - fl/stl/initializer_list.h
  │ │ │ │ ├─   11.8 ms - fl/stl/allocator.h
  │ │ │ │ │ └─    8.1 ms - fl/stl/bitset.h
  │ │ │ │ │   └─    5.2 ms - fl/stl/bitset_dynamic.h
  │ │ │ │ │     └─    1.4 ms - fl/stl/unique_ptr.h
  │ │ │ │ └─    1.8 ms - fl/stl/basic_vector.h
  │ │ │ ├─  150.9 ms - fl/stl/variant.h
  │ │ │ │ └─  149.6 ms - fl/stl/new.h
  │ │ │ │   └─  149.6 ms - platforms/new.h
  │ │ │ │     └─  149.5 ms - platforms/shared/new.h
  │ │ │ │       └─  120.9 ms - new
  │ │ │ │         └─   17.3 ms - c++config.h
  │ │ │ │           └─    4.2 ms - os_defines.h
  │ │ │ ├─    8.5 ms - fl/stl/shared_ptr.h
  │ │ │ │ ├─    4.2 ms - fl/stl/type_traits.h
  │ │ │ │ └─    0.9 ms - fl/stl/atomic.h
  │ │ │ ├─    2.9 ms - fl/stl/algorithm.h
  │ │ │ │ └─    1.2 ms - fl/math/random.h
  │ │ │ │   └─    0.6 ms - fl/math/random8.h
  │ │ │ └─    0.9 ms - fl/stl/pair.h
  │ │ └─   28.3 ms - fl/stl/string.h
  │ │   ├─    8.5 ms - fl/stl/basic_string.h
  │ │   │ ├─    0.7 ms - fl/stl/not_null.h
  │ │   │ └─    0.6 ms - fl/stl/iterator.h
  │ │   ├─    5.4 ms - fl/stl/span.h
  │ │   │ └─    2.3 ms - fl/math/geometry.h
  │ │   ├─    3.4 ms - fl/stl/string_view.h
  │ │   └─    1.0 ms - fl/stl/optional.h
  │ ├─    7.9 ms - platforms/await.h
  │ │ └─    7.6 ms - platforms/coroutine_runtime.h
  │ │   └─    6.5 ms - fl/system/engine_events.h
  │ │     ├─    3.2 ms - fl/math/screenmap.h
  │ │     │ └─    2.3 ms - fl/stl/flat_map.h
  │ │     └─    2.1 ms - fl/math/xymap.h
  │ │       └─    0.5 ms - fl/math/lut.h
  │ └─    0.6 ms - fl/task/promise_result.h
  ├─  407.4 ms - fl/fastled.h
  │ ├─  214.1 ms - crgb.h
  │ │ ├─  213.2 ms - fl/gfx/crgb.h
  │ │ │ └─  209.9 ms - fl/math/ease.h
  │ │ │   └─  208.5 ms - fl/math/fixed_point.h
  │ │ │     ├─  116.4 ms - fl/math/fixed_point/s4x12.h
  │ │ │     │ ├─  103.4 ms - fl/math/sin32.h
  │ │ │     │ │ └─  101.5 ms - fl/math/simd.h
  │ │ │     │ │   └─  101.1 ms - fl/math/simd/types.h
  │ │ │     │ │     └─  100.9 ms - platforms/simd.h
  │ │ │     │ ├─    0.7 ms - fl/math/fixed_point/traits.h
  │ │ │     │ └─    0.5 ms - fl/math/fixed_point/isqrt.h
  │ │ │     ├─   11.6 ms - fl/math/fixed_point/s8x24.h
  │ │ │     ├─   11.6 ms - fl/math/fixed_point/s8x8.h
  │ │ │     ├─   11.4 ms - fl/math/fixed_point/s16x16.h
  │ │ │     └─   11.2 ms - fl/math/fixed_point/s24x8.h
  │ │ └─    0.6 ms - chsv.h
  │ │   └─    0.6 ms - fl/gfx/hsv.h
  │ ├─  121.2 ms - platforms.h
  │ │ └─  121.1 ms - platforms/stub/fastled_stub.h
  │ │   ├─   95.9 ms - platforms/stub/fastspi_stub.h
  │ │   │ └─   95.9 ms - platforms/stub/fastspi_stub_generic.h
  │ │   │   ├─   91.3 ms - platforms/shared/active_strip_data/active_strip_data.h
  │ │   │   │ └─   89.8 ms - fl/id_tracker.h
  │ │   │   │   └─   89.0 ms - fl/stl/mutex.h
  │ │   │   │     └─   89.0 ms - platforms/mutex.h
  │ │   │   │       └─   88.8 ms - platforms/stub/mutex_stub.h
  │ │   │   └─    4.2 ms - platforms/shared/active_strip_tracker/active_strip_tracker.h
  │ │   └─   25.1 ms - platforms/stub/clockless_stub.h
  │ │     └─   25.1 ms - platforms/stub/clockless_channel_stub.h
  │ │       ├─    9.1 ms - fl/channels/data.h
  │ │       │ └─    6.7 ms - fl/channels/config.h
  │ │       │   ├─    1.4 ms - fl/chipsets/chipset_timing_config.h
  │ │       │   │ └─    0.9 ms - fl/chipsets/led_timing.h
  │ │       │   └─    1.0 ms - fl/chipsets/spi.h
  │ │       ├─    8.5 ms - fl/system/log.h
  │ │       │ └─    8.2 ms - fl/stl/strstream.h
  │ │       ├─    1.7 ms - fl/channels/manager.h
  │ │       ├─    1.1 ms - fl/stl/weak_ptr.h
  │ │       └─    0.8 ms - fl/channels/driver.h
  │ ├─   27.1 ms - colorutils.h
  │ │ └─   26.5 ms - fl/gfx/colorutils.h
  │ │   ├─    5.9 ms - fl/gfx/blur.h
  │ │   │ └─    3.2 ms - fl/gfx/canvas.h
  │ │   │   └─    2.0 ms - fl/math/alpha.h
  │ │   └─    2.1 ms - fl/gfx/fill.h
  │ ├─   15.6 ms - pixel_controller.h
  │ │ ├─   11.2 ms - pixel_iterator.h
  │ │ │ └─   11.1 ms - fl/chipsets/encoders/pixel_iterator.h
  │ │ │   ├─    3.2 ms - fl/chipsets/encoders/apa102.h
  │ │ │   │ └─    2.5 ms - fl/chipsets/encoders/encoder_utils.h
  │ │ │   │   └─    2.0 ms - fl/gfx/gamma_lut.h
  │ │ │   ├─    3.0 ms - fl/chipsets/encoders/pixel_iterator_adapters.h
  │ │ │   ├─    0.6 ms - fl/chipsets/encoders/sk9822.h
  │ │ │   └─    0.5 ms - fl/chipsets/encoders/hd108.h
  │ │ └─    1.8 ms - rgbw.h
  │ │   └─    1.7 ms - fl/gfx/rgbw.h
  │ └─   14.2 ms - pixeltypes.h
  │   ├─   11.8 ms - lib8tion.h
  │   │ ├─    5.9 ms - fl/math/math8.h
  │   │ │ ├─    3.1 ms - fl/math/intmap.h
  │   │ │ │ └─    2.4 ms - platforms/intmap.h
  │   │ │ ├─    1.6 ms - fl/math/scale8.h
  │   │ │ │ └─    1.5 ms - platforms/scale8.h
  │   │ │ │   └─    0.6 ms - platforms/shared/scale8.h
  │   │ │ └─    1.2 ms - platforms/math8.h
  │   │ │   └─    0.9 ms - platforms/shared/math8.h
  │   │ └─    1.2 ms - fl/math/beat.h
  │   │   └─    0.7 ms - fl/math/trig8.h
  │   │     └─    0.7 ms - platforms/trig8.h
  │   │       └─    0.6 ms - platforms/shared/trig8.h
  │   └─    2.1 ms - crgb.hpp
  ├─   81.0 ms - fl/ui.h
  │ ├─   50.8 ms - fl/stl/json.h
  │ │ └─   39.9 ms - fl/stl/json/types.h
  │ │   └─    4.8 ms - fl/stl/limits.h
  │ ├─    7.5 ms - fl/ui_impl.h
  │ │ └─    7.0 ms - platforms/ui_defs.h
  │ │   ├─    1.5 ms - platforms/shared/ui/json/audio.h
  │ │   │ └─    0.7 ms - platforms/shared/ui/json/audio_internal.h
  │ │   ├─    1.1 ms - platforms/shared/ui/json/button.h
  │ │   ├─    0.7 ms - platforms/shared/ui/json/checkbox.h
  │ │   ├─    0.6 ms - platforms/shared/ui/json/number_field.h
  │ │   └─    0.6 ms - platforms/shared/ui/json/help.h
  │ └─    4.3 ms - fl/stl/url.h
  ├─   18.9 ms - chipsets.h
  │ ├─    7.7 ms - fl/chipsets/ucs7604.h
  │ │ └─    5.8 ms - fl/chipsets/encoders/ucs7604.h
  │ ├─    4.5 ms - fl/chipsets/apa102.h
  │ ├─    1.2 ms - fl/chipsets/lpd880x.h
  │ ├─    0.7 ms - fl/chipsets/encoders/ws2816.h
  │ └─    0.5 ms - fl/chipsets/ws2801.h
  └─   16.0 ms - fl/audio/audio_processor.h
    ├─    4.0 ms - fl/audio/audio_context.h
    │ └─    1.1 ms - fl/audio/fft/fft.h
    ├─    1.6 ms - fl/audio/detector/vibe.h
    └─    0.7 ms - fl/audio/signal_conditioner.h
fl/task/executor.h (949.7ms)
  ├─  501.2 ms - fl/task/scheduler.h
  │ ├─  494.5 ms - fl/stl/singleton.h
  │ │ └─  494.0 ms - fl/stl/thread_local.h
  │ │   └─  493.1 ms - fl/stl/thread.h
  │ │     └─  493.0 ms - platforms/thread.h
  │ │       └─  493.0 ms - platforms/stub/thread_stub.h
  │ │         └─  492.9 ms - platforms/stub/thread_stub_stl.h
  │ │           └─  486.4 ms - thread
  │ │             ├─  298.3 ms - std_thread.h
  │ │             │ ├─   90.0 ms - iosfwd
  │ │             │ ├─   70.2 ms - tuple
  │ │             │ ├─   51.0 ms - refwrap.h
  │ │             │ ├─    8.5 ms - gthr.h
  │ │             │ └─    4.5 ms - unique_ptr.h
  │ │             └─  155.6 ms - this_thread_sleep.h
  │ │               ├─  115.6 ms - chrono.h
  │ │               └─    4.5 ms - cerrno
  │ └─    6.1 ms - fl/task/task.h
  │   └─    2.4 ms - fl/trace.h
  │     ├─    1.5 ms - fl/stl/chrono.h
  │     └─    0.6 ms - fl/stl/tuple.h
  ├─  438.8 ms - fl/task/promise.h
  │ ├─  406.8 ms - fl/stl/function.h
  │ │ ├─  240.5 ms - fl/stl/vector.h
  │ │ │ ├─  203.5 ms - fl/math/math.h
  │ │ │ │ └─  200.0 ms - fl/stl/undef.h
  │ │ │ │   └─  336.5 ms - stdlib.h
  │ │ │ │     ├─  176.9 ms - cstdlib
  │ │ │ │     │ └─  336.5 ms - stdlib.h
  │ │ │ │     │   ├─  176.9 ms - cstdlib
  │ │ │ │     │   │ └─  336.5 ms - stdlib.h
  │ │ │ │     │   ├─    9.1 ms - types.h
  │ │ │ │     │   │ ├─    9.1 ms - types.h
  │ │ │ │     │   │ ├─    1.7 ms - pthreadtypes.h
  │ │ │ │     │   │ ├─    1.5 ms - select.h
  │ │ │ │     │   │ └─    1.3 ms - endian.h
  │ │ │ │     │   └─    0.5 ms - floatn.h
  │ │ │ │     ├─    9.1 ms - types.h
  │ │ │ │     │ ├─    9.1 ms - types.h
  │ │ │ │     │ │ ├─    9.1 ms - types.h
  │ │ │ │     │ │ │ ├─    9.1 ms - types.h
  │ │ │ │     │ │ │ ├─    1.7 ms - pthreadtypes.h
  │ │ │ │     │ │ │ ├─    1.5 ms - select.h
  │ │ │ │     │ │ │ └─    1.3 ms - endian.h
  │ │ │ │     │ │ ├─    1.7 ms - pthreadtypes.h
  │ │ │ │     │ │ │ └─    1.3 ms - thread-shared-types.h
  │ │ │ │     │ │ ├─    1.5 ms - select.h
  │ │ │ │     │ │ └─    1.3 ms - endian.h
  │ │ │ │     │ ├─    1.7 ms - pthreadtypes.h
  │ │ │ │     │ │ └─    1.3 ms - thread-shared-types.h
  │ │ │ │     │ ├─    1.5 ms - select.h
  │ │ │ │     │ └─    1.3 ms - endian.h
  │ │ │ │     └─    0.5 ms - floatn.h
  │ │ │ ├─   18.1 ms - fl/stl/initializer_list.h
  │ │ │ ├─   11.8 ms - fl/stl/allocator.h
  │ │ │ │ └─    8.1 ms - fl/stl/bitset.h
  │ │ │ │   └─    5.2 ms - fl/stl/bitset_dynamic.h
  │ │ │ │     └─    1.4 ms - fl/stl/unique_ptr.h
  │ │ │ └─    1.8 ms - fl/stl/basic_vector.h
  │ │ ├─  150.9 ms - fl/stl/variant.h
  │ │ │ └─  149.6 ms - fl/stl/new.h
  │ │ │   └─  149.6 ms - platforms/new.h
  │ │ │     └─  149.5 ms - platforms/shared/new.h
  │ │ │       └─  120.9 ms - new
  │ │ │         └─   17.3 ms - c++config.h
  │ │ │           └─    4.2 ms - os_defines.h
  │ │ │             └─    3.8 ms - features.h
  │ │ ├─    8.5 ms - fl/stl/shared_ptr.h
  │ │ │ ├─    4.2 ms - fl/stl/type_traits.h
  │ │ │ └─    0.9 ms - fl/stl/atomic.h
  │ │ ├─    2.9 ms - fl/stl/algorithm.h
  │ │ │ └─    1.2 ms - fl/math/random.h
  │ │ │   └─    0.6 ms - fl/math/random8.h
  │ │ └─    0.9 ms - fl/stl/pair.h
  │ └─   28.3 ms - fl/stl/string.h
  │   ├─    8.5 ms - fl/stl/basic_string.h
  │   │ ├─    0.7 ms - fl/stl/not_null.h
  │   │ └─    0.6 ms - fl/stl/iterator.h
  │   ├─    5.4 ms - fl/stl/span.h
  │   │ └─    2.3 ms - fl/math/geometry.h
  │   ├─    3.4 ms - fl/stl/string_view.h
  │   └─    1.0 ms - fl/stl/optional.h
  ├─    7.9 ms - platforms/await.h
  │ └─    7.6 ms - platforms/coroutine_runtime.h
  │   └─    6.5 ms - fl/system/engine_events.h
  │     ├─    3.2 ms - fl/math/screenmap.h
  │     │ └─    2.3 ms - fl/stl/flat_map.h
  │     └─    2.1 ms - fl/math/xymap.h
  │       └─    0.5 ms - fl/math/lut.h
  └─    0.6 ms - fl/task/promise_result.h
fl/fastled.h (407.4ms)
  ├─  214.1 ms - crgb.h
  │ ├─  213.2 ms - fl/gfx/crgb.h
  │ │ └─  209.9 ms - fl/math/ease.h
  │ │   └─  208.5 ms - fl/math/fixed_point.h
  │ │     ├─  116.4 ms - fl/math/fixed_point/s4x12.h
  │ │     │ ├─  103.4 ms - fl/math/sin32.h
  │ │     │ │ └─  101.5 ms - fl/math/simd.h
  │ │     │ │   └─  101.1 ms - fl/math/simd/types.h
  │ │     │ │     └─  100.9 ms - platforms/simd.h
  │ │     │ │       └─  100.8 ms - platforms/shared/simd_x86.hpp
  │ │     │ ├─    0.7 ms - fl/math/fixed_point/traits.h
  │ │     │ └─    0.5 ms - fl/math/fixed_point/isqrt.h
  │ │     ├─   11.6 ms - fl/math/fixed_point/s8x24.h
  │ │     ├─   11.6 ms - fl/math/fixed_point/s8x8.h
  │ │     ├─   11.4 ms - fl/math/fixed_point/s16x16.h
  │ │     └─   11.2 ms - fl/math/fixed_point/s24x8.h
  │ └─    0.6 ms - chsv.h
  │   └─    0.6 ms - fl/gfx/hsv.h
  ├─  121.2 ms - platforms.h
  │ └─  121.1 ms - platforms/stub/fastled_stub.h
  │   ├─   95.9 ms - platforms/stub/fastspi_stub.h
  │   │ └─   95.9 ms - platforms/stub/fastspi_stub_generic.h
  │   │   ├─   91.3 ms - platforms/shared/active_strip_data/active_strip_data.h
  │   │   │ └─   89.8 ms - fl/id_tracker.h
  │   │   │   └─   89.0 ms - fl/stl/mutex.h
  │   │   │     └─   89.0 ms - platforms/mutex.h
  │   │   │       └─   88.8 ms - platforms/stub/mutex_stub.h
  │   │   │         └─   88.8 ms - platforms/stub/mutex_stub_stl.h
  │   │   └─    4.2 ms - platforms/shared/active_strip_tracker/active_strip_tracker.h
  │   └─   25.1 ms - platforms/stub/clockless_stub.h
  │     └─   25.1 ms - platforms/stub/clockless_channel_stub.h
  │       ├─    9.1 ms - fl/channels/data.h
  │       │ └─    6.7 ms - fl/channels/config.h
  │       │   ├─    1.4 ms - fl/chipsets/chipset_timing_config.h
  │       │   │ └─    0.9 ms - fl/chipsets/led_timing.h
  │       │   └─    1.0 ms - fl/chipsets/spi.h
  │       ├─    8.5 ms - fl/system/log.h
  │       │ └─    8.2 ms - fl/stl/strstream.h
  │       ├─    1.7 ms - fl/channels/manager.h
  │       ├─    1.1 ms - fl/stl/weak_ptr.h
  │       └─    0.8 ms - fl/channels/driver.h
  ├─   27.1 ms - colorutils.h
  │ └─   26.5 ms - fl/gfx/colorutils.h
  │   ├─    5.9 ms - fl/gfx/blur.h
  │   │ └─    3.2 ms - fl/gfx/canvas.h
  │   │   └─    2.0 ms - fl/math/alpha.h
  │   └─    2.1 ms - fl/gfx/fill.h
  ├─   15.6 ms - pixel_controller.h
  │ ├─   11.2 ms - pixel_iterator.h
  │ │ └─   11.1 ms - fl/chipsets/encoders/pixel_iterator.h
  │ │   ├─    3.2 ms - fl/chipsets/encoders/apa102.h
  │ │   │ └─    2.5 ms - fl/chipsets/encoders/encoder_utils.h
  │ │   │   └─    2.0 ms - fl/gfx/gamma_lut.h
  │ │   ├─    3.0 ms - fl/chipsets/encoders/pixel_iterator_adapters.h
  │ │   ├─    0.6 ms - fl/chipsets/encoders/sk9822.h
  │ │   └─    0.5 ms - fl/chipsets/encoders/hd108.h
  │ └─    1.8 ms - rgbw.h
  │   └─    1.7 ms - fl/gfx/rgbw.h
  └─   14.2 ms - pixeltypes.h
    ├─   11.8 ms - lib8tion.h
    │ ├─    5.9 ms - fl/math/math8.h
    │ │ ├─    3.1 ms - fl/math/intmap.h
    │ │ │ └─    2.4 ms - platforms/intmap.h
    │ │ ├─    1.6 ms - fl/math/scale8.h
    │ │ │ └─    1.5 ms - platforms/scale8.h
    │ │ │   └─    0.6 ms - platforms/shared/scale8.h
    │ │ └─    1.2 ms - platforms/math8.h
    │ │   └─    0.9 ms - platforms/shared/math8.h
    │ └─    1.2 ms - fl/math/beat.h
    │   └─    0.7 ms - fl/math/trig8.h
    │     └─    0.7 ms - platforms/trig8.h
    │       └─    0.6 ms - platforms/shared/trig8.h
    └─    2.1 ms - crgb.hpp
fl/ui.h (81.0ms)
  ├─   50.8 ms - fl/stl/json.h
  │ └─   39.9 ms - fl/stl/json/types.h
  │   └─    4.8 ms - fl/stl/limits.h
  ├─    7.5 ms - fl/ui_impl.h
  │ └─    7.0 ms - platforms/ui_defs.h
  │   ├─    1.5 ms - platforms/shared/ui/json/audio.h
  │   │ └─    0.7 ms - platforms/shared/ui/json/audio_internal.h
  │   ├─    1.1 ms - platforms/shared/ui/json/button.h
  │   ├─    0.7 ms - platforms/shared/ui/json/checkbox.h
  │   ├─    0.6 ms - platforms/shared/ui/json/number_field.h
  │   └─    0.6 ms - platforms/shared/ui/json/help.h
  └─    4.3 ms - fl/stl/url.h
chipsets.h (18.9ms)
  ├─    7.7 ms - fl/chipsets/ucs7604.h
  │ └─    5.8 ms - fl/chipsets/encoders/ucs7604.h
  ├─    4.5 ms - fl/chipsets/apa102.h
  ├─    1.2 ms - fl/chipsets/lpd880x.h
  ├─    0.7 ms - fl/chipsets/encoders/ws2816.h
  └─    0.5 ms - fl/chipsets/ws2801.h

TOP 20 SLOWEST OPERATIONS
--------------------------------------------------------------------------------
  1.  1510.6 ms - Source: FastLED.h
  2.  1510.6 ms - Total Source: 
  3.   949.7 ms - Source: fl/task/executor.h
  4.   501.2 ms - Source: fl/task/scheduler.h
  5.   494.5 ms - Source: fl/stl/singleton.h
  6.   494.0 ms - Source: fl/stl/thread_local.h
  7.   493.1 ms - Source: fl/stl/thread.h
  8.   493.0 ms - Source: platforms/thread.h
  9.   493.0 ms - Source: platforms/stub/thread_stub.h
 10.   492.9 ms - Source: platforms/stub/thread_stub_stl.h
 11.   486.4 ms - Source: thread
 12.   438.8 ms - Source: fl/task/promise.h
 13.   420.6 ms - Total ParseClass: 
 14.   407.4 ms - Source: fl/fastled.h
 15.   406.8 ms - Source: fl/stl/function.h
 16.   298.3 ms - Source: std_thread.h
 17.   240.5 ms - Source: fl/stl/vector.h
 18.   214.1 ms - Source: crgb.h
 19.   213.2 ms - Source: fl/gfx/crgb.h
 20.   209.9 ms - Source: fl/math/ease.h

PERFORMANCE FLAGS
--------------------------------------------------------------------------------
⚠️  SLOW HEADERS (>50.0ms):
    - FastLED.h (1510.6ms)
    - fl/task/executor.h (949.7ms)
    - fl/task/scheduler.h (501.2ms)
    - fl/stl/singleton.h (494.5ms)
    - fl/stl/thread_local.h (494.0ms)
    - fl/stl/thread.h (493.1ms)
    - platforms/thread.h (493.0ms)
    - platforms/stub/thread_stub.h (493.0ms)
    - platforms/stub/thread_stub_stl.h (492.9ms)
    - fl/task/promise.h (438.8ms)

⚠️  Template instantiation time is high (20.9% of total)
✓  Lexing time is acceptable (<10% of total)

RECOMMENDATIONS
--------------------------------------------------------------------------------
1. Consider optimizing FastLED.h (1510.6ms)
2. Consider optimizing fl/task/executor.h (949.7ms)
3. Consider optimizing fl/task/scheduler.h (501.2ms)

================================================================================

@zackees
zackees deleted the feat/audio-silence-gate-vibe branch May 30, 2026 20:01
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