Audo recording on Arduino Uno: "Skips" & "Pops" answered.

Well, since writing the above last night, I've tried some experiments that improved the situation:

One was the removal of the line "myFile.flush();". This line repeatedly updated the file being saved to the SD Disk, but the time that took was the major cause of the "skips". The line is not necessary anyway, as long as you save the file at the end by grounding input pin 3. After a moment, doing so executes the line "myFile.close();". This is totally necessary, because with neither flushing nor closing, you'll end up with an empty file.

In addition, I placed a 220 mfd capacitor across 5v and ground at the point where I have two resistors creating the 2.5v bias voltage for the analog input A0. This removed nearly all the "buzzing" you hear in my demo file above.

Thinking lack of synchronization between the interrupt service routine (ISR) and the main loop might be the problem, I tried placing EVERYTHING inside the ISR procedure. This wasn't a good answer since it delayed the timing between interrupts, resulting in slow recording that played back at normal speed sounding like the Chipmunks! It also make the pitch shaky/uneven.

There are still random "clicks", but later when I have the op-amp and start recording at full volume, I think the clicks will be quiet enough by comparison to be acceptable, so I'm satisfied with the sound now as it is.

BUT.... If anyone as ideas how I can improve the sound more, I'd love to give your inspiration a try!

============================

It's evening again now, and I found an article, Arduino Audio Output, that explains pops and snaps as being "discontinuities" in timing between the changes to bits and bytes within the AVR's digital processing. In other words, not everything can happen all at exactly the same time, causing spikes before other bits and bytes catch up to match the earier bits and bytes. The result is the sharp spikes like those seen in this photo from that article:

The answer, it explains, is to use external RC (capacitor and resistor) high-pass filtering to remove them.