Self-Adaptive Sieve Convolution — User Guide

Granular convolution in which modular sieve rules route each source grain to one of two source-derived impulse responses or to a dry path, with optional adaptive IR harvesting and crossfading.

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

What this does

Self-Adaptive Sieve Convolution divides the source into overlapping grains and classifies each grain using two modular sieve rules. A grain that matches Sieve A is convolved with IR_A; a grain that matches Sieve B is convolved with IR_B; all other grains pass through the dry route. Both impulse responses are harvested from the source itself, so the processor continually reuses the sound's own material as convolution kernels.

When Adaptive updates is enabled, new source-derived IRs are harvested during the run and crossfaded against the previous IRs. The result is a deterministic, source-dependent granular convolution texture whose routing pattern is controlled by modular arithmetic rather than random choice.

Priority rule: if a grain satisfies both sieve equations, Sieve A wins. There is no simultaneous A+B convolution for that grain.

What is a sieve?

Here, a sieve is a periodic selection rule on the grain number n:

Sieve A hit when: n mod mA = rA Sieve B hit when: n mod mB = rB

For example, n mod 3 = 0 selects grain indices 0, 3, 6, 9... . A remainder outside the legal range is automatically folded modulo its modulus, so a remainder of 5 with modulus 3 becomes 2.

The two rules create interlocking periodic routes through the grain stream. The script uses these elementary congruence classes directly; it does not implement the full Boolean union/intersection/complement algebra of Xenakis's general sieve theory.

Quick start

  1. Select exactly one Sound.
  2. Run Self_Adaptive_Sieve_Convolution.praat.
  3. Start with Subtle Shimmer or Dense Reverb.
  4. Listen to the relation between Segment_ms, Hop_fraction and the two sieve patterns.
  5. Use Adaptive_updates when you want the source-derived IR colour to evolve through the file.
  6. Read the visualization: top/bottom ticks mark A/B routes; full vertical lines mark IR updates.

Presets

PresetGrain / hopIR / HPA sieveB sieveAdaptive schedule
Custom50 ms / 0.50300 ms / 500 Hz3 / 05 / 2100 grains / 10-grain crossfade
Subtle Shimmer25 ms / 0.50150 ms / 500 Hz3 / 05 / 2200 / 20
Dense Reverb80 ms / 0.50500 ms / 300 Hz2 / 03 / 150 / 5
Micro Pulse10 ms / 0.2580 ms / 600 Hz3 / 04 / 1150 / 15
Slow Morph150 ms / 0.75600 ms / 200 Hz4 / 07 / 3300 / 30
Prime Sieve50 ms / 0.50300 ms / 500 Hz2 / 03 / 1100 / 10
Sparse Scatter60 ms / 0.50350 ms / 500 Hz7 / 011 / 3120 / 12
Dissolve100 ms / 0.60400 ms / 400 Hz3 / 15 / 0250 / 40

Presets also set Tail_ms and Dry_gain. Slow Morph and Dissolve deliberately use non-COLA hop placements; the resulting inter-grain pulsation is part of their preset character.

Controls

ControlDefaultMeaning
Segment_ms50Source grain length. Grains are extracted with a Hanning window.
Hop_fraction0.5Hop = segment duration × this fraction. Must be greater than zero.
Tail_ms100Maximum retained convolution tail per wet grain; final buffer is source duration + this tail.
Ir_ms300Duration of each source-harvested impulse response.
Ir_hp_hz500Optional high-pass applied to harvested IRs. 0 Hz bypasses the filter.
Dry_gain0.8Gain for grains that hit neither sieve.
Sieve_a_mod / rem3 / 0Elementary congruence selecting A grains.
Sieve_b_mod / rem5 / 2Elementary congruence selecting B grains.
Adaptive_updatesOnPeriodically harvest fresh A/B IRs from later source positions.
Update_interval100 grainsHow often the script attempts a new adaptive harvest.
Crossfade_grains10Number of routed grains over which old and new IRs are blended.

Processing pipeline

  1. Read source duration, sample rate, channels and original start time.
  2. Find valid sieve-consistent locations for the initial IR_A and IR_B.
  3. Harvest each IR from the source, optionally high-pass it, apply short edge fades and an internal conditioning level.
  4. Create a silent multichannel output buffer of source duration + Tail_ms.
  5. Walk the source on the grain-hop grid; an end-anchored final grain is added when needed so the source suffix is covered.
  6. Route each grain to A, B or dry. Wet grains are convolved with the active IR and trimmed to segment + tail.
  7. RMS-match each wet grain to its corresponding dry grain. This is why the internal scalar IR conditioning level does not act like a user-visible wet-level control.
  8. Apply local fades and overlap-add the processed grain into the output buffer.
  9. When adaptive updating is active, harvest new sieve-consistent IRs and crossfade old→new across routed grains.
  10. Target-normalize the complete output to 0.9 and apply 10 ms / 20 ms edge fades.

Adaptive IR behaviour

Adaptive updates are not random. At each update interval, the script searches forward to the next grain index compatible with the relevant sieve and harvests a new source segment there. Old and new IRs are then linearly blended across the requested number of A- or B-routed grains.

Because the IRs are harvested from the source rather than synthesized, timbral changes in the source can become changes in the convolution colour. The same source and the same settings therefore produce the same routing and IR schedule.

Channels, duration and level

Output name: SieveConv_<source>.

Visualization

Historical and compositional context

The word sieve has a specific history in twentieth-century composition. Iannis Xenakis developed a sieve theory based on modular arithmetic and logical combinations of congruence classes, using it to generate pitch collections, rhythms and other parameter sequences. In that tradition, a condition such as n mod m = r is an elementary periodic selector.

This script uses that same modular-selection idea as a routing device for grains, but in a deliberately simpler form: two elementary residue classes decide whether each grain enters convolution path A, convolution path B, or the dry path. The number theory therefore becomes an audible orchestration mechanism rather than a pitch-scale generator.

Further reading: Christopher Ariza, “The Xenakis Sieve as Object: A New Model and a Complete Implementation,” Computer Music Journal 29(2), 2005, 40–60. doi:10.1162/0148926054094396.