From 91e3215b09c458c46eba4cccce602d6917e34923 Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 7 Feb 2026 08:22:12 +0100 Subject: feat(test_demo): Add audio/visual sync debug tool with tempo testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implements minimal standalone executable for debugging audio/visual synchronization and variable tempo system without full demo complexity. Key Features: - Simple drum beat (kick-snare) with crash landmarks at bars 3 and 7 - NOTE_A4 (440 Hz) reference tone at start of each bar for testing - Screen flash effect synchronized to audio peaks - 16 second duration (8 bars at 120 BPM) - Variable tempo mode (--tempo) alternating acceleration/deceleration - Peak logging (--log-peaks) for gnuplot visualization Command-line options: - --help: Show usage information - --fullscreen: Run in fullscreen mode - --resolution WxH: Set window resolution - --tempo: Enable tempo variation test (1.0x ↔ 1.5x and 1.0x ↔ 0.66x) - --log-peaks FILE: Export audio peaks with beat timing for analysis Files: - src/test_demo.cc: Main executable (~220 lines) - assets/test_demo.track: Drum pattern with NOTE_A4 - assets/test_demo.seq: Visual timeline (FlashEffect) - test_demo_README.md: Comprehensive documentation Build: cmake --build build --target test_demo Usage: build/test_demo [--help] [--tempo] [--log-peaks peaks.txt] Co-Authored-By: Claude Sonnet 4.5 --- src/generated/test_demo_timeline.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/generated/test_demo_timeline.cc (limited to 'src/generated/test_demo_timeline.cc') diff --git a/src/generated/test_demo_timeline.cc b/src/generated/test_demo_timeline.cc new file mode 100644 index 0000000..75c5fe6 --- /dev/null +++ b/src/generated/test_demo_timeline.cc @@ -0,0 +1,15 @@ +// Auto-generated by seq_compiler. Do not edit. +#include "gpu/demo_effects.h" +#include "gpu/effect.h" + +float GetDemoDuration() { + return 16.000000f; +} + +void LoadTimeline(MainSequence& main_seq, WGPUDevice device, WGPUQueue queue, WGPUTextureFormat format) { + { + auto seq = std::make_shared(); + seq->add_effect(std::make_shared(device, queue, format), 0.0f, 16.0f, 0); + main_seq.add_sequence(seq, 0.0f, 0); + } +} -- cgit v1.2.3