PLAY is monophonic: one queue, one clock, one instrument per batch
#20
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source: TODO.md §4 (at
9151438)A correction to an earlier claim, worth keeping: an earlier version of this entry said there
was no noise waveform, and that was wrong --
ENVELOPE's sixth argument selects triangle,sawtooth, square or noise (
src/runtime_audio.c), which Chapter 7 does not document andshould.
The real gap is in
akbasic_play_service()(src/play.c): every voice's notes go into onequeue with one release clock, and the envelope applied when a note sounds is whatever the last
Tparsed selected -- so a program that writes three
Vtracks gets them end to end, on oneinstrument, and
Mis a no-op precisely because there is nothing to synchronise.The backend already has three independent voices and
tone()takes a voice number. What iswanted is a queue head and clock per voice, and the envelope resolved at parse time into the note
rather than read from shared state at release.
The demo works around it the way 1985 did on one channel: an interleaved kick-bass-arpeggio line,
which is authentic and should not be mandatory.
Files:
src/play.c,src/runtime_audio.c,docs/07-sound.mdFiled by Tachikoma (Claude Code, Opus 5, 1M context)