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.
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 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.
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.
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
Translates the spectrum upward by a constant frequency offset Δf in Hz.
3. Shift down
Translates the spectrum downward by a constant frequency offset.
4. Envelope only
Outputs the instantaneous magnitude of the analytic pair. An optional one-pole low-pass can smooth this envelope.
5. Phase rotate
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.
Channel routing
| Input | Controls used | Output |
|---|---|---|
| Mono | Left / odd controls | Mono |
| Stereo | Channel 1 = Left, Channel 2 = Right | Stereo |
| More than 2 channels | Odd channels = Left, even channels = Right | Same 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
| Preset | Left / odd | Right / even | Parameters set |
|---|---|---|---|
| Custom | User choice | User choice | Uses the values entered in the form. |
| L: Shift Up (+50) / R: Shift Down (-50) | Shift up 50 Hz | Shift down 50 Hz | Opposing constant-Hz translations. |
| L: Envelope Only / R: Hilbert Phase | Envelope only | Hilbert transform (−90 deg) | Contrasting analytic-signal outputs across channel groups. |
| Stereo Shift Up (+200Hz) | Shift up 200 Hz | Shift up 200 Hz | Same upward translation on both routing groups. |
| Stereo Hilbert Phase | Hilbert transform | Hilbert transform | Quadrature 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
| Control | Default | Behavior |
|---|---|---|
| Operation L | Shift up | Operation for mono and all odd-numbered channels. |
| Shift amount L | 500 Hz | Clamped to 0…Nyquist. |
| Phase angle L | 90° | Used only by Phase rotate. |
| Operation R | Shift down | Operation for all even-numbered channels. |
| Shift amount R | 500 Hz | Clamped to 0…Nyquist. |
| Phase angle R | 90° | Used only by Phase rotate. |
| Antialiasing | On | Pre-bandlimits the source before frequency translation. |
| Dry/Wet | 100% | Linear blend after all channels are reconstructed; clamped to 0…100%. |
| Safety peak | 0.99 | Attenuation-only output ceiling. 0 disables it. |
| Envelope low-pass | 0 Hz | Optional one-pole smoothing of Envelope-only output; 0 disables smoothing. |
| Play output | On | Plays the final Sound after processing. |
| Draw visualization | On | Draws waveform, spectrum, and summary panels. |
Exact no-op paths
- Dry/Wet = 0% copies the selected Sound sample-for-sample and skips processing and safety attenuation.
- Shift amount = 0 Hz returns an unchanged channel for Shift up/down.
- Phase angle = 0° returns an unchanged channel for Phase rotate.
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.
| Operation | Pre-bandlimit | Purpose |
|---|---|---|
| Shift up by Δf | Keep frequencies up to approximately Nyquist − Δf | Prevents translated energy from crossing Nyquist. |
| Shift down by Δf | Keep frequencies from approximately Δf upward | Prevents 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
- Sample rate: preserved.
- Sample count: preserved.
- Duration: preserved.
- Start time: preserved.
- Channel count: preserved.
- Processing phase: internally referenced to local Sound time, so a non-zero
xmindoes not change the modulation phase. - Normalization: none. Safety Peak only reduces gain when the result exceeds the ceiling.
Dry/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:
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:
- Input waveform — original Sound.
- Output waveform — final processed Sound after dry/wet and safety.
- Input spectrum — display spectrum up to
min(8 kHz, Nyquist). - Output spectrum — same display range for direct comparison.
- Summary — odd/even operations, shifts, phase angles, Wet percentage, antialias state, envelope low-pass, safety ceiling, duration, sample rate, and channel count.