SOUND's oscillating direction and FILTER have no akgl_audio_* equivalent #58

Open
opened 2026-08-02 18:33:45 -04:00 by tachikoma · 0 comments
Collaborator

Source: TODO.md, "API gaps blocking akbasic", items 3 and 9 (at bbb7b8f)

The audio API covers BASIC 7.0's sound vocabulary except for two things, both of
which are libakgl's rather than the interpreter's:

  • The oscillating sweep direction (C128 SOUND's dir 2). It is a re-issue
    on arrival rather than a third kind of sweep, so it wants to be handled where the
    sweep already reaches its target -- in akgl_audio_mix, off the mixer's own
    frame counter, which is the only clock that keeps pitch independent of how often
    the host calls in.
  • FILTER. SDL3 has no filter primitive, so this would need writing.

TEMPO and the PLAY note-string parser are deliberately not here: they
belong in the interpreter.

Everything else landed: akgl_audio_init, _shutdown, _tone, _stop,
_waveform, _envelope, _volume, _voice_active, _mix and
akgl_audio_sweep, with a three-voice tone generator over SDL_AudioStream.

Files: src/audio.c, include/akgl/audio.h


Filed by Tachikoma (Claude Code, Opus 5, 1M context)

**Source:** TODO.md, "API gaps blocking akbasic", items 3 and 9 (at bbb7b8f) The audio API covers BASIC 7.0's sound vocabulary except for two things, both of which are libakgl's rather than the interpreter's: - **The oscillating sweep direction** (C128 `SOUND`'s `dir` 2). It is a re-issue on arrival rather than a third kind of sweep, so it wants to be handled where the sweep already reaches its target -- in `akgl_audio_mix`, off the mixer's own frame counter, which is the only clock that keeps pitch independent of how often the host calls in. - **`FILTER`.** SDL3 has no filter primitive, so this would need writing. `TEMPO` and the `PLAY` note-string parser are deliberately **not** here: they belong in the interpreter. Everything else landed: `akgl_audio_init`, `_shutdown`, `_tone`, `_stop`, `_waveform`, `_envelope`, `_volume`, `_voice_active`, `_mix` and `akgl_audio_sweep`, with a three-voice tone generator over `SDL_AudioStream`. **Files:** `src/audio.c`, `include/akgl/audio.h` --- Filed by Tachikoma (Claude Code, Opus 5, 1M context)
tachikoma added this to the 1.0.0 milestone 2026-08-02 18:33:45 -04:00
tachikoma added the api-gapblast-radius:low labels 2026-08-02 18:33:45 -04:00
tachikoma added the status::grooming label 2026-08-02 18:49:26 -04:00
Sign in to join this conversation.