okay this is a shot in the dark but do any #DOS folks know anything about where one would start with actually authoring PC speaker sound effects?

@eniko I very very briefly looked into pc speaker music when I was trying to see how low bit you could go in the chiptune scene around 2011.

The tracker MONOTONE is written in pascal, which is a little fiddly, but it does pc speaker sounds in a slightly hardware-agnostic way.

https://github.com/MobyGamer/MONOTONE/tree/master

The source for the speaker output is here:

https://github.com/MobyGamer/MONOTONE/blob/master/MTSRC/MT_OUTP.PAS

I am not good at pascal, but my general understanding is that it reads the BIOS clock, waits for it to tick over once, then sends the note as a set frequency number to the memory address of the pc speaker. Then, on the next tick, it checks memory to see if it needs to send that same number to the speaker again or if it needs to set the speaker to a frequency that's impossible for it to make which results in it not making any noise at all.