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.
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.
Quick start
- Select exactly one Sound object in Praat.
- Run
Feedback_Aware_Convolution.praat. - Choose one of the four built-in presets, or Custom.
- For Custom, choose Intensity or Pitch, set the threshold and minimum spacing, then set impulse and Wet/Dry controls.
- 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.
| Preset | Mode | Threshold | Minimum spacing | Impulse duration | Amplitude mapping |
|---|---|---|---|---|---|
| Custom | Form value | Form value | Form value | Form value | Form value |
| Sparse Intensity | Intensity | 75 dB | 0.08 s | 0.5 ms | 0.8 |
| Dense Intensity | Intensity | 60 dB | 0.03 s | 0.3 ms | 1.2 |
| Melodic Pitch | Pitch | 150 Hz | 0.05 s | 0.4 ms | 1.0 |
| Rhythmic Events | Intensity | 72 dB | 0.04 s | 0.2 ms | 1.5 |
Melodic Pitch also sets the pitch-analysis range to 80–600 Hz.
Parameters
| Control | Default | Behavior |
|---|---|---|
| Parameter_type | Intensity | Choose intensity-based or pitch-based event detection. |
| Detection_threshold | 70 | Interpreted as dB in Intensity mode and Hz in Pitch mode. |
| Minimum_spacing_s | 0.05 s | Refractory 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_Hz | 80 / 600 Hz | Used only in Pitch mode. Custom bounds are internally ordered; equal bounds are separated by 1 Hz. |
| Impulse_duration_s | 0.0003 s | Gaussian event width. Internally clamped to at least three source samples. |
| Amplitude_mapping | 1.0 | Scales the normalized event amplitude after feature-value mapping. |
| Wet_dry_percent | 50% | Clamped internally to 0–100%. |
| Draw_visualization / Play_result | yes / yes | Draw 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.
Event amplitude
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
- A private zero-based copy is used for analysis and convolution; the selected source object is never modified.
- The source is convolved with the event-driven IR using Praat
Convolve: "sum", "zero". - The wet result is trimmed to the original duration.
- The final Sound is built on a copy of the original source grid:
wet × Wet + dry × (1-Wet). - Every non-silent result is then peak-normalized to 0.95.
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:
- Dry waveform and Result waveform, each drawn with Praat's own autoscaling.
- Impulse panel with one stem/marker per accepted event and a dotted threshold reference.
- Parameter line showing mode, threshold, spacing and event count.
- Summary strip describing the self-derived IR relationship.
Marker heights are display-normalized feature values. They are not a direct plot of the Gaussian IR sample amplitudes.
Output behavior
- Duration: exactly the original duration.
- Time domain: final output is built on the original Sound grid, so the source time origin is retained.
- Sample rate: preserved.
- Channels: original channel count is preserved, including 3+ channel input.
- Randomness: none; identical input and settings produce the same detector/IR.
- No-event case: no output is created.