diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-07 18:50:55 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-07 18:50:55 +0100 |
| commit | 74554454d7f58a3d3a74c319289f7a853ccb476d (patch) | |
| tree | b0b3febf325d6a0d647b7bde2cbe83e41d779143 /src/tests/test_window.cc | |
| parent | 3b1d28500629b8488863aeaba3203ad5c3118d5f (diff) | |
feat(tools): Add music track visualizer
Created HTML-based visualizer for .track files with:
Features:
- Load .track files via file input button
- Zoomable timeline (horizontal zoom with mouse wheel)
- Scrollable view (Shift+wheel for horizontal scroll)
- Vertical zoom controls for pattern boxes
- Click & drag panning
Visualization:
- Color-coded pattern boxes (deterministic HSL colors from name hash)
- Automatic stack-based layout (prevents overlapping patterns)
- Beat grid lines within each pattern (vertical lines at beat boundaries)
- Beat numbers displayed when zoomed in
- Sample ticks showing when events trigger (height varies with volume)
- Alternating beat background (full-height rectangles for easy counting)
- Time ruler with second markers at top
Technical:
- Single standalone HTML file (13KB, no dependencies)
- Pure HTML5 Canvas + JavaScript
- Parses .track format: SAMPLE, PATTERN, SCORE sections
- Responsive canvas sizing based on track duration
- 120 BPM timing (2 beats per second)
Files:
- tools/track_visualizer/index.html (visualizer)
- tools/track_visualizer/README.md (documentation)
Usage: Open index.html in browser, load assets/music.track
Diffstat (limited to 'src/tests/test_window.cc')
0 files changed, 0 insertions, 0 deletions
