Skip to content

Spectral Processing

  • lpifft~ lpifft~ performs an inverse FFT with a rectangular low-pass filter, intended for anti-aliased dynamic wavetable synthesis.
  • splitspec~ splitspec~ is an FFT-based spectral splitter that divides a spectrum into N separate parts, supporting applications such as multichannel spatialization.
  • piwrap~ piwrap~ wraps an input phase signal into the range from -pi to pi.
  • spec2_1p1z_time~ spec2_1p1z_time~ applies feedback to a spectrum, as shown after rfft~ in the help patch.
  • complex-mod~ complex-mod~ treats two input signals as the real and imaginary parts of a complex-valued signal and multiplies them by a sinusoid to shift all frequencies up or down by a specified amount in Hz.
  • phasedelta~ phasedelta~ calculates the phase deviation between successive FFT frames, converting spectral phase data at its inlet into phase-delta data at its outlet.
  • phasetofreq~ phasetofreq~ converts phase values to frequency values for each spectral bin.
  • spec2_matrix_bundle_stat~ spec2_matrix_bundle_stat~ multiplies an n-dimensional signal vector by a dynamic sparse matrix whose columns each contain at most one value of one, routing each input to a selected output or to none.
  • spec2_mul_scalar~ spec2_mul_scalar~ multiplies a signal spectrum by a scalar value, like spec2*s~, operating on (block size / 2 + 1) bins.
  • fx.rb_pitchshift~ fx.rb_pitchshift~ is a Rubber Band-based audio effect that pitch-shifts an input signal, outputting the transposed signal.
  • magfreq_analysis~ magfreq_analysis~ analyzes an input signal to estimate its instantaneous amplitude and frequency spectrum, with outputs inspectable for a selected FFT bin.
  • spec2_sum~ spec2_sum~ accumulates the sum of a spectrum over its (blocksize/2) + 1 bins.
  • sonogram~ sonogram~ records an FFT-based sonogram from a loaded sound, allows its frequency-domain data to be modified, and plays the resynthesized result.
  • fx.pitchshift~ fx.pitchshift~ is a simple signal pitch shifter based on two delay lines, intended to transpose incoming audio by a specified number of semitones.
  • binmix~ binmix~ mixes the values from inlet 2 for all matching values received at inlet 1, serving as a bin mixer for paired signal values.
  • binmin~ binmin~ finds the minimum sample value in signal block a and outputs that value, the associated value from signal block b, and their shared index.
  • fd_blackman~ fd_blackman~ computes a Blackman window using signals and loads it into a named array for use by fd_windows.
  • freqshift~ freqshift~ shifts an input signal’s frequency by ring modulation, producing separate down-shifted and up-shifted signal outputs.
  • bdft bdft is a control abstraction that sets the decay time for bdiag~.
  • espectro espectro is a spectral visualizer for displaying the spectrum of an input signal.
  • audiofreeze audiofreeze takes an audio signal and, when triggered by its FREEZE control or trigger input, captures a snapshot of the spectral field and recreates it through resynthesis.
  • pd_spectral_toolkit pd_spectral_toolkit is an overview of the Pd Spectral Toolkit, a collection of objects for frequency-domain processing, including spectral analysis and resynthesis, complex arithmetic, conversions, comparisons, and utilities.
  • amptomag~ amptomag~ converts amplitude values to magnitude values.
  • pol2rec~ pol2rec~ converts polar-coordinate signals back into rectangular-coordinate signals, providing two signal inlets and two signal outlets.
  • bwin~ bwin~ multiplies each signal block by a window, supporting block-oriented spectral processing such as applying analysis and synthesis windows around bfft~ and ibfft~.
  • spec2_clip_min~ spec2_clip_min~ restricts a signal so that its values do not fall below a minimum limit, similarly to max~.
  • pp.fft-partconv-st~.s pp.fft-partconv-st~.s performs stereo partitioned FFT convolution and runs its CPU-heavy DSP in a pd~ subprocess.
  • binmax~ binmax~ finds the maximum sample value in signal block A and outputs that value, the corresponding value from signal block B, and their shared index.
  • spec2_clip_max~ spec2_clip_max~ restricts a spectral signal so that its values do not exceed a maximum limit, functioning like min~.
  • pp.fft-timbre~ pp.fft-timbre~ processes an input signal using an FFT-based bin-reordering function, with controls including shift, rotation, curves, breakpoints, makeup gain, and dry/wet mix.
  • pitchshifter pitchshifter shifts the pitch of an input signal and provides a dry/wet control for blending the processed and original signals.
  • bdfts bdfts is a control abstraction that sets oscillator frequency for bdiag~.
  • valleys~ valleys~ finds valleys in spectral data received at its first inlet and outputs the valley data from its first outlet.
  • fd_dataHann fd_dataHann applies a Hann window to an array in a data structure.
  • spec2_tabreceive_enable~ spec2_tabreceive_enable~ receives a spectrum from a named table while allowing table reading to be enabled or disabled.
  • permut~ permut~ randomly permutes the samples in a signal block and is mainly intended for shuffling spectral data.
  • magtodb~ magtodb~ converts magnitude values to dB-FS decibel values.
  • spec2_block_delay~ spec2_block_delay~ delays a spectrum by approximately one block while copying only (blocksize/2 + 1) samples.
  • fx.pitchshift_s~ fx.pitchshift_s~ is the signal-control version of fx.pitchshift~, shifting an input signal’s pitch by a number of semitones supplied to its second inlet.
  • pp.fft-freeze-st~ pp.fft-freeze-st~ freezes an incoming signal when it receives a bang and outputs the frozen signal.
  • fx.vocoder~ fx.vocoder~ is a simple vocoder that processes a modulation signal with an excitation/carrier signal.
  • cartodb~ cartodb~ converts Cartesian real and imaginary signal values to dB-FS decibel values.
  • pp.fft-timbre-st~ pp.fft-timbre-st~ is the stereo version of pp.fft-timbre~, processing left and right signals with a configurable FFT bin-reordering function.
  • pp.freqshift-st~ pp.freqshift-st~ is the stereo version of pp.freqshift~, shifting input signals in frequency by a specified number of hertz using single-sideband modulation and a quadrature transform.
  • +spectralgate +spectralgate~ is a spectral version of a standard gate, using a threshold shape to control gating across the spectrum.
  • frequor~ frequor~ is a frequency-domain phasor for traversing spectra.
  • +morphfilter +morphfilter~ is a basic spectral filter whose response can be drawn and stored in two arrays.
  • reactor reactor is a musical sound-processing patch for operations including mixing, cross-synthesis, fragmentation, morphing, and convolution.
  • peaks~ peaks~ finds peaks in the spectral data received at its first inlet, outputting those peaks from outlet 1 and the associated data from its second spectral-data inlet through outlet 2.
  • binmonitor~ binmonitor~ outputs a float representing the value of a specific bin in incoming spectral data.
  • bthresher~ bthresher~ extends the thresher~ model by providing independent threshold and damping factors for individual FFT bins, enabling bin-level feedback control.
  • cartopolar~ cartopolar~ converts Cartesian coordinates to polar coordinates, taking the real value at its first inlet and the imaginary value at its second.
  • pp.fft-gate-st~ pp.fft-gate-st~ is the stereo version of pp.fft-gate~, processing left and right signals with an FFT noise gate and providing separate denoised and noisy-part stereo outputs.
  • pp.fft-profile~ pp.fft-profile~ is an esoteric spectral denoiser/vocoder that filters one signal using a spectral mask retrieved from a second signal, outputting both the masked signal and the residual.
  • pp.fft-partconv~ pp.fft-partconv~ performs partitioned impulse-response convolution, outputting both the convolved signal and a dry/wet signal.
  • spec2_powtodb~ spec2_powtodb~ converts the power values of a signal spectrum to dB, like powtodb~.
  • soundtouch~ soundtouch~ provides time-stretching and pitch-shifting using Olli Parviainen’s SoundTouch library.
  • ui.spectroscope~ ui.spectroscope~ is a GUI object for displaying the spectrum of an incoming signal.
  • fd_hann~ fd_hann~ calculates a raised-cosine (Hann) window into a named array and is used by fd_windows.
  • icep~ icep~ computes a backward cepstrum using normalized FFT/IFFT objects.
  • array.convolve array.convolve performs FFT convolution on a target array using an impulse-response array.
  • pp.spectrum~ pp.spectrum~ is a spectrum analyser that accepts a signal in its single signal inlet.
  • spec2_rmstodb~ spec2_rmstodb~ converts the RMS values of a signal spectrum to decibels.
  • cartophase~ cartophase~ converts Cartesian coordinates to phase values.
  • hilbert~ hilbert~ outputs a phase-quadrature version of its input signal.
  • pp.fft-partconv~.s pp.fft-partconv~.s performs partitioned impulse-response convolution and runs its CPU-heavy DSP in a subprocess using pd~.
  • spec2_abs~ spec2_abs~ takes the absolute value of a signal spectrum.
  • binsort~ binsort~ sorts spectral dataset A by its left-inlet values, in either ascending or descending order.
  • pp.fft-freeze~ pp.fft-freeze~ freezes an incoming audio signal when it receives a bang and outputs the frozen signal.
  • codepend~ codepend~ is a classic block-convolution processor that combines two input signals.
  • spec2_dbtopow~ spec2_dbtopow~ converts the dB values of a signal spectrum to power, like dbtopow~.
  • spec2_sqrt~ spec2_sqrt~ takes the square root of each value in a signal spectrum, like sqrt~, using a spectrum containing blocksize/2 + 1 bins.
  • pp.fft-pitchshift~ pp.fft-pitchshift~ uses a phase-vocoder implementation to transpose an input signal by a specified number of cents, outputting the transposed signal.
  • cartoamp~ cartoamp~ converts Cartesian coordinates—real values at inlet 1 and imaginary values at inlet 2—into amplitude values at its outlet.
  • freqtophase~ freqtophase~ converts frequency values to phase values for each bin, producing phase values from -pi to pi.
  • spec2_add_scalar~ spec2_add_scalar~ adds a scalar value to a signal spectrum and is equivalent to spec2+s~.
  • pp.freqshift~ pp.freqshift~ is a single-sideband modulation frequency shifter that shifts an input signal by a frequency specified in hertz.
  • freqtocar~ freqtocar~ converts magnitude and frequency pairs into Cartesian coordinates, outputting real values from its first outlet and imaginary values from its second.
  • spec2_add~ spec2_add~ adds two signal spectra, each containing (blocksize/2 + 1) bins.
  • freqshifterd~ freqshifterd~ is a frequency shifter with a phase input.
  • cep~ cep~ computes a forward complex cepstrum using normalized FFT/IFFT objects.
  • polartocar~ polartocar~ converts polar coordinates to Cartesian coordinates.
  • cartofreq~ cartofreq~ converts Cartesian spectral coordinates, supplied as real and imaginary values, into magnitude and frequency outputs.
  • magtrim~ magtrim~ zeroes spectral data whose magnitude falls outside a specified lower and upper range, providing trimmed outputs for two spectral data inputs.
  • fd_specplot~ fd_specplot~ displays the spectrum of an input signal.
  • fx.shimmer~ fx.shimmer~ is a stereo shimmer reverb effect that combines reverberation with pitch shifting.
  • phaseaccum~ phaseaccum~ calculates running sums of the phases of successive FFT frames, producing accumulated phase data from spectral phase data.
  • cartomag~ cartomag~ converts Cartesian coordinates into magnitude values.
  • pp.fft-partconv-st~ pp.fft-partconv-st~ is the stereo version of pp.fft-partconv~, convolving stereo input with stereo impulse responses and outputting left and right convolved signals.
  • bmatrix~ bmatrix~ multiplies a signal block by an arbitrary matrix and is mainly intended for spectral processing.
  • fd_critical fd_critical computes critical bandwidth values for use with fd_bark, using the documented Bark-to-frequency relationships.
  • spec2_sub~ spec2_sub~ subtracts two signal spectra, each containing (blocksize/2 + 1) bins.
  • freqtopolar~ freqtopolar~ converts magnitude and frequency pairs into polar coordinates, outputting magnitude and phase in the range −π to π.
  • binindex~ binindex~ outputs ascending sample-index values from zero through one less than the current block size.
  • pthng~ pthng~ is intended to shift upward through harmonics by multiplying a cosine wave by a multiple Hann-windowed pulse train.
  • freqshifter~ freqshifter~ performs single-sideband modulation to shift the frequency of an input signal.
  • pp.fft-gate~ pp.fft-gate~ is a spectral gate for reducing noise in an input signal, with separate signal outlets for the denoised and noisy parts.
  • sgvisu~ sgvisu~ is a spectrogram signal visualizer that communicates its inputs to an external process.
  • fx.freqshift~ fx.freqshift~ is a frequency shifter for single-sideband ring modulation.
  • bdiag~ bdiag~ is a parallel block-diagonal state-space model intended to filter spectral data.
  • spec2_stretch~ spec2_stretch~ stretches a spectrum of (blocksize/2 + 1) bins by a specified factor.
  • pp.fft-pitchshift-st~ pp.fft-pitchshift-st~ is the stereo version of pp.fft-pitchshift~, using Pd’s phase-vocoder implementation to transpose left and right input signals by a value in cents.
  • spec2_mul~ spec2_mul~ multiplies two signal spectra, like spec2*~.
  • array.window array.window fills a named array with a selected window function, such as Hann, Hamming, Blackman, triangular, or Welch.
  • harmprod~ harmprod~ calculates the harmonic product spectrum of an input raw spectrum.
  • splitbank~ splitbank~ is a tunable spectrum splitter that divides an incoming sound into a configurable number of sub-spectra and provides separate signal outputs.
  • rec2pol~ rec2pol~ converts two signal inputs representing rectangular coordinates into two signal outputs representing polar coordinates, such as converting the sine and cosine outputs of rfft to phase and magnitude.
  • spec2_shift~ spec2_shift~ shifts a spectrum of blocksize/2 + 1 values to the left.
  • fd_bark~ fd_bark~ converts an incoming magnitude-spectrum signal to a Bark-scaled signal.
  • constantq~ constantq~ performs constant-Q spectral analysis of an audio signal over configurable frequency bands, with results available as a list or in a buffer.
  • chair.feedback-cancellation~ chair.feedback-cancellation~ helps reduce acoustic feedback when sound from speakers is picked up by a microphone by applying a uniform frequency shift rather than a pitch shift.
  • convolver~ convolver~ performs non-real-time convolution of a source sound array with an impulse-response array, for purposes such as applying reverberation.
  • magtoamp~ magtoamp~ converts magnitude values at its first inlet into amplitude values at its outlet.
  • spec2_dbtorms~ spec2_dbtorms~ converts the dB values of a signal spectrum to RMS values.
  • spec2_tab_conv~ spec2_tab_conv~ convolves a spectrum of size block size/2 + 1 with values from a table.
  • freqsieve~ freqsieve~ assigns spectral frequency data to the proper bins, taking magnitude and frequency signals as its first two inputs and outputting the reassigned magnitude and frequency signals.
  • arrayfilt~ arrayfilt~ filters a sound using the contents of an array as a magnitude-spectrum filter, demonstrated with FFT primitives.
  • bintrim~ bintrim~ zeroes spectral data outside a specified range of bins, producing trimmed versions of two spectral inputs at its two outlets.
  • +spectralcompand +spectralcompand~ is a spectral version of a standard compander, intended to control compression across a signal’s spectrum.
  • spec2_tabreceive~ spec2_tabreceive~ receives a spectrum from a table named by its symbol argument.
  • polartofreq~ polartofreq~ converts polar-coordinate magnitude and phase signals into magnitude and frequency signals.
  • spec2_1p1z_freq~ spec2_1p1z_freq~ filters a spectrum with a one-pole, one-zero IIR filter, first from left to right and then from right to left.
  • partconv~ partconv~ is a partitioned-convolution signal external that uses an array containing an impulse response, with the array and partition size supplied as arguments.
  • pp.fft-profile-st~ pp.fft-profile-st~ is a stereo spectral denoiser/vocoder that filters left and right input signals using a mask retrieved from a second stereo signal pair.
  • peakit~ peakit~ processes spectral signals from rfft~ and reports detected peaks through two list outlets.
  • fx.ringmod~ fx.ringmod~ is a ring modulator effect that processes a carrier signal using an internal modulator or a modulator supplied to its second inlet.
  • hoa.fx.dephaser~ hoa.fx.dephaser~ is an FFT dephaser intended for processing HOA harmonic signals.
  • plot.response~ plot.response~ calculates a signal’s amplitude/frequency and phase responses to an impulse, with outputs suitable for array.plot~ or ui.plot~.
  • mtx_window mtx_window creates a matrix row vector containing a window function, specified by a window type and length.