ASA Demos: Auditory Scene Analysis Demonstrations
A Praat script collection demonstrating principles of auditory stream segregation, perceptual organization, and musical listening based on Bregman's Auditory Scene Analysis.
What is Auditory Scene Analysis?
Auditory Scene Analysis (ASA) is the process by which the human auditory system organizes sound into perceptually meaningful elements. In real-world listening, multiple sound sources overlap in time and frequency. ASA explains how we segregate these sources into separate "streams" and perceive them as distinct auditory objects.
👂 Key ASA Principles (Bregman, 1990)
- Stream Segregation: Sounds with similar properties (pitch, timbre, location) group together
- Principle of Proximity: Sounds close in frequency or time tend to group
- Principle of Similarity: Sounds with similar acoustic properties group
- Principle of Good Continuation: Smoothly changing sounds group together
- Principle of Common Fate: Sounds with correlated changes group
- Old+New Heuristic: New sounds are segregated from ongoing sounds
Musical Relevance: ASA explains why we can follow individual instruments in an ensemble, perceive melodies despite accompaniment, and experience auditory illusions like the scale illusion or auditory streaming.
Quick Start
- In Praat, open the script editor.
- Load
ASA_Demos.praat. - Select the Experiment_Type from the dropdown menu.
- Click Run → Run (or press Ctrl+R).
- The script will generate and play the selected auditory demonstration.
- A new Sound object named according to the demo will appear in the Objects list.
- Use headphones for best results
- Listen in a quiet environment
- Close your eyes to focus auditory attention
- Listen multiple times to notice different aspects
- Try to consciously switch between possible perceptual organizations
- All demos generate synthetic tones (sine waves or xylophone-like decays)
- Default sample rate: 44.1 kHz
- Amplitude scaling: High tones at 0 dB, Low tones at -6 dB (Demo 2: -1.5 dB)
- All outputs are normalized to peak amplitude of 0.99
- Stereo/mono: All outputs are mono (single channel)
- No external files required - everything is generated procedurally
ASA Theory & Principles
Streaming and Fusion
Two Perceptual States:
- Stream Segregation (Two-stream percept): High and low tones heard as separate sequences
- Stream Integration (One-stream percept): All tones heard as a single sequence
Factors influencing streaming:
| Factor | Effect | Demo |
|---|---|---|
| Frequency Separation | Larger separation → more segregation | Demo 1, 3 |
| Temporal Proximity | Faster tempo → more segregation | Demo 1 |
| Similarity | Similar amplitudes, timbres → more integration | Demo 2 |
| Repetition | More repetition → stronger streaming | Demo 4 |
| Pitch Range | Separate ranges → easier segregation | Demo 8 |
Primitive vs. Schema-Based Organization
🧠 Two Processing Stages
Primitive (Bottom-up) Organization:
- Automatic, innate processes
- Based on acoustic properties (frequency, timing, location)
- Operates on short time scales (seconds)
- Examples: Streaming based on frequency separation
Schema-Based (Top-down) Organization:
- Learned, cognitive processes
- Based on knowledge, expectations, attention
- Operates on longer time scales
- Examples: Recognizing familiar melodies, attending to specific instruments
Musical Applications of ASA
🎵 How ASA Explains Musical Perception
- Polyphonic Listening: How we separate multiple melodies
- Figure-Ground Segregation: Melody vs. accompaniment
- Timbre-Based Grouping: Instrument identification in ensembles
- Rhythmic Perception: How tempo affects pattern recognition
- Auditory Illusions: Scale illusion, Deutsch's tritone paradox
Demonstrations Overview
Demo 1: Stream Segregation (Cycle Speed)
⏱️ Effect of Tempo on Streaming
Stimulus: Alternating high and low tones (H-L-H-L-H-L)
Perceptual Effect: At slow tempo, hear integrated pattern. At fast tempo, hear segregated high and low streams.
ASA Principle: Temporal proximity affects streaming threshold.
Demo 2: Pattern Recognition (Within-Stream)
🎯 Recognizing Patterns in Single Streams
Stimulus A: High tones only, with gaps (H-gap-H-gap-H-gap)
Stimulus B: High and low tones alternating (H-L-H-L-H-L)
Perceptual Effect: Easier to recognize repeating pattern in Stream A than in integrated Stream B.
ASA Principle: Stream segregation facilitates pattern recognition within streams.
Demo 2: Pattern Recognition (Across-Stream)
🔄 Recognizing Patterns Across Streams
Stimulus A: High tones with one low tone at end (H-gap-H-gap-L-gap)
Stimulus B: Alternating pattern with swapped positions (H-L-H-L-L-H)
Perceptual Effect: Demonstrates difficulty of recognizing patterns that cross stream boundaries.
ASA Principle: Patterns are easier to recognize within streams than across streams.
Demo 3: Loss of Rhythm (Large Separation)
🥁 Rhythm Perception with Frequency Separation
Stimulus: Accelerating sequence: H-L-H-gap pattern
Perceptual Effect: At slow tempo, hear gallop rhythm. At fast tempo, lose rhythmic pattern due to streaming.
ASA Principle: Large frequency separation promotes streaming, disrupting rhythm perception.
Demo 3: Loss of Rhythm (Small Separation)
🎵 Preserved Rhythm with Small Separation
Stimulus: Same accelerating pattern but smaller frequency separation
Perceptual Effect: Rhythmic pattern remains perceptible even at fast tempo.
ASA Principle: Small frequency separation maintains integration, preserving rhythm.
Demo 4: Cumulative Effects of Repetition
🔄 Build-up of Streaming with Repetition
Stimulus: Alternating high-low tones repeated in blocks
Perceptual Effect: Streaming becomes stronger with more repetitions.
ASA Principle: Streaming builds up cumulatively over time.
Demo 5: Segregation of Melody from Interference
🎼 Melody Recognition with Distractors
Stimulus: Target melody + random distractor tones
Perceptual Effect: Can you follow the melody despite interference?
ASA Principle: Pitch proximity and good continuation help melody tracking.
Demo 6: Telemann Sonata (Compound Melody)
🎻 Bach/Telemann Violin Solo Streaming
Stimulus: Fast alternating notes that can be heard as one or two streams
Perceptual Effect: At slow tempo, hear single melodic line. At fast tempo, may hear two interleaved streams.
ASA Principle: Compound melodies demonstrate streaming in real music.
Demo 7: African Xylophone (Interlocking Parts)
🎹 Amadinda/Xylophone Interlocking
Stimulus: Two interlocking xylophone parts presented separately then together
Perceptual Effect: Hear separate patterns, then hear how they combine.
ASA Principle: Temporal and pitch factors in polyrhythmic music.
Demo 8: African Xylophone (Pitch Range Separation)
🎚️ Effect of Pitch Range on Streaming
Stimulus: Same as Demo 7 but Part B transposed up one octave
Perceptual Effect: Easier to hear separate streams due to pitch range separation.
ASA Principle: Pitch proximity/remoteness affects streaming strength.
Core Procedures & Implementation
Basic Tone Generation
🔊 MakeTone Procedure
Parameters:
.freq: Frequency in Hz.dur: Duration in seconds.gain: Amplitude multiplier.rise: Rise time (linear fade in).fall: Fall time (linear fade out)
Xylophone Tone Generation
🎹 MakeXylophone Procedure
Characteristics: Exponential decay simulates wooden bar percussion. 40 Hz decay rate gives natural xylophone envelope.
Pattern Repetition
🔄 RepeatSound Procedure
Purpose: Efficiently repeats a sound pattern multiple times without memory leaks.
Global Configuration
Applications & Educational Use
Teaching Auditory Perception
Classroom Demonstrations:
- Psychology Courses: Auditory perception, cognitive psychology
- Music Theory: Polyphonic listening, contrapuntal perception
- Audio Engineering: Mixing principles, auditory masking
- Neuroscience: Auditory processing, neural correlates of streaming
Suggested Activities:
- Play demos, have students describe what they hear
- Compare different listening strategies (passive vs. focused attention)
- Discuss individual differences in perception
- Relate to real-world listening situations
- Experiment with modifying parameters
Research Applications
Experimental Stimuli Generation:
- Psychoacoustics: Measuring streaming thresholds
- Neuroimaging: fMRI/EEG studies of auditory organization
- Clinical Audiology: Testing auditory processing disorders
- Music Cognition: Studying polyphonic perception
Modification Guidelines:
- Change frequencies to test different separations
- Adjust tempo to find streaming thresholds
- Modify amplitudes to test intensity effects
- Add spatial cues (not implemented in current version)
- Incorporate more complex timbres
Musical Composition Insights
🎵 Compositional Implications
Streaming in Music:
- Counterpoint: Voice separation depends on pitch proximity
- Orchestration: Instrument choice affects stream cohesion
- Tempo Effects: Fast passages may cause unintended streaming
- Register Planning: Pitch range distribution affects clarity
Historical Examples:
- Bach's compound melodies: Designed to suggest multiple voices
- African xylophone music: Uses streaming for interlocking patterns
- Minimalist music: Explores perceptual ambiguity
- Electronic music: Intentional streaming effects
Parameters & Technical Details
Frequency Parameters
| Demo | High Frequencies | Low Frequencies | Separation |
|---|---|---|---|
| Demo 1 | 2500, 2000, 1600 Hz | 350, 430, 550 Hz | ~2.5-3 octaves |
| Demo 2 | 2500, 2000, 1600 Hz | 350, 430, 550 Hz | ~2.5-3 octaves |
| Demo 3 (Large) | 1400 Hz | 500 Hz | ~2.8 octaves |
| Demo 3 (Small) | 1400 Hz | 1320 Hz | ~minor 2nd |
| Demo 4 | 2000 Hz | 700 Hz | ~2.9 octaves |
| Demo 5 | Melody: C4-G4 range | Random: C4-G4 | Variable |
| Demo 6 | G4-G5 range | (Single stream) | 1 octave span |
| Demo 7 | 350-709 Hz | Same range | Equipentatonic |
| Demo 8 | 350-709 Hz / 1190-1418 Hz | Two ranges | 1+ octave between parts |
Temporal Parameters
| Demo | Tone Duration | Gap Duration | Total Duration |
|---|---|---|---|
| Demo 1 (Slow) | 400 ms | 0 ms | ~9.6 s total |
| Demo 1 (Fast) | 100 ms | 0 ms | |
| Demo 2 | 100 ms | 100 ms | ~36 s total |
| Demo 3 | 287→88 ms | Tone duration | 12 s |
| Demo 4 | 100 ms | 12.5 ms | ~70 s |
| Demo 5 | 120 ms | 0 ms | ~7.7 s |
| Demo 6 (Slow) | 250 ms | 0 ms | ~9 s |
| Demo 6 (Fast) | 100 ms | 0 ms | |
| Demo 7/8 | 120 ms | 120 ms (in parts) | ~12 s |
Amplitude Parameters
📊 Amplitude Settings
| Parameter | Value | dB | Use |
|---|---|---|---|
| gainHigh | 1.0 | 0 dB | All high tones |
| gainLow | 10^(-6/20) ≈ 0.501 | -6 dB | Demo 1, 3, 4 low tones |
| gainLowDemo2 | 10^(-1.5/20) ≈ 0.841 | -1.5 dB | Demo 2 low tones |
| Final scaling | Peak to 0.99 | -0.09 dBFS | All outputs |
Rationale: -6 dB difference creates clear streaming. -1.5 dB in Demo 2 makes streaming more ambiguous, testing pattern recognition limits.
Modification Guide
To modify demonstrations:
- Change frequencies: Edit the frequency values in the specific demo section
- Adjust tempo: Modify tone durations and gap durations
- Change amplitudes: Modify gainHigh, gainLow, gainLowDemo2 values
- Add spatialization: Convert to stereo and add panning (not implemented)
- Modify timbre: Replace sine tones with more complex waveforms
- Change patterns: Modify the tone sequences in procedures
Example: Create custom frequency separation test: