Temporal Turing Morph — User Guide
Reorders fixed-duration audio events with a 1D activator–inhibitor reaction–diffusion simulation. The final spatial activator pattern becomes a permutation controller, with Sort, Displace, and StripeRev reordering, a monotonic morph between identity and the target order, optional energy seeding, arc/drift/rupture shaping, and multichannel-preserving reassembly.
What this does
Temporal Turing Morph divides one selected Sound into event-scale segments, runs a one-dimensional reaction–diffusion simulation across the segment index axis, converts the final activator state into a segment permutation, then concatenates the original multichannel segments in that order.
Arc, drift, and rupture operate inside the simulation. They change the single final permutation; they do not animate an expand/collapse/drift gesture along the output audio timeline.
Quick start
- Select exactly one Sound of at least 50 ms.
- Run
Temporal_Turing_Morph.praat. - Choose Custom or one of the six named presets.
- Set Chunk_duration_ms to define the event scale.
- Choose Sort, Displace, or StripeRev.
- Set Morph_amount from 0 for identity order to 1 for the complete target permutation.
- Choose Flat + noise or Energy-seeded initialization.
- Optionally set Arc, Drift, Rupture, and Random_seed.
- Run. The result is named
<source>_TemporalTuring.
Reaction–diffusion model
For each segment index i, the script evolves activator A and inhibitor I:
The fixed saturation ceiling is K = 5. Diffusion coefficients are:
The ratio D_i / D_a is therefore always 50 for this implementation.
Reflective boundaries
The 1D Laplacian uses reflected endpoint values and:
Explicit Euler step
The time step is chosen from a fixed worst-case diffusion ceiling and the current Drift_strength:
This keeps the same stable step sizing across the allowed Diffusion_rate range while allowing Diffusion_rate itself to scale the effective diffusion per iteration.
Per-iteration perturbation
Every activator cell also receives a small Gaussian stochastic term of fixed standard deviation 0.02 on every iteration. A and I are clamped to 0…5 after the Euler update, before any rupture injection.
Segmentation & channel handling
The requested chunk duration is internally clamped to 5…2000 ms. Segment count is:
The complete source is covered. The final segment may therefore be shorter than Chunk_duration_ms.
500-segment cap
If the requested chunk would create more than 500 segments, the script enlarges the effective chunk duration to:
so that all source material is still retained in exactly 500 segments.
Channels
The processing copy preserves the source channel count. Stereo and multichannel inputs are not folded to mono for synthesis. Every extracted segment keeps all original channels, and reordering applies the same segment permutation to every channel.
Energy seeding uses Praat's RMS measurement directly on each multichannel segment, producing one scalar RMS value per segment.
Seed modes
Flat + noise
Energy-seeded
Each segment RMS is divided by the maximum segment RMS and then perturbed:
Negative initial activator values are clamped to zero. In both modes the inhibitor is initialized to the same value as the activator:
Arc, drift & rupture
Arc modes
Arc_mode modifies the reaction rate across simulation iterations:
| Mode | arcFactor |
|---|---|
| Off | Constant 1. |
| Expand-Collapse | Linear rise to 1 at 65% of the simulation, followed by a steeper fall with a minimum factor of 0.05. |
| Collapse-Regrow | U-shaped 1 − 4t(1−t), with a 0.05 floor. |
| Pulse | 0.5 + 0.5 cos(4πt), giving two cosine cycles. |
The resulting reaction rate itself is clamped to a minimum of 0.001.
Drift
Drift_strength creates a Gaussian-shaped multiplier that travels from the first to the last segment over the simulation:
This multiplier acts on the diffusion terms for both activator and inhibitor. It does not directly add activator energy.
Rupture
On each iteration, Rupture_prob is the probability of one rupture event. A random segment center is chosen and activator energy is added within ±4 segments:
Rupture is injected after the normal 0…5 clamp and can therefore temporarily raise the activator above the saturation ceiling until later iterations reshape it.
Reorder modes
Sort — R-D rank
Segments are sorted by ascending final activator value. Output slot 1 receives the segment with the smallest A value, and so on.
Displace — R-D shift
Each original segment receives a target position:
The segments are then sorted by targetPosition. The normalization by the largest actual deviation from the mean keeps the absolute shift within the requested Max_displacement_segments.
StripeRev — band palindrome
The script labels contiguous runs according to whether their activator is above the final mean. Every run is then reversed internally, while the sequence of runs remains in original order.
Morph amount
Morph_amount is clamped to 0…1.
| Value | Order |
|---|---|
| 0 | Identity: original segment order. |
| 1 | Complete target R-D permutation. |
| Between | A proportional prefix of adjacent swaps needed to transform identity into the target permutation. |
For intermediate values the script first derives the adjacent-transposition sequence corresponding to the target order, then applies:
The result is always a valid permutation. Increasing Morph_amount increases the number of target-building swaps rather than interpolating and rounding segment indices.
Edge taper & assembly
Before reassembly, each segment can receive an independent cosine fade-in and fade-out. Taper duration is limited to 40% of that segment's actual duration:
The taper stage is skipped when the requested duration is 0.5 ms or less.
Because every source segment appears exactly once in the final permutation and tapering does not change duration, the reordered result preserves the source duration, subject only to normal sample-grid representation.
Presets
| Preset | Chunk | D / R / I | Iter | Seed | Reorder / Morph | Arc / Drift / Rupture | Taper |
|---|---|---|---|---|---|---|---|
| Temporal Stutter | 20 ms | 2.5 / 0.35 / 0.30 | 50 | Flat + noise | Sort / 1.0 | Off / 0 / 0 | 2 ms |
| Phrase Scrambler | 250 ms | 1.5 / 0.60 / 0.30 | 7 | Energy | Sort / 1.0 | Off / 0 / 0 | 12 ms |
| Memory Erosion | 400 ms | 1.2 / 0.25 / 0.40 | 20 | Energy | Displace / 0.75 | Off / 0 / 0 | 20 ms |
| Rhythmic Crystal | 50 ms | 0.05 / 0.15 / 0.85 | 80 | Flat + noise | Sort / 1.0 | Off / 0 / 0 | 3 ms |
| Narrative Arc | 120 ms | 1.2 / 0.30 / 0.25 | 40 | Energy | Sort / 1.0 | Expand-Collapse 0.9 / 0 / 0 | 8 ms |
| Tectonic Rupture | 80 ms | 1.5 / 0.25 / 0.30 | 35 | Energy | Displace / 1.0 | Off / 1.2 / 0.12 | 6 ms |
Named presets also set Initial_perturbation and Max_displacement_segments. They do not overwrite Random_seed, Normalize_output, Draw_visualization, or Play_result.
Parameters & effective limits
| Parameter | Default | Effective behavior |
|---|---|---|
| Chunk_duration_ms | 80 | Clamped to 5…2000 ms; may be enlarged further to respect the 500-segment cap. |
| Diffusion_rate | 1.0 | Clamped to 0.001…5; scales Da and Di. |
| Reaction_rate | 0.20 | Clamped to 0.001…1. |
| Inhibition_strength | 0.30 | Clamped to 0.01…2. |
| Iterations | 25 | Clamped to 1…200. |
| Initial_perturbation | 0.05 | Gaussian seed amplitude, clamped to 0.001…0.5. |
| Reorder_mode | Sort | Sort, Displace, or StripeRev. |
| Max_displacement_segments | 10 | Used by Displace; clamped to 1…100. |
| Morph_amount | 1.0 | Clamped to 0…1. |
| Seed_mode | Flat + noise | Flat stochastic seed or normalized segment RMS plus perturbation. |
| Edge_taper_ms | 5 | Negative values become 0; effective taper is at most 40% of each segment. |
| Arc_mode | Off | Off, Expand-Collapse, Collapse-Regrow, or Pulse. |
| Arc_strength | 0.8 | Clamped to 0…1. |
| Drift_strength | 0 | Moving diffusion multiplier, clamped to 0…3. |
| Rupture_prob | 0 | Probability per simulation iteration, clamped to 0…0.5. |
| Random_seed | 0 | Positive value = predictable simulation; zero or negative = safe unpredictable RNG. |
| Normalize_output | On | Target Sinc70 peak scaling to 0.99 for non-silent output. |
| Draw_visualization | On | Draw the R-D/reordering analysis view. |
| Play_result | On | Play the completed result. |
Visualization
The v1.3 Picture view contains:
- Title bar — source, effective segment count/chunk size, iteration count, reorder mode and morph.
- Activator pattern — final A[i] values with a mean reference line.
- Permutation map — output position versus original segment index, with identity diagonal.
- Original waveform.
- Output waveform.
- Activator mean evolution across iterations, with an arc-profile overlay when Arc_mode is active.
- R-D parameter summary.
Activator color
The blue-to-orange bar colors progress by segment index. Bar height is the actual final activator value. Color itself does not encode activator magnitude.
Permutation map color
Map ticks use a blue-to-orange progression by output slot. Their coordinates carry the mapping: x = original segment, y = output position.
Waveform scale
The input and output waveform panels use separate amplitude scales based on their own peaks. They are not a shared-amplitude comparison.
Energy panel
The plotted curve is mean activator after each simulation iteration. The dotted reference is the mean after iteration 1. When active, the arc profile is rescaled into the same panel for visual reference; it is not plotted in physical reaction-rate units.
Output behavior
- Name:
<source>_TemporalTuring. - Channels: same as source.
- Sample rate: same as source.
- Duration: source duration, subject to sample-grid representation.
- Original Sound: unchanged.
- Randomness: initialization perturbation, per-iteration activator noise, and rupture events when enabled.
- Random seed: positive values make those simulation choices reproducible; the predictable global RNG state is restored to Praat's safe unpredictable state immediately after the simulation.
- Normalization: when enabled, every non-silent result is target-normalized to Sinc70 peak 0.99.