summaryrefslogtreecommitdiff
path: root/doc/HOWTO.md
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-09 15:35:14 +0100
committerskal <pascal.massimino@gmail.com>2026-02-09 15:35:14 +0100
commit802e97ee695de1bc8657c5cbca653bb2f13b90a8 (patch)
tree85ecd65f78457ede14d7fbaf85c78280aad01b59 /doc/HOWTO.md
parentc784f8e1472991b8f4c35136b3468f3bfc6c37a7 (diff)
docs: Condense essential context files (856→599 lines)
Extract detailed examples and untriaged tasks to on-demand docs. Created BACKLOG.md, ARCHITECTURE.md, CODING_STYLE.md, TOOLS_REFERENCE.md. Reduces always-loaded token budget by 30% while preserving all information. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'doc/HOWTO.md')
-rw-r--r--doc/HOWTO.md86
1 files changed, 24 insertions, 62 deletions
diff --git a/doc/HOWTO.md b/doc/HOWTO.md
index 2595258..876d7dc 100644
--- a/doc/HOWTO.md
+++ b/doc/HOWTO.md
@@ -2,6 +2,8 @@
Common commands for building and testing.
+---
+
## Building
### Debug Build
@@ -11,10 +13,7 @@ cmake --build build -j4
./build/demo64k
```
-Options:
-- `--fullscreen`: Run in fullscreen
-- `--resolution WxH`: Set window size (e.g., 1024x768)
-- `--seek TIME`: Jump to timestamp (debug builds only)
+Options: `--fullscreen`, `--resolution WxH`, `--seek TIME` (debug only)
Keyboard: `Esc` (exit), `F` (toggle fullscreen)
@@ -50,24 +49,29 @@ cmake --build build_final -j4
cmake -S . -B build -DDEMO_BUILD_TESTS=ON -DDEMO_BUILD_TOOLS=ON
cmake --build build -j4
```
-Enables tests and tools without stripping debug features.
-**Note**: `DEMO_ALL_OPTIONS=ON` enables tests, tools, AND `STRIP_ALL`, which removes debug-only code (e.g., `test_demo` PeakMeterEffect). Use selective flags for debugging.
+**Note:** `DEMO_ALL_OPTIONS=ON` enables tests, tools, AND `STRIP_ALL`, which removes debug-only code. Use selective flags for debugging.
+
+---
## Build System
-**Dependency Tracking**: CMake tracks 42 demo + 17 test assets. Editing shaders/audio auto-triggers rebuild.
+**Dependency Tracking:** CMake tracks 42 demo + 17 test assets. Editing shaders/audio auto-triggers rebuild.
-**Header Organization**:
+**Header Organization:**
- `asset_manager_dcl.h`: Forward declarations
- `asset_manager.h`: Core API (GetAsset/DropAsset)
- `asset_manager_utils.h`: Typed helpers
+---
+
## Git Clone
```bash
git clone ssh://git@51.38.51.127/~/demo.git
```
+---
+
## Audio System
### AudioEngine API
@@ -92,10 +96,7 @@ audio_shutdown();
- `seek(time)`: Jump to timestamp (debug only)
**Direct Synth APIs** (performance-critical):
-- `synth_register_spectrogram()`: Register samples
-- `synth_trigger_voice()`: Trigger playback
-- `synth_get_output_peak()`: Get audio level
-- `synth_render()`: Low-level rendering
+- `synth_register_spectrogram()`, `synth_trigger_voice()`, `synth_get_output_peak()`, `synth_render()`
**Testing:**
```cpp
@@ -105,6 +106,8 @@ engine.update(1.0f);
engine.shutdown();
```
+---
+
## Auxiliary Texture Masking
Share textures between effects:
@@ -118,6 +121,8 @@ WGPUTextureView view = demo_->get_auxiliary_view("mask_name");
```
See `doc/MASKING_SYSTEM.md` for details.
+---
+
## Demo Timeline
Edit `assets/demo.seq`:
@@ -127,6 +132,8 @@ SEQUENCE 0.0 0
```
Rebuild to update timeline.
+---
+
## Testing
**Run all tests:**
@@ -142,56 +149,7 @@ cd build && ctest
- `SynthEngineTest`: Audio synthesis
- `SequenceSystemTest`: Timeline logic
-## Code Coverage (macOS)
-```bash
-brew install lcov
-./scripts/gen_coverage_report.sh [target_dir]
-```
-
-## Tools
-
-### Windows Cross-Compilation
-```bash
-./scripts/fetch_win_deps.sh
-./scripts/build_win.sh
-./scripts/run_win.sh
-```
-
-### spectool (Audio Analysis)
-```bash
-cmake -S . -B build -DDEMO_BUILD_TOOLS=ON
-cmake --build build -j4
-
-# Analyze
-./build/spectool analyze input.wav output.spec
-
-# Play
-./build/spectool play input.spec
-```
-
-### specview (Visualization)
-```bash
-./build/specview input.spec
-```
-
-### specplay (Diagnostic)
-```bash
-./build/specplay input.spec
-# or
-./build/specplay input.wav
-```
-Output: Peak, RMS, clipping detection.
-
-### Submodule Updates
-```bash
-cd third_party/wgpu-native
-git fetch
-git checkout trunk
-git reset --hard origin/trunk
-cd ../..
-git add third_party/wgpu-native
-git commit -m "chore: Update wgpu-native"
-```
+---
## Asset Management
@@ -218,3 +176,7 @@ const uint8_t* data = GetAsset(AssetId::KICK_1, &size);
```
Build system auto-runs `asset_packer` when asset lists change.
+
+---
+
+For developer tools reference (spectool, Windows cross-compilation, code coverage), see `doc/TOOLS_REFERENCE.md`.