Dramaturgical Structure Composer β User Guide
Advanced electroacoustic composition tool that reshapes musical form through spectral novelty detection, texture classification, and structural operations β NOT an FX processor, but a form architect.
What this does
This script implements a Dramaturgical Structure Composer β a tool that analyzes the structural properties of an audio recording and reshapes its form according to compositional archetypes. Unlike processors that apply continuous effects, this tool recomposes the material by detecting sections, classifying their textures, and applying structural operations (reordering, looping, silence insertion, stretching, and transformed recalls) to create new musical forms.
π What is Dramaturgical Composition?
Dramaturgy in music refers to the shaping of musical events to create narrative arcs, tension, release, and structural coherence. This tool implements dramaturgical principles through:
- Spectral novelty detection β finding natural section boundaries where timbre changes
- Silence detection β identifying structural gaps in the sound
- Register tracking β measuring pitch centroid to classify texture brightness/darkness
- Texture classification β categorizing sections as tonal, sparse, bright, dark, or noise
- Form archetypes β applying classical structural patterns (arch, contrast, rondo, narrative)
The result is not an "effect" but a recomposition β a new musical structure derived from the source material's own characteristics.
Key Features (v4.0):
- Macro-dynamics preserved β no per-block normalization (unlike v3.0)
- Optional tension arc envelope β shapes overall dynamic contour
- Texture-aware crossfades β different joint types for different texture combinations
- 5 Form Archetypes β Arch, Contrast, Rondo, Narrative, Random swap
- Transformed recalls β filtered, stretched, reversed, quieter echoes of previous material
- Context-aware silence placement β after peaks, before recalls for dramatic effect
- Bolder stretch ranges for Radical mode β 0.25Γ to 4.0Γ
- Organic noise-tail silences β instead of digital zero
Quick start
- In Praat, select exactly one Sound object (minimum 20 seconds, any material).
- Run scriptβ¦ β select
Dramaturgical_Structure_Composer.praat. - Choose Strategy (Conservative, Dramatic, or Radical).
- Select Reorder_mode (Arch, Contrast, Rondo, Narrative, Random).
- Enable/disable options (looping, silences, stretching, recalls, tension arc).
- Click OK β advanced settings dialog appears with additional controls.
- Configure advanced parameters (tension arc position, crossfade mode, silence mode, recall transformations).
- Click OK β processor analyzes, reorders, applies operations, creates new structure.
Dramaturgical Structure Theory
The Analysis Pipeline
Texture Classification
π¨ The Five Texture Types
| Code | Name | Criteria | Color in Viz |
|---|---|---|---|
| 1 | Tonal | Harmonicity > harmonicity_threshold (0.15) | Light blue |
| 2 | Sparse | Energy < 0.001 (very quiet, isolated events) | Gray |
| 3 | Bright | Spectral centroid > spectral_centroid_high_hz (3000 Hz) | Light yellow |
| 4 | Dark | Spectral centroid < spectral_centroid_low_hz (500 Hz) | Blue-gray |
| 5 | Noise | None of the above (broadband, mixed) | Orange |
Texture distance formula (used for contrast maximization):
distance = 0.4 Γ |texβ - texβ| + 0.3 Γ |centβ - centβ|/5000 + 0.3 Γ |rmsβ - rmsβ|/max(rms)
Tension Arc Envelope
Texture-Aware Crossfades
Analysis & Detection
Analysis Parameters
| Parameter | Default | Description |
|---|---|---|
| Min_section_duration_s | 8 | Smallest allowed section (seconds) |
| Max_section_duration_s | 90 | Largest allowed section (clipped) |
| Novelty_threshold | 0.25 | Spectral change threshold for section boundaries |
| Silence_threshold_dB | -45 | Below this = silence |
| Min_silence_duration_s | 0.5 | Minimum silence to register (advanced) |
| Harmonicity_threshold | 0.15 | Above this = tonal |
| Spectral_centroid_low_hz | 500 | Below this = dark |
| Spectral_centroid_high_hz | 3000 | Above this = bright |
Spectral Novelty Algorithm
Silence Detection
Form Archetypes
ποΈ Arch Form (mode 2)
Structure: Build to peak at arc_peak_position, then mirror down
Algorithm:
- Sort sections by RMS (energy) ascending
- Place quietest sections at beginning and end
- Place loudest section at peak position
- Fill outward alternating left/right from peak
Dramaturgy: Gradual increase in intensity/density to climax, then relaxation
Example: Introduction β Build β Climax β Dissolution β Coda
β‘ Contrast Form (mode 3)
Structure: Maximize difference between adjacent sections
Algorithm (greedy):
- Start with darkest section (lowest centroid)
- For each position, pick unused section with maximum texture distance from previous
- Continue until all sections placed
Dramaturgy: Juxtaposition, abrupt shifts, dialectical structure
Example: Dark β Bright β Sparse β Tonal β Noise
π Rondo Form (mode 4)
Structure: Refrain alternates with contrasting episodes
Algorithm:
- Find most "distinctive" section (max harmonicity + centroid deviation) as refrain
- Order: Refrain β Episodeβ β Refrain β Episodeβ β Refrain β ...
- Final Refrain at end
Dramaturgy: Recurring material provides unity; episodes provide variety
Example: A B A C A D A (classical rondo)
π Narrative Form (mode 5)
Structure: Dark β Building β Bright β Recall of opening β Fade
Algorithm:
- Sort sections by spectral centroid (brightness) ascending
- Place darkest first, brightest at ~70% of duration
- Append recall of opening section at end
Dramaturgy: Story arc: exposition β development β climax β recollection β dissolution
Example: Dark introduction β developing middle β bright climax β distant memory β fade
π² Random Swap (mode 6)
Structure: Random permutations of section order
Algorithm: Perform N random swaps (N = floor(num_sections/2))
Dramaturgy: Chance operations, unpredictable structure
Use: Experimental work, aleatoric composition
Structural Operations
Strategy Settings
| Strategy | Loop Prob | Silence Prob | Stretch Prob | Recall Prob | Max Ops | Silence Range | Stretch Range |
|---|---|---|---|---|---|---|---|
| Conservative | 0.2 | 0.15 | 0.2 | 0.25 | 3 | 2 s | 0.7-1.4Γ |
| Dramatic | 0.4 | 0.35 | 0.4 | 0.4 | 6 | 8 s | 0.4-2.5Γ |
| Radical | 0.6 | 0.5 | 0.5 | 0.6 | 10 | 20 s | 0.25-4.0Γ |
Operation Types
Advanced Settings Dialog
| Parameter | Default | Description |
|---|---|---|
| Arc_peak_position | 0.65 | Where climax occurs (0-1) |
| Arc_exaggeration | 1.5 | Dynamic range multiplier |
| Crossfade_mode | Texture-aware | Fixed (30 ms) or texture-based durations |
| Silence_mode | Noise tail | Digital zero or organic noise from source |
| Recall_apply_lowpass | 1 | Filter recalled material |
| Recall_reduce_amplitude | 1 | Quieter recalls |
| Recall_allow_reverse | 1 | 35% chance of reversed recall |
| Recall_amplitude_factor | 0.7 | Amplitude multiplier for recalls |
| Recall_lowpass_hz | 2500 | Cutoff for low-pass filter |
| Keep_debug_objects | 0 | Preserve intermediate sounds |
Visualization & Analysis
Visualization Panels
Reading the Section Visualization
- Light blue (tonal): Pitched, harmonic material β likely melodic or harmonic content
- Orange (noise): Broadband, unpitched β textures, effects, breath, friction
- Gray (sparse): Low energy, isolated events β silence, single notes, gaps
- Light yellow (bright): High spectral centroid β high frequencies prominent
- Blue-gray (dark): Low spectral centroid β bass, low register, muffled
The dark blue bars show relative RMS energy β taller bars = louder sections. This helps identify climax sections and dynamic structure.
Section numbers correspond to original detection order. In the reordered output, these numbers are rearranged according to the selected archetype.
Diagnostic Info Output
- Number of silences detected
- Number of sections detected with timestamps
- Each section's texture classification, centroid, RMS
- Final section order with arrow notation
- List of planned operations with parameters
- Output duration relative to input
Applications
Electroacoustic Composition
Use case: Generating new structural versions of existing recordings
Technique: Dramatic strategy with Narrative or Arch form
Workflow:
- Record or collect source material with varied textures (20-120 seconds)
- Run analysis with Conservative strategy first to understand section detection
- Adjust min_section_duration and novelty_threshold as needed
- Apply Dramatic or Radical strategy with desired archetype
- Export output and use as movement in larger work
Sound Design for Media
Use case: Creating evolving textures with narrative arcs
Technique: Radical strategy with Contrast or Rondo form
Applications:
- Film scoring: Generate cue structures from source material
- Game audio: Create adaptive music stems with structural variation
- Sound installation: Generate long-form evolving pieces from field recordings
- Podcast/radio: Reshape interview material into narrative forms
Research & Education
Use case: Demonstrating structural analysis and recomposition
Technique: Enable visualization, compare archetypes on same source
Learning outcomes:
- Understand spectral novelty as structural boundary detector
- See how texture classification maps to perceived timbre
- Hear how different archetypes shape narrative flow
- Explore relationship between original and recomposed structures
Experimental Music
Use case: Chance operations and aleatoric structure generation
Technique: Radical strategy with Random swap and high operation probabilities
Approach:
- Use same source multiple times with different random seeds
- Layer multiple outputs for complex textures
- Combine with live processing or improvisation
- Use as source material for further transformation
Practical Workflow Examples
π¬ Film Scene: Building Tension
Goal: Create suspenseful cue that builds to climax
Settings:
- Strategy: Dramatic
- Reorder mode: Arch
- Tension arc: ON, peak at 0.7, exaggeration 1.8
- Operations: Allow silences, stretching, recalls
- Source: Ambient drone + occasional impacts
Result: Quiet sections at beginning and end, loudest at 70% point, with dramatic silences after peaks
ποΈ Rondo from Field Recording
Goal: Create rondo structure from environmental sounds
Settings:
- Strategy: Dramatic
- Reorder mode: Rondo
- Texture-aware crossfades: ON
- Operations: Loops and recalls allowed
- Source: 2-minute field recording (birds, traffic, wind)
Result: Most distinctive sound becomes refrain, alternates with other textures β creates "theme and variations" from found sound
π Radical Narrative Transformation
Goal: Extreme recomposition of speech into abstract narrative
Settings:
- Strategy: Radical
- Reorder mode: Narrative
- Tension arc: ON, peak at 0.65, exaggeration 2.0
- All operations allowed, high probabilities
- Source: 60-second spoken monologue
Result: Speech becomes abstract: dark/filtered recalls of opening, stretched phonemes, compressed silences β creates dreamlike narrative arc
Troubleshooting Common Issues
Cause: Novelty_threshold too low/high for material
Solution: Adjust novelty_threshold (0.15-0.35 range), check min_section_duration
Cause: Harmonicity_threshold inappropriate for source
Solution: Adjust harmonicity_threshold (0.1-0.25), or modify centroid thresholds
Cause: Many operations (loops, silences) adding/subtracting time
Solution: Reduce max_operations, check stretch factors, or use Conservative strategy
Cause: Crossfade_mode = fixed or texture-aware producing short crossfades
Solution: Switch to texture-aware mode, or manually increase crossfade durations in procedure
Cause: recall_amplitude_factor too low, or low-pass filter too aggressive
Solution: Increase recall_amplitude_factor (0.8-0.9), raise recall_lowpass_hz (3000-4000)
Advanced Techniques
- More tonal-sensitive: Reduce harmonicity_threshold to 0.08
- More noise-sensitive: Increase to 0.2
- Narrow brightness range: Set centroid_low=1000, centroid_high=2000
- Broad classification: Use wider thresholds (300-4000 Hz)
- Loop-heavy: Increase loop_probability, reduce others
- Silence-heavy: Increase silence_insert_probability, silence_duration_range_s
- Stretch-heavy: Increase stretch_probability, widen stretch_factor range
- Recall-heavy: Increase recall_probability, enable all recall transformations
When silence_mode = 2, the script extracts the last 2 seconds of the source, heavily low-passes it (0-400 Hz), and scales to very low amplitude (0.02 peak). This creates a natural ambient floor rather than digital silence. For different "silence colors," modify the filter frequencies or use different source regions.