diff options
Diffstat (limited to 'doc/TRACKER.md')
| -rw-r--r-- | doc/TRACKER.md | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/doc/TRACKER.md b/doc/TRACKER.md index 6e71951..48829c0 100644 --- a/doc/TRACKER.md +++ b/doc/TRACKER.md @@ -74,3 +74,42 @@ PATTERN short_fill LENGTH 0.5 # 2 beats = 1 second at 120 BPM Potential runtime modifiers (not yet implemented): - Randomization, accents, volume modulation, distortion, noise, effects + +--- + +## AudioEngine API + +**Production usage:** +```cpp +#include "audio/audio_engine.h" + +audio_init(); +static AudioEngine g_audio_engine; +g_audio_engine.init(); + +// Main loop +g_audio_engine.update(music_time); + +g_audio_engine.shutdown(); +audio_shutdown(); +``` + +**Methods:** +- `init()`: Initialize synth + tracker +- `update(music_time)`: Update music state, trigger patterns +- `shutdown()`: Cleanup +- `seek(time)`: Jump to timestamp (debug builds only) + +**Testing:** +```cpp +AudioEngine engine; +engine.init(); +engine.update(1.0f); +engine.shutdown(); +``` + +**Direct synth APIs** (performance-critical code only): +- `synth_register_spectrogram()` +- `synth_trigger_voice()` +- `synth_get_output_peak()` +- `synth_render()` |
