1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# 64k Demo Project
## Goal
- Produce a <=64k native demo binary
- Same C++ codebase for Windows, macOS, Linux
## Graphics
- WebGPU via wgpu-native
- WGSL shaders
- Hybrid rendering: Rasterized proxy geometry + SDF raymarching
## Audio
- 32 kHz, 16-bit stereo
- Procedurally generated samples
- Real-time additive synthesis from spectrograms (IDCT)
- Variable tempo system with music time abstraction
- Event-based pattern triggering for dynamic tempo scaling
- Modifiable Loops and Patterns, w/ script to generate them (like a Tracker)
- Unified AudioEngine for lifecycle management
## Constraints
- Size-sensitive
- Minimal dependencies
- Explicit control over all allocations
## Style
- Demoscene
- No engine abstractions
---
## Current Status
- **Timing System:** **Beat-based timelines** for musical synchronization. Sequences defined in beats, converted to seconds at runtime. Effects receive both physical time (constant) and beat time (musical). Variable tempo affects audio only. See `doc/BEAT_TIMING.md`.
- **Workspace system:** Multi-workspace support. Easy switching with `-DDEMO_WORKSPACE=<name>`. Shared common assets.
- **Audio:** Sample-accurate sync. Zero heap allocations per frame. Variable tempo. Comprehensive tests.
- **Shaders:** Parameterized effects (UniformHelper, .seq syntax). Beat-synchronized animation support (`beat_time`, `beat_phase`). Modular WGSL composition.
- **3D:** Hybrid SDF/rasterization with BVH. Binary scene loader. Blender pipeline.
- **Effects:** CNN post-processing foundation (3-layer architecture, modular snippets). CNNEffect validated in demo. CNN v2 complete: storage buffer architecture, binary weights (~3.2 KB), dynamic layer count, patch-based training (100 epochs, 3×3 kernels). TODO: 8-bit quantization.
- **Tools:** CNN test tool (readback works, output incorrect - under investigation). Texture readback utility functional. Timeline editor (web-based, beat-aligned, audio playback).
- **Build:** Asset dependency tracking. Size measurement. Hot-reload (debug-only).
- **Testing:** **36/36 passing (100%)**
---
## Next Up
See `TODO.md` for current priorities and active tasks.
---
## Documentation
**Essential:**
- `doc/ARCHITECTURE.md` - System architecture and design decisions
- `doc/HOWTO.md` - Common operations and workflows
- `doc/CONTRIBUTING.md` - Development protocols
**Technical Reference:**
- Core: `ASSET_SYSTEM.md`, `SEQUENCE.md`, `TRACKER.md`, `3D.md`, `CNN_EFFECT.md`, `CNN_V2.md`
- Formats: `SCENE_FORMAT.md`, `MASKING_SYSTEM.md`
- Tools: `BUILD.md`, `WORKSPACE_SYSTEM.md`, `SIZE_MEASUREMENT.md`, `CNN_TEST_TOOL.md`, `tools/timeline_editor/README.md`
**History:**
- `doc/COMPLETED.md` - Completed tasks archive
- Git log for detailed change history
|