Work on documentation

This commit is contained in:
2026-01-31 13:46:43 +01:00
parent 08029ec604
commit 0299012725
45 changed files with 668 additions and 1318 deletions

58
docs/engine_settings.md Normal file
View File

@@ -0,0 +1,58 @@
# Settings
The audio engine can be configured through the Engine page or via command-line arguments. Settings are saved and restored between sessions.
## Engine Page
Press `Ctrl+Right` until you reach the Engine page. Here you can see the engine status and adjust settings.
### Display
The right side of the page shows visualizations:
- **Scope**: oscilloscope showing the audio waveform
- **Spectrum**: 32-band frequency analyzer
### Settings
Navigate with arrow keys, adjust values with left/right:
- **Output Device**: where sound goes (speakers, headphones, interface).
- **Input Device**: what audio input source to use (microphone, line-in, etc.).
- **Channels**: number of output channels (2 for stereo).
- **Buffer Size**: audio buffer in samples (64-4096).
- **Max Voices**: polyphony limit (1-128, default 32).
- **Lookahead**: scheduling lookahead in milliseconds (0-50, default 15).
### Buffer Size
Smaller buffers mean lower latency but higher CPU load. Larger buffers are safer but feel sluggish.
| Buffer | Latency at 44.1kHz |
|--------|-------------------|
| 64 | ~1.5ms |
| 128 | ~3ms |
| 256 | ~6ms |
| 512 | ~12ms |
| 1024 | ~23ms |
Start with 512. Lower it if you need tighter timing. Raise it if you hear glitches.
### Samples
The engine indexes audio files from your sample directories. Add directories with `A`, remove with `D`. The sample count shows how many files are indexed. You can load as many sample banks as you want, they are not really loaded into memory but _lazily loaded_. They are loaded on demand when you play a sample. Samples are referenced by filename without extension:
```forth
kick s . ;; plays kick.wav, kick.mp3, etc.
```
## Troubleshooting
* **No sound**: Check output device selection.
* Try the test sound (`t`) on Engine page).
* **Glitches/crackling**: Increase buffer size, restart the Engine.
* **High CPU**: Reduce max voices. Disable scope/spectrum. Increase buffer size.
* **Samples not found**: Check sample directories on Engine page. Filenames are case-sensitive on some systems.