Risset Mutations Generator — User Guide
Algorithmic composition inspired by Jean‑Claude Risset: generates evolving spectral textures through parameterized harmonic mutation, creating structured computer music from mathematical principles.
What this does
This script implements Risset‑inspired algorithmic composition — generating structured computer music through parameterized spectral mutation. Inspired by Jean‑Claude Risset's pioneering work in computer music, the script creates evolving sound textures by scheduling multiple "events" (sine‑based voices) that mutate harmonically over time according to mathematical functions. Each event follows a unique trajectory in frequency‑amplitude space, creating complex emergent textures from simple sine wave foundations.
Key Features:
- 4 Compositional Strategies — Full 3‑part form, odd‑harmonic study, high‑order study, density study
- Stochastic Event Scheduling — Random yet structured placement of musical events
- 3 Spectral Mutation Modes — Chebyshev polynomial transformations for harmonic evolution
- Advanced Visualization — Score‑like display showing frequency trajectories over time
- Parameterized Composition — Control over duration, density, frequency range, harmonic character
- Real‑time Synthesis — Generates complete compositions from mathematical specifications
Technical Implementation: (1) Event Scheduling: Based on selected preset, generate N events with random start times, durations, frequencies, and mutation modes. (2) Spectral Synthesis: For each event, create a sine wave at the base frequency. (3) Harmonic Mutation: Apply Chebyshev polynomial transformations (modes 1‑3) to create evolving harmonic spectra. (4) Amplitude Shaping: Apply time‑varying amplitude and mutation envelopes. (5) Accumulation: Mix all events into a master composition. (6) Visualization: Generate score‑like display showing frequency trajectories with time‑based color coding.
Quick start
- In Praat, ensure no objects are selected (the script generates sound from scratch).
- Run script… →
risset_mutations_generator.praat. - Select a Compositional Strategy preset (start with "1. Full Composition (3‑Part Arc)").
- Set master_duration (30.0 seconds is a good starting point).
- Enable show_visuals to see the frequency trajectory score.
- Click OK — the composition generates, visualizes, and plays automatically.
- The result appears as "Master_Mix_XXXXXX" where XXXXXX is a random run ID.
Risset & Spectral Theory
Risset's Computer Music Philosophy
Spectral Thinking
Risset approached sound as spectral evolution rather than notes:
🎵 Beyond Equal Temperament
Traditional music: Discrete pitches (12‑TET), fixed timbres, rhythmic patterns.
Risset's approach: Continuous frequency spaces, evolving spectra, parameterized transformations.
Key principles:
- Synthesis from first principles (sine waves as atoms)
- Psychoacoustic exploration (how we perceive sound)
- Algorithmic generation (music as mathematical process)
- Emergent complexity (simple rules → rich results)
The Mutation Concept
Risset's "mutations" transform simple sounds into complex ones:
Chebyshev Polynomial Transformations
Mathematical Basis
The script uses Chebyshev polynomials of the first kind:
Three Mutation Modes
🔀 Spectral Transformation Modes
Mode 1 (Woody/Hollow):
Formula: (1‑m)×sine + m×(‑0.3×sine + 2.0×sine³ − 0.7×sine⁵)
Blends sine with combination of T₁, T₃, T₅
Result: Emphasizes odd harmonics (1,3,5) → clarinet‑like tones
Mode 2 (Brassy/Chaos):
Formula: (1‑m)×sine + m×(0.5×sine + 0.5×T₂(sine))
Blends sine with T₁ and T₂ mixture
Result: Adds even harmonics (2) → brighter, brass‑like character
Mode 3 (Glassy/Chime):
Formula: (1‑m)×sine + m×T₇(sine)
Pure 7th‑order Chebyshev polynomial
Result: High‑order harmonics → metallic, bell‑like timbres
Algorithmic Composition Structure
Event‑Based Architecture
The composition is built from scheduled events:
Stochastic vs Deterministic
Controlled randomness creates variation within structure:
• Event start times (within section boundaries)
• Event durations (within preset ranges)
• Frequencies (within preset ranges)
• Peak mutation amounts
Deterministic elements:
• Number of events (fixed per preset)
• Section boundaries (for Preset 1)
• Mutation formulas (exact polynomials)
• Envelope shapes (mathematical functions)
Result: Each run is unique but follows the same structural rules.
Compositional Strategies
Four Preset Architectures
| Preset | Events | Duration Range | Frequency Range | Mode Bias | Musical Form |
|---|---|---|---|---|---|
| 1. Full Composition | 14 | 4‑14 s | 110‑880 Hz | Mode 1→2→3 | 3‑part arc: Beginning, Development, Conclusion |
| 2. Odd Harmonics | 8 | 10‑15 s | 55‑275 Hz | Mode 1 only | Sustained drone study |
| 3. High Order | 12 | 4‑9 s | 440‑1100 Hz | Mode 3 only | Glassy, chime‑like textures |
| 4. Density Study | 25 | 1.5‑4 s | 110‑1320 Hz | Mode 2 only | Dense, chaotic, brassy clusters |
🎼 Preset 1: Full Composition (3‑Part Arc)
Structural Design:
- Section 1 (Beginning): Events 1‑4, slow/long, low frequencies, Mode 1, moderate amplitude
- Section 2 (Development): Events 5‑10, medium duration, mid‑high frequencies, Mode 2, high amplitude
- Section 3 (Conclusion): Events 11‑14, medium duration, mid frequencies, Mode 3, low amplitude
Musical Result: A complete miniature composition with introduction, climax, and resolution. The harmonic character evolves from woody (Mode 1) through brassy (Mode 2) to glassy (Mode 3).
🎵 Preset 2: Study in Odd Harmonics
Focus: Exploration of clarinet‑like, hollow tones through exclusive use of Mode 1 (odd‑harmonic emphasis).
Parameters: 8 long events (10‑15 s), low frequency range (55‑275 Hz), all Mode 1.
Musical Result: A sustained drone texture with slowly evolving woody timbres. The limited harmonic palette creates coherence; overlapping long tones create beating and phasing effects.
🔔 Preset 3: Study in High Order
Focus: Metallic, bell‑like textures through exclusive use of Mode 3 (7th‑order Chebyshev).
Parameters: 12 medium events (4‑9 s), high frequency range (440‑1100 Hz), all Mode 3.
Musical Result: A sparkling, chime‑like texture with prominent high harmonics. Shorter events create rhythmic interplay; high frequencies create bright, crystalline quality.
🎺 Preset 4: Study in Density
Focus: Dense, chaotic textures through many short events with Mode 2 (even‑harmonic emphasis).
Parameters: 25 short events (1.5‑4 s), wide frequency range (110‑1320 Hz), all Mode 2, high amplitude.
Musical Result: A bustling, brassy texture with constant activity. Many overlapping short events create complex interference patterns; wide frequency range fills spectral space.
Parameter Ranges
📊 Preset Parameter Specifications
Base frequency: Fixed at 110 Hz (A2) for all presets, but individual events span:
- Preset 1: 110‑880 Hz (1‑8× base)
- Preset 2: 55‑275 Hz (0.5‑2.5× base)
- Preset 3: 440‑1100 Hz (4‑10× base)
- Preset 4: 110‑1320 Hz (1‑12× base)
Event counts: 8‑25 events depending on density goals.
Time distributions: Preset 1 has structured sections; others have uniform random within bounds.
Amplitude ranges: Peak amplitude 0.2‑1.0, with presets having different average levels.
Synthesis Pipeline
Event Generation
Stochastic Scheduling
For each preset, events are generated with controlled randomness:
Parameter Arrays
Five arrays store event parameters:
Voice Synthesis
Per‑Event Processing
Envelope Design
Two complementary envelopes shape each event:
Formula:
pk × (abs(sin(π×t/dur)))^1.5Shape: Rises to peak at center, falls to zero at ends
Purpose: Spectral complexity peaks in middle of event
Amplitude envelope: Controls overall loudness
Formula:
(sin(π×t/dur))²Shape: Raised cosine (smooth fade in/out)
Purpose: Natural attack/decay without clicks
Interaction: Sound begins as pure sine, mutates to complex spectrum, returns to sine.
Master Mix Assembly
Additive Accumulation
All voices sum into a master buffer:
Timing Precision
To avoid alignment issues:
Visualization
The Spectral Score
Graphical Representation
🎨 Time‑Frequency Score Display
The visualization creates a "score" showing all events as frequency trajectories over time.
Layout:
- X‑axis: Time (0 to master_duration seconds)
- Y‑axis: Frequency (0 to max_freq Hz, auto‑scaled)
- Background: Black with subtle gray grid
- Events: Colored lines showing frequency modulation
- Base frequency: Dimmer horizontal line at event's base freq
Purpose: Visualize the algorithmic composition structure, showing event density, frequency distribution, and temporal evolution.
Color Coding System
Time‑based gradient shows progression:
Drawing Algorithm
Frequency Trajectory Calculation
Each event's frequency modulation is drawn:
Visualization Pipeline
Interpretation Guide
📈 Reading the Spectral Score
Horizontal position: When event occurs in time
Vertical position: Base frequency (center of wiggly line)
Line wiggle amplitude: Amount of frequency modulation (pk parameter)
Line color: Time of event start (blue=early, red=late)
Line brightness: Mutation mode (brightest=Mode 1)
Event density: How many lines in time region
Frequency distribution: How lines are spread vertically
Preset 1 special pattern: Three clear clusters (sections)
Applications
Algorithmic Composition
Use case: Generate complete musical works from mathematical specifications.
Technique: Use Preset 1 (Full Composition) as starting point, modify parameters, run multiple times, select best results.
Workflow:
- Generate several compositions with different run IDs
- Listen and select interesting results
- Note parameter combinations that work well
- Modify script to fine‑tune those parameters
- Export selected compositions as WAV files
Sound Design & Texture Creation
Use case: Create evolving textures for film, game, or experimental music.
Technique: Use Preset 2 (Odd Harmonics) for woody drones, Preset 3 (High Order) for metallic textures, Preset 4 (Density) for chaotic beds.
Advantages:
- Parameterized control over spectral character
- Reproducible results (with Run ID)
- Visual feedback of spectral evolution
- Can generate long textures (minutes) by increasing duration
Educational Tool
Use case: Teach spectral synthesis, algorithmic composition, computer music history.
Technique: Compare presets, modify parameters, observe audio and visual results.
Learning objectives:
- Understand Risset's spectral approach
- Hear effects of different Chebyshev polynomials
- See relationship between parameter settings and musical results
- Learn algorithmic composition strategies
Research & Exploration
Use case: Explore parameter spaces in algorithmic composition.
Technique: Modify script to systematically vary parameters, analyze results.
Example studies:
- How does event density affect perceived complexity?
- What frequency ranges work best for each mutation mode?
- How do different envelope shapes affect perception?
- Can listeners distinguish between different presets?
Practical Workflow Examples
🎬 Film Score Texture
Goal: Create evolving background texture for sci‑fi scene.
Settings:
- Preset: 3 (High Order)
- Duration: 45.0 s
- Post‑process: Add reverb and subtle pitch modulation in DAW
- Visualization: Disable for faster rendering
Result: A sparkling, metallic texture that slowly evolves over 45 seconds, suitable for space or technology scenes.
🎵 Generative Music Installation
Goal: Create continuously varying sound for art installation.
Settings:
- Preset: 1 (Full Composition)
- Duration: 180.0 s (3 minutes)
- Run in loop: Modify script to generate new composition when previous ends
- Parameter drift: Slowly change base frequency over multiple runs
Result: A never‑repeating sound environment with clear structural arcs every 3 minutes.
🔬 Psychoacoustic Experiment
Goal: Test perception of spectral mutation.
Settings:
- Create pairs of sounds: same parameters except mutation mode
- Use short durations (5‑10 s) for clear comparison
- Ask listeners: "Which sound is more metallic/woody/brassy?"
- Record visualizations for correlation with perception
Result: Data on how different Chebyshev polynomials affect timbre perception.
Advanced Techniques
- Parameter automation: Modify script so parameters change during composition (e.g., base frequency sweeps up over time).
- External control: Read parameters from text file for precise control over each event.
- Multi‑layer output: Generate separate tracks for each mutation mode, mix in DAW.
- Real‑time control: Adapt script to respond to MIDI or OSC messages for live performance.
- Export events separately: Save each event as individual sound for granular rearrangement.
- Extreme durations: 300 s (5 minute) compositions with very slow evolution.
- Micro‑events: 100 events of 0.5 s each for granular texture.
- Frequency modulation: Replace fixed frequency with sweeping or LFO‑modulated frequency.
- Custom polynomials: Experiment with different Chebyshev combinations or other orthogonal polynomials.
- Spatialization: Add stereo panning based on frequency or time position.
Troubleshooting Common Issues
Cause: Too few events for duration, or events clustered in small time region.
Solution: Increase event count, adjust time distribution bounds, or use Preset 4 (high density).
Cause: Too many high‑frequency events with high mutation amounts.
Solution: Use Preset 2 (lower frequencies), reduce pk values, or use Mode 1 (softer mutation).
Cause: Praat picture window too small, or events outside expected frequency range.
Solution: Maximize Praat picture window; check max_freq calculation in script.
Cause: Many events with long durations, or visualization enabled for long compositions.
Solution: Disable visualization (show_visuals = 0), reduce event count or duration.
Technical Deep Dive
Chebyshev Polynomial Properties
Harmonic Generation
Why Chebyshev polynomials for spectral mutation?
Numerical Stability
Direct polynomial evaluation vs. trigonometric form:
Random Number Generation
Praat's Random Functions
The script uses Praat's built‑in random generators:
Reproducibility
Run ID ensures reproducible compositions:
• Script starts with randomInteger(1, 999999)
• This seed determines all subsequent random values
• Same Run ID = same random sequence = identical composition
Practical use:
• Note Run ID from successful compositions
• Hard‑code that ID to recreate exact composition
• Or: Modify script to accept Run ID as parameter
Without fixed seed: Different composition each run (desired for exploration).
Memory Management
Object Cleanup Strategy
The script carefully manages Praat objects:
Formula‑Based Efficiency
Using Praat's Formula for vectorized operations: