Also, I have been using OpenMPT to create my first .xm files. It has been such a joy. I noticed Trapper used it, so it seemed like the right thing to do. Yes, the .xm created is repetitive, brief, and not the most ambitious or original-sounding tune in the world, but I think it sets the right mood. Thank you, freesound.org.
The software library I've written over the past years includes a simple procedural synthesizer along with a simple music string parser. (Think of the "play" statement in Basic, except with the ability to change tracks, instruments, and volume settings.) In writing the synthesizer functions, my most useful sources were the Andy Farnell website (http://obiwannabe.co.uk/tutorials/html/tutorials_main.html), a tiny speech synthesizer included with the digital magazine Hugi 24, and the Karplus-Strong algorithm. I have very minimal requirements of sound, so I have read far too much information in the meantime on sound processing. Convincing the unfatigued ear is all that matters - "just do whatever works" has been my lesson.