Chaotic Neural Map Modulator — v2.0 User Guide

Content‑aware chaotic modulation. A small MLP is trained on feature streams from the input, iterated with controlled instability, and its output modulates pitch, amplitude, and ring‑frequency. Pitch modulation is relative to the input’s tracked F0 contour and quantized to a chosen scale; ring‑modulation locks to harmonic ratios of local F0; unvoiced frames skip pitch‑shift entirely; modulation depth reduces near transients.

Author: Shai Cohen Affiliation: Department of Music, Bar‑Ilan University, Israel Version: 2.0 (2026) License: MIT License Repo: GitHub
Contents:

What this does

Chaotic Neural Map Modulator v2.0 is a content‑aware modulation engine. It extracts feature streams (amplitude, spectral centroid, rolloff) from the input, trains a small neural network (10 hidden neurons, 150 iterations) to predict the next feature frame, then iterates the network with controlled instability to generate chaotic control signals. These signals modulate:

Content‑aware design (v2.0):
  • Pitch follows the input’s F0 contour + wobbles, rather than replacing it with a median.
  • Ring‑mod uses F0‑locked harmonic ratios (0.5, 0.75, 4/3, 3/2, 2, 2.5, 3) – sidebands sit at consonant intervals.
  • Unvoiced frames (fricatives, drums, silence) skip PSOLA entirely; amplitude and ring‑mod still apply at reduced depth.
  • 10 ms modulation control rate (6× finer than the 60 ms chaos iteration) – supports articulation.
  • Transient detection reduces modulation depth near onsets to preserve attack clarity.
  • Mono only – run twice with different seeds and combine externally for stereo.

Quick start

  1. In Praat, select exactly one Sound object (mono – stereo will be downmixed).
  2. Run script…Chaotic_Neural_Map_Modulator.praat.
  3. Choose a Preset:
    • Subtle Organic, Balanced Chaos, Wild Unstable, Tightly Controlled, Glitch Machine
  4. For custom mode (preset = Custom), adjust:
    • Instability – chaos strength (0–10).
    • Modulation_rate_Hz – how fast the chaos kicks (1–6 Hz).
    • Pitch_range_semitones – maximum pitch deviation (±).
    • Pitch_scale – quantisation scale.
    • Amplitude_mod_depth – intensity modulation strength (0–1).
    • Ring_mod_depth – ring‑modulation mix (0–1).
  5. Set Dry_wet (0 = dry, 1 = fully processed) and HF_boost_dB (high‑frequency lift).
  6. Click OK. The script analyses the input, trains the MLP, generates chaos, modulates the sound, and creates a new Sound object named originalname_chaotic_preset.
Tip: Start with Balanced Chaos (instability 5, rate 2 Hz) to hear a natural‑sounding wobble on speech or sustained notes. For aggressive glitch effects, try Glitch Machine (instability 9, rate 6 Hz). The visualisation shows F0 contours (grey = input, blue = output) and the chaotic pitch shift trajectory.
Important: This effect is implemented entirely in Praat – no Python required. The MLP training (150 iterations, 10 hidden neurons) takes a few seconds. Processing time scales with the length of the input; a 10‑second sound takes 10–20 seconds.

The 5 presets (+ Custom)

PresetInstabilityRate (Hz)Pitch range (st)Amplitude depthRing depthDescription
Subtle Organic2.51.030.300.10
Balanced Chaos5.02.060.500.25
Wild Unstable8.04.0120.700.45
Tightly Controlled4.03.040.400.20
Glitch Machine9.0。<6.0180.800.60

Pipeline overview

Stage 1 – Feature extraction (60 ms frames)
Amplitude (dB), spectral centroid (Hz), spectral rolloff (Hz). Features normalised to [0,1].

Stage 2 – MLP training
3‑8‑3 network (input: 3 features, hidden: 10 neurons, output: 3 features). Trained to predict next frame’s features from current. Tanh activation, learning rate 0.12, 150 iterations.

Stage 3 – Chaos generation (60 ms steps)
The trained network is iterated with controlled injection of the input features (autonomy), volatility scaling, and mutation. Outputs three chaotic control signals (pitch, amplitude, ring).

Stage 4 – Control‑rate resampling (10 ms)
Chaos signals are linearly interpolated to a 10 ms control rate. Voiced/unvoiced flags from F0 tracking determine whether pitch‑shift is applied. Transient detection reduces modulation depth near onsets.

Stage 5 – Modulation application
Pitch: PSOLA via PitchTier, quantized to selected scale, only on voiced frames.
Amplitude: IntensityTier (dB offsets).
Ring‑mod: sinusoid with frequency interpolated between F0‑locked harmonic ratios (voiced) or fallback band (unvoiced).
HF boost: high‑shelf filter (2000 Hz).
Dry/wet mix.

The chaos iteration rate (60 ms) is tuned for slow, organic dynamics; the 10 ms control rate supports articulation (e.g., vibrato on individual notes).

Parameters & defaults

Core behaviour

ParameterRangeDefaultDescription
Instability0–105.0
Modulation_rate_Hz0.5–102.0

Pitch

ParameterOptionsDefaultDescription Pitch_range_semitones0–246。 Pitch_scaleChromatic / Major / Minor (natural) / Pentatonic major / Whole tone / Stay on input pitch classMajor。

Other modulations

ParameterRangeDefaultDescription Amplitude_mod_depth0–10.5。 Ring_mod_depth0–10.3。

Output

ParameterRangeDefaultDescription Dry_wet0–10.7。 HF_boost_dB0–123。 Draw_visualizationyes/noyes。 Play_outputyes/noyes。

Visualization (Praat picture)

When Draw_visualization = 1, the script draws a multi‑panel figure:

Tip: The F0 contour panel is the most informative – it shows how the output pitch follows the input’s shape while adding wobble. Unvoiced regions (fricatives, silence) are pink and have no pitch shift (flat line).

FAQ / troubleshooting

No pitch shift audible / output sounds like original

Check that the input has voiced frames (the script reports “Voiced: X frames”). If nVoiced = 0, pitch‑shift is bypassed. Increase Pitch_range_semitones and Instability. Also check Dry_wet – if set to 0, only dry signal passes.

Ring‑mod sounds noisy / unmusical

Ring‑mod frequency is locked to harmonic ratios of local F0 when voiced (0.5, 0.75, 4/3, 3/2, 2, 2.5, 3). If the input F0 is unstable, the sidebands will also be unstable. Reduce Ring_mod_depth (e.g., to 0.15) for a subtler effect. On unvoiced material, ring‑mod uses a fallback band (350–500 Hz) – this is intentionally noisy.

Processing is slow for long files

The MLP training (150 iterations) scales with the number of frames, not the duration directly. A 60‑second sound at 60 ms frame step has ≈1000 frames – training takes 5–10 seconds. The PSOLA resynthesis (pitch shift) is the main cost. Reduce Pitch_range_semitones or use a shorter sound for preview.

Why 60 ms chaos iteration and 10 ms control rate?

The chaos network learns slow dynamics (60 ms ≈ 16 Hz). Applying modulation at 10 ms (100 Hz) allows finer articulation – for example, vibrato on a sustained note can be smoother. The control‑rate signals are linearly interpolated from the 60 ms chaos stream.

Transient detection

When the amplitude rises by ≥6 dB between frames, a transient is flagged. Modulation depth scales linearly to zero over the next 3 frames (≈180 ms). This preserves attack clarity – on drums or plucked sounds, the initial impact remains relatively unprocessed.

Pitch scale quantisation

The chaotic pitch shift (in semitones) is snapped to the nearest scale tone before being converted to cents. “Stay on input pitch class” forces the output pitch to stay within the same pitch class (±12, ±24, etc.) – the wobble becomes octave‑only, useful for drone‑like material.