Quantum Pitch Jumps — User Guide

Stochastic absolute-pitch trajectories built from harmonic states, interval scaling, semitone glitches, and correlated uncertainty.

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

What this does

Quantum Pitch Jumps replaces the detected pitch trajectory with a stochastic sequence of absolute pitch states derived from the source's median F0. A harmonic state defines the base interval, an energy value expands or contracts that interval away from unison, optional glitch events add semitone offsets, and a slowly changing uncertainty factor introduces correlated pitch variation.

Important: this is not modulation added to the source melody. The source pitch analysis supplies the median-F0 anchor and the resynthesis framework; the generated Quantum PitchTier becomes the new pitch trajectory in voiced material.

The same generated PitchTier is applied independently to every original channel. The channel count, source duration, time domain, and sampling frequency are preserved.

Quick start

  1. Select exactly one Sound object.
  2. Run Quantum_Pitch_Jumps.praat.
  3. Choose one of the seven built-in presets or Manual.
  4. Set the number of quantum states and the jump/glitch probabilities. Probabilities are interpreted per 100 ms.
  5. Use Energy_min/max to control how strongly harmonic intervals depart from unison.
  6. Set the glitch interval range and the multiplicative uncertainty range.
  7. Set the pitch-analysis range for the source material, then choose whether to draw the visualization and play the result.
Randomness: the script does not expose or set a random seed. Repeating the same run can therefore produce a different jump sequence, energy sequence, glitches, and uncertainty trajectory.

Quantum states and harmonic mapping

The state space is centered on a unison level. The center index is ceil(Quantum_levels / 2). Levels below the center use inverse harmonic ratios; levels above it use positive ratios. With an even number of levels, this indexing gives one more state on the positive side than on the negative side.

The twelve base interval ratios are:

1/1, 16/15, 9/8, 6/5, 5/4, 4/3,
7/5, 3/2, 8/5, 5/3, 16/9, 15/8

States farther than the first twelve interval steps continue into octave bands. Negative states use the reciprocal of the corresponding positive interval. This avoids simply repeating the same small set of ratios when Quantum_levels is large.

Energy scaling

When a jump occurs, a new Energy value is drawn from Energy_min … Energy_max. Energy is an exponent on the harmonic ratio:

energized_ratio = base_ratio ^ energy_level

energy = 1 leaves the interval unchanged; values below 1 pull the interval toward unison; values above 1 push it farther from unison. Energy remains unchanged until the next jump event.

Jumps, glitches, and uncertainty

Time-consistent event probabilities

Jump_probability and Glitch_probability mean the probability of at least one corresponding event over a 100 ms reference window. The script converts each value to the probability appropriate for the actual generated-curve time step:

p_step = 1 - (1 - p_100ms) ^ (curve_dt / 0.1)

This keeps the event rate approximately independent of file duration and of the number of generated control points.

Jump event

At a jump event, the script selects a state uniformly from 1 … Quantum_levels and draws a new energy value. The selected state can equal the current state; in that case the energy may still change the resulting pitch interval.

Glitch event

A glitch does not select a new quantum state. It adds a one-point semitone offset drawn from Glitch_min_semitones … Glitch_max_semitones:

glitch_multiplier = 2 ^ (glitch_semitones / 12)

Correlated uncertainty

Uncertainty is not independent sample-by-sample jitter. A new target multiplier is drawn about every 50 ms, and the running uncertainty value slews toward it with an approximately 20 ms response. The selected range is multiplicative around the final frequency.

Final generated pitch

final_ratio = energized_ratio × glitch_multiplier × uncertainty_state
new_F0 = median_F0 × final_ratio

The generated F0 is then limited to the synthesis-safe range 20 Hz … 0.45 × source sample rate. These limits are independent of the analysis floor and ceiling.

Presets

The menu contains seven built-in presets plus Manual. Built-in presets override the quantum-state, probability, energy, glitch, and uncertainty fields. They do not override Time_step, Minimum_pitch, Maximum_pitch, Draw_visualization, or Play_result.

PresetLevelsJump / 100 msGlitch / 100 msEnergyGlitch (st)Uncertainty
Gentle Quantum80.200.050.8–1.5−1 … +1.50.99–1.01
Moderate Quantum120.300.100.7–1.8−1.5 … +20.98–1.02
Aggressive Quantum160.500.200.5–2.2−3 … +40.95–1.05
Extreme Quantum240.700.300.3–3.0−5 … +60.90–1.10
Glitchy Micro50.600.400.9–1.2−0.5 … +10.995–1.005
Harmonic Leaps70.400.050.6–1.8−1 … +10.98–1.02
Chaotic Quantum320.800.500.2–4.0−8 … +100.80–1.20
Manual120.400.150.5–2.0−2 … +30.98–1.02

Parameters

ParameterDefaultMeaning
PresetManualSelects Manual or one of seven built-in parameter sets.
Quantum_levels12Number of harmonic states; validated from 1 to 64.
Jump_probability0.4Jump-event probability per 100 ms; range 0–1.
Glitch_probability0.15Glitch-event probability per 100 ms; range 0–1.
Energy_min / Energy_max0.5 / 2.0Positive exponent range applied to the selected harmonic interval.
Glitch_min / max_semitones−2 / +3Semitone range for a glitch event.
Uncertainty_min / max0.98 / 1.02Positive multiplicative range for correlated uncertainty.
Time_step0.005 sTime step for Pitch analysis and Manipulation resynthesis. It does not set the quantum-curve point density.
Minimum_pitch / Maximum_pitch50 / 900 HzPitch-analysis range. Maximum must remain below 45% of the source sample rate.
Draw_visualizationYesDraw the current transformation in the Picture window.
Play_resultYesPlay the final Sound after processing.

Generated-curve density

The quantum PitchTier uses:

npoints = clamp(round(duration / 0.01), 200, 2000)
curve_dt = duration / (npoints - 1)

Short sounds therefore use a denser-than-100-Hz curve, sounds of roughly 2–20 seconds are near 100 Hz, and longer sounds are capped at 2000 generated points. Event probabilities are converted from their 100 ms interpretation to this actual curve_dt.

Analysis, resynthesis, and output

For multichannel input, the script converts the source to mono only for pitch analysis. It measures the median F0 using the selected analysis settings, then builds one shared Quantum PitchTier.

Each original channel is processed independently with Praat Manipulation and overlap-add resynthesis using that same PitchTier. The processed channels are then rebuilt into a Sound with the original number of channels.

Visualization

When Draw_visualization is enabled, the Picture window shows:

Display density: the visualization uses at most 500 bins. Pitch/level values use the representative sample stored for each bin, while jump and glitch occurrences are accumulated so events are not simply lost during display decimation. The Picture is therefore a compact summary of the full generated control curve.