Add per-output PipeWire audio routing - #3
Open
marksverdhei wants to merge 13 commits into
Open
Conversation
- Add BpmDetector in vibe-audio that uses spectral flux and autocorrelation - Detect tempo from bass frequencies (20-200 Hz) - BPM updates every 15 seconds with 5 BPM hysteresis for stability - Expose iBPM as uniform at binding 4 in FragmentCanvas - Update WGSL and GLSL preambles with iBPM declaration Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- BPM detector now collects estimates over 15 minutes and uses median - Writes current BPM to /tmp/vibe-bpm for external tools - More stable BPM that ignores transient percussion Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
update code
Merges 42 upstream commits including ResourceManager removal, Component trait refactoring, texture/sampler support, frequency presets, and type alias improvements. Drops fork-only BPM detection and color palette features that are incompatible with the refactored upstream architecture. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Re-implements both features on top of upstream's refactored codebase (no more ResourceManager, new Component trait, texture support): - BPM detector: spectral flux + autocorrelation with median smoothing, exposed as iBPM uniform (binding 4), writes /tmp/vibe-bpm for waybar - Color palette: 4 configurable colors from ~/.config/vibe/colors.toml, exposed as iColors uniform (binding 5), live-reloads via mtime check Texture bindings bumped to 6/7 to accommodate new uniforms. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Some AMD GPUs expose Rgba16Unorm first which isn't renderable. Prefer known-good 8-bit formats with fallback chain. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…capture On PipeWire/ALSA, build_input_stream on an output device doesn't do loopback capture. Switch to using the default input device with supported_input_configs so PipeWire can route a monitor source for capturing system audio output. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Start normalize_factor at 0.1 instead of 1.0 so newly loaded shaders fade in from dim rather than flashing bright and slowly settling. Use a faster ramp-up rate (3% vs 0.2% per frame) while below 0.5 to reach equilibrium in ~1-2 seconds. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Documents the full shader interface (uniforms, audio data, color palette), visual techniques (raymarching, fractals, volumetrics, 4D geometry, gravitational lensing, soft bodies), performance optimization, and color palette integration. Derived from patterns across 12 production shaders. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New section on keeping colors saturated — the averaging trap, asymmetric blends, additive vs mix, saturation recovery, contrast over blending. Updated design principles to emphasize color zone separation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Each output config can now specify an `audio_target` PipeWire node name. When set, PIPEWIRE_NODE is configured before CPAL opens the input stream, allowing different monitors to visualize different audio sources (e.g., TTS audio on one display, music on another). Co-Authored-By: Claude Opus 4.5 <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.
Summary
audio_targetfield toOutputConfigfor specifying a PipeWire node name per outputPIPEWIRE_NODEenv var before CPAL opens the audio stream, then restores it afterwardAUDIO_ROUTING.mddocs andlist_inputs.rsexample utilityTest plan
audio_target = "tts_sink"in an output config and verify it captures from that sourceaudio_targetcontinue to use the default sourcelist_inputsexample to confirm available PipeWire sources are listed🤖 Generated with Claude Code