Distributed Sound Ecology — Interacting Sound Agents

Create rhythmic fragments, resonant textures and evolving sound processes from a recording. Three sound agents select material, respond to one another and shape a new musical timeline through independent, centralized or decentralized control.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel License: MIT License Repository: Praat AudioTools on GitHub

Musical concept

Distributed Sound Ecology (DSE) starts with a recorded sound and treats it as material shared by three computational agents. Each agent has different preferences for the acoustic qualities of source segments. The agents decide when to act and what material to select; in the decentralized architecture they can also influence each other's activity and choices.

Compositional idea: compose the conditions for interaction rather than prescribing every note or sound event. Musical form can emerge through patterns of activity, delayed response, competition, cooperation and the transformation of shared sound material.

The same agent decisions can be rendered in different ways: as short fragments, sounds with retained resonance, evolving voices, or sustained sound processes. This lets the composer explore the relation between interaction and sonic continuity without changing the underlying event sequence.

Quick start

  1. Open a recording in Praat and select one Sound in the Objects window.
  2. Run Distributed_Sound_Ecology.praat. Keep its companion dce_engine.py in plugin_AudioTools/py/.
  3. Choose Decentralized for interacting agents, or All three (comparison) to hear the different control structures using the same source and seed.
  4. For a starting point, use Duration_s = 15, Coupling = 4, Memory_s = 0.30, Selection_temperature = 0.12, Event_feedback = Hybrid, and Seed = 1.
  5. Choose a Rendering approach. Persistent Processes is a good starting point for sustained tones and resonant recordings; Fragmented (Legacy) is well suited to short rhythmic material.
  6. Leave Play = 1 to audition the result automatically. In the three-condition comparison, the Decentralized Sound is played; all three remain available in Praat Objects.
For a smooth ending: in Persistent Processes, open the output settings and adjust Final_fade_s (default 1.0 s, range 0–10 s). This fades the finished stereo mix at the end. The setting is specific to Persistent Processes.

Four rendering approaches

The agents select source material using the same simulation and event log. Rendering determines how these decisions become audible sound.

Fragmented (Legacy)

Short selected grains are placed directly on the output timeline with brief edge fades. Useful for rhythmic recombination, pointillism, speech fragments and sharply articulated textures.

Sustain-Aware

Selected segments can continue into the original recording, retaining available decay or sustain. The renderer uses release envelopes, entry fades and optional preservation of overlapping tails.

Continuous Voices

Each agent can maintain a source-reading voice. Some decisions introduce new attacks; others move the playhead toward selected material through a gradual crossfade. Suitable for exploring continuity between selections.

Persistent Processes

Agent decisions update sound processes lasting across musical phrases. Material streams blend over time; sustained regions can be extended by looping and transformed without a fresh attack for every decision.

Persistent Processes: shaping a continuous texture

Morph_s controls how quickly a process approaches newly selected material. Higher values create slower changes; lower values produce more responsive timbral motion. Articulation = Activity phrases starts a new voice after a sufficiently long gap in an agent's activity; Source attacks allows selected attacks to start phrases. Final_fade_s shapes the ending of the complete output.

Suggested listening experiment: keep the source and Seed fixed, then compare Morph_s = 0.5, 1.0 and 3.0 seconds. This changes the pace of sonic transformation without altering the agents' event log.

Natural continuation depends on what exists in the recording. Looping and crossfading can support longer sound processes, but cannot guarantee perfectly seamless transitions for every source.

Three control architectures

Independent

Three agents operate without external coupling. Each has its own activity, fatigue, event timing and preferences for source material.

Centralized

All agents receive a shared time-varying control trajectory, G(t). Their responses differ according to their own firing rates and material preferences.

Decentralized

Agents influence one another through a directed network. Slow activity memory, fast event pulses and optional grain-selection coupling create reciprocal responses.

Independent: uext,i = 0
Centralized: uext,i follows the shared trajectory G(t)
Decentralized: uext,i combines network-driven slow and fast feedback

The three control conditions use the same sound corpus and agent model. However, differences in the number of generated events, activity level and perceived loudness can accompany differences in interaction structure.

Network presets and coupling

In Decentralized mode, the matrix K[i,j] describes the influence of agent j on agent i. Positive values encourage activity or attraction; negative values introduce inhibition or repulsion.

NetworkCoupling matrix K (rows A, B, C)Musical tendency
Cyclic inhibition (default)0,0.3,-0.8;
-0.8,0,0.3;
0.3,-0.8,0
Mixed excitation and cyclic inhibition; shifting activity and interlocking patterns.
Cooperative0,0.5,0.5;
0.5,0,0.5;
0.5,0.5,0
Mutual reinforcement; at high Coupling, activity may become saturated.
Competitive0,-0.5,-0.5;
-0.5,0,-0.5;
-0.5,-0.5,0
Mutual inhibition; some agents may temporarily dominate others.
Custom matrix3 × 3 numeric valuesDefine the pattern and strength of interaction; diagonal values must be zero.

Coupling (0–20) sets the overall influence strength. Coupling = 0 removes external coupling. The optional Couple_activity and Couple_grain_selection controls independently enable interactions affecting event activity and material selection.

Musical controls

Main controls

Praat controlDefaultWhat it changes
ArchitectureAll threeGenerate the three conditions or a selected control architecture.
Duration_s15Simulation duration in seconds. Rendering includes an additional 0.6 s output margin.
Seed1Repeatable random decisions for controlled comparisons.
Network_presetCyclic inhibitionRelationship pattern between the decentralized agents.
Coupling4.0Strength of the shared or peer-driven activity influence.
Memory_s0.30Time scale of slow activity feedback between agents.
Selection_temperature0.12How strongly agents favour preferred sound fragments versus exploring alternatives.
Event_feedbackHybridOff, Hybrid (slow + fast) or Fast response only in Decentralized.
RenderingFragmented (Legacy)Choose fragmented sound, sustained material, evolving voices or persistent sound processes.
Play1Automatically audition the selected result.

Additional controls

Network and grain selection

Custom_matrix defines a directed network; Couple_activity enables interaction-driven activity changes; Couple_grain_selection and Selection_gain determine how another agent's choice influences sound selection. Subtick_onsets permits event timings between the 100 ms simulation ticks.

Feedback response

Event_strength controls the impact of fast event pulses, while Event_decay_s determines how long they remain influential. Feedback_reference lets the decentralized drive use either the original signal offsets (Legacy) or an independent-agent baseline; Pulse_rate_normalize adjusts relative pulse weighting. Central_reference chooses the central trajectory's offset.

Rendering, sound ending and output
ParameterDefaultUse
Max_natural_tail_s4.0 sMaximum source continuation for sustain-based rendering.
Release_ms120 msSmooth ending of an artificially terminated sound.
Crossfade_ms25 msTransition smoothing where relevant to the renderer.
Sustain_sensitivity0.5Controls the detection of continuation across segment boundaries.
Final_boundaryFixed durationKeep a consistent output length or allow the final sound tails to finish.
Evolution_ms300 msCrossfade duration target in Continuous Voices.
Preserve_tails0Allow uncut overlaps in Sustain-Aware rendering.
Morph_s1.0 sRate of material transformation in Persistent Processes (0.05–10 s).
ArticulationActivity phrasesStart persistent voices by activity gaps or source attacks.
Final_fade_s1.0 sPersistent Processes only: fade out the final stereo mix; 0 disables (range 0–10 s).

Output_normalization offers Fixed gain, RMS matched and Peak normalized output. Draw_visualization, Show_statistics and Keep_intermediate_files control inspection and saved analysis data.

Not every parameter affects every architecture or rendering mode. For instance, Memory_s affects decentralized slow feedback, while Final_fade_s affects only Persistent Processes.

How the sound is made

1. AnalyzeRecording → grains and acoustic features
2. SimulateAgent decisions → event and state logs
3. RenderFour approaches to sounding material
4. VisualizeSound objects and Praat Picture

1 — Analyze the recording

Audio is divided into analytical grains. Each receives descriptors for RMS level, spectral centroid, spectral flatness and duration. Sustain-aware analysis additionally identifies possible attacks, sustained regions and natural tails for rendering.

2 — Model agent interactions

Every 100 ms the agents update their activity and fatigue using their own state and the selected control architecture. Event times are placed within these ticks. Selection depends on agent preferences, recent usage and optional influence from the other agents.

3 — Turn decisions into sound

The renderer interprets the event log using the selected Rendering mode. Fragmented emphasizes discrete sounds; Sustain-Aware preserves source continuation; Continuous Voices moves between sounding regions; Persistent Processes updates longer-lived sound streams as agent decisions arrive.

4 — Listen and inspect

Praat imports the rendered stereo Sounds and can draw aligned activity, drive, pulse and event-map views. Default pan positions separate agents A (left), B (center) and C (right).

Reading the Praat Picture

The visualization shows the three agents over a common time axis. In comparison mode, Independent, Centralized and Decentralized appear side by side.

A — rhythmic preferenceB — spectral preferenceC — textural preference
I — ActivityTime vs. activation (0–1)

Shows how actively each agent is generating events. In Centralized, the shared trajectory G(t) is also shown as a dashed line.

II — External DriveExcitation and inhibition

Shows incoming activity-control signals. The comparison uses a shared vertical drive scale, making the strength of control visibly comparable.

III — Event PulseRecent event activity

Shows the decaying signal produced by each agent's recent events. These signals can affect subsequent decentralized decisions.

IV — Event MapWhen each agent makes a decision

Three event lanes show the timing of decisions and their relative gain. In Persistent Processes, these marks indicate decisions, not necessarily new audible attacks.

SummaryMeasured behavior

Includes events per second, agent activity, cross-agent correlations, drive variability and the effective diversity of selected grains.

Interpreting the event map: a dense pattern of decisions does not always mean an equally dense pattern of audible attacks. In Persistent Processes, numerous decisions may shape a single continuous voice.

Compositional approaches

Percussion and rhythmic loops

Use Fragmented to create interlocking events. Try different coupling matrices to hear changing levels of cooperation and competition.

Voice and speech

Reorganize vocal gestures using agent preferences. Compare sharply segmented results with more connected passages created through Sustain-Aware or Persistent Processes.

Sustained instruments and resonances

Select Persistent Processes and lengthen Morph_s for gradual movement between sustained materials. Adjust the final fade to shape the release of the whole texture.

Field recordings and complex soundscapes

Combine transient details with continuous ambience. Explore how independent or coupled agents distribute attention across the recording.

Agent names describe their default preferences for acoustic features. They are not three unrelated synthesizers: each agent draws from the same source and is influenced by the selected interaction architecture.

Comparing agent behavior

To hear what a parameter changes, keep the source recording, Seed, duration, rendering mode and other controls constant. Then change only the architecture, network or parameter under examination.

ComparisonTryListen for
Independent vs. DecentralizedSame seed; change Architecture and compare Coupling 0 with 4.Changes in the distribution and interaction of events.
Slow vs. fast feedbackDecentralized; compare Event Feedback Off, Hybrid and Fast response only.Longer fluctuations versus quick responses to agent events.
Material selection influenceCompare Selection_gain = 0 and 1.How peer choices alter the material used by each agent.
Rendering and continuityRender the same event log with Fragmented and Persistent Processes.Discrete attacks versus evolving, phrase-based sound behavior.

Differences between control conditions can include event density and output level, not just interaction topology. The visual measurements help interpret the system's behavior but do not by themselves measure perceived musical form.

Output and reproducibility

Praat produces stereo Sound objects for the selected architectures. When intermediate files are retained, the engine can also provide the acoustic-feature corpus, an event log, agent-state trajectories, rendering diagnostics and the Python processing log.

FileWhat it contains
corpus.tsvAnalytical grain intervals and acoustic features.
corpus_sustain.tsvEstimated source-continuation and sound-class metadata for continuity-aware rendering.
c0_s1_events.tsv / c0_s1_states.tsv (and the other conditions)Agent decisions and the evolution of agent states over time.
*_render.tsv / *_render_stats.txtRendering actions, voice information and output statistics.
engine.logProcessing details and diagnostic messages.

The same recording, parameters and Seed reproduce the same simulation within the same software environment. Different Rendering modes can interpret the same event log differently. Reproduction across different software environments may not be identical at the individual-sample level.

Installation and troubleshooting

IssueWhat to check
Python engine cannot be foundPlace dce_engine.py in plugin_AudioTools/py/, alongside the corresponding Praat script installation.
Praat reports an engine compatibility problemReplace the Praat script and its companion Python engine together using the same distribution package.
Missing Python dependencyThe interpreter invoked by Praat must have numpy, scipy, librosa and soundfile available.
Output sounds too fragmentedChoose Persistent Processes, use Activity phrases and explore a longer Morph_s (for example 3 seconds).
The sound ends abruptlyIn Persistent Processes, increase Final_fade_s from 1 to 2 seconds. This parameter does not affect the other Rendering modes.
Coupling or Memory seems inaudibleUse Decentralized and compare Coupling 0 against 4 with the same Seed; enable Couple_activity.
Output is too loud or clipsTry RMS matched or Peak normalized output. Fixed gain preserves differences between conditions but can exceed full scale.
No event or state files are visibleEnable Keep_intermediate_files; temporary analysis files are otherwise cleaned up.

Python packages: numpy, scipy, librosa and soundfile. Install them into the Python environment that Praat actually uses:

python -m pip install numpy scipy librosa soundfile