Quantum Pitch Jumps — User Guide
Stochastic absolute-pitch trajectories built from harmonic states, interval scaling, semitone glitches, and correlated uncertainty.
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.
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
- Select exactly one Sound object.
- Run
Quantum_Pitch_Jumps.praat. - Choose one of the seven built-in presets or Manual.
- Set the number of quantum states and the jump/glitch probabilities. Probabilities are interpreted per 100 ms.
- Use Energy_min/max to control how strongly harmonic intervals depart from unison.
- Set the glitch interval range and the multiplicative uncertainty range.
- Set the pitch-analysis range for the source material, then choose whether to draw the visualization and play the result.
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:
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:
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:
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:
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
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.
| Preset | Levels | Jump / 100 ms | Glitch / 100 ms | Energy | Glitch (st) | Uncertainty |
|---|---|---|---|---|---|---|
| Gentle Quantum | 8 | 0.20 | 0.05 | 0.8–1.5 | −1 … +1.5 | 0.99–1.01 |
| Moderate Quantum | 12 | 0.30 | 0.10 | 0.7–1.8 | −1.5 … +2 | 0.98–1.02 |
| Aggressive Quantum | 16 | 0.50 | 0.20 | 0.5–2.2 | −3 … +4 | 0.95–1.05 |
| Extreme Quantum | 24 | 0.70 | 0.30 | 0.3–3.0 | −5 … +6 | 0.90–1.10 |
| Glitchy Micro | 5 | 0.60 | 0.40 | 0.9–1.2 | −0.5 … +1 | 0.995–1.005 |
| Harmonic Leaps | 7 | 0.40 | 0.05 | 0.6–1.8 | −1 … +1 | 0.98–1.02 |
| Chaotic Quantum | 32 | 0.80 | 0.50 | 0.2–4.0 | −8 … +10 | 0.80–1.20 |
| Manual | 12 | 0.40 | 0.15 | 0.5–2.0 | −2 … +3 | 0.98–1.02 |
Parameters
| Parameter | Default | Meaning |
|---|---|---|
| Preset | Manual | Selects Manual or one of seven built-in parameter sets. |
| Quantum_levels | 12 | Number of harmonic states; validated from 1 to 64. |
| Jump_probability | 0.4 | Jump-event probability per 100 ms; range 0–1. |
| Glitch_probability | 0.15 | Glitch-event probability per 100 ms; range 0–1. |
| Energy_min / Energy_max | 0.5 / 2.0 | Positive exponent range applied to the selected harmonic interval. |
| Glitch_min / max_semitones | −2 / +3 | Semitone range for a glitch event. |
| Uncertainty_min / max | 0.98 / 1.02 | Positive multiplicative range for correlated uncertainty. |
| Time_step | 0.005 s | Time step for Pitch analysis and Manipulation resynthesis. It does not set the quantum-curve point density. |
| Minimum_pitch / Maximum_pitch | 50 / 900 Hz | Pitch-analysis range. Maximum must remain below 45% of the source sample rate. |
| Draw_visualization | Yes | Draw the current transformation in the Picture window. |
| Play_result | Yes | Play the final Sound after processing. |
Generated-curve density
The quantum PitchTier uses:
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.
- Output name:
<source>_quantum_<preset>, for examplevoice_quantum_Gentle. - Channel count: preserved.
- Duration and time domain: preserved.
- Sample rate: preserved.
- No usable pitch: the script stops cleanly rather than generating a result.
- Peak protection: if the final absolute peak exceeds 0.95, it is scaled down to 0.95. Quieter results are not boosted; this is attenuation-only peak safety.
Visualization
When Draw_visualization is enabled, the Picture window shows:
- Original waveform and Quantum result waveform. Each panel uses Praat's automatic waveform amplitude range; they are not forced to a shared y-scale.
- Quantum pitch curve in Hz, including the synthesis-safe limits actually applied. A dotted horizontal line marks the source median F0.
- Jump markers as vertical red lines and glitch markers as green circles.
- Quantum level trajectory, showing the current discrete state index over time.
- Harmonic-ratio bars for the twelve base positive ratios. The display does not separately draw the inverse or higher-octave extensions used by larger state spaces.
- Statistics for levels, jump count, glitch count, and the two per-100-ms probabilities.
- Summary strip for the current run.