8-Channel Spectral Shift

Create eight simultaneous spectral translations of a sound. Keep the frequency shifts fixed, or let all eight offsets evolve independently over time to produce moving inharmonic spectra, convergences, crossings, oscillations, and drifting clusters.

Author: Shai Cohen Department: Music, Bar-Ilan University, Israel Script: v1.0 (2026) License: MIT Project: Praat AudioTools
8 parallel channelsStatic + DynamicFrequency translation, not pitch shiftingNative Praat

What it does

The script takes one selected Sound, creates a mono working signal, and produces eight versions whose spectral components are moved by additive amounts measured in Hertz. Unlike transposition, an additive frequency shift changes the frequency ratios between partials. A harmonic source can therefore become inharmonic without changing its duration.

Frequency shifting is not pitch shifting. A +100 Hz translation moves a 200 Hz partial to 300 Hz and a 1,000 Hz partial to 1,100 Hz. Those are different musical intervals. The process reorganizes the spectrum rather than preserving its harmonic ratios.

All eight channels begin together. The tool creates parallel spectral variations, not staggered entries or a canon. You can export the voices independently, combine them into a multichannel Sound, or hear them as a stereo spectral-bank mix.

Quick start

  1. Select exactly one Sound in the Praat Objects window.
  2. Run 8-Channel_Spectral_Shift.praat.
  3. For a first dynamic experiment, select DYN Spectral Convergence or DYN Spectral Orbit. These presets automatically activate Dynamic mode and select their motion.
  4. Alternatively, choose a regular preset or Custom, then set Processing_mode to Static or Dynamic. With Dynamic, choose a Motion.
  5. Choose your Output_format. For ordinary listening, Stereo mix is convenient; for further multichannel work, choose 8 channels.
  6. To change motion depth, speed, target, shape, or Dry/Wet balance, enable Edit_motion_and_mix_parameters. A second dialog appears after you confirm the main form.
  7. Click OK (and Continue in the optional dialog). Listen to the result and inspect the trajectory visualization and Info report.
Preset behavior: All named presets use Hz values. A dynamic preset forces Dynamic mode and its associated motion even if Static or a different motion was selected in the main form. A regular preset supplies eight offsets; you may combine it with any Dynamic motion.

Two processing modes

Static: fixed spectral offsets

One whole-file FFT is shared by the eight outputs. For each channel, the script moves complex spectral bins by a constant integer offset, discards out-of-band bins, and inverse-transforms the result. The offset does not change over time.

fout = fin + Δfi

Resolution: Hz requests are rounded to the nearest FFT bin. The report shows requested and achieved shifts plus any quantization error. This is the original spectral-bin translation path.

Dynamic: moving spectral offsets

A shared FFT-derived analytic signal is modulated with continuous phase. Each channel follows its own time-varying frequency-offset trajectory, without frame-by-frame STFT processing.

fout(t) = fin + Δfi(t)

Resolution: motion offsets are applied in Hz without FFT-bin rounding. A conservative per-channel spectral band guard removes source components that could leave the valid band during the trajectory.

The two modes deliberately use different synthesis engines. Static retains the original bin-shifting approach; Dynamic adds time-varying frequency translation while keeping the same eight-channel output formats.

Five dynamic motions

In Dynamic mode, the eight Shift_1 to Shift_8 values are each channel's reference offsets. Their precise role depends on the motion:

MotionWhat happensMusical effectRelevant controls
ConvergenceEach channel moves from its Shift value to the common Target_Hz.Several inharmonic spectral versions gradually fuse into a shared state.Target_Hz, Motion_shape
DivergenceAll channels begin at Target_Hz and move toward their individual Shift values.A unified spectrum separates into eight spectral strands.Target_Hz, Motion_shape
CrossingEach Shift value moves through Target_Hz to its mirror image on the other side.Upward and downward spectral banks exchange positions.Target_Hz, Motion_shape
OscillationEach channel oscillates around its own Shift value, with an adjustable phase step between channels.Periodic spectral orbiting, beating, and changing interchannel relationships.Motion_depth, Motion_rate, Phase_spread
Cluster driftThe entire group glides by Motion_depth, while individual channels wobble at slightly different rates.An evolving cluster with internal motion and changing beating.Motion_depth, Motion_rate, Phase_spread, Motion_shape

Motion_shape controls the progress of glides: Linear (steady), S-curve (smooth start and arrival), Early (faster at the start), or Late (faster near the end). These shapes affect Convergence, Divergence, Crossing, and Cluster drift, but not Oscillation.

Understanding Shift values: In Oscillation they are the centres of the trajectories, not necessarily each channel's instantaneous value at time zero: Phase_spread can give the channels different starting phases. In Divergence they are destination values, rather than initial values.

Presets

Dynamic presets

These choose the motion as well as its offsets and selected motion settings. Defaults may be modified in the optional second dialog.

PresetConfigurationResult
DYN Spectral ConvergenceOffsets +700, +500, +300, +100, −100, −300, −500, −700 Hz; S-curve; target 0 Hz.Eight spectral versions meet at zero offset by the end.
DYN Spectral DivergenceOffsets +100, +250, +450, +700, −100, −250, −450, −700 Hz; Late shape; target 0 Hz.Starts together and gradually fans outward.
DYN Crossing StreamsOffsets +400, +300, +200, +100, −100, −200, −300, −400 Hz; S-curve; target 0 Hz.Eight lines cross and exchange positive/negative positions.
DYN Spectral OrbitAll centres 0 Hz; ±200 Hz depth; 0.125 Hz rate; 45° phase step.Eight staggered oscillations with an 8-second period.
DYN Cluster DriftCentres 100–170 Hz in 10 Hz steps; +300 Hz glide; 0.2 Hz base wobble rate; 45° spread.A tight group drifts upward while its inner relationships evolve.

Original / static presets

These retain their established offsets. Use them in Static mode, or as reference offsets in a Dynamic motion.

PresetCh1–Ch8 offsets (Hz)Structure
CustomUser-entered valuesHz or FFT bins; the only option that permits bin units.
Gentle Up20, 30, 40, 50, 65, 80, 100, 120Small upward offsets.
Moderate Up100, 150, 200, 250, 300, 400, 500, 600Wider upward offsets.
Extreme Up500, 700, 900, 1200, 1500, 1800, 2200, 2600Large upward offsets, with possible high-frequency loss.
Symmetrical+400, +300, +200, +100, −100, −200, −300, −400Positive against negative spectral banks.
All Down−50, −100, −150, −200, −250, −300, −350, −400Downward offsets.
Spread−400, −250, −100, 0, 0, +100, +250, +400Spreads outward around a zero-offset pair.
Cluster Up100, 110, 120, 130, 140, 150, 160, 170Eight closely spaced offsets.
Doubling offsets+50, +100, +200, +400, −50, −100, −200, −400Geometrically spaced additive offsets, not octave transpositions.

Controls and optional second dialog

Main dialog

ControlDefaultPurpose
PresetCustomSelects any original or DYN preset; named presets replace entered shift values.
Processing_modeStaticChooses original constant-offset processing or the moving-trajectory engine. DYN presets override this to Dynamic.
MotionConvergenceSelects one of five trajectory types in Dynamic mode. DYN presets select their own motion.
Edit_motion_and_mix_parametersOffOpens a second dialog for custom motion settings and Wet percentage. Available in either mode.
Shift_unitsHertzHz or FFT-bin units for Custom. In Dynamic mode, bin inputs are converted to Hz before modulation; only Static snaps the achieved offset to whole bins.
Shift_1 … Shift_8+100, +200, +300, +400, −100, −200, −300, −400Constant offsets in Static, trajectory reference positions/destinations in Dynamic.
Output_format8-channel octophonicChooses multichannel, paired-stem, or folded-down output.
Scale_peak0.99Peak target for one gain applied across all eight channels; additional output-mix scaling where applicable.
Draw_visualizationOnDraws channel offsets or trajectories, energy retention, waveforms, and summary.
Play_resultOnPlays the result, or a stereo preview for multiple stem objects.

Second dialog: Motion and mix parameters

Tick Edit_motion_and_mix_parameters in the main form to access these. The dialog opens with defaults determined by the selected preset.

ControlDefaultUse
Motion_depth200 HzOscillation: ±depth around each channel's reference offset. Cluster drift: total common glide (positive or negative). DYN presets may override it.
Motion_rate0.25 HzOscillation frequency or base rate for cluster wobble. Limited in the script to 0.001–50 Hz. Cluster channels run at slightly different rates.
Phase_spread45°Phase difference between adjacent channels for oscillation/wobble.
Motion_shapeS-curveLinear, S-curve, Early, or Late for gliding motions.
Target_Hz0 HzShared target for Convergence/Divergence, or crossing centre for Crossing.
Wet100%100 = processed only; 0 = mono source only; intermediate values mix dry and processed signals before the shared-gain stage. Works in both Static and Dynamic modes.
Not every control affects every motion. For instance, Motion_rate and Phase_spread do not change Convergence, Divergence, or Crossing; Target_Hz does not control Oscillation. The second dialog shows all parameters together for consistency.

Output formats

All formats are available with either processing engine. The channel order remains Ch1 through Ch8, with channels 1–4 and 5–8 treated as two spectral banks for stereo monitoring.

Output_formatReturned Praat Sound objectsMapping
8 channels1 × 8-channel SoundOutput channels 1–8 = Ch1–Ch8.
4 stereo pairs4 × 2-channel SoundsCh1|Ch2, Ch3|Ch4, Ch5|Ch6, Ch7|Ch8.
2 quad groups2 × 4-channel SoundsCh1–Ch4 and Ch5–Ch8.
4-channel fold-down1 × 4-channel Sound1=Ch1+Ch5, 2=Ch2+Ch6, 3=Ch3+Ch7, 4=Ch4+Ch8.
Stereo mix1 × stereo SoundLeft bank = Ch1–Ch4; right bank = Ch5–Ch8.

Fold-down and stereo-mix outputs are peak-scaled again after combining. When four stereo stems or two quad stems are returned, Play_result uses a temporary stereo monitor (Ch1–4 left, Ch5–8 right); the preview is not an extra returned stem.

Level handling and energy retention

Each channel's processed energy is measured before Dry/Wet mixing and before the common output gain. The percentage shown in the report compares that channel's energy with the mono source energy. It is capped at 100% for display.

Energy kept (%) = 100 × processed channel energy / source energy

Shared gain = Scale_peak / highest absolute peak among the eight channels

The same gain factor is then applied to all eight channels. This avoids independently peak-equalizing each output and preserves the level differences arising from the spectral processing. With Wet below 100%, the original mono source is mixed into each channel before that common gain is calculated.

Low energy retention is informative, not necessarily an error. Extreme offsets or wide dynamic trajectories may remove large parts of the spectrum. A silent source is explicitly recognized in the report, so its energy percentages should not be interpreted.

Visualization

The script draws a diagnostic figure using the existing eight working channels. The first two panels adapt to the selected processing mode.

PanelStatic modeDynamic mode
A · Main plotEight bin-offset bars, coloured by shift direction.Eight colour-coded frequency-offset trajectories plotted over the sound's duration, with channel legend and zero-offset reference.
B · OffsetsAchieved frequency shift in Hz for each channel, after bin quantization.Each channel's minimum–maximum offset range; open circle = start, filled circle = end.
C · Energy keptPre-gain energy retained after static DC/Nyquist truncation.Pre-gain energy retained after the dynamic spectral band guard.
D · Channel examplesCh1 and Ch8 waveforms, shown with a shared amplitude scale so their levels can be compared.
E · SummaryPreset, measured shifts, output and routing.Preset, motion parameters, start/end offsets, output and routing.

The dynamic trajectory curves are drawn from the same equations and parameters as the audio processing; they do not require a second spectral analysis. They show frequency offset, not the absolute pitch of a particular source partial.

Processing efficiency and reporting

Both engines reuse the source's initial spectral analysis rather than repeating source analysis eight times. Static reuses the source FFT for each bin translation. Dynamic builds a shared Hilbert spectrum and uses continuous-phase modulation, avoiding a separate sequence of STFT frames per output channel.

In Dynamic mode, channels whose trajectories require the same protected source band can reuse the same inverse-transformed in-phase and quadrature components. On supported Praat versions, native vector operations are used for the modulation; an alternative Formula path is included for older versions.

The Info window reports the timing of each stage of the current run:

Source preparation + shared analysis
Trajectory / shift planning
Eight-channel synthesis
Shared gain
Output assembly
Visualization
Total processing time (before playback)

Reported times are local measurements, not a universal processing-speed guarantee. Duration, FFT size, number of distinct band guards, output format, and visualization settings can affect runtime and memory use.

Technical notes and limitations

Static engine

Hz shifts are quantized to whole FFT bins. Shifted components outside DC–Nyquist are discarded, not wrapped. The imaginary components at DC and Nyquist are set to zero, and the inverse-transform output is trimmed back to the original duration and sample rate.

Dynamic engine

Instantaneous frequency offsets are defined by continuous trajectories. The script integrates their phase analytically, then modulates band-limited in-phase and quadrature signals. No STFT window or overlap-add stage is needed.

Why the dynamic band guard matters

Dynamic frequency translation cannot safely retain every source component for every possible trajectory. The script estimates the full offset range of each channel, adds a small safety margin, and retains only source frequencies that remain in the valid 0-to-Nyquist band throughout that motion. Components outside this safe band are removed for the entire sound, not only at the instant they would cross a boundary.

This avoids spectral wrapping or fold-over, but can thin the sound more than an otherwise comparable static shift. A trajectory with an excessively large excursion may produce a silent channel. The Info window reports each retained source band and identifies silent channels.

Other considerations

Compositional starting points