Hexaphonic Serial Audio Processor — User Guide

Advanced serial composition techniques applied to audio processing: six independent 12-tone rows control amplitude modulation, timing, and spatialization parameters.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 2.0 (2025) License: MIT License Repo: https://github.com/ShaiCohen-ops/Praat-plugin_AudioTools
Contents:

What this does

This script implements hexaphonic serial audio processing — an advanced application of twelve-tone serial composition techniques to digital audio effects. Six independent serial rows control different audio processing parameters, creating complex, algorithmically determined transformations that evolve over time according to strict serialist principles.

Key Features:

What is serial audio processing? Traditional audio effects: manual parameter control, predictable patterns. Serial audio processing: Applies twelve-tone serial composition principles to audio effect parameters. Advantages: (1) Algorithmic complexity: Creates intricate, evolving patterns impossible to design manually. (2) Historical connection: Links digital audio processing to 20th-century avant-garde composition. (3) Parameter integration: Multiple effects parameters controlled by unified mathematical system. (4) Reproducibility: Same serial rows produce identical results. (5) Creative exploration: Discovers unexpected audio transformations through systematic processes. Use cases: Experimental music composition, sound design for media, academic research in algorithmic composition, audio art installations, music theory pedagogy.

Technical Implementation: (1) Row Definition: Six 12-value rows define parameter sequences. (2) Transformations: Generate prime, inversion, retrograde, and retrograde-inversion forms. (3) Section Structure: Four sections with different transformation combinations. (4) Parameter Mapping: Convert row values (0-11) to audio parameters. (5) Segment Processing: Apply amplitude modulation with different waveforms. (6) Spatialization: Stereo panning controlled by serial values. (7) Time Stretching: Pitch shifting via resampling with serial control. (8) Quality Control: Perceptual scaling and parameter validation.

Quick start

  1. In Praat, select exactly one Sound object.
  2. Run script…hexaphonic_serial_processor.praat.
  3. Choose Preset or select "Custom" for manual row definition.
  4. If using custom, define six 12-tone rows (values 0-11 separated by spaces).
  5. Set parameter ranges for modulation rate, depth, and duration.
  6. Enable perceptual_rate_scaling for natural frequency perception.
  7. Click OK — processing begins with detailed progress reporting.
  8. Result appears as "originalname_AM" and plays automatically.
Quick tip: Start with Classic Webern preset for balanced, symmetrical processing. Use perceptual_rate_scaling = yes for more musical modulation rates. The six rows control: (1) Modulation rate, (2) Modulation depth, (3) Waveform shape, (4) Segment duration, (5) Stereo panning, (6) Playback speed. Values 0-11 map to parameter ranges — for example, modulation rate from 0.5 Hz to 50 Hz. The processing divides your audio into 48 segments (4 sections × 12 steps) with serial-controlled transformations. Listen for the systematic evolution of textures across sections.
Important: PROCESSING TIME — Creates 48 individual audio segments + transformations. Long audio files will take significant time. EXTREME PARAMETERS — Very high modulation rates or depths can create harsh, noisy results. SERIAL CONSTRAINTS — Each value 0-11 appears exactly once per row (true 12-tone rows). SECTIONAL STRUCTURE — Audio is processed in fixed sequential sections, not real-time. MEMORY USAGE — High segment count may require substantial RAM for long files. QUALITY CONSIDERATIONS — Resampling for pitch shifting may slightly reduce audio quality. Original sound is preserved unchanged.

Serial Composition Theory

Twelve-Tone Serialism Basics

🎵 The Twelve-Tone System

Concept: Equal treatment of all twelve pitch classes through ordered sequences

Historical context: Arnold Schoenberg's method from 1920s

Audio adaptation: Apply same principles to effect parameters

Core serial principles:

PRIME ROW (P): Original ordered sequence of 12 values Example: [0, 3, 7, 11, 2, 6, 9, 1, 5, 8, 4, 10] Properties: Each value 0-11 appears exactly once INVERSION (I): Subtract each value from 11 Formula: I[n] = 11 - P[n] Example: [11, 8, 4, 0, 9, 5, 2, 10, 6, 3, 7, 1] RETROGRADE (R): Reverse the order Formula: R[n] = P[12-n] Example: [10, 4, 8, 5, 1, 9, 6, 2, 11, 7, 3, 0] RETROGRADE-INVERSION (RI): Reverse then invert Formula: RI[n] = 11 - P[12-n] Example: [1, 7, 3, 6, 10, 2, 5, 9, 0, 4, 8, 11] Musical significance: Creates systematic variation while maintaining structure All transformations preserve the "all-interval" property Provides mathematical foundation for creative work

Hexaphonic Extension

Six Independent Parameter Rows

Multi-parameter serial control:

This script uses SIX simultaneous serial rows: 1. MODULATION RATE: Controls LFO frequency for AM Range: min_rate to max_rate (typically 0.5-50 Hz) 2. MODULATION DEPTH: Controls AM intensity Range: min_depth to max_depth (typically 0.05-0.95) 3. WAVEFORM SHAPE: Determines modulator waveform Mapping: 0-2=sine, 3-5=triangle, 6-8=square, 9-11=sawtooth 4. SEGMENT DURATION: Controls time segment length Range: min_duration to max_duration (typically 0.1-3.0s) 5. STEREO PANNING: Controls left-right position Mapping: 0=left, 6=center, 11=right 6. PLAYBACK SPEED: Controls pitch shifting Mapping: 0=-6 semitones, 6=original, 11=+5 semitones Each row operates independently but follows same transformation rules

Classical Serial Presets

Preset 1: Classic Webern

⚪ Anton Webern Style

Characteristics: Symmetrical structures, economical material

Audio effect: Balanced, subtle transformations

Best for: Delicate textures, academic demonstrations

Webern row properties:

Modulation Rate: "0 11 3 8 4 7 9 2 10 1 5 6" Features: Symmetrical intervals, palindromic tendencies Duration: "5 6 4 7 3 8 2 9 1 10 0 11" Creates varied but balanced time structure Speed: "6 6 6 5 7 5 7 6 6 6 6 6" Mostly centered with slight variations Maintains pitch coherence Overall effect: Mathematical precision with subtle variations

Preset 2: Berg Symmetrical

🔵 Alban Berg Influence

Characteristics: Lyrical, with hidden symmetries

Audio effect: Expressive, evolving transformations

Best for: Emotional content, dramatic development

Preset 3: Schoenberg Op.25

🟡 Original Serial Master

Characteristics: Historic first completely serial piece

Audio effect: Classic serial sound, academic reference

Best for: Historical studies, fundamental demonstrations

Other Specialized Presets

PresetStyleCharacteristicsBest For
Chromatic AscentLinearSequential values 0-11Clear progression
All-IntervalComplexContains all 11 intervalsMaximum variety
Pentatonic SerialModalEmphasizes pentatonic intervalsMusical accessibility
Whole-Tone SerialSymmetricalWhole-tone scale emphasisDreamlike quality
Random ChaosStochasticRandom permutationsExperimental textures

Parameter Mapping System

Modulation Parameters

Amplitude Modulation (Ring Modulation)

Mathematical foundation:

AMPLITUDE MODULATION formula: output(t) = input(t) × [1 + depth × modulator(t)] Where modulator(t) is: Sine: sin(2π × rate × t) Triangle: 1 - 4 × |round(rate×t) - rate×t| Square: sign(sin(2π × rate × t)) Sawtooth: 2 × ((rate×t) - floor(rate×t)) - 1 Parameter mapping: Rate: row value → frequency (0.5-50 Hz) Depth: row value → modulation intensity (5%-95%) Shape: row value → waveform type Effect characteristics: Sine: Smooth, musical tremolo Triangle: Gentle, evolving sweeps Square: Rhythmic, pulsed effect Sawtooth: Sweeping, siren-like

Perceptual Rate Scaling

Logarithmic frequency mapping:

LINEAR mapping (perceptual_rate_scaling = no): frequency = min_rate + (value/11) × (max_rate - min_rate) LOGARITHMIC mapping (perceptual_rate_scaling = yes): frequency = min_rate × (max_rate/min_rate) ^ (value/11) Comparison example (min_rate=0.5, max_rate=50): Value 0: Linear=0.5 Hz, Log=0.5 Hz Value 3: Linear=14.0 Hz, Log=1.7 Hz Value 6: Linear=27.5 Hz, Log=5.9 Hz Value 9: Linear=41.0 Hz, Log=20.2 Hz Value 11: Linear=50.0 Hz, Log=50.0 Hz Perceptual advantage: Logarithmic matches human frequency perception Better distribution of musically useful rates Avoids clustering most values at high end

Spatial and Temporal Parameters

Stereo Panning System

Linear panning control:

Panning mapping: pan_position = row_value / 11 left_gain = 1 - pan_position right_gain = pan_position Examples: Value 0: pan_position=0.0 → left_gain=1.0, right_gain=0.0 (full left) Value 6: pan_position=0.545 → left_gain=0.455, right_gain=0.545 (slight right) Value 11: pan_position=1.0 → left_gain=0.0, right_gain=1.0 (full right) Implementation: Extract left and right channels Apply gain factors separately Recombine into stereo Alternative approach (not used): Equal-power panning: left=√(1-pan), right=√(pan) More natural but computationally expensive

Time and Pitch Control

Segment duration and speed:

DURATION mapping: duration = min_duration + (value/11) × (max_duration - min_duration) Example: min=0.1s, max=3.0s, value=6 → duration = 1.55s SPEED mapping (pitch shifting): semitones = value - 6 (range: -6 to +5 semitones) speed_factor = 2 ^ (semitones / 12) target_hz = original_hz × speed_factor Examples: Value 0: -6 semitones, factor=0.5, target_hz=11025 (half speed) Value 6: 0 semitones, factor=1.0, target_hz=22050 (original) Value 11: +5 semitones, factor=1.334, target_hz=29433 (higher pitch) Resampling process: Resample to target_hz, then back to original_hz Preserves duration while changing pitch

Waveform Shape Mapping

Four Modulator Waveforms

Shape value interpretation:

Value ranges determine waveform: 0-2: SINE WAVE Formula: sin(2π × rate × t) Character: Smooth, musical, classic tremolo 3-5: TRIANGLE WAVE Formula: 1 - 4 × |round(rate×t) - rate×t| Character: Gentle sweeps, evolving texture 6-8: SQUARE WAVE Formula: sign(sin(2π × rate × t)) Character: Rhythmic, pulsed, aggressive 9-11: SAWTOOTH WAVE Formula: 2 × ((rate×t) - floor(rate×t)) - 1 Character: Sweeping, siren-like, intense Distribution: Each waveform gets 3 of 12 possible values Equal probability in random rows Systematic variation in composed rows

Serial Transformations

Four Standard Transformations

🔄 Mathematical Variations

Concept: Systematic generation of related row forms

Purpose: Create variation while maintaining structural integrity

Audio effect: Coherent yet evolving parameter sequences

Transformation algorithms:

PRIME (P): Original row P[n] = original_row[n] INVERSION (I): Subtract from 11 I[n] = 11 - P[n] Effect: Creates complementary parameter values RETROGRADE (R): Reverse order R[n] = P[13 - n] Effect: Time-reversed parameter sequence RETROGRADE-INVERSION (RI): Reverse then invert RI[n] = 11 - P[13 - n] Effect: Maximum transformation while preserving structure Example with row [0, 3, 7, 11, 2, 6, 9, 1, 5, 8, 4, 10]: P: [0, 3, 7, 11, 2, 6, 9, 1, 5, 8, 4, 10] I: [11, 8, 4, 0, 9, 5, 2, 10, 6, 3, 7, 1] R: [10, 4, 8, 5, 1, 9, 6, 2, 11, 7, 3, 0] RI: [1, 7, 3, 6, 10, 2, 5, 9, 0, 4, 8, 11]

Cross-Coupled Section Structure

Four-Part Formal Design

Section transformation assignments:

SECTION A: PRIME COMBINATION Rate: P, Depth: P, Shape: P, Duration: P, Panning: P, Speed: P Character: Direct presentation of original rows SECTION B: CROSS-COUPLED Rate: I, Depth: R, Shape: P, Duration: I, Panning: R, Speed: I Character: Inverted rates with retrograde depth/panning SECTION C: CROSS-COUPLED Rate: R, Depth: P, Shape: I, Duration: R, Panning: I, Speed: R Character: Retrograde rates with inverted shape/panning SECTION D: CROSS-COUPLED Rate: RI, Depth: I, Shape: R, Duration: RI, Panning: P, Speed: RI Character: Maximum transformation with prime panning Design philosophy: Each section has unique transformation combination Creates systematic evolution across piece Maintains relationships between parameters Provides large-scale formal structure

Mathematical Properties

Transformation relationships:

Identity relationships: I(I(row)) = P(row) (Double inversion returns prime) R(R(row)) = P(row) (Double retrograde returns prime) RI(RI(row)) = P(row) (Double RI returns prime) Combination properties: R(I(row)) = RI(row) I(R(row)) = RI(row) These are equivalent definitions Group theory perspective: The four transformations form a mathematical group Closure: Any combination of transformations yields another transformation Identity: P serves as identity element Inverses: Each transformation has an inverse Audio significance: Guarantees coherent parameter evolution Creates perceptible structural relationships Provides mathematical foundation for artistic results

Processing Architecture

Segment-by-Segment Processing

Step-wise audio transformation:

FOR each of 4 sections: FOR each of 12 steps in section: EXTRACT segment using duration row value APPLY speed transformation (pitch shift) APPLY amplitude modulation with rate/depth/shape APPLY panning transformation STORE processed segment END FOR END FOR CONCATENATE all 48 segments OUTPUT final combined sound Segment properties: Each segment has unique parameter combination Duration varies according to duration row Processing order follows serial sequence Total processing: 4×12 = 48 individual segments

Quality Control Measures

Parameter validation and safety:

Duration validation: IF current_time + step_duration > total_duration step_duration = total_duration - current_time END IF IF step_duration ≤ 0.01: skip segment Resampling safety: IF |speed_factor - 1.0| > 0.01: apply resampling ELSE: skip resampling to preserve quality Memory management: Remove temporary objects after each segment Final cleanup of all intermediate segments Preserve only original and final result Progress reporting: Detailed info window output Step-by-step parameter display Final summary statistics

Applications

Experimental Music Composition

Use case: Creating complex, evolving textures for avant-garde music

Technique: Apply to instrumental recordings or electronic sounds

Settings: Use composed rows like Webern or Berg for structural integrity

Sound Design for Media

Use case: Generating unique sound transformations for film/games

Technique: Process Foley sounds or synth patches with serial transformations

Settings: Random Chaos preset for unexpected results

Music Theory Pedagogy

Use case: Demonstrating serial composition principles audibly

Technique: Use simple audio examples to hear serial transformations

Settings: Chromatic Ascent for clear parameter progression

Algorithmic Composition Research

Use case: Studying systematic parameter control in audio processing

Technique: Analyze relationships between serial structures and audio results

Settings: Custom rows with specific interval properties

Audio Art Installation

Use case: Creating evolving soundscapes for gallery settings

Technique: Process environmental sounds with serial methods

Settings: Long durations with subtle parameter ranges

Practical Workflow Examples

🎼 Academic Demonstration

Goal: Teach serial composition through audio examples

Settings:

  • Preset: Classic Webern
  • Sound: Simple sine wave or piano note
  • Parameters: Moderate ranges for clarity
  • Duration: Short audio for quick demonstration

Result: Clear audible demonstration of serial transformations

🎬 Sci-Fi Sound Design

Goal: Create alien or futuristic sound effects

Settings:

  • Preset: Random Chaos
  • Sound: Synthetic textures or processed vocals
  • Parameters: Extreme ranges for dramatic effect
  • Waveforms: Square and sawtooth for edgy character

Result: Unpredictable, evolving sci-fi textures

🔬 Research Experiment

Goal: Study parameter perception in serial structures

Settings:

  • Preset: Custom designed rows
  • Sound: Controlled test signals
  • Parameters: Specific ranges for experimental control
  • Analysis: Detailed parameter logging

Result: Systematic data on serial audio perception

Creative Techniques

Row design strategies:
  • Symmetrical rows: Create balanced, palindromic effects
  • Extreme intervals: Use large jumps for dramatic changes
  • Clustered values: Group similar values for cohesive sections
  • Complementary rows: Design rows that work well together
  • Cultural references: Base rows on existing serial compositions
Parameter combination ideas:
  • Slow rates + deep modulation: Creates evolving swells
  • Fast rates + square waves: Creates rhythmic textures
  • Extreme panning + pitch shifts: Creates spatial disorientation
  • Varied durations + consistent rates: Creates formal structure
  • Complementary transformations: Highlights serial relationships

Troubleshooting Common Issues

Problem: Processing takes extremely long time
Cause: Very long audio file, complex parameter combinations
Solution: Use shorter audio segments, simplify parameter ranges
Problem: Output sounds noisy or distorted
Cause: Extreme modulation depths or rates, square/sawtooth waves
Solution: Reduce depth range, use sine/triangle waves, lower amplitudes
Problem: Cannot hear serial structure
Cause: Too complex source material, subtle parameter changes
Solution: Use simpler sounds, increase parameter contrast, listen multiple times
Problem: Memory errors during processing
Cause: Too many segments, insufficient RAM
Solution: Process shorter files, increase system memory, close other applications
Problem: Unexpected parameter behavior
Cause: Invalid row values, incorrect row formatting
Solution: Verify rows contain values 0-11 exactly once, check space separation

Technical Reference

Complete Parameter Reference

ParameterTypeDefaultDescription
Presetoptionmenu1Pre-configured serial row sets
mod_rate_rowsentence"0 3 7 11 2 6 9 1 5 8 4 10"Modulation rate row (0-11)
mod_depth_rowsentence"5 9 2 11 0 7 3 10 1 6 8 4"Modulation depth row (0-11)
mod_shape_rowsentence"2 8 5 0 11 3 7 1 9 4 10 6"Waveform shape row (0-11)
duration_rowsentence"6 2 9 1 11 4 8 0 7 3 10 5"Segment duration row (0-11)
panning_rowsentence"4 8 1 10 3 7 0 11 5 9 2 6"Stereo panning row (0-11)
speed_rowsentence"6 5 7 4 8 3 9 2 10 1 11 0"Playback speed row (0-11)
min_ratepositive0.5Minimum modulation rate (Hz)
max_ratepositive50Maximum modulation rate (Hz)
min_depthpositive0.05Minimum modulation depth
max_depthpositive0.95Maximum modulation depth
min_durationpositive0.1Minimum segment duration (s)
max_durationpositive3.0Maximum segment duration (s)
perceptual_rate_scalingboolean1Use logarithmic rate mapping

Output Characteristics

Generated Sound Properties

Technical specifications:

Output object: "originalname_AM" Type: Stereo Sound (always converted to stereo) Duration: Approximately original duration (varies with speed changes) Sampling frequency: Same as original Content: 48 sequentially processed segments Segment properties: Each segment has unique parameter combination AM applied with one of four waveform types Stereo panning applied Pitch may be shifted ±6 semitones Duration varies 0.1-3.0 seconds Quality considerations: Resampling may introduce slight artifacts Extreme parameters may cause distortion Segment boundaries are abrupt (rectangular window)

Performance Characteristics

Processing Time Factors

Major time consumers:

1. Segment extraction: 48× O(n) with segment length 2. Resampling: 48× O(n) when speed changes needed 3. AM processing: 48× O(n) with sound length 4. Panning: 48× O(n) with sound length 5. Concatenation: O(n) with total length Dominant factors: Number of segments (always 48) Original audio length Complexity of parameter combinations Typical performance: 1-minute audio: 2-5 minutes processing 5-minute audio: 10-25 minutes processing 30-minute audio: 1-2 hours processing Memory usage: Peak: 48× segment size in memory Final: only original and result preserved