| Age | Commit message (Collapse) | Author |
|
Improvements to seq_compiler Gantt chart visualization:
- Add optional sequence name support: SEQUENCE <start> <pri> ["name"] [end]
Names displayed in both ASCII and HTML Gantt charts for better readability
- Implement adaptive tick intervals based on demo duration:
* ≤5s: 1s intervals
* ≤40s: 2s intervals (fixes 32.5s demo from 5s to 2s)
* ≤100s: 5s intervals
* >100s: 10s+ intervals
- Sort sequences by start time in Gantt output for chronological visualization
- Add horizontal visual separators between sequences in both ASCII and HTML
- Update documentation (SEQUENCE.md) and quick reference (demo.seq)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
Simplifies effect priority management by using relative modifiers instead
of explicit numbers, making timeline reordering much more practical.
## New Priority System
Effects now use priority modifiers after EFFECT keyword:
- `+` increment priority by 1 (or start at 0 if first)
- `=` keep same priority as previous effect
- `-` decrement priority (or start at -1 if first, for background)
Old syntax:
```
EFFECT FlashEffect 0.0 0.5 0
EFFECT FadeEffect 0.1 0.3 1
EFFECT BgCube 0.2 3 -1
```
New syntax:
```
EFFECT - BgCube 0.2 3 # Priority -1 (background)
EFFECT + FlashEffect 0.0 0.5 # Priority 0
EFFECT + FadeEffect 0.1 0.3 # Priority 1
```
## Benefits
✓ Reordering effects no longer requires renumbering all priorities
✓ Priority relationships are explicit and relative
✓ File order matches render order (easier to understand)
✓ Same-priority effects clearly marked with `=`
✓ Background layers (-1) clearly marked with `-`
✓ Reduces errors when reorganizing timelines
## Implementation
- Updated seq_compiler to parse +/=/- modifiers
- Tracks current priority per sequence
- First effect sets base priority (0 or -1)
- Subsequent effects modify relative to previous
- Generated C++ code unchanged (still uses integer priorities)
## Changes to demo.seq
- All effects updated to use new syntax
- Effects reordered by priority within sequences
- Priority gaps removed (were likely unintentional)
- Comments updated to reflect new system
## Documentation
- Updated SEQUENCE.md with new syntax
- Added examples showing +, =, - usage
- Explained priority calculation rules
This makes timeline authoring significantly more maintainable, especially
when experimenting with different effect orderings during development.
|
|
Moves comprehensive sequence system documentation out of demo.seq into
a proper documentation file, keeping the timeline file clean and focused.
Changes:
- New file: doc/SEQUENCE.md with complete .seq format reference
- Streamlined: assets/demo.seq reduced from 207 to 104 lines
- Updated: README.md to include SEQUENCE.md reference
Benefits:
- Easier to read and navigate the actual timeline
- Documentation separately viewable in markdown
- Better for version control (timeline vs doc changes separated)
- Follows project convention of dedicated doc files
- Makes demo.seq more approachable for quick edits
The timeline file is now 50% smaller while all documentation remains
easily accessible in the standard doc/ directory.
|
|
logging infrastructure
MILESTONE: Audio System Robustness & Debugging
Core Audio Backend Optimization:
- Fixed stop-and-go audio glitches caused by timing mismatch
- Core Audio optimized for 44.1kHz (10ms periods), but 32kHz expected ~13.78ms
- Added allowNominalSampleRateChange=TRUE to force OS-level 32kHz native
- Added performanceProfile=conservative for 4096-frame buffers (128ms)
- Result: Stable ~128ms callbacks, <1ms jitter, zero underruns
Ring Buffer Improvements:
- Increased capacity from 200ms to 400ms for tempo scaling headroom
- Added comprehensive bounds checking with abort() on violations
- Fixed tempo-scaled buffer fill: dt * g_tempo_scale
- Buffer maintains 400ms fullness during 2.0x acceleration
NOTE_ Parsing Fix & Sample Caching:
- Fixed is_note_name() checking only first letter (A-G)
- ASSET_KICK_1 was misidentified as A0 (27.5 Hz)
- Required "NOTE_" prefix to distinguish notes from assets
- Updated music.track to use NOTE_E2, NOTE_G4 format
- Discovered resource exhaustion: 14 unique samples → 228 registrations
- Implemented comprehensive caching in tracker_init()
- Assets: loaded once from AssetManager, cached synth_id
- Generated notes: created once, stored in persistent pool
- Result: MAX_SPECTROGRAMS 256 → 32 (88% memory reduction)
Debug Logging Infrastructure:
- Created src/util/debug.h with 7 category macros
(AUDIO, RING_BUFFER, TRACKER, SYNTH, 3D, ASSETS, GPU)
- Added DEMO_ENABLE_DEBUG_LOGS CMake option (defines DEBUG_LOG_ALL)
- Converted all diagnostic code to use category macros
- Default build: macros compile to ((void)0) for zero runtime cost
- Debug build: comprehensive logging for troubleshooting
- Updated CONTRIBUTING.md with pre-commit policy
Resource Analysis Tool:
- Enhanced tracker_compiler to report pool sizes and cache potential
- Analysis: 152/228 spectrograms without caching, 14 with caching
- Tool generates optimization recommendations during compilation
Files Changed:
- CMakeLists.txt: Add DEBUG_LOG option
- src/util/debug.h: New debug logging header (7 categories)
- src/audio/miniaudio_backend.cc: Use DEBUG_AUDIO/DEBUG_RING_BUFFER
- src/audio/ring_buffer.cc: Use DEBUG_RING_BUFFER for underruns
- src/audio/tracker.cc: Implement sample caching, use DEBUG_TRACKER
- src/audio/synth.cc: Use DEBUG_SYNTH for validation
- src/audio/synth.h: Update MAX_SPECTROGRAMS (256→32), document caching
- tools/tracker_compiler.cc: Fix is_note_name(), add resource analysis
- assets/music.track: Update to use NOTE_ prefix format
- doc/CONTRIBUTING.md: Add debug logging pre-commit policy
- PROJECT_CONTEXT.md: Document milestone
- TODO.md: Mark tasks completed
Verification:
- Default build: No debug output, audio plays correctly
- Debug build: Comprehensive logging, audio plays correctly
- Caching working: 14 unique samples cached at init
- All tests passing (17/17)
handoff(Claude): Audio system now stable with robust diagnostic infrastructure.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
- Added detailed design for dynamic BVH and GPU traversal in 3D.md.
- Outlined SDF-based collision detection and semi-implicit Euler physics loop.
- Updated TODO.md with atomic tasks for physics implementation and granular WGSL refactoring.
|
|
Updated gen_coverage_report.sh to accept an optional argument for targeting specific directories using lcov --extract.
|
|
Added CMake support for coverage builds and a script to generate HTML reports using lcov on macOS. Also cleaned up .gitignore.
|
|
Assigned reference numbers to all remaining tasks in documentation:
- Task #34: Full STL Removal
- Task #35: CRT Replacement
- Task #36: Blender Exporter
- Task #37: Asset Ingestion
- Task #38: Runtime Loader
- Task #39: Visual Debugging System
- Task #40: Advanced Lighting & Transparency
- Task #41: Spectrogram Editor HTML Tool
- Task #42: Vectorial Spectrogram Reader (C++)
- Task #43: Spectrogram Drawing Bricks
Ensured consistent task numbering across PROJECT_CONTEXT.md and TODO.md.
|
|
Lowered the priority of the 'replace STL' task. It will be addressed in the final optimization phase (Phase 2) to simplify current development. Hot paths in AssetManager and Procedural remain optimized.
handoff(Gemini): STL usage is now permitted for non-critical paths until the final optimization phase. PROJECT_CONTEXT.md and TODO.md updated accordingly.
|
|
Critical Bug Fixes:
- Fixed pool exhaustion: Tracker slots never freed after use, music stopped
after 8 patterns. Implemented round-robin allocation with cleanup.
- Fixed note name parsing: Added automatic note-to-frequency conversion
in tracker_compiler. Bass and melody now play correctly.
- Fixed timing mismatch: Patterns are 2 seconds but triggered every 4 seconds,
causing silence gaps. Updated SCORE to trigger every 2 seconds.
Improvements:
- Implemented dynamic resource sizing in tracker_compiler: Analyzes score to
determine optimal MAX_VOICES/MAX_SPECTROGRAMS values.
- Created comprehensive rock track: 11 patterns with drums, bass, power chords,
and lead melody over 25 seconds.
- Added 213 lines of asset system documentation with 8 prioritized tasks.
Known Issues for next session:
- Audio quality could be improved (some artifacts remain)
- Note synthesis uses default parameters, needs tuning
- Pattern overlaps might cause voice exhaustion under heavy load
Files Changed:
- src/audio/tracker.cc: Round-robin pool allocation, cleanup logic
- tools/tracker_compiler.cc: Note name parser, resource usage analysis
- src/audio/synth.h: Increased limits to 16 based on analysis
- assets/music.track: 230-line rock arrangement
- doc/ASSET_SYSTEM.md: Comprehensive documentation + 8 tasks
- TODO.md: Updated with recent completions and known issues
handoff(Gemini): Music system now functional but needs quality improvements.
Audio artifacts and synthesis tuning remain. See TODO.md for details.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
|
|
Adds a section on Alignment, String Safety, and Size Reporting to ASSET_SYSTEM.md.
|
|
Updates ASSET_SYSTEM.md to describe shader asset handling. Adds Task #24 to TODO.md and PROJECT_CONTEXT.md to extract hardcoded shaders and integrate them with the AssetManager and ShaderComposer.
|
|
|
|
|
|
into BUILD.md
|
|
|
|
|
|
- Moved 3D.md into the doc/ directory to centralize documentation.
- Updated README.md to reflect the new location of 3D.md.
- Captured the action items from 3D.md (visual debug mode, Blender exporter) and added them as a new task (#18) in the PROJECT_CONTEXT.md roadmap.
|
|
- Moved PHASE2_COMPRESSION.md into the doc/ directory.
- Updated README.md to list and describe the new documentation file.
|
|
- Reverted modifications made to files within the 'third_party/' directory.
- Updated CONTRIBUTING.md to explicitly forbid any automated or manual changes to third-party code.
|
|
- Task A: Centralized all generated code (assets, timeline) into a single directory to create a single source of truth.
- Task A: Isolated test asset generation into a temporary build directory, preventing pollution of the main source tree.
- Task B: Vertically compacted all C/C++ source files by removing superfluous newlines.
- Task C: Created a top-level README.md with project overview and file descriptions.
- Task D: Moved non-essential documentation into a directory to reduce root-level clutter.
|