Feedback-Aware Convolution — User Guide

Builds an event-driven impulse response from the source's own intensity or pitch structure, then applies that IR back to the source by convolution.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.5.1 (2026) License: MIT License Repo: https://github.com/ShaiCohen-ops/Praat-plugin_AudioTools
Contents:

What this does

Feedback-Aware Convolution analyzes the selected Sound and turns detected acoustic events into an impulse response (IR). The analysis can follow either intensity or pitch. Each accepted event becomes a short Gaussian impulse whose amplitude is derived from the measured feature value. The source is then convolved with this event-driven IR.

The name describes a self-referential control relationship: the source determines the IR that is later applied back to that source. There is no audio feedback loop and the convolution itself is a standard fixed-IR convolution after the analysis stage has finished.

Offline process: analyze the complete source → detect events → build one IR → convolve → trim the wet result to the source duration → mix wet and dry.

Quick start

  1. Select exactly one Sound object in Praat.
  2. Run Feedback_Aware_Convolution.praat.
  3. Choose one of the four built-in presets, or Custom.
  4. For Custom, choose Intensity or Pitch, set the threshold and minimum spacing, then set impulse and Wet/Dry controls.
  5. Click OK. If no event passes the detector, the script exits without creating an output.

Output name: <source>_feedback_<preset>.

Presets

Built-in presets override the analysis/detection fields shown below. Wet_dry_percent, Draw_visualization, and Play_result keep the values currently shown in the form.

PresetModeThresholdMinimum spacingImpulse durationAmplitude mapping
CustomForm valueForm valueForm valueForm valueForm value
Sparse IntensityIntensity75 dB0.08 s0.5 ms0.8
Dense IntensityIntensity60 dB0.03 s0.3 ms1.2
Melodic PitchPitch150 Hz0.05 s0.4 ms1.0
Rhythmic EventsIntensity72 dB0.04 s0.2 ms1.5

Melodic Pitch also sets the pitch-analysis range to 80–600 Hz.

Parameters

ControlDefaultBehavior
Parameter_typeIntensityChoose intensity-based or pitch-based event detection.
Detection_threshold70Interpreted as dB in Intensity mode and Hz in Pitch mode.
Minimum_spacing_s0.05 sRefractory interval between accepted events. While the feature remains above threshold, a new event can be accepted once this interval has elapsed.
Pitch_floor_Hz / Pitch_ceiling_Hz80 / 600 HzUsed only in Pitch mode. Custom bounds are internally ordered; equal bounds are separated by 1 Hz.
Impulse_duration_s0.0003 sGaussian event width. Internally clamped to at least three source samples.
Amplitude_mapping1.0Scales the normalized event amplitude after feature-value mapping.
Wet_dry_percent50%Clamped internally to 0–100%.
Draw_visualization / Play_resultyes / yesDraw the analysis summary and/or play the result.

Detection and IR generation

Intensity mode

The source is converted to Intensity with a 75 Hz minimum pitch, 1 ms time step and mean-energy subtraction enabled, then converted to an IntensityTier. The script scans its tier points in time order. An event is accepted when the value is above the threshold and the minimum spacing from the previous accepted event has elapsed.

Pitch mode

The source is analyzed with To Pitch at a fixed 1 ms time step and the selected pitch floor/ceiling. The Pitch object is sampled every 1 ms. Undefined F0 values are ignored. A defined value above the threshold can generate an event subject to the same minimum-spacing rule.

Not an edge detector: the script does not require an upward threshold crossing. If a feature stays above threshold, additional events may be accepted at the configured refractory spacing.

Event amplitude

Intensity mode: normalized = clamp((value - 40) / 40, 0, 1) Pitch mode: normalized = clamp((value - threshold) / threshold, 0, 1) Event amplitude = normalized × Amplitude_mapping Gaussian event = amplitude × exp(-((t - eventTime) / (effectiveDuration/6))²)

The same event-derived IR is written to every source channel. The IR duration equals the source duration. The detector is capped at 10,000 events.

Convolution and mix

  1. A private zero-based copy is used for analysis and convolution; the selected source object is never modified.
  2. The source is convolved with the event-driven IR using Praat Convolve: "sum", "zero".
  3. The wet result is trimmed to the original duration.
  4. The final Sound is built on a copy of the original source grid: wet × Wet + dry × (1-Wet).
  5. Every non-silent result is then peak-normalized to 0.95.
Level behavior: the final Scale peak: 0.95 is target normalization, not an attenuation-only safety ceiling. Even a low-level result — including 0% Wet — is rescaled to a 0.95 peak if it is non-silent.

Visualization

The drawing contains:

Marker heights are display-normalized feature values. They are not a direct plot of the Gaussian IR sample amplitudes.

Output behavior