FSM Event Generator — Kotoński Edition — User Guide
Algorithmic composition tool: finite-state machine generating deterministic event sequences inspired by Włodzimierz Kotoński's stochastic synthesis techniques.
What this does
This script implements a finite-state machine (FSM) event generator for algorithmic composition, inspired by Polish composer Włodzimierz Kotoński's stochastic synthesis techniques as heard in Aela (1967). The tool generates sequences of sonic events (tones and noise bands) based on a deterministic state machine with four compositional states.
Key Features:
- 5 Compositional Presets — Based on Kotoński's stochastic techniques
- Custom FSM Control — User-defined state progression and transitions
- Dual Event Types — Tones (sinusoids) and noise bands (filtered noise)
- 4 Compositional States — Each with distinct timing, frequency, and density characteristics
- Visual Score Output — Graphical representation of the generated composition
- Deterministic Algorithm — Reproducible results based on input parameters
- Compositional Statistics — Detailed analysis of generated event structure
Technical Implementation: (1) FSM Initialization: Four states with unique parameter sets for event duration, gaps, frequencies, and amplitude envelopes. (2) Event Generation: For each of N events, determine current state, generate event parameters based on state characteristics. (3) State Transitions: Progress through states based on preset strategy or custom progression rules. (4) Audio Rendering: Create each event as either tone (sinusoid with attack/release) or noise band (filtered Gaussian noise). (5) Visualization: Generate score-like graphic showing event timing, frequency, type, and state. (6) Analysis: Calculate statistics about the composition's structure and balance.
Quick start
- In Praat, ensure no objects are selected.
- Run script… → select
FSM_Generator_Kotonski_Edition.praat. - Choose Preset (1-5 for Kotoński-inspired strategies, 6 for custom).
- Set Duration_s (total composition length in seconds).
- Set Num_events (total number of sonic events).
- Adjust Global_amplitude, attack/release times as needed.
- If using Custom preset, set compositional controls (state progression, transition mode, etc.).
- Enable Draw_score for visual output, Play_result for immediate audition.
- Click OK — script generates composition, displays statistics, creates "FSM_[name]" sound object.
Compositional Theory
Finite-State Machine Composition
🎵 Four Compositional States
State 1: Sparse Pointillism — Short events, long gaps, high register
State 2: Bass Punctuations — Longer events, shorter gaps, low register
State 3: Dense Clusters — Very short events, moderate gaps, mid-high register
State 4: Textural Bands — Medium events, very short gaps, wide frequency range
Each state defines probability distributions for event duration, gaps, frequency range, amplitude, and event type (tone/noise).
State Characteristics
| State | Duration Range | Gap Range | Frequency Focus | Typical Density |
|---|---|---|---|---|
| State 1 | 15–25 ms | 350–650 ms | High (800–6000 Hz) | Sparse (0.5–2 events/sec) |
| State 2 | 100–350 ms | 20–80 ms | Low (60–500 Hz) | Moderate (2–5 events/sec) |
| State 3 | 10–40 ms | 5–30 ms | Mid-high (1500–7000 Hz) | Dense (5–15 events/sec) |
| State 4 | 150–450 ms | 25–75 ms | Wide (200–5000 Hz) | Medium (3–8 events/sec) |
Stochastic Synthesis Principles
Kotoński's Approach
Event Generation Algorithm
Audio Event Types
Tones (Sinusoids)
Noise Bands (Filtered Noise)
State Transition Strategies
Built-in Preset Strategies
Custom Transition Modes
Preset Strategies
Preset 1: Aela I - Sparse Pointillism
🎵 High Register, Long Silences
Duration: 50.0 seconds
Events: 80 total (1.6 events/second)
Frequency range: 800–6000 Hz (high register)
Event type: Tones only
Character: Delicate, pointillistic texture with considerable silence between events
Inspiration: Kotoński's sparse high-register passages in Aela
Preset 2: Aela II - Bass Punctuations
🎵 Low Interruptions, Weighted Presence
Duration: 40.0 seconds
Events: 60 total (1.5 events/second)
Frequency range: 60–500 Hz (low register)
Event type: Tones only
Character: Bass-registral punctuations with weighty presence
Inspiration: Low-frequency interruptions in stochastic works
Preset 3: Aela III - Dense High Cluster
🎵 Tight Swarm, High Density
Duration: 35.0 seconds
Events: 200 total (5.7 events/second)
Frequency range: 1500–7000 Hz (high-mid register)
Event type: Tones only
Character: Dense swarm of high-frequency events with minimal gaps
Inspiration: Cluster textures in electroacoustic music
Preset 4: Aela IV - Filtered Noise Bands
🎵 Spectral Drift, Noise Textures
Duration: 55.0 seconds
Events: 90 total (1.6 events/second)
Frequency range: 200–5000 Hz (wide spectrum)
Event type: Noise bands only
Character: Evolving noise bands with spectral drift
Inspiration: Colored noise textures in granular synthesis
Preset 5: Aela V - Mixed Texture
🎵 Alternating Characters, Balanced
Duration: 60.0 seconds
Events: 150 total (2.5 events/second)
Frequency range: 150–4000 Hz (balanced spectrum)
Event type: Mixed tones and noise (alternating)
Character: Balanced alternation between pitched and noisy events
Inspiration: Contrasting material in stochastic composition
Parameters & Controls
Global Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Preset | option menu | 1 (Aela I) | Compositional strategy |
| Duration_s | positive real | 45.0 | Total composition length (seconds) |
| Sample_rate | positive integer | 44100 | Audio sampling rate (Hz) |
| Num_events | positive integer | 120 | Total number of sonic events |
| Global_amplitude | positive real | 0.6 | Overall amplitude scaling (0.0–1.0) |
| Attack_ms | positive real | 10 | Attack time per event (milliseconds) |
| Release_ms | positive real | 15 | Release time per event (milliseconds) |
| Draw_score | boolean | yes | Generate visual score |
| Play_result | boolean | yes | Play after generation |
Custom Mode Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| State_progression | option menu | Linear cycle | How states progress (4 options) |
| Transition_mode | option menu | Event-based | When state transitions occur (3 options) |
| Transition_every_N | positive integer | 25 | Events between transitions (event-based mode) |
| Frequency_min_Hz | positive real | 80 | Minimum event frequency (Hz) |
| Frequency_max_Hz | positive real | 8000 | Maximum event frequency (Hz) |
| Density_multiplier | real | 1.0 | Global density scaling (<1 = denser, >1 = sparser) |
| State1_type | option menu | Tones | Event type preference for state 1 |
| State2_type | option menu | Tones | Event type preference for state 2 |
| State3_type | option menu | Tones | Event type preference for state 3 |
| State4_type | option menu | Tones | Event type preference for state 4 |
| Noise_bandwidth_Hz | positive real | 800 | Default bandwidth for noise bands (Hz) |
Workflow & Output
Processing Pipeline
Output Information
📊 Compositional Statistics
The script provides detailed statistics in Praat's Info window:
- Event distribution across 4 states (counts and percentages)
- Material balance between tones and noise events
- Timing statistics (average duration, gaps, sound/silence ratio)
- Frequency range covered by the composition
- Processing times for each stage (generation, rendering, visualization)
- Final output details (duration, peak amplitude, name)
Visual Score Features
Practical Applications
Algorithmic Composition
Use case: Generating structured electroacoustic textures
Technique: Use presets as starting points, then customize
Workflow:
- Generate multiple variations with different parameters
- Layer outputs for richer textures
- Use as source material for further processing (granular, spectral, etc.)
- Combine with other synthesis techniques
Teaching Stochastic Methods
Use case: Demonstrating algorithmic composition principles
Learning outcomes:
- Understand finite-state machine concepts in music
- Explore parameter control in algorithmic composition
- Hear effects of density, frequency range, event type changes
- Connect visual score to sonic result
Sound Design
Use case: Creating evolving textures for media
Technique: Custom mode with specific state progressions
Applications:
- Ambient backgrounds for film/games
- Transition sounds with evolving character
- Abstract sound effects with controlled randomness
- Granular synthesis source material
Troubleshooting Common Issues
Cause: Large Num_events value or high sample rate
Solution: Reduce Num_events (start with 50–200), use 44100 Hz sample rate
Cause: Global_amplitude too high or too many overlapping events
Solution: Reduce Global_amplitude (0.3–0.7 range), increase gaps via Density_multiplier > 1.0
Cause: Frequency_max_Hz too low or state settings favoring low frequencies
Solution: Increase Frequency_max_Hz (4000–10000 Hz), try Preset 1 or 3
Cause: Praat Picture window too small or composition too dense
Solution: Increase Praat Picture window size, reduce Num_events for clearer visualization