Spectral Panner — User Guide
Frequency-dependent equal-power stereo panning with a smooth spectral crossover.
What this does
Spectral Panner distributes a sound across stereo according to frequency. The input is first converted to a single mono working source. Its complex spectrum is then copied into left and right branches, and each frequency bin receives a complementary pair of equal-power gains.
Below the crossover region, the spectrum is biased toward one side; above it, the bias moves to the opposite side. Inside the crossover region, the pan position moves smoothly between the two sides with a raised-cosine transition. Pan depth determines how far the low and high ends move away from the centre.
Quick start
- Select exactly one Sound object in Praat.
- Run
Panning_filter.praat. - Choose a preset or select Custom.
- Set the Crossover frequency and Crossover width.
- Choose whether low frequencies begin on the Left or Right.
- Set Pan depth: 0 keeps every frequency centred; 1 allows the low and high ends to reach opposite sides.
- Enable Draw response if you want to inspect the actual left/right gain curves.
Signal flow
1. Prepare the working source
The selected Sound is converted to mono when it contains more than one channel. A mono input is copied directly. Processing is therefore based on one common spectral source, and the final output is always stereo.
2. Transform the complete source to a complex spectrum
The mono source is sent to Praat's Sound: To Spectrum... with Fast = yes. In Praat, this means that zero samples may be appended so the transform length becomes a power of two; it does not apply a Hann analysis window.
3. Apply frequency-dependent stereo gains
The full complex spectrum is copied into left and right branches. Each branch is multiplied by a real gain function, so both the real and imaginary components are scaled together and the phase of each retained frequency component is preserved.
4. Reconstruct and crop
Each modified Spectrum is converted back to Sound. Any zero-padding introduced by the fast transform is removed by extracting exactly the original duration, and the two reconstructed channels are combined into one stereo Sound.
5. Restore time and apply safety attenuation
The original start time is restored. If the resulting stereo peak exceeds 0.99, both channels are attenuated by the same factor so the peak becomes 0.99. Quieter outputs are never boosted.
Equal-power spectral panning
The transition is defined by three frequencies:
For Low frequencies to Left, the pan position moves from -depth at the low end to +depth at the high end. Choosing Right reverses that direction.
This is the constant-power property used by the processor. At the stereo centre, both channel gains are sqrt(0.5) (about −3.01 dB each). At Pan depth = 0, every frequency is at that centre position. At full depth, frequencies outside the transition can reach one channel with gain 1 and the other with gain 0.
Presets
| Preset | Crossover | Width | Depth |
|---|---|---|---|
| Custom | User value | User value | User value |
| Subtle Split | 800 Hz | 150 Hz | 0.70 |
| Classic Mid | 500 Hz | 100 Hz | 1.00 |
| Deep Bass Left | 200 Hz | 50 Hz | 1.00 |
| High Split | 2000 Hz | 300 Hz | 0.80 |
| Wide Separation | 600 Hz | 400 Hz | 1.00 |
Parameters
| Parameter | Default | Meaning |
|---|---|---|
| Preset | Custom | Loads one of five predefined crossover/depth combinations, or leaves the manual values active. |
| Crossover frequency (Hz) | 500 | Nominal centre of the spectral transition. Must be above 0 Hz and below Nyquist. |
| Crossover width (Hz) | 100 | Width of the raised-cosine transition before clipping at DC/Nyquist. |
| Low frequencies to | Left | Chooses the low-frequency side; the high-frequency direction is automatically the opposite. |
| Pan depth | 1.0 | 0 = centre at all frequencies; 1 = maximum opposite-side separation. Values outside 0–1 are clamped. |
| Draw response | On | Draws the actual left/right channel-gain curves and processing summary. |
| Play result | On | Plays the final stereo object after processing. |
Input & output behavior
| Property | Behavior |
|---|---|
| Input selection | Exactly one Sound object. |
| Channel handling | Any input with more than one channel is converted to one mono working source. The output is always stereo; the original stereo or multichannel image is intentionally replaced. |
| Sample rate | Preserved. |
| Duration | Preserved exactly after removing FFT zero-padding. |
| Start time | The original xmin is restored. |
| Output name | <original>_specpan |
| Output level | Natural result unless peak exceeds 0.99; then attenuation-only safety is applied. There is no upward normalization. |
| Randomness | None. The processor is deterministic for the same source and settings. |
sqrt(0.5) gain. This is the centre position of the equal-power pan law, not a unity-gain dual-mono copy.Visualization
When Draw response is enabled, the Picture window shows the actual frequency-dependent gains used by the processor.
- Left and Right response curves — linear channel gain from DC to Nyquist.
- Horizontal reference —
sqrt(0.5), the equal-power centre gain. - Transition markers — actual low and high edges after clipping to the valid spectral range.
- Nominal crossover marker — the requested crossover frequency.
- Summary strip — crossover, transition band, depth, input channel count, sample rate, start time, duration, peak change, safety gain and panning direction.
The plot is a filter/panning response diagram; it does not display the spectrum of the selected source.
Technical notes
Praat stores Spectrum objects as real and imaginary components of the complex spectrum. Multiplying both by the same real channel gain changes the amplitude assigned to that channel while retaining the phase of that spectral component. Praat's documentation also specifies that Fast = yes appends zeroes when needed for a power-of-two FFT, and that converting the Spectrum back to Sound reproduces the original Sound plus any appended zeroes.
Because the entire source is transformed as one block, the panning curve is static over time. The frequency-dependent stereo image does not follow pitch, intensity or other source features.