They are composed on trackers and the mod files are more akin to a MIDI file than they are “waveforms and shit”. At least not if you talk about “waveforms” in the PCM sense of the term.
The evolution of these mod files is an interesting one. Epic were the ones who most leaned into this for commercial uses. Games like the original Unreal and Jazz Jackrabbit 2 had some awesome sounding music and was the same mod files.
As a much younger nerd and hobby hacker too, I always wondered how those keygens were so small in size yet sounded so modern. Took years before I learned about trackers. I was pretty late to the game on that one.