Cepstrum 2026-11-05
A cepstrum transforms a logarithmic spectrum back to a time-like coordinate. In the real-cepstrum convention for a discrete-time signal with Fourier transform ,The finite-data version uses an inverse discrete Fourier transform of the log-magnitude spectrum. Zeros require suitable assumptions or numerical regularization. Using log power instead of log magnitude changes the scaling, so the convention must be stated.[ref]
Spectral Audio Signal Processing by Julius O. Smith III. Spectral Envelope Extraction, Cepstral Windowing, equation 11.2
The usefulness comes from convolution: if , then the spectra multiply and their log magnitudes add, giving . Multiplicative source-and-filter effects become additive.
For an ideal echo filter , with real , expanding givesOther coefficients vanish. Thus an echo of amplitude delayed by eight samples gives coefficients at and at . Peaks reveal a delay that originally appeared as spectral ripples. The output coordinate is called quefrency. Keeping only its low-quefrency coefficients can smooth a spectral envelope, while retaining high-quefrency structure can expose repetitions.
Discrete-time Fourier transform 2026-11-05
The discrete-time Fourier transform represents a sequence indexed by integer sample number using a continuous, periodic frequency variable. In cycles per sample, the transform pair isFor an absolutely summable sequence, the sum converges uniformly to a continuous function, and the inverse formula follows by integrating the exponentials term by term. Their integral over one frequency period is one when the integer exponent is zero and zero otherwise. The primary text gives the same pair in angular frequency , where the inverse integral carries a factor .[ref]
Because , . Discrete time therefore does not imply discrete frequency: the DTFT is defined at every frequency in one period. With sampling frequency , a physical frequency corresponds to ; frequencies separated by integer multiples of give identical sampled complex exponentials. This is the basic frequency ambiguity behind aliasing.
An original two-sample example takes and all other entries zero. ThenAt zero frequency its value is one; at its magnitude is with phase ; at it vanishes. As the impulse response of a two-tap moving average, it preserves a constant input and removes an alternating-sign input. SciPy’s frequency-response definition evaluates precisely such sums when its denominator is one; its frequency units depend on the fs parameter.[ref]
For a finite record extended by zero, the unnormalized discrete Fourier transform gives samples of the same continuous function:Zero padding the record to length instead evaluates on a denser grid. It does not change or restore unobserved time samples. The rectangular window and Hann window demonstrate how the selected finite record shapes that continuous response.
Convergence assumptions matter. For when , zero otherwise, and , the geometric sum givesAt , that ordinary convergent-sum argument fails. Square-summable sequences admit an interpretation, while perpetual tones require a generalized interpretation; neither should be treated as an absolutely convergent version of the same series without stating the interpretation.
A useful check of numerical transform conventions is to evaluate a finite sum at arbitrary frequencies, compare its DFT-grid values with the FFT output, and repeat after zero-padding. This tests the exponent sign, normalization and frequency units independently. In a physical acquisition, one must also state sampling rate, record duration and the response before sampling; dense numerical frequency points alone do not validate those experimental inputs.
Julius O. Smith III 2026-11-05
Julius O. Smith III works on applications of digital signal processing to music and audio. Stanford identifies him as a professor emeritus of music and, by courtesy, electrical engineering, based at its Center for Computer Research in Music and Acoustics. His doctorate in electrical engineering was completed at Stanford in 1983.[ref]
His Spectral Audio Signal Processing by Julius O. Smith III explains how to extract a spectral envelope rather than treating every narrow harmonic peak as part of the slowly varying sound shape. One method uses a cepstrum: transform a logarithmic magnitude spectrum, retain an appropriate low-quefrency region, and transform back. This separates broad spectral shape from more rapidly oscillating harmonic detail under suitable assumptions.[ref]
Spectral Audio Signal Processing by Julius O. Smith III. Spectral Envelope Extraction, Cepstral Windowing and equations 11.2–11.3
For example, two played notes can have different harmonic spacings while sharing a similar broad envelope associated with the instrument's resonances. Distinguishing spacing from envelope helps explain why changing a note's pitch and changing its timbre are different signal-processing tasks. The separation is approximate: window choice and closely spaced spectral features affect what the method preserves.
Quefrency 2026-11-05
Quefrency is the independent coordinate of a cepstrum. When a cepstrum is obtained by an inverse Fourier transform of a logarithmic magnitude spectrum expressed as a function of frequency in hertz, its quefrency coordinate has units of time. A repeated pattern across frequency can consequently appear at the corresponding reciprocal spacing on the quefrency axis.[ref]
Spectral Audio Signal Processing by Julius O. Smith III. Spectral Envelope Extraction, Cepstral Windowing, equation 11.2: inverse transform of log spectral magnitude
For an -point discrete Fourier transform with sampling rate , bin spacing is . The inverse-transform coordinate at index has quefrencyWith , index 40 represents . An ideal echo delayed by 40 samples generates spectral ripples spaced by and a cepstrum contribution at that delay, with further contributions at its multiples. The cepstrum's real-valued convention can also produce mirrored peaks at negative quefrencies.
A quefrency peak is therefore not a -period oscillation of the original waveform by definition. Depending on the signal, it might reflect an echo or a fundamental frequency near . Interpretation requires a model of how the spectral repetition arose.
Spectral envelope 2026-11-05
A spectral envelope is a smooth description of the broad shape of a frequency spectrum, separating slowly varying magnitude structure from fine spectral peaks. It is an estimated representation, not a uniquely defined extra part of the Fourier transform. Smoothing scale, whether one smooths linear magnitude or log magnitude, and the estimation method all matter.[ref]
Spectral Audio Signal Processing by Julius O. Smith III. Spectral Envelope Extraction, Cepstral Windowing and examples
For a periodic signal passed through a linear time-invariant system, the harmonic line at has amplitude proportional to . The excitation sets the line spacing , while the filter's frequency response shapes their broad heights. Changing the fundamental frequency can therefore move the lines without moving the filter's resonant peaks. A spectral envelope aims to capture that broad shape; overly aggressive smoothing can erase meaningful resonances, while insufficient smoothing retains the individual harmonics.
