summaryrefslogtreecommitdiff
path: root/assets/final/BASS_SYNTH_1.spec
AgeCommit message (Collapse)Author
20 hoursfeat(audio): Add RMS normalization to spectool for consistent sample loudnessskal
IMPLEMENTATION: - Added --normalize flag to spectool analyze command - Default target RMS: 0.15 (customizable via --normalize [rms]) - Two-pass processing: load all PCM → calculate RMS/peak → normalize → DCT - Peak-limiting safety: prevents clipping by limiting scale factor if peak > 1.0 - Updated gen_spectrograms.sh to use --normalize by default ALGORITHM: 1. Calculate original RMS and peak of input audio 2. Compute scale factor to reach target RMS (default 0.15) 3. Check if scaled peak would exceed 1.0 (after windowing + IDCT) 4. If yes, reduce scale factor to keep peak ≤ 1.0 (prevents clipping) 5. Apply scale factor to all PCM samples before windowing/DCT RESULTS: Before normalization: - RMS range: 0.054 - 0.248 (4.6x variation, ~13 dB) - Some peaks > 1.0 (clipping) After normalization: - RMS range: 0.049 - 0.097 (2.0x variation, ~6 dB) ✅ 2.3x improvement - All peaks < 1.0 (no clipping) ✅ SAMPLES REGENERATED: - All 14 .spec files regenerated with normalization - High dynamic range samples (SNARE_808, CRASH_DMX, HIHAT_CLOSED_DMX) were peak-limited to prevent clipping - Consistent loudness across all drum and bass samples GITIGNORE CHANGE: - Removed *.spec from .gitignore to track normalized spectrograms - This ensures reproducibility and prevents drift from source files handoff(Claude): RMS normalization implemented and working. All samples now have consistent loudness with no clipping.
22 hoursfix(audio): Regenerate spectrograms with orthonormal DCTskal
Regenerated all spectrograms using the new FFT-based orthonormal DCT to match the orthonormal IDCT used in playback. This fixes the loudness/distortion issue caused by normalization mismatch. **Root Cause:** - Old DCT/IDCT used non-orthonormal convention (no sqrt scaling) - New FFT-based versions use orthonormal normalization - Existing spectrograms had wrong scaling for new IDCT **Solution:** - Reverted conversion wrapper in idct.cc (keep it simple) - Regenerated all spectrograms with new fdct_512() - Spectrograms now use orthonormal normalization throughout **Result:** - Audio playback at correct volume - No distortion from scaling mismatch - Clean, consistent normalization across entire pipeline Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
3 daysfeat: Optional sequence end times and comprehensive effect documentationskal
This milestone implements several key enhancements to the sequencing system and developer documentation: ## Optional Sequence End Times (New Feature) - Added support for explicit sequence termination via [time] syntax - Example: SEQUENCE 0 0 [30.0] forcefully ends all effects at 30 seconds - Updated seq_compiler.cc to parse optional [time] parameter with brackets - Added end_time_ field to Sequence class (default -1.0 = no explicit end) - Modified update_active_list() to check sequence end time and deactivate all effects when reached - Fully backward compatible - existing sequences work unchanged ## Comprehensive Effect Documentation (demo.seq) - Documented all effect constructor parameters (standard: device, queue, format) - Added runtime parameter documentation (time, beat, intensity, aspect_ratio) - Created detailed effect catalog with specific behaviors: * Scene effects: HeptagonEffect, ParticlesEffect, Hybrid3DEffect, FlashCubeEffect * Post-process effects: GaussianBlurEffect, SolarizeEffect, ChromaAberrationEffect, ThemeModulationEffect, FadeEffect, FlashEffect - Added examples section showing common usage patterns - Documented exact parameter behaviors (e.g., blur pulsates 0.5x-2.5x, flash triggers at intensity > 0.7, theme cycles every 8 seconds) ## Code Quality & Verification - Audited all hardcoded 1280x720 dimensions throughout codebase - Verified all shaders use uniforms.resolution and uniforms.aspect_ratio - Confirmed Effect::resize() properly updates width_/height_ members - No issues found - dimension handling is fully dynamic and robust ## Files Changed - tools/seq_compiler.cc: Parse [end_time], generate set_end_time() calls - src/gpu/effect.h: Added end_time_, set_end_time(), get_end_time() - src/gpu/effect.cc: Check sequence end time in update_active_list() - assets/demo.seq: Comprehensive syntax and effect documentation - Generated files updated (timeline.cc, assets_data.cc, music_data.cc) This work establishes a more flexible sequencing system and provides developers with clear documentation for authoring demo timelines. handoff(Claude): Optional sequence end times implemented, effect documentation complete, dimension handling verified. Ready for next phase of development.
4 dayschore: Finalize Build System Consolidation (Task #25)skal
Updated project roadmap and to-do list to reflect the completion of the modular build system refactor.