A high speed, digitally based, signal processing system which accepts directly coupled input data from a detector with a continuous discharge type preamplifier and produces a spectral analysis of the x-rays illuminating the detector. The system's principal elements are an analog signal conditioning section, a combinatorial logic section which implements digital triangular filtering and pileup inspection, and a microprocessor which accepts values captured by the logic section and uses them to compute x-ray energy values. Operating without pole-zero correction, the system achieves high resolution by capturing, in conjunction with each peak value from the digital filter, an associated value of the unfiltered signal, and using this latter signal to correct the former for errors which arise from its local slope terms. This correction greatly reduces both energy resolution degradation and peak centroid shifting in the output spectrum as a function of input count rate. When the noise of this correction is excessive, a modification allows two filtered averages of the signal to be captured and a corrected peak amplitude computed therefrom.