summaryrefslogtreecommitdiff
path: root/third_party/glfw3webgpu/glfw3webgpu.h
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-04 13:38:16 +0100
committerskal <pascal.massimino@gmail.com>2026-02-04 13:38:16 +0100
commit25d7e4ef3713e805a272fb84df7ba0c66e533caf (patch)
tree5b842a39e5607a3790ccee0ccbb60cf25633c873 /third_party/glfw3webgpu/glfw3webgpu.h
parent829e2112db2c6ee05ed3fa787476456cb137222f (diff)
feat(audio): Variable tempo system with music time abstraction
Implemented unified music time that advances at configurable tempo_scale, enabling dynamic tempo changes without pitch shifting or BPM dependencies. Key Changes: - Added music_time tracking in main.cc (advances by dt * tempo_scale) - Decoupled tracker_update() from physical time (now uses music_time) - Created comprehensive test suite (test_variable_tempo.cc) with 6 scenarios - Verified 2x speed-up and 2x slow-down reset tricks work perfectly - All tests pass (100% success rate) Technical Details: - Spectrograms remain unchanged (no pitch shift) - Only trigger timing affected (when patterns fire) - Delta time calculated per frame: dt = current_time - last_time - Music time accumulates: music_time += dt * tempo_scale - tempo_scale=1.0 → normal speed (default) - tempo_scale=2.0 → 2x faster triggering - tempo_scale=0.5 → 2x slower triggering Test Coverage: 1. Basic tempo scaling (1.0x, 2.0x, 0.5x) 2. 2x speed-up reset trick (accelerate to 2.0x, reset to 1.0x) 3. 2x slow-down reset trick (decelerate to 0.5x, reset to 1.0x) 4. Pattern density swap at reset points 5. Continuous acceleration (0.5x to 2.0x over 10s) 6. Oscillating tempo (sine wave modulation) Test Results: - After 5s physical at 2.0x tempo: music_time=7.550s (expected ~7.5s) ✓ - Reset to 1.0x, advance 2s: music_time delta=2.000s (expected ~2.0s) ✓ - Slow-down reset: music_time delta=2.000s (expected ~2.0s) ✓ Enables future dynamic tempo control without modifying synthesis engine. handoff(Claude): Variable tempo system complete and verified Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'third_party/glfw3webgpu/glfw3webgpu.h')
0 files changed, 0 insertions, 0 deletions