Morphic Form — Grain Placement Engine — User Guide

Time-domain grain placement controlled by a bounded morph trajectory between two behavioral attractors. Grain size, density, source-position jitter, backtracking, repetition, and onset gaps evolve over time while the grains themselves are not pitch-shifted or spectrally filtered.

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

What this does

Morphic Form analyzes the source on a 50 ms control grid and generates a time-varying grain-placement trajectory between two behavioral attractors. Attractor A favors larger, sparser, more stable placement; Attractor B favors shorter, denser, more jittered placement with more backtracking and repetition.

The morph trajectory is shaped by the selected pacing curve and bounded by Morph_intensity. Local acoustic activity and the voiced/unvoiced state can accelerate movement toward that ceiling, but they cannot push the trajectory beyond the range selected by the user.

Key Features:

Signal-processing scope: no pitch shifting, resampling, or spectral-domain transformation is applied to the individual grains. The sonic change comes from temporal selection, placement, overlap, repetition, backtracking, gaps, grain-edge fades, and final level normalization.

Quick start

  1. Select exactly one Sound object in Praat.
  2. Run Morphic_Form.praat.
  3. Choose a preset or Custom.
  4. For Custom, set Morph_intensity, Base_grain_ms, Base_density_gps, Max_jitter_ms, Output_duration_ratio, and Pacing_curve.
  5. Set Random_seed if you want reproducible scheduling.
  6. Enable Draw_visualization if you want to inspect the morph, grain parameters, acoustic features, and source-read map.
  7. Click OK. The output is named <source>_morphic.
Useful starting point: Slow Bloom provides a gradual transition with comparatively large grains and moderate density. Nervous Scatter starts already near the turbulent side of the model and is better for dense, unstable textures.
Input requirements: the selected Sound must be at least 100 ms long and must not be silent or near-silent.

Morphic Model

The Two Attractors

Attractor Definitions

ParameterAttractor AAttractor B
Grain sizebase_grain_ms × 1.35base_grain_ms × 0.67
Densitybase_density_gps × 0.55base_density_gps × 1.90
Jittermax_jitter_ms × 0.08max_jitter_ms
Backtrack probability0.020.22
Repeat probability0.040.28
Gap probability0.070.00
Gap durationrandom 12–40 msnone

The derived grain sizes and densities are additionally bounded internally: A grain size to 15–150 ms, B grain size to 10–100 ms, A density to at least 3 grains/s, and B density to at most 100 grains/s.

Pacing Curves

Linear: eased = t Accelerate: eased = t² Decelerate: eased = 1 - (1 - t)² target_morph = eased × Morph_intensity

Bounded Feature Modulation

Morph-state update

activity = normalized frame-to-frame intensity change voiced = 1 if F0 is defined 0 otherwise local_push = 0.55 × activity + 0.45 × (1 - voiced) adjusted_target = target_morph + 0.30 × local_push × (Morph_intensity - target_morph) adjusted_target is bounded to: 0 ... Morph_intensity state = state + 0.22 × (adjusted_target - state) state is also bounded to: 0 ... Morph_intensity

Normalized intensity itself is retained for analysis and visualization, but it is not a separate term in the morph-state update. The responsive terms are activity and voiced/unvoiced state.

Morph_intensity: 0 keeps the state at Attractor A. A value of 1 permits the trajectory to approach the full B range. Because the state uses an inertial update, a short sound need not numerically reach the ceiling before the end.

Acoustic Analysis

Control features are evaluated every 50 ms on an output-time grid. Each output frame is mapped back to the corresponding source time.

Output-Duration Mapping

out_duration = source_duration × Output_duration_ratio time_ratio = source_duration / out_duration reference source position = output_time × time_ratio

This maps the full source timeline across the requested output duration. A ratio of 2.0 spreads the source trajectory over twice the time; a ratio of 0.5 traverses it in half the time. The ratio itself does not inherently create source wrapping or skip a fixed portion of the source. Jitter, backtracking, and repetition perturb the reference trajectory.

Preset Strategies

Preset Morph Base grain Density Jitter Ratio Pacing Initial state
Slow Bloom0.6052 ms17 g/s7 ms1.0×LinearA
Tidal Surge0.9030 ms38 g/s28 ms1.2×AccelerateA
Nervous Scatter0.9522 ms52 g/s40 ms0.85×Linear0.75
Still Center0.1568 ms11 g/s4 ms1.0×DecelerateA
Time Stretch0.4560 ms20 g/s12 ms2.0×DecelerateA
Collapse0.8025 ms45 g/s20 ms0.5×AccelerateA
Nervous Scatter: unlike the other presets, it starts at morph state 0.75, giving it a turbulent character from the beginning rather than evolving from A first.

Parameters & Controls

ParameterDefaultEffective range / behavior
Morph_intensity0.75Clamped 0–1; maximum allowed morph state
Base_grain_ms40Clamped 10–120 ms before attractor scaling
Base_density_gps25Clamped 5–80 grains/s before attractor scaling
Max_jitter_ms15Clamped 0–50 ms
Output_duration_ratio1.0Clamped 0.1–10.0
Pacing_curveLinearLinear / Accelerate / Decelerate
Random_seed00 = unpredictable; positive integer = reproducible
Draw_visualizationOnDraw suite-standard diagnostic page
Play_resultOnPlay final Sound

Internal Control Constants

ParameterValueMeaning
gd_lr0.22Morph-state response rate
local_weight0.30Strength of local acoustic modulation within the allowed morph range
analysis hop50 msControl-feature sampling interval
grain edge fade10%Linear fade-in and fade-out on each extracted grain
final edge fadeup to 5 msProtects the assembled buffer boundaries

Grain Scheduling & Rendering

Per-Frame Placement Parameters

For morph state m: grain_ms = A_grain + m × (B_grain - A_grain) density = A_density + m × (B_density - A_density) jitter = A_jitter + m × (B_jitter - A_jitter) backtrack_probability = A_backtrack + m × (B_backtrack - A_backtrack) repeat_probability = A_repeat + m × (B_repeat - A_repeat) gap_probability = A_gap + m × (B_gap - A_gap)

Grain Schedule

For each scheduled onset: hop = 1 / current_density source position = output_time × time_ratio + Gaussian(0, current_jitter) optional backtrack: subtract Uniform(40 ms, 220 ms) optional repeat: reuse previous valid source position source-boundary handling: reflect overshoot back into valid range then apply final safety clamp optional gap: advance output clock by Uniform(12 ms, 40 ms) finally: output_time += hop

Reflection at the source boundaries prevents large jitter or backtracking values from artificially accumulating grains exactly at the first or last legal source position.

Dynamic Grain Budget

peak_density = max(A_density, B_density) max_grains = ceil(out_duration × peak_density × 1.25) + 64 minimum budget = 500

The budget is derived from the maximum density the model can request. If the budget is nevertheless exhausted before the timeline is fully scheduled, the script reports the unscheduled duration; the output buffer remains exact in duration and the uncovered tail is silent.

Time-Placed Overlap-Add

1. Create an output buffer of exact out_duration. 2. Preserve the source number of channels. 3. Extract each scheduled source grain. 4. Apply 10% linear fade-in and fade-out. 5. Add the grain directly into the output buffer at its scheduled onset. 6. Overlapping grains sum naturally. 7. Apply one short final fade at the file boundaries. 8. Scale final peak to 0.99.

There is no separate concatenate/crossfade stage. Density controls onset spacing, while grain duration determines how strongly neighboring grains overlap.

Channel handling: acoustic features are measured from a mono analysis copy. Grain extraction and overlap-add use the original Sound, so the output preserves the original channel count and channel-specific material.

Visualization

The v1.4 visualization uses the Praat AudioTools suite layout and summarizes the source, control trajectories, grain schedule, and output.

HEADER source | preset | morph intensity | pacing | grain count ORIGINAL WAVEFORM source waveform MORPHIC OUTPUT rendered output waveform duration and final peak MORPH / GRAIN SIZE light fill = target morph curve red line = same target morph curve green = normalized grain-size trajectory derived from the actual bounded morph state DENSITY / JITTER blue = density amber = jitter scaled to the density axis ACOUSTIC FEATURES blue = normalized intensity red = activity green = voiced flag shaded regions = voiced frames GRAIN READ MAP x = output time y = scheduled source position dashed line = proportional reference read points = scheduled grain positions SUMMARY STRIP source duration / sample rate / channels / ratio / seed Attractor A and B grain-density-jitter values morph intensity / pacing / local weight grain count / scheduling status / final duration
Morph panel: the current visualization does not draw the stored frame-by-frame morph state directly. The light fill and red line both show the target morph curve. The green grain-size trajectory reflects the actual bounded morph state indirectly through the parameter interpolation.
Grain read map: visualization data are retained for the first 800 scheduled grains. When more than 400 of those are available, the plotted points are downsampled. For very dense or long renders, the map therefore represents the early portion of the schedule rather than a uniform sample of the entire output.

Applications

Gradual Texture Transformation

Use Slow Bloom or Tidal Surge to move from relatively stable grain placement toward denser, more irregular scheduling while keeping the source material recognizable at the grain level.

Dense Fragmentation

Nervous Scatter starts near the turbulent side and combines short grains, high density, strong position jitter, and greater backtrack/repeat probability.

Temporal Expansion and Compression

Output_duration_ratio changes how the source timeline is distributed across the output. Time Stretch expands the trajectory; Collapse compresses it.

Multichannel Recomposition

Stereo or multichannel material can be analyzed with a common mono control trajectory while retaining the original channel structure in the extracted grains.

Feature-Responsive Grain Placement

Activity and voiced/unvoiced structure influence how quickly the morph approaches its user-defined ceiling, linking acoustic change in the source to the evolving grain schedule.

Troubleshooting

No grains generated:
The selected parameter combination did not produce a usable schedule. Check source duration and grain settings; very short or silent sources are rejected before scheduling.
Unexpected silent tail:
If the scheduling budget is exhausted before the full timeline is covered, the buffer duration remains correct but the unscheduled tail is silent. The Info window reports this condition.
Strong source-edge concentration:
The current implementation reflects out-of-range source positions before its final safety clamp, specifically to reduce edge accumulation. If the effect remains strong, reduce Max_jitter_ms or use a less turbulent preset.
Morph panel red line does not show feature modulation:
Correct for the current visualization: the red line shows the target morph curve. Actual modulation is reflected indirectly in the derived grain-size, density, and jitter trajectories.