brb, creating Malbolge.NET.
The main issue with seeing the real implementation in this case (and it's one that I'm coming to realize now that I'm trying to change synths) is that WaveGen was built around BeepMap, not vice versa. As such, there is a ton of cruft in the synth itself to support the program. Essentially, the program and WaveGen work together to act as a sequencer. The program arranges the note and rest events and WaveGen processes the lists. Due to the way it's designed, it would be practically impossible to make the program work in real-time. The render-then-play process is required to make it work.
Because of all that, I decided to abandon bringing Synthia to the program and instead building that up as its own engine. I made sure to put "Synthia is not a sequencer" in my design docs twice to remind myself of that. I suppose it wouldn't be a terrible program to learn on, but I don't consider it to be a good way to write a synthesizer. A simple wave generator? Sure. A softsynth? Nah.
I'm starting on a new project from the bottom. Synthia is going to handle mixing, plugin chains, and managing note events that are passed to it by programs. The plugins will work similarly to Buzz Tracker, starting with a generator plugin, going through any number of effect plugins, and ending with output. It won't have any output aside from raw stream data, but I'm going to write a program that does it for the sake of testing. It's going to work per-sample, so it'll be possible to actually stream Synthia's output, something that isn't possible with BeepMap/WaveGen. Furthermore, all audio processing will be done with double precision floats and converted to a desired bit depth. I've found that dealing directly with integers is nothing short of a pain in the ass, particularly when it comes to dealing with peaks. -1.0 and 1.0 make a hell of a lot more sense. Plus, it'll be much easier to actually alert the calling program about clipping, since we're not dealing with maximum values anymore.
Whew, I'm kind of excited about this. Ever since I've taken up what I like to call the "STFU and code" technique (namely, not once thinking about failing -- I used to obsess over maybes and wind up never getting anything done), I've been more driven to do this type of shit than ever.
With regards to comments, I'm a bit sporadic as well. I distinctly recall doing actual work within a "for" statement (not inside of a block, but actually in the for statement, as the last parameter) and not really documenting it. I'll have to look for that one. Then there was always the comment I left when I hacked in multithreading support to a VB.NET program that I wrote a while ago. It basically did nothing but talk about how awful and hackish the code was. Oh well, both cases wound up working quite well.