Draw Intensity Envelope — User Guide

Draw a gain contour by hand over a selected Sound, edit it interactively, and apply the curve as true relative gain in decibels without external software or Python.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel License: MIT License Repo: Praat AudioTools
Contents:

What this does

Draw Intensity Envelope turns the Praat Demo window into an interactive gain-envelope editor. The original waveform is shown above a drawing panel that shares the same time axis. Click points into the lower panel, move existing points vertically, undo edits, then apply the completed curve to the selected Sound.

The vertical axis is expressed in relative dB gain: 0 dB leaves the Sound unchanged, positive values amplify it, and negative values attenuate it.

Core idea: the drawn contour becomes a Praat IntensityTier, then the Sound and tier are multiplied with scaling disabled. The values you draw therefore act as actual relative gain values rather than as an automatically normalized envelope.

Sound → drawn envelope

SELECT ONE SOUND ↓ OPEN INTERACTIVE DEMO WINDOW input waveform above dB drawing panel below ↓ DRAW / MOVE / UNDO CONTROL POINTS ↓ CREATE INTENSITYTIER one point per drawn time / dB value ↓ SOUND × INTENSITYTIER scaling OFF ↓ OPTIONAL PEAK GUARD rescale only if peak would exceed 0.99 ↓ OUTPUT SOUND <source>_drawnIntensity ↓ FINAL INPUT / OUTPUT COMPARISON + PLAYBACK

Quick start

  1. Select exactly one Sound object.
  2. Run Draw_Intensity_Envelope.praat.
  3. Set Range_dB to the vertical drawing range you want, such as ±30 dB.
  4. Leave Prevent_clipping enabled if you want the script to protect the result from peaks above full scale.
  5. Click inside the lower panel to add gain points.
  6. Click near the time of an existing point to move that point vertically instead of adding another one.
  7. Press U to undo the last add or move.
  8. Press Enter to apply the envelope and play the result.
  9. Press Esc to cancel without creating a new Sound.
Keyboard focus: after the Demo window opens, click once inside it if necessary so that U, Enter, and Esc are received by the editor.

Interactive editor

Adding points

A click inside the gain panel creates a control point at that time and dB value. Points are kept internally in chronological order, so you can draw them in any sequence.

Moving points

If you click close to the time coordinate of an existing point, the script keeps its time and replaces its dB value. This makes vertical adjustment fast without creating duplicate points.

Undo

U reverses the most recent add or move. Undo history remains available throughout the drawing session.

Outside the first and last point

The first gain value is held from the beginning of the Sound to the first point, and the last gain value is held from the final point to the end of the Sound. The editor shows these constant regions as dotted extensions.

before first point: gain(t) = first drawn value between points: IntensityTier interpolation after last point: gain(t) = last drawn value

Processing method

After the drawing is accepted, the script creates an IntensityTier on the Sound's original time domain. Each user point becomes one tier point after accounting for the Sound's actual start time.

The Sound and tier are then combined with Praat's multiplication command using scaling disabled:

Sound × IntensityTier → Multiply: scaling = no

This is important because the envelope represents relative dB gain. The script does not normalize the Sound simply because an envelope has been applied.

Drawn valueMeaning
0 dBOriginal level is retained.
+6 dBThe local level is amplified by approximately 6 dB.
−6 dBThe local level is attenuated by approximately 6 dB.
Positive / negative curvesCreate swells, fades, accents, dips, long-form dynamics, or manually drawn amplitude gestures.

Controls

ControlDefaultFunction
Range_dB30 dBSets the editor's vertical range to ± this value. It changes the available drawing range, not the Sound before processing.
Prevent_clippingOnIf the processed peak exceeds 0.99, rescales the entire result to a peak of 0.99.

Editor commands

ActionFunction
ClickAdd a new point or move an existing point at nearly the same time.
UUndo the last add or move.
EnterApply the envelope and play the result. At least one point is required.
EscCancel. No output Sound is created.

Peak protection

The envelope itself is applied without normalization. After processing, the script measures the raw output peak.

When Prevent_clipping is enabled:

if raw peak ≤ 0.99: keep the result unchanged if raw peak > 0.99: rescale the complete output to peak = 0.99

When the guard is disabled, peaks above ±1 are left unchanged and the Info window reports a clipping warning.

Absolute-level consequence: if the peak guard activates, the complete result is rescaled. The shape of the drawn envelope is retained, but the absolute level implied by the raw dB curve is no longer preserved exactly.

Outputs

OutputPurpose
<source>_drawnIntensityThe processed Sound with the hand-drawn gain contour applied.
Demo-window final viewOverlays input and output waveforms and keeps the envelope visible for immediate visual comparison.
Info reportLists every envelope point, input/output peaks, whether peak protection was triggered, RMS change, and the output name.
PlaybackThe processed Sound is played automatically after the envelope is applied.

The temporary IntensityTier is removed after processing. The original Sound remains unchanged.

Reading the display

The interactive display follows the AudioTools visual language and is divided into four functional regions:

Shared time axis: the waveform and envelope use the same horizontal timing, so gain gestures can be placed directly against visible events in the Sound.

Notes & limitations

Citation

Praat AudioTools: Cohen, S. (2026). Praat AudioTools: An Offline Analysis–Resynthesis Toolkit for Experimental Composition.