Bell Curve Envelope — User Guide
Dual-stage processing: applies a pseudo-spectral filtering effect via time-shifted subtraction, followed by a Gaussian (Normal Distribution) amplitude envelope.
What this does
This script combines timbre modification with dynamic shaping. It first creates a "hollow" or "phased" texture by subtracting a pitch-shifted version of the sound from a time-stretched version (simulating spectral comb filtering). It then applies a Gaussian Bell Curve envelope to smooth the attack and decay, creating organized sound events from continuous textures. The result transforms static noise or drones into metallic, percussive, or swelling "bell-like" tones.
Key Features:
- Pseudo-Spectral Filtering — Creates complex interference patterns using time-domain manipulation.
- Gaussian Shaping — Applies a mathematically perfect Normal Distribution curve as an amplitude envelope.
- 5 Built-in Presets — From tight percussive hits ("Narrow Bell") to long, atmospheric swells ("Wide Bell").
- Frequency Emphasis — Controls to shift the "filtering" towards lower or higher pitch characteristics.
- Positional Control — Ability to skew the envelope peak to the start, middle, or end of the file.
Signal(slow) - Signal(fast). By subtracting a slightly faster playback from a slightly slower playback, the phases align and cancel out at specific intervals. This creates a "comb filter" effect, often removing the fundamental frequency and emphasizing odd harmonics, resulting in a hollow, metallic timbre without using traditional EQ.
Technical Implementation: (1) Copy Sound: Creates a working copy _bell. (2) Filtering: Applies formula self[col/low] - self[col*high], effectively mixing pitch-shifted versions. (3) Envelope: Calculates Gaussian curve based on `bell_width_divisor` and `bell_center_position`. (4) Apply Envelope: Multiplies the filtered audio by the Gaussian curve. (5) Normalize: Scales peak amplitude to 0.99 to prevent clipping from the subtraction summation.
Quick start
- In Praat, select exactly one Sound object.
- Run script… →
Bell curve envelope.praat. - Select a Preset (e.g., "Narrow Bell" for percussion, "Wide Bell" for pads).
- Click OK — script processes the file and plays the result automatically.
low_freq_factor and high_freq_factor to 1.0 (or extremely close, like 1.0001). This bypasses the pitch-shifting interference.
Theory & Logic
1. The Filtering Mechanism
The script creates texture via differential resampling. By taking two pointers to the same audio file—one moving slightly slower (Low Factor) and one moving slightly faster (High Factor)—and subtracting them, we create a composite signal.
Signal A (Slow): / \ / \ / \ (Lower Pitch)
Signal B (Fast): /\ /\ /\ (Higher Pitch)
Result (A - B): Complex, beating waveform with phase cancellations.
2. The Gaussian Envelope
The amplitude is shaped using the Normal Distribution (Bell Curve) formula. This is distinct from linear (triangular) or ADSR envelopes because it is continuous and smooth (differentiable at all points), creating a very natural "analog" rise and fall.
- Width Divisor: Determines the standard deviation ($\sigma$). Higher divisor = narrower curve = shorter sound.
- Center Position: Determines the mean ($\mu$). Shifts the peak time.
Parameters & Presets
Presets
| Preset | Description | Internal Logic |
|---|---|---|
| Custom | Manual control. | Uses user values. |
| Narrow Bell | Percussive, short sound. | bell_width_divisor = 8 |
| Wide Bell | Long, slow swell. | bell_width_divisor = 2 |
| Low Freq Emphasis | Darker, bass-heavy tone. | low=1.5, high=1.0 |
| High Freq Emphasis | Thinner, shimmering tone. | low=1.0, high=1.5 |
Manual Parameters (Custom Mode)
| Parameter | Default | Description |
|---|---|---|
| low_freq_factor | 1.1 | Stretches layer 1. Value > 1 lowers pitch. |
| high_freq_factor | 1.1 | Shrinks layer 2. Value > 1 raises pitch. |
| bell_width_divisor | 4 | Curve sharpness. $\sigma = \text{Duration} / \text{Divisor}$. |
| bell_center_position | 0.5 | Peak location. 0.0=Start, 0.5=Mid, 1.0=End. |
| scale_peak | 0.99 | Final normalization level. |
Mathematical Deep Dive
The Gaussian Formula
The script calculates the amplitude envelope $E(t)$ using the following implementation of the Gaussian function:
📐 Understanding the Divisor
The bell_width_divisor effectively defines how many standard deviations fit into the file duration.
- Divisor = 2: The bell is very wide. The file duration covers roughly ±1$\sigma$. (Amplitude at edges is $\approx 36\%$).
- Divisor = 4: The bell is standard. The file duration covers ±2$\sigma$. (Amplitude at edges is $\approx 1.8\%$).
- Divisor = 8: The bell is narrow. The file duration covers ±4$\sigma$. (Amplitude at edges is near silence).
The Spectral Filter Formula
The "filtering" is achieved via this specific Praat Formula:
Applications
Percussive Sound Design
Goal: Create a metallic "impact" from white noise.
Settings: Preset "Narrow Bell", or Custom with Divisor=10, Center=0.1.
Result: The high divisor creates a sharp pluck. The filtering adds a metallic, inharmonic tail reminiscent of a struck cymbal or gong.
Drone & Pad Textures
Goal: Create an evolving, breathing pad.
Settings: Preset "Wide Bell", Center=0.5.
Result: A sound that slowly fades in, reaches a complex timbral peak in the middle, and fades out. The "filtering" adds movement to the texture so it isn't static.
Psychoacoustic Effects
Goal: "Ghostly" voice effects.
Settings: Input: Speech recording. Settings: Low Factor=1.01, High Factor=1.01.
Result: The slight detuning (1.01) creates a slow flanging/phasing effect combined with the smooth fade, making the voice sound distant or ethereal.
Troubleshooting
Cause: If
bell_width_divisor is extremely high (>20), the bell might be too narrow to hear (milliseconds).Solution: Lower the divisor.
Cause: If
bell_center_position is 0.0 or 1.0, the bell curve is cut in half, starting effectively at max volume.Solution: Ensure the envelope starts at 0 amplitude by moving the center inward (e.g. 0.1) or increasing the divisor so the tails reach zero within the file duration.