8-Channel Spectral Shift — User Guide
Creates eight parallel whole-file spectral translations of one source. Each channel receives a constant additive frequency offset by translating FFT bins; components shifted below DC or above Nyquist are discarded rather than wrapped.
What this does
The script converts the selected Sound to a mono working source, computes one whole-file FFT, and creates eight translated spectra from that common source spectrum. Each requested shift is converted to an integer FFT-bin offset, the complex bins are translated without wraparound, and each translated spectrum is inverse-transformed back to audio. All eight channels start together and retain the source duration.
- Positive and negative shifts: upward and downward spectral translation are both supported.
- Hz by default: requested Hertz values are quantized to the nearest available FFT bin.
- Advanced bin mode: Custom values can be entered directly as FFT-bin offsets.
- No spectral wrap: energy translated past Nyquist or below DC is discarded.
- Shared gain: one gain factor is applied across all eight translated channels, preserving their relative level differences.
- Five output layouts: octophonic, stereo-pair stems, quad stems, four-channel fold-down, or stereo spectral-bank mix.
Quick start
- Select exactly one Sound.
- Run
8-Channel_Spectral_Shift.praat. - Choose a Preset, or leave Custom and enter eight shifts.
- For Custom, choose Hertz for file-independent values or FFT bins for direct bin offsets.
- Choose the required Output_format.
- Set Scale_peak, and leave visualization/playback enabled if desired.
- Click OK. The Info window reports requested and achieved shifts, bin quantization, retained spectral energy, and output routing.
Spectral translation
One FFT for the complete source
The script does not use an STFT, frames, windows, or a time-varying shift. It computes one Spectrum for the complete mono source and translates that spectrum by a fixed amount for each of the eight channels.
Hertz to bins
FFT-bin width depends on sample rate and FFT length. In Hertz mode the script measures that width and converts each requested shift to the nearest integer bin:
This is why Hertz is the default user unit. A value such as “100 bins” represents different Hz shifts for files whose FFT lengths differ, while “100 Hz” retains the same musical/spectral meaning and is merely quantized to the available bin grid.
Positive and negative translation
DC and Nyquist
After translation, the imaginary component of the DC bin and of the Nyquist bin is explicitly set to zero. These bins must be purely real for a valid spectrum representing a real-valued time-domain signal.
Shift limits
After the FFT size is known, each bin offset is constrained to the range -(nBins-1) through +(nBins-1). The Info report notes when a requested shift had to be clamped.
Presets
All named presets use Hertz, regardless of the Shift_units menu. FFT-bin mode is available only for Custom.
| Preset | Ch1–Ch8 shifts (Hz) | Structure |
|---|---|---|
| Custom | User values | Hz or FFT bins, including positive, zero, and negative values. |
| Gentle Up | 20, 30, 40, 50, 65, 80, 100, 120 | Eight small upward translations. |
| Moderate Up | 100, 150, 200, 250, 300, 400, 500, 600 | Increasing upward offsets. |
| Extreme Up | 500, 700, 900, 1200, 1500, 1800, 2200, 2600 | Large upward translations with increasing high-frequency truncation risk. |
| Symmetrical | +400, +300, +200, +100, -100, -200, -300, -400 | Upward spectral bank against downward spectral bank. |
| All Down | -50, -100, -150, -200, -250, -300, -350, -400 | Eight downward translations. |
| Spread | -400, -250, -100, 0, 0, +100, +250, +400 | Negative bank through two unshifted centre channels to positive bank. |
| Cluster Up | 100, 110, 120, 130, 140, 150, 160, 170 | Tightly spaced upward translations. |
| Doubling offsets | +50, +100, +200, +400, -50, -100, -200, -400 | Geometrically increasing additive offsets. |
Parameters
| Parameter | Default | Actual role |
|---|---|---|
| Preset | Custom | Selects Custom or one of eight fixed Hz shift patterns. |
| Shift_units | Hertz | Hertz or direct FFT-bin offsets. Named presets always force Hertz. |
| Shift_1 … Shift_8 | 100, 200, 300, 400, -100, -200, -300, -400 | Custom additive spectral offsets. Positive = up, negative = down. |
| Output_format | 8-channel octophonic | Selects the returned routing layout. |
| Scale_peak | 0.99 | Target used by the shared eight-channel gain stage; values ≤0 revert to 0.99 and values above 1 are clamped to 1. |
| Draw_visualization | on | Draws the v0.9 process/analysis figure. |
| Play_result | on | Plays the single returned object, or a temporary stereo spectral-bank monitor for stem formats. |
Level handling & energy retention
No per-channel peak equalization
Each translated channel is measured but is not independently peak-normalized. This matters because upward and downward translation can discard different amounts of spectral energy. Equalizing every channel separately would hide those differences.
The shared gain may attenuate or boost the bank as a whole. Relative channel levels produced by the spectral translations remain intact.
Energy retained
Before the shared gain is applied, the script measures each translated channel's whole-file energy relative to the mono source:
The display and Info window use this as a practical indicator of how much energy survived the DC/Nyquist truncation. If the weakest channel falls below 50%, the report calls attention to the loss.
Output formats
| Format | Returned objects | Routing | Additional normalization |
|---|---|---|---|
| 8 channels — octophonic | 1 × 8-channel | out1–out8 = Ch1–Ch8 | None after shared gain |
| 4 stereo pairs | 4 × stereo | Ch1|Ch2, Ch3|Ch4, Ch5|Ch6, Ch7|Ch8 | None after shared gain |
| 2 quad groups | 2 × 4-channel | Ch1–Ch4 and Ch5–Ch8 | None after shared gain |
| 4-channel fold-down | 1 × 4-channel | 1=Ch1+Ch5, 2=Ch2+Ch6, 3=Ch3+Ch7, 4=Ch4+Ch8 | Final peak scaling to Scale_peak |
| Stereo mix | 1 × stereo | L = Ch1+Ch2+Ch3+Ch4; R = Ch5+Ch6+Ch7+Ch8 | Final peak scaling to Scale_peak |
Why the stereo fold uses two banks
The stereo mapping is deliberately positional rather than odd/even. Channels 1–4 form the left spectral bank and channels 5–8 the right bank. This makes presets such as Symmetrical, Spread, and All Up/Down readable as two opposing spectral groups.
Stem-format preview
For 4 stereo pairs and 2 quad groups, Play_result creates a temporary stereo monitor using the same bank mapping — Ch1–4 left, Ch5–8 right — peak-scales that monitor, plays it, and removes it. The monitor is not one of the returned stem objects.
Visualization
The v0.9 figure uses an 8 × 8 canvas and reads the eight working translated channels directly, so its core analysis is the same for all five output formats.
Implementation notes & limitations
- Exactly one Sound: the script exits before showing the form unless exactly one Sound is selected.
- Multichannel input: a multichannel source is converted to mono using Praat's ordinary mono conversion before spectral processing. There is no cancellation-safe strongest-channel fallback.
- Whole-file transform: the shift is constant for the entire duration. There is no framewise or time-varying spectral processing.
- FFT padding: Praat's Spectrum transform may use a padded FFT length. The inverse-transformed Sound is explicitly forced back to the original sample rate and trimmed to the original duration.
- Bin quantization: an exact requested Hertz value is achieved only when it falls on the available FFT-bin grid. The Info window reports the actual value and error.
- Truncation: translated spectral components that cross 0 Hz or Nyquist disappear; they are not mirrored or wrapped.
- No time-domain pitch model: the process is additive spectral translation, not semitone transposition, resampling, PSOLA pitch shifting, or formant-preserving pitch manipulation.
- Parallel voices: all eight channels begin together. The word “canon” is intentionally absent from the current description because the process contains no temporal imitation.