I once wrote a Z-80 assembler spectrum analyzer for a TRS-80 model III, using the cassette audio in port. This was a simple off/on gate that sensed voltage. In effect, it was a 1-bit ADC. The response probably only really detected up to about 1200 Hz. It was lame, and simply counted the cycles between transitions of the in port, and filled the appropriate frequency "bin". Tweaking the decay values resulted in something that actually did a job as a crude frequency analyzer.

Oh yeah, I also once wrote a little ditty on that TRS-80 that recorded 48 seconds or so of 8 KHz 1-bit audio (remember, we only have 48K of RAM), and then would play it backwards.