Digital spectral analysis