Bigram Stutter Effect — User Guide
Probabilistic audio stuttering using Markov chain (bigram) logic. Segments audio into windows and makes chain decisions: repeat current segment or advance to next, creating natural‑sounding glitch effects.
What this does
This script implements a probabilistic stutter effect using a bigram (Markov chain) model. It divides audio into fixed‑length windows, then makes sequential decisions: at each step, either repeat the current segment (stutter) or advance to the next segment. This creates natural‑sounding glitch patterns that are more organic than simple repetition or random skipping.
Key Features:
- Bigram Markov chain logic – Each decision depends only on current state
- 6 stereo processing modes – From identical to ping‑pong patterns
- 6 built‑in presets – Subtle glitch to intense stutter effects
- Visual decision chain display – See the Markov process in action
- True stereo processing – Independent or coordinated L/R patterns
- Overlap crossfading – Smooth transitions between segments
Technical Implementation: (1) Segmentation: Divides audio into fixed‑length windows. (2) Bigram chain: For each channel, builds a sequence where at each position, random number determines: if < stutter_probability → repeat current segment, else → advance to next. (3) Stereo coordination: Applies one of six modes to relate L and R chains. (4) Extraction & assembly: Extracts segments, applies fade in/out, concatenates according to chain. (5) Visualization: Draws decision chains as colored circles (red=stutter, green=advance).
Quick start
- In Praat, select exactly one Sound object (mono or stereo).
- Run script… →
Bigram_Stutter_Effect.praat. - Choose a Preset or select "Custom" for full control.
- Adjust Window size (ms) and Stutter probability if desired.
- Select a Stereo processing mode (even for mono input).
- Enable Draw visualization to see decision chains.
- Click OK – processed sound named
originalname_stutteredappears.
Bigram Model Explained
The Markov Decision Process
Action space: {STUTTER, ADVANCE}
Transition probabilities:
• P(STUTTER | current) = stutter_probability
• P(ADVANCE | current) = 1 – stutter_probability
Chain Generation Algorithm
Mathematical Properties
Comparison to Other Stutter Methods
• Pattern: [1, 1, 1, 2, 2, 2, 3, 3, 3]
• Mechanical, predictable
• No decision chain
Random skip/repeat:
• Pattern: [1, 3, 5, 2, 4, 1, 6]
• Unnatural jumps
• Lacks temporal coherence
Bigram Markov (this script):
• Pattern: [1, 1, 2, 2, 2, 3, 4, 4, 5]
• Locally coherent (adjacent segments)
• Natural‑sounding, "human" feel
• Maintains forward progression
Stereo Processing Modes
Mode 1: Mono to Stereo (Identical)
Effect: Centered, mono‑like stutter
Use case: Basic stutter effect, mono compatibility
Pattern example:
• L: [1, 1, 2, 2, 2, 3, 4]
• R: [1, 1, 2, 2, 2, 3, 4] (identical)
Mode 2: Independent
Effect: Wide, chaotic stereo field
Use case: Maximum width, experimental textures
Pattern example:
• L: [1, 1, 2, 2, 2, 3, 4]
• R: [1, 2, 2, 3, 3, 3, 4] (different)
Mode 3: Complementary
Effect: Anti‑correlated, "breathing" motion
Use case: Psychoacoustic effects, width modulation
Pattern example:
• L: [1, 1, 2, 2, 2, 3, 4] (stutters at positions 2, 4, 5)
• R: [1, 2, 2, 3, 3, 4, 4] (advances when L stutters)
Mode 4: Offset
Effect: Echo‑like, canon effect
Use case: Rhythmic patterns, delayed textures
Pattern example:
• L: [1, 1, 2, 2, 2, 3, 4]
• R: [1, 1, 1, 2, 2, 2, 3] (shifted right by 1)
Mode 5: Asymmetric
Effect: L more active/stuttery, R more stable
Use case: Focused effects, lead‑accompaniment
Pattern example:
• L: [1, 1, 2, 2, 2, 3, 4, 4] (p=0.3)
• R: [1, 2, 2, 3, 4, 4, 5, 5] (p=0.15, fewer stutters)
Mode 6: Ping‑Pong
Effect: Panning stutter, side‑to‑side motion
Use case: Rhythmic panning, dance music effects
Pattern example:
• L: [1, 1, 2, 3, 3, 4, 5] (stutters at positions 2, 5)
• R: [1, 2, 2, 3, 4, 4, 5] (stutters at positions 3, 6)
Presets & Parameters
Built‑in Presets
| Preset | Window (ms) | Probability | Overlap (ms) | Character |
|---|---|---|---|---|
| Subtle Stutter | 80 | 0.20 | 10 | Light glitch, barely noticeable |
| Medium Stutter | 60 | 0.35 | 8 | Clear stutter, musical effect |
| Heavy Stutter | 40 | 0.55 | 5 | Intense, glitch‑heavy texture |
| Glitch Hop | 100 | 0.40 | 15 | Rhythmic, beat‑oriented stutter |
| Broken Record | 25 | 0.60 | 3 | Fast, frequent micro‑stutters |
| Tape Malfunction | 150 | 0.15 | 20 | Long segments, rare but long stutters |
Custom Parameters
| Parameter | Default | Range | Description |
|---|---|---|---|
| Window_size_ms | 50 | 10‑500 | Length of each segment in milliseconds |
| Stutter_probability_0_to_1 | 0.3 | 0‑1 | Probability to repeat current segment |
| Overlap_ms | 5 | 0‑50 | Crossfade overlap between segments |
| Stereo_mode | 1 | 1‑6 | How L and R channels relate (see modes above) |
| Draw_visualization | ✓ | on/off | Show decision chain plot |
| Play_result | ✓ | on/off | Auto‑play after processing |
- Window size vs content: For speech, 40‑80 ms captures phonemes. For music, 80‑150 ms captures beats/harmony. For granular effects, 20‑40 ms.
- Probability: 0.1‑0.25 = subtle; 0.3‑0.45 = musical; 0.5‑0.7 = intense glitch; >0.7 = may get stuck on segments.
- Overlap: Typically 5‑20% of window size. Larger = smoother transitions but less definition. 0 = hard cuts.
- Stereo mode + probability: In Asymmetric mode, R probability = 0.5 × L probability.
Visualization
The Decision Chain Plot
• Red circles = STUTTER decision (repeat current segment)
• Green circles = ADVANCE decision (move to next segment)
• Horizontal position = sequential step in chain
• Vertical position: 0.5 = stutter, 1.0 = advance
• Left panel = L channel decisions
• Right panel = R channel decisions
• Shows first 100 decisions of each chain
Reading the Visualization
Mostly green with few red:
• Low stutter probability
• Smooth progression with occasional repeats
• Example: [G, G, R, G, G, G, R, G]
Alternating red/green clusters:
• Medium probability
• Segments repeat 1‑3 times then advance
• Example: [R, R, G, R, G, G, R, R, R, G]
Mostly red with few green:
• High stutter probability
• Gets "stuck" on segments
• Long repeats before advancing
• Example: [R, R, R, R, G, R, R, R, G]
Stereo Mode Visualization
Identical (Mode 1):
• L and R panels exactly match
Independent (Mode 2):
• No correlation between L and R
• Different patterns
Complementary (Mode 3):
• When L is red, R is green at same position
• Anti‑correlated patterns
Offset (Mode 4):
• R panel looks like L panel shifted right
Asymmetric (Mode 5):
• R has fewer red circles (half probability)
Ping‑Pong (Mode 6):
• Red circles alternate between L and R
Waveform Displays
• Top panel: Original waveform (gray)
• Bottom panel: Processed stereo waveform (blue)
• Shows time‑domain effect of stutter decisions
• Original vs processed comparison
• Stereo waveform shows L (top) and R (bottom) channels
Applications
Electronic Music Production
Use case: Creating glitch, IDM, and experimental textures.
Technique: Apply Heavy Stutter preset to drum loops or synth lines.
Example: Drum loop → 40 ms window, 0.55 probability, Independent stereo mode = complex, wide stutter pattern.
Vocal Processing & Effects
Use case: Adding stutter effects to vocals for electronic/pop tracks.
Technique: Use Medium Stutter with 60‑80 ms windows (phoneme‑length).
Result: Natural‑sounding vocal stutter that respects speech rhythm.
Sound Design for Media
Use case: Creating malfunction, glitch, and transition sounds.
Workflow:
- Start with UI sounds, mechanical samples
- Apply Broken Record preset (25 ms, high probability)
- Use Ping‑Pong stereo mode for spatial interest
- Layer with original for enhanced effect
Experimental Composition
Use case: Generating rhythmic and textural material from field recordings.
Technique: Environmental sounds with Tape Malfunction preset.
Example: Rain recording → 150 ms windows, 0.15 probability = occasional long stutters creating rhythmic structure.
Practical Workflow Examples
🎵 Vocal Stutter for Electronic Track
Goal: Add modern stutter effect to vocal hook.
Settings:
- Preset: Medium Stutter
- Custom adjustments: Window=70 ms, Probability=0.4
- Stereo mode: Complementary
- Overlap: 10 ms
Result: Musical vocal stutter with stereo width modulation.
🥁 Drum Loop Glitch
Goal: Create glitch‑hop style drum stutter.
Settings:
- Preset: Glitch Hop
- Custom adjustments: Window=100 ms (quarter note at 150 BPM)
- Stereo mode: Ping‑Pong
- Probability: 0.45
Result: Rhythmic stutter that pans L‑R, suitable for breakbeat/IDM.
🎬 Sci‑Fi UI Sound Design
Goal: Create malfunctioning computer/interface sound.
Settings:
- Preset: Broken Record
- Custom adjustments: Window=30 ms, Probability=0.65
- Stereo mode: Independent
- Overlap: 3 ms (hard cuts)
Result: Fast, chaotic stutter suggesting system failure.
Troubleshooting
Cause: Window size too large relative to audio duration.
Solution: Reduce window_size_ms (try 25‑100 ms) or use longer source audio.
Cause: Overlap too small or zero, creating discontinuities.
Solution: Increase overlap_ms (5‑20 ms), ensure overlap < window size.
Cause: Probability too low or window too large.
Solution: Increase stutter_probability (0.4‑0.6), decrease window_size_ms (30‑60 ms).
Cause: Probability too high (>0.7).
Solution: Reduce probability (0.3‑0.5), or combine with shorter window for faster progression.
Cause: Mono input being processed differently than expected.
Solution: Remember mono inputs are duplicated to stereo; true stereo requires stereo input.
Performance Notes
- Window count: More segments = more processing time. Long audio with small windows creates many segments.
- Overlap: Larger overlap requires more crossfade calculations.
- Stereo modes: Independent and Complementary modes require separate chain generation.
- Visualization: Drawing decision chains adds processing time (minimal).
- Memory: All segments extracted simultaneously; very long audio may require significant RAM.
Creative Tips
- Layer multiple passes: Apply effect, bounce, apply again with different settings.
- Combine with other effects: Stutter → reverb/delay → stutter again.
- Rhythmic alignment: Set window to match tempo (60000/BPM = ms per beat).
- Selective processing: Apply to only certain sections of audio (use Praat's Edit window first).
- Parameter automation: Manually change parameters between script runs for evolving effects.