I swear, I thought I was struggling with this for a very long time, but it turns out that it has only been 4 days since my last post.
I continued work on Wyngine, and reached the first milestone in audio synthesis: Generating sounds.
1/2 = change between sine and square wave
Q/A = increase/decrease frequency
E/D = increase/decrease volume
UP/DOWN = increase/decrease octave
ZSXCFVGBNJMK = piano notes (A, A#, B, ... G#)
It’s nothing fancy, and it probably isn’t optimised (you’ll likely hear pops, clicks and stutters)… But I’m happy that I finally understand a little bit about audio playback. I went down into the emulator development rabbit hole a little, and am truly amazed by all the work that some programmers put into emulating game hardware. Perhaps someday I can try writing my own emulator, but that’s something really far off in the future.
The next milestone is to introduce load MIDI files, and after that, to implement MIDI playback. If successful, I can probably produce extremely small-sized webgames; Because web games usually have large asset sizes (audio and graphic files). It’s something nice to dream about.