Hilbert Audio Processor — User Guide

Analytic-signal processing for quadrature transformation, single-sideband frequency translation, envelope extraction, and constant phase rotation, with independent odd/even channel routing.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 1.5 (2026) License: MIT License Repo: Praat AudioTools
Contents:

What this does

Hilbert Audio Processor builds a quadrature representation of the selected Sound and uses it for four related kinds of spectral/time-domain processing: a Hilbert transform, constant-Hz frequency translation, analytic-envelope extraction, and constant phase rotation. Each real channel is processed independently, then reconstructed into the original channel layout.

The practical idea: the original waveform supplies the real component x(t), while a Hilbert-transformed version supplies a quadrature component h(t). Together they provide a two-dimensional analytic representation from which the script can derive a shifted signal, an amplitude envelope, or a rotated phase projection.

The processor is offline. It preserves the source sample rate, sample count, start time, duration, and channel count. Mono uses the Left controls. In multichannel Sounds, odd-numbered channels use the Left controls and even-numbered channels use the Right controls.

Analytic signal and Hilbert transform

For each mono channel, the script computes an exact-length FFT with To Spectrum: "no". The quadrature spectrum is formed by multiplying positive-frequency bins by −j, then converting the spectrum back to a Sound.

Analytic pair: real part = x(t) quadrature part = h(t) = Hilbert{x(t)} Analytic signal: a(t) = x(t) + j h(t) Envelope: A(t) = sqrt(x(t)^2 + h(t)^2)

DC is removed from the Hilbert component. For an even sample count, the Nyquist bin is also removed because it has no unique quadrature partner. For an odd sample count, the final FFT bin is a normal positive-frequency bin and is retained.

Exact-length FFT: v1.5 does not zero-pad the analysis transform. This keeps the reconstructed channel at the original sample count and avoids adding a separate padded time region around the source.

Five operations

1. Hilbert transform (−90 deg)

Outputs the quadrature component itself. Positive-frequency components are rotated by −90°. This is the operation formerly labelled “No shift”; v1.5 names the operation according to what it actually returns.

2. Shift up

y(t) = x(t) cos(2π Δf t) - h(t) sin(2π Δf t)

Translates the spectrum upward by a constant frequency offset Δf in Hz.

3. Shift down

y(t) = x(t) cos(2π Δf t) + h(t) sin(2π Δf t)

Translates the spectrum downward by a constant frequency offset.

Frequency translation is not conventional pitch shifting. Every spectral component moves by the same number of hertz, so harmonic ratios generally change. A 100 Hz partial and a 200 Hz partial shifted upward by 50 Hz become 150 Hz and 250 Hz, not a transposed 1:2 pair.

4. Envelope only

A(t) = sqrt(x(t)^2 + h(t)^2)

Outputs the instantaneous magnitude of the analytic pair. An optional one-pole low-pass can smooth this envelope.

5. Phase rotate

y(t) = x(t) cos(θ) - h(t) sin(θ)

Applies one constant phase rotation to the positive-frequency spectrum. In v1.5 this is computed directly in the frequency domain. DC, and Nyquist when present, are scaled by cos(θ) because their Hilbert component is zero.

Dry/wet and phase rotation: mixing a fixed phase-rotated copy with the dry signal changes overall phase and gain, but it does not create a frequency-dependent phaser or flanger response by itself. The phase angle is constant across frequency.

Channel routing

InputControls usedOutput
MonoLeft / odd controlsMono
StereoChannel 1 = Left, Channel 2 = RightStereo
More than 2 channelsOdd channels = Left, even channels = RightSame number of channels

Every channel is extracted, processed independently, and recombined in its original order. The Right controls are ignored for a mono source.

Presets

PresetLeft / oddRight / evenParameters set
CustomUser choiceUser choiceUses the values entered in the form.
L: Shift Up (+50) / R: Shift Down (-50)Shift up 50 HzShift down 50 HzOpposing constant-Hz translations.
L: Envelope Only / R: Hilbert PhaseEnvelope onlyHilbert transform (−90 deg)Contrasting analytic-signal outputs across channel groups.
Stereo Shift Up (+200Hz)Shift up 200 HzShift up 200 HzSame upward translation on both routing groups.
Stereo Hilbert PhaseHilbert transformHilbert transformQuadrature output on all channels.

Preset values override the relevant operation and shift controls. Global controls such as Dry/Wet, Antialiasing, Safety Peak, Envelope Low-pass, playback, and visualization remain available.

Controls

ControlDefaultBehavior
Operation LShift upOperation for mono and all odd-numbered channels.
Shift amount L500 HzClamped to 0…Nyquist.
Phase angle L90°Used only by Phase rotate.
Operation RShift downOperation for all even-numbered channels.
Shift amount R500 HzClamped to 0…Nyquist.
Phase angle R90°Used only by Phase rotate.
AntialiasingOnPre-bandlimits the source before frequency translation.
Dry/Wet100%Linear blend after all channels are reconstructed; clamped to 0…100%.
Safety peak0.99Attenuation-only output ceiling. 0 disables it.
Envelope low-pass0 HzOptional one-pole smoothing of Envelope-only output; 0 disables smoothing.
Play outputOnPlays the final Sound after processing.
Draw visualizationOnDraws waveform, spectrum, and summary panels.

Exact no-op paths

Antialiasing for frequency translation

Constant-Hz translation can push energy beyond a valid spectral boundary. When Antialiasing is enabled, v1.5 pre-filters the exact-length spectrum before the quadrature modulation.

OperationPre-bandlimitPurpose
Shift up by ΔfKeep frequencies up to approximately Nyquist − ΔfPrevents translated energy from crossing Nyquist.
Shift down by ΔfKeep frequencies from approximately Δf upwardPrevents translated positive-frequency energy from crossing below 0 Hz.

The script uses Praat's compiled Hann-band filter with a transition width of approximately one millionth of an FFT bin. At sampled FFT bins this behaves effectively like the intended discrete 0/1 mask while avoiding the much slower interpreted spectral Formula used in earlier versions.

Output behavior

Dry/Wet

output = Wet × processed + Dry × original Wet = Dry_wet_percent / 100 Dry = 1 - Wet

The blend is linear and is applied only after all processed channels have been reconstructed.

Envelope smoothing

When Envelope low-pass is above 0 Hz, the analytic magnitude is smoothed by a first-order one-pole low-pass:

alpha = exp(-2π fc / fs) y[n] = (1-alpha) x[n] + alpha y[n-1]

The parameter therefore represents an actual cutoff frequency in hertz, not an arbitrary smoothing amount.

Visualization

When enabled, the script draws the standardized AudioTools figure:

For multichannel Sounds, the two spectrum panels use a mono display conversion only for visualization. The actual audio processing remains independent per channel and preserves the original multichannel structure.