Feature/music reactive#612
Draft
sanialmccormick wants to merge 27 commits into
Draft
Conversation
787037f to
01b1722
Compare
…n, IIR kick detection, F3 audio debug HUD
…ng, mid/side kick detection, F3 sample count display, remove double smoothing from client.h
…and real-time mixing
- Vendor aubio library as plain source (no submodule) - Migrate audio analysis to aubio (pvoc + tempo, complex domain method) - Custom onset-flux ACF BPM estimator with sub-harmonic reinforcement - PLL-style beat phase sync using aubio confidence gating - Settings tab: FPS weight checkboxes, tooltips on all controls, mix smoothness slider - Audio panel (F3): matching weight checkboxes, tooltips, fix duplicate ImGui IDs - Fix F3 keybind fall-through into skip-forward command - Fix F3 panel state desyncing after F1/F2 dismiss (stale static -> IsVisible query) - Remove audio bars from F2 dreamstats overlay - Lower default band multipliers (bass 0.7, mid 0.8, high 0.7) - Improve snare/kick separation threshold logic Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
7fdfe56 to
dcce7ac
Compare
…ual exclusion fixes - AudioAnalyzer: move all processing to dedicated background thread (std::thread + std::mutex + std::atomic) so beat/BPM tracking is decoupled from render stalls - Beat counter: monotonic uint32_t atomic incremented on phase wraps; beat visualizer in F3 panel and overlay now derived from AudioAnalyzer_GetBeatCount() % 4 - 4-box beat visualizer in F3 panel (gold beat 1, blue-white beats 2-4) and overlay - Hold-to-nudge Slow/Fast buttons auto-lock BPM and apply temporary ±5% offset while held - Beat cut trigger: bar-aligned targetBarBeat pattern (always multiple of 4, fires on beat 1 only); N slider renamed Bars with updated tooltips - Adaptive normalisation: gamma=2 power curve suppresses quiet-passage overshoot - Audio settings loaded on startup (not deferred to first F3 open) - Mutual exclusion: F3 closes settings dialog; settings closes audio panel — prevents dual-ImGui-context crash when both share the same HWND Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cking - Add BeatDetektor (two instances: 60-119 and 120-239 BPM) as primary BPM source; aubio onsets continue to correct beat phase - BPM stability: proximity-weighted alpha (zero at >15% deviation) and octave-fold correction prevent bad frames yanking the estimate - Kick/snare detection requires prior level to be low (attack from silence), suppressing false triggers from sustained bass/mid content - Beat cuts: volume gate, bar-aligned trigger every N bars, catch-up snap so quiet sections do not cascade cuts when audio returns - Bar counter in F3 overlay cycles 1/N..N/N and resets on Reset button - Reset button zeros beat count so bar count restarts from 1 - Audio mix blend clip ticked each frame so second dream plays animated rather than freezing on its first frame Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ntext crash Settings dialog and audio panel share the same HWND ImGui context. F3 already dismissed settings before showing the audio panel, but the reverse path (opening settings via tray/toggle while audio panel was open) had no matching guard, causing an IM_ASSERT __debugbreak crash. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
These two files are referenced in electricsheep.vcxproj but were never committed, causing build failures on clean checkouts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wires up the Windows client to the system audio output and uses it to drive playback — frame rate, dream cuts, and layer mixing.
What it does
WASAPI loopback captures whatever's playing on the default output device. No mic, no config — it just works. Samples are pushed
through an aubio phase vocoder each frame to get band energy (bass/mid/high), spectral centroid, kick/snare/transient detection,
and a BPM estimate.
Three systems consume that data:
Attack/release are independently configurable so it doesn't snap around.
and transition style. Global cooldown stops them stomping on each other.
Settings
Everything is exposed two ways — the Audio Reactive tab in Settings for persistence, and an F3 overlay panel for tweaking in real
time while the screensaver is running. All controls have tooltips.
Dependency
Vendored aubio (aubio/src/ only — docs, tests, Python bindings stripped out). Replaces KissFFT which has been removed. No install
needed, compiles straight into the MSVC project.
BPM uses a custom onset-flux autocorrelation estimator on top of aubio's beat events — raw aubio BPM was too unstable for driving
cuts reliably.
Bug fixes in this branch