summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/COMPLETED.md8
-rw-r--r--doc/HEADLESS_MODE.md2
-rw-r--r--doc/archive/FINAL_STRIP_REPORT.md2
-rw-r--r--src/app/main.cc5
4 files changed, 10 insertions, 7 deletions
diff --git a/doc/COMPLETED.md b/doc/COMPLETED.md
index 1acf8d1..55fac50 100644
--- a/doc/COMPLETED.md
+++ b/doc/COMPLETED.md
@@ -305,7 +305,7 @@ Use `read @doc/archive/FILENAME.md` to access archived documents.
- [x] **WAV Dump Backend for Debugging**:
- [x] **Implementation**: Created WavDumpBackend implementing AudioBackend interface to render audio offline to .wav files.
- - [x] **Command-Line Option**: Added `--dump_wav output.wav` flag to enable offline rendering instead of live playback.
+ - [x] **Command-Line Option**: Added `--dump-wav output.wav` flag to enable offline rendering instead of live playback.
- [x] **Stereo Bug Fix**: Fixed critical mono/stereo mismatch. Synth outputs STEREO (interleaved L/R) but initial implementation wrote MONO.
- [x] **Correct Allocation**: Changed to allocate `frames * 2` samples and write stereo format (num_channels = 2).
- [x] **Format Matching**: WAV header now correctly specifies 16-bit PCM, stereo, 32kHz (matches live audio exactly).
@@ -385,7 +385,7 @@ Use `read @doc/archive/FILENAME.md` to access archived documents.
- [x] **Priority Modifiers**: Toggle button for "Same as Above" (= modifier) vs "Increment" (+ modifier). Visual feedback in button text.
- [x] **Diagonal Scroll**: Mouse wheel navigation with 10% viewport slack. Smooth following to time-ordered sequence cascade. Flash animation on active sequence change.
- [x] **Dynamic Bounds**: Sequence visual bounds calculated from min/max effect times. Cumulative Y positioning prevents overlap.
- - [x] **Waveform Visualization**: Load WAV files (via Web Audio API) and display waveform above timeline. Scales with zoom (pixels per second). Documented integration with `--dump_wav` flag.
+ - [x] **Waveform Visualization**: Load WAV files (via Web Audio API) and display waveform above timeline. Scales with zoom (pixels per second). Documented integration with `--dump-wav` flag.
- [x] **UI Polish**: Hoverable sequence names (large centered text, fades on hover). No scrollbars (hidden CSS). Clean, minimal interface.
- [x] **File I/O**: Load/save demo.seq files with proper serialization. BPM parsing and display. Re-order sequences by time.
- [x] **Delete & Add**: Delete sequences/effects. Add new sequences (at time 0, priority 0).
@@ -428,7 +428,7 @@ Use `read @doc/archive/FILENAME.md` to access archived documents.
#### Milestone: Audio System Robustness & Variable Tempo (February 4, 2026)
- **Event-Based Tracker for Tempo Scaling**: Refactored tracker system from pattern compositing to individual event triggering. Previously, pattern events were baked into single spectrograms at fixed positions, so tempo scaling only affected pattern trigger timing. Now each TrackerEvent triggers as a separate voice with timing calculated dynamically based on music_time. Result: Notes within patterns correctly accelerate/decelerate with tempo changes. At 2.0x tempo, both pattern triggering AND note spacing play 2x faster. Verified with WAV dump showing 61.24s music time in 60s physical time during tempo transitions. All 17 tests pass (100%).
-- **WAV Dump Backend for Debugging**: Added `WavDumpBackend` implementing `AudioBackend` interface to render audio offline to .wav files instead of playing on device. Enabled via `--dump_wav output.wav` flag. Critical bug fix: Synth outputs STEREO (interleaved L/R) but initial implementation wrote MONO, causing severe distortion. Fixed by allocating `frames * 2` samples and writing stereo format (num_channels = 2). Added regression test (`test_wav_dump.cc`) with critical assertion `assert(header.num_channels == 2)` to prevent future mono/stereo mismatches. WAV format now matches live audio exactly: 16-bit PCM, stereo, 32kHz.
+- **WAV Dump Backend for Debugging**: Added `WavDumpBackend` implementing `AudioBackend` interface to render audio offline to .wav files instead of playing on device. Enabled via `--dump-wav output.wav` flag. Critical bug fix: Synth outputs STEREO (interleaved L/R) but initial implementation wrote MONO, causing severe distortion. Fixed by allocating `frames * 2` samples and writing stereo format (num_channels = 2). Added regression test (`test_wav_dump.cc`) with critical assertion `assert(header.num_channels == 2)` to prevent future mono/stereo mismatches. WAV format now matches live audio exactly: 16-bit PCM, stereo, 32kHz.
- **Variable Tempo System**: Implemented unified music time abstraction in `main.cc` that decouples tracker timing from physical time. Music time advances at configurable `tempo_scale` rate (default 1.0), enabling dynamic tempo changes without pitch shifting. Created comprehensive test suite (`test_variable_tempo.cc`) verifying 2x speed-up and 2x slow-down "reset tricks" work perfectly. All 6 test scenarios pass with mathematical precision. System ready for expressive tempo control in demo with zero size impact.
@@ -459,7 +459,7 @@ Use `read @doc/archive/FILENAME.md` to access archived documents.
- **Key Technical Insights**: (1) DCT-III is the inverse of DCT-II, not IDCT-II. (2) Hamming window is ONLY for analysis (before DCT), NOT synthesis (before IDCT). (3) Orthonormal DCT produces sqrt(N/2) smaller values than non-orthonormal. (4) Reordering method is more accurate than double-and-mirror for DCT via FFT. (5) Round-trip accuracy is more important than absolute DCT accuracy.
#### Milestone: Interactive Timeline Editor (February 5, 2026) 🎉
-- **Task #57 Phase 1: Production-Ready Timeline Editor**: Created fully functional web-based editor for `demo.seq` timeline files. **Core Features**: Load/save demo.seq with BPM parsing, Gantt-style visual timeline, drag & drop sequences/effects with snap-to-beat, resize handles (left/right) allowing negative relative times, stack-order based priority system (Up/Down buttons + "Same as Above" toggle), floating auto-apply properties panel, diagonal mouse wheel scroll with 10% viewport slack, dynamic sequence bounds calculation, delete/add sequences, re-order by time. **Audio Visualization**: WAV waveform display above timeline using Web Audio API, scales with zoom (pixels per second), documented integration with `--dump_wav` flag for aligning sequences with actual demo audio output. **UI Polish**: Hoverable sequence names (large centered, fades on hover), hidden scrollbars, crosshair cursor on waveform, flash animation on active sequence change, clean minimal interface. **Bug Fixes**: Resolved critical e.target vs e.currentTarget drag offset bug, fixed sequence overlap with cumulative Y positioning, corrected effect relative time calculations. **Files**: `tools/timeline_editor/index.html` (~1200 lines pure HTML/CSS/JS, no dependencies), `README.md` (usage guide, wav_dump integration docs), `ROADMAP.md` (3 phases, 117-161 hour estimate). **Next**: Phase 1.2 (Add Effect button), Phase 2.5 (music.track visualization overlay). **Impact**: Visual timeline editing now production-ready, eliminates manual text editing for sequence placement and timing adjustments.
+- **Task #57 Phase 1: Production-Ready Timeline Editor**: Created fully functional web-based editor for `demo.seq` timeline files. **Core Features**: Load/save demo.seq with BPM parsing, Gantt-style visual timeline, drag & drop sequences/effects with snap-to-beat, resize handles (left/right) allowing negative relative times, stack-order based priority system (Up/Down buttons + "Same as Above" toggle), floating auto-apply properties panel, diagonal mouse wheel scroll with 10% viewport slack, dynamic sequence bounds calculation, delete/add sequences, re-order by time. **Audio Visualization**: WAV waveform display above timeline using Web Audio API, scales with zoom (pixels per second), documented integration with `--dump-wav` flag for aligning sequences with actual demo audio output. **UI Polish**: Hoverable sequence names (large centered, fades on hover), hidden scrollbars, crosshair cursor on waveform, flash animation on active sequence change, clean minimal interface. **Bug Fixes**: Resolved critical e.target vs e.currentTarget drag offset bug, fixed sequence overlap with cumulative Y positioning, corrected effect relative time calculations. **Files**: `tools/timeline_editor/index.html` (~1200 lines pure HTML/CSS/JS, no dependencies), `README.md` (usage guide, wav_dump integration docs), `ROADMAP.md` (3 phases, 117-161 hour estimate). **Next**: Phase 1.2 (Add Effect button), Phase 2.5 (music.track visualization overlay). **Impact**: Visual timeline editing now production-ready, eliminates manual text editing for sequence placement and timing adjustments.
#### Other Completed Tasks
- **Task #50: WGSL Modularization**: Updated `ShaderComposer` to support recursive `#include` directives, refactored the entire shader library into granular snippets (shapes, utils, lighting), and updated the 3D renderer to use this modular system. This resolved macOS shader compilation issues and significantly improved shader maintainability.
diff --git a/doc/HEADLESS_MODE.md b/doc/HEADLESS_MODE.md
index 2365906..f139317 100644
--- a/doc/HEADLESS_MODE.md
+++ b/doc/HEADLESS_MODE.md
@@ -18,7 +18,7 @@ cmake --build build_headless -j4
./build_headless/demo64k --headless --duration 60
# Audio validation
-./build_headless/demo64k --dump_wav test.wav
+./build_headless/demo64k --dump-wav test.wav
```
Test script: `./scripts/test_headless.sh`
diff --git a/doc/archive/FINAL_STRIP_REPORT.md b/doc/archive/FINAL_STRIP_REPORT.md
index 6ed1b43..e2e9a4f 100644
--- a/doc/archive/FINAL_STRIP_REPORT.md
+++ b/doc/archive/FINAL_STRIP_REPORT.md
@@ -20,7 +20,7 @@ This document provides comprehensive analysis of the FINAL_STRIP error checking
- **DEMO_STRIP_ALL**: OFF
- **DEMO_FINAL_STRIP**: OFF
- **Features**:
- - Command-line parsing enabled (--seek, --dump_wav, --help)
+ - Command-line parsing enabled (--seek, --dump-wav, --help)
- Debug labels enabled (WebGPU labels, printf diagnostics)
- Error checking enabled (FATAL_* macros active)
- Full error messages with file:line information
diff --git a/src/app/main.cc b/src/app/main.cc
index 27d6312..e19f05b 100644
--- a/src/app/main.cc
+++ b/src/app/main.cc
@@ -67,7 +67,7 @@ int main(int argc, char** argv) {
}
} else if (strcmp(argv[i], "--debug") == 0) {
Renderer3D::SetDebugEnabled(true);
- } else if (strcmp(argv[i], "--dump_wav") == 0) {
+ } else if (strcmp(argv[i], "--dump-wav") == 0) {
dump_wav = true;
// Optional: allow specifying output filename
if (i + 1 < argc && argv[i + 1][0] != '-') {
@@ -85,6 +85,9 @@ int main(int argc, char** argv) {
} else if (strcmp(argv[i], "--hot-reload") == 0) {
hot_reload_enabled = true;
printf("Hot-reload enabled (watching config files)\n");
+ } else {
+ fprintf(stderr, "Error: Unrecognized option '%s'\n", argv[i]);
+ return 1;
}
}
#else