Wave Interference Pattern — User Guide
Whole-file FFT spectral colouration using a deterministic sine/cosine interference law across frequency-bin index.
What this does
Wave Interference Pattern applies a static gain pattern to a whole-file FFT. The gain combines a sine pattern and a weighted cosine pattern across FFT-bin index, takes the absolute value, and multiplies the result by a linear brightness ramp. The same non-negative scalar multiplies the real and imaginary parts of each complex FFT bin, so bin phase is preserved while magnitude is reshaped.
Quick start
- Select exactly one mono or stereo Sound.
- Run
Wave_Interference_Pattern.praat. - Choose a preset. Subtle Spectral Interference is a useful first test; Slow Spectral Moire makes the large-scale modulation most obvious.
- Adjust the sine/cosine divisors to change the spacing of the spectral pattern.
- Set Wet/Dry and the desired output channel mode.
- The result is named
originalName_PresetName.
What “interference” and “moiré” mean here
In physical wave interference, overlapping waves add and can reinforce or cancel one another depending on relative phase. This processor borrows that visual/mathematical idea but applies it to a spectral gain curve, not to two propagating acoustic waves.
Here k is FFT-bin index. Dₛ and D𝚌 control the two bin-domain periods, W is the cosine weight, and B[k] is the brightness ramp. Because the absolute value is taken, the gain remains non-negative and therefore does not introduce π phase flips.
Moiré analogy
When the two bin-domain periods are close but not identical, their sum produces a slower large-scale envelope across frequency. The script calls this a spectral moiré pattern by analogy with the broad beat-like patterns that appear when similar spatial grids are superimposed.
Presets
| Preset | Sine divisor | Cosine divisor | Weight | Brightness | Cutoff |
|---|---|---|---|---|---|
| Custom | 800 | 1200 | 0.5 | 1.2 | 11000 Hz |
| Strong Spectral Interference | 400 | 600 | 0.8 | 1.5 | user value |
| Subtle Spectral Interference | 1200 | 2000 | 0.2 | 1.1 | user value |
| Alien Radio | 150 | 160 | 0.9 | 2.0 | user value |
| Slow Spectral Moire | 2000 | 2005 | 1.0 | 1.0 | user value |
| Metallic Ring | 300 | 450 | 0.7 | 1.8 | user value |
| Underwater Transmission | 500 | 700 | 0.6 | 0.8 | 6000 Hz |
Except where shown, presets leave Frequency cutoff, Wet/Dry, stereo controls and output settings at the values entered in the form.
Controls
| Control | Meaning |
|---|---|
| Frequency cutoff Hz | Bins below the realizable cutoff receive the interference law; bins above it remain at gain 1. Requested values above Nyquist are clamped. |
| Sine / Cosine divisor | Period controls in FFT-bin units. Larger divisors make slower changes across bin index. |
| Cosine weight | Relative contribution of the cosine component. Negative values are rejected. |
| Brightness compensation | Linear ramp across bin index. 1 = neutral; >1 progressively emphasizes higher patterned bins; <1 progressively reduces them. |
| Wet/Dry percent | 0% = dry path with no peak scaling; 100% = pure patterned spectrum before final target normalization. |
| Stereo output | For mono input, optionally makes stereo by delaying only the wet right channel. For stereo input, OFF intentionally downmixes to mono before processing. |
| Stereo delay ms | Delay applied to the wet right channel only when mono input is converted to stereo. |
| Scale peak | For every nonzero Wet setting, final target peak normalization. |
Processing pipeline
- Prepare the dry/output topology: mono or stereo according to input and Stereo output.
- Create a whole-file FFT for the processing channel(s).
- Compute one exact gain-map Matrix from the bin-domain interference law.
- Multiply both complex Spectrum rows by the same gain map and inverse-transform.
- For stereo input, process L/R independently with the same gain law while retaining each channel's own complex spectrum.
- For mono→stereo, duplicate the wet signal and delay only the wet right channel.
- Mix dry and wet. Wet = 0 copies the dry path and skips peak scaling; Wet > 0 is target-normalized to Scale peak.
Channel, phase and level behavior
- Input: mono or stereo; 3+ channels are rejected.
- Stereo input + Stereo output ON: stereo is preserved; both channels receive the same gain law independently.
- Stereo input + Stereo output OFF: source is converted to mono before processing, so output is mono.
- Mono input + Stereo output ON: output is stereo; the dry path is identical L/R, while the wet right channel receives Stereo delay ms.
- Phase: preserved per FFT bin because the applied gain is real and non-negative.
- Duration / sample rate: preserved.
- Wet = 0: no peak scaling, but channel format still follows the selected Stereo output mode.
- Wet > 0: final result is always target-normalized to Scale peak.
- Randomness: none. Given the same source and settings, the spectral law is deterministic.
Visualization
- A — Interference Law: the exact scalar gain generated across frequency.
- B — Transfer Proof: target gain in dB versus the measured source→pure-wet spectral ratio.
- C — Source / Pure Wet: smoothed relative spectra on a logarithmic frequency axis.
- D — Time-Domain Consequence: source and final waveforms on a shared amplitude scale.
The summary also reports FFT-bin width, realized cutoff, Wet percentage, channel count and transfer-proof error.