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.
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:
- Pitch – relative to the input’s tracked F0 contour, quantized to a selected scale (chromatic, major, minor, pentatonic, whole‑tone, or stay‑on‑pitch). Unvoiced frames skip pitch‑shift entirely.
- Amplitude – adding/subtracting dB to the intensity envelope.
- Ring‑modulation – frequency is locked to harmonic ratios of local F0 when voiced (octave, fifth, fourth, etc.), or a fallback band when unvoiced.
- 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
- In Praat, select exactly one Sound object (mono – stereo will be downmixed).
- Run script… →
Chaotic_Neural_Map_Modulator.praat. - Choose a Preset:
- Subtle Organic, Balanced Chaos, Wild Unstable, Tightly Controlled, Glitch Machine
- 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).
- Set Dry_wet (0 = dry, 1 = fully processed) and HF_boost_dB (high‑frequency lift).
- 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.
The 5 presets (+ Custom)
| Preset | Instability | Rate (Hz) | Pitch range (st) | Amplitude depth | Ring depth | Description | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Subtle Organic | 2.5 | 1.0 | 3 | 0.30 | 0.10 | 。||||||||||||||||||||||||
| Balanced Chaos | 5.0 | 2.0 | 6 | 0.50 | 0.25 | 。||||||||||||||||||||||||
| Wild Unstable | 8.0 | 4.0 | 12 | 0.70 | 0.45 | 。||||||||||||||||||||||||
| Tightly Controlled | 4.0 | 3.0 | 4 | 0.40 | 0.20 | 。||||||||||||||||||||||||
| Glitch Machine | 9.0 | 。<6.0 | 18 | 0.80 | 0.60 | 。
Pipeline overview
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
| Parameter | Range | Default | Description | ||
|---|---|---|---|---|---|
| Instability | 0–10 | 5.0 | 。|||
| Modulation_rate_Hz | 0.5–10 | 2.0 | 。
Pitch
Other modulations
Output
Visualization (Praat picture)
When Draw_visualization = 1, the script draws a multi‑panel figure:
- Input and output waveforms – for comparison.
- F0 contour – grey = input (original), blue = output (modulated). Pink shaded regions = unvoiced frames (where pitch‑shift is skipped).
- Ring‑mod frequency trajectory – green line shows the instantaneous ring‑mod frequency (Hz). Pink shading = unvoiced frames.
- Pitch shift trajectory – blue line shows the chaotic pitch shift in semitones (after scale quantisation).
- Output spectrogram – 0–5 kHz, showing the effect of modulation.
- Training loss – MSE over iterations (shows network learning).
- Summary strip – pitch range, scale, voiced frame count, amplitude/ring depths, transient count, chaos parameters.
FAQ / troubleshooting
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 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.
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.
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.
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.
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.