diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-07 08:22:12 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-07 08:22:12 +0100 |
| commit | 91e3215b09c458c46eba4cccce602d6917e34923 (patch) | |
| tree | 2194ef37f54c7da633962abf0f32c73c6f1e2092 /assets | |
| parent | 036114d12d024273e752ffbb68a95a04ee34d4fa (diff) | |
feat(test_demo): Add audio/visual sync debug tool with tempo testing
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 <noreply@anthropic.com>
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/test_demo.seq | 7 | ||||
| -rw-r--r-- | assets/test_demo.track | 32 |
2 files changed, 39 insertions, 0 deletions
diff --git a/assets/test_demo.seq b/assets/test_demo.seq new file mode 100644 index 0000000..6dc26ca --- /dev/null +++ b/assets/test_demo.seq @@ -0,0 +1,7 @@ +# Minimal timeline for audio/visual sync testing +# BPM 120 (set in test_demo.track) + +SEQUENCE 0.0 0 "Main Loop" + EFFECT + FlashEffect 0.0 16.0 + +END_DEMO 32b diff --git a/assets/test_demo.track b/assets/test_demo.track new file mode 100644 index 0000000..8c06100 --- /dev/null +++ b/assets/test_demo.track @@ -0,0 +1,32 @@ +# Minimal drum beat for audio/visual sync testing +# Pattern: kick-snare-kick-snare, crash every 4th bar +# Includes NOTE_A4 (440 Hz) at start of each bar for testing + +SAMPLE ASSET_KICK_1 +SAMPLE ASSET_SNARE_1 +SAMPLE ASSET_CRASH_1 + +PATTERN drums_basic + 0.0, ASSET_KICK_1, 1.0, 0.0 + 0.0, NOTE_A4, 0.5, 0.0 + 1.0, ASSET_SNARE_1, 0.9, 0.0 + 2.0, ASSET_KICK_1, 1.0, 0.0 + 3.0, ASSET_SNARE_1, 0.9, 0.0 + +PATTERN drums_with_crash + 0.0, ASSET_KICK_1, 1.0, 0.0 + 0.0, ASSET_CRASH_1, 0.85, 0.0 + 0.0, NOTE_A4, 0.5, 0.0 + 1.0, ASSET_SNARE_1, 0.9, 0.0 + 2.0, ASSET_KICK_1, 1.0, 0.0 + 3.0, ASSET_SNARE_1, 0.9, 0.0 + +SCORE + 0.0, drums_basic + 2.0, drums_basic + 4.0, drums_with_crash + 6.0, drums_basic + 8.0, drums_basic + 10.0, drums_basic + 12.0, drums_with_crash + 14.0, drums_basic |
