ZigZag Time Effect — User Guide
Alternating forward/back-step time reading with two playback modes: Stutter keeps every extracted grain forward, while Scrub reverses grains taken from backward source positions. Random duration and amplitude variation, extraction windows, and optional grain overlap shape the result.
What this does
ZigZag Time Effect repeatedly extracts short grains while moving a source read position through the selected Sound. Processing begins with a forward grain, then alternates between a forward read and a back-step read.
The source position still progresses overall because both branches advance currentPosition, but the backward branch first chooses a read region behind the current position. Playback_mode determines whether that back-step grain is played forward or reversed.
Quick start
- Select exactly one Sound object.
- Run
ZigZag_Effect.praat. - Choose Default (Tape Scrub), Subtle Stutter, Aggressive Glitch, Tape Wobble, or Custom.
- Choose Stutter or Scrub.
- Set Direction_changes_per_second and Zigzag_time_s to establish the base grain scale.
- Use Forward_ratio and Backward_distance_factor to control movement through the source.
- Choose the extraction window and variation amounts.
- Set Segment_overlap_s and Max_segments.
- Run. The result is named
<source>_zigzag_<mode>.
Playback modes
Stutter — always play forward
Forward and back-step grains are both extracted from the source and played in their original direction. The zigzag comes from changes in source position: the backward branch moves the next extraction region behind the current read position, but the grain itself still runs from its lower time to its higher time.
Scrub — reverse when moving back
The source-position logic is the same, but every backward grain is reversed after extraction. The alternating sequence therefore contains true forward and reverse playback:
The Default, Aggressive Glitch and Tape Wobble presets use Scrub. Subtle Stutter uses Stutter.
Timing & source movement
Base grain duration
Zigzag_time_s therefore acts as a limit on the base grain scale. When 1 / Direction_changes_per_second is already shorter, Zigzag_time_s does not change the base duration.
Per-grain duration
Every generated duration remains positive.
Forward branch
Backward branch
If the backward read would exceed the source end, the extraction window is moved left so the requested duration fits whenever possible.
After every backward grain:
The alternating branches therefore use different forward-progress rates: the backward branch advances the read position at 30% of the corresponding forward-branch rate.
Extraction windows, variation & overlap
Window type
Each grain is created directly with Praat Extract part using the selected window:
| Window_type | Praat extraction window |
|---|---|
| Hanning | Hanning |
| Hamming | Hamming |
| Rectangular | Rectangular |
The selected extraction window supplies the grain-edge shaping.
Amplitude variation
One random gain is drawn independently for every grain and applied equally to all of its channels.
Overlap
After all grains have been generated, they are assembled in one batch. With a positive overlap the script uses Concatenate with overlap.
This keeps the requested overlap below the duration of every generated grain. With zero overlap, ordinary Concatenate is used.
Presets
| Preset | Mode | Zigzag time | Forward ratio | Overlap | Changes/s | Back factor | Duration var. | Amp var. |
|---|---|---|---|---|---|---|---|---|
| Default (Tape Scrub) | Scrub | 0.05 s | 0.60 | 2 ms | 20 | 0.80 | 0.15 | 0.10 |
| Subtle Stutter | Stutter | 0.08 s | 0.75 | 3 ms | 12 | 0.50 | 0.08 | 0.05 |
| Aggressive Glitch | Scrub | 0.03 s | 0.50 | 1 ms | 35 | 1.20 | 0.25 | 0.20 |
| Tape Wobble | Scrub | 0.12 s | 0.65 | 5 ms | 8 | 0.60 | 0.12 | 0.08 |
Named presets overwrite only the values shown above. They do not change Window_type, Max_segments, Scale_peak, Draw_visualization, or Play_result.
Parameters & effective limits
| Parameter | Default | Exact role |
|---|---|---|
| Preset | Default (Tape Scrub) | Four named presets plus Custom. |
| Playback_mode | Scrub | Stutter keeps backward-position grains forward; Scrub reverses them. |
| Zigzag_time_s | 0.05 s | Upper constraint used when the reciprocal direction-change duration is larger; must be shorter than the source. |
| Forward_ratio | 0.6 | Controls forward movement of the source read position; positive form field with no internal upper clamp. |
| Segment_overlap_s | 0.002 s | Requested final grain overlap; capped to 99% of the shortest actual grain. |
| Direction_changes_per_second | 20 | Natural number; establishes 1/rate base duration before the Zigzag_time_s limit. |
| Backward_distance_factor | 0.8 | Multiplies current grain duration to determine how far behind currentPosition a backward extraction begins. |
| Window_type | Hanning | Hanning, Hamming, or Rectangular extraction window. |
| Segment_duration_variation | 0.15 | Uniform per-grain duration variation; effective maximum 0.99. |
| Amplitude_variation | 0.10 | Uniform per-grain gain variation around 1; effective maximum 0.99. |
| Max_segments | 500 | Hard maximum number of generated grains. |
| Scale_peak | 0.91 | Final target Sinc70 peak for every non-silent result. |
| Draw_visualization | On | Draw shared-scale waveforms, read-head trajectory and summary. |
| Play_result | On | Play the completed result. |
Channels & output duration
Channel handling
The private processing copy keeps the complete channel layout of the selected Sound. Extraction, reversal, amplitude scaling and concatenation therefore preserve mono, stereo, or higher multichannel channel count.
All channels of a grain share the same source-time region, reversal decision and amplitude factor.
Output duration
Output duration is determined by the actual grain durations and the final effective overlap:
The result is not constrained to the source duration.
Max_segments stop
The processing loop ends when either:
currentPositionreaches the source duration, or- Max_segments grains have been generated.
If the segment cap is reached first, the zigzag read does not continue through the remaining source timeline.
Final peak scaling
After concatenation, the script measures the Sinc70 absolute extremum. Every non-silent result receives:
This is target peak normalization. A non-zero result below the requested peak can therefore be amplified as well as attenuated. Digital silence is left unchanged.
Visualization
The v0.5 Picture view contains:
- Source waveform — display-only mono fold when the input has more than one channel.
- Zigzag output waveform — display-only mono fold when the result has more than one channel.
- Read-head trajectory — x = source position, y = output order.
- Summary strip — preset, mode, segment count, direction-change rate, forward ratio, backward distance, effective overlap, input duration and output duration.
Shared waveform scale
Source and output use one common amplitude range derived from the larger absolute peak with 12% headroom. Their displayed heights are therefore directly comparable.
Read-head trajectory
The trajectory visualizes the actual playback path rather than only extraction blocks:
- green grain stroke: forward playback;
- red grain stroke in Scrub: reversed backward grain;
- red relocation in Stutter: backward source-position jump before a grain that still plays forward;
- gray relocation: movement between other consecutive grains.
For very large renders, the visualization samples the trajectory at a display step derived from the segment count; the DSP still uses every generated grain.
Output behavior
- Name:
<source>_zigzag_Stutteror<source>_zigzag_Scrub. - Channels: same as source.
- Sample rate: same as source.
- Original Sound: unchanged.
- Randomness: independent duration and amplitude draws for every grain.
- Random seed: no user control.
- Final level: target Sinc70 peak = Scale_peak for non-silent output.
- Playback: controlled by Play_result.