@lanodan This is probably the only time I've seen someone doing something like this in C. I know this was something people did in BASIC back in the day but not C.
@lanodan @p I never heard of either technique. I only know of BASIC music because that was common before things like MIDI became mainstream. Famous video game composers like Konji Kondo and Tim Follin got their start by programming music in BASIC. The latter was famous for coming up with a technique to create the illusion of multi-channel audio on a computer that supported only one sound channel.