Rhythmic Pitch Percussion — User Guide
Builds a rhythmic target-pitch contour around the source median F0, using hit envelopes, polyrhythmic ghost events, correlated humanization, and a low-level tension wave.
What this does
Rhythmic Pitch Percussion analyses the selected Sound only to obtain a reliable median F0, then constructs a new PitchTier around that median. The new contour is driven by a binary rhythm pattern, three-stage decaying hit envelopes, polyrhythmic ghost events, per-beat humanization, and a small continuous tension wave.
Signal flow:
→ rhythm / ghost / tension pitch-offset curve in Hz
→ target PitchTier = median F0 + offset
→ synthesis safety limits
→ per-channel Manipulation + overlap-add
→ rebuild original channel count → attenuation-only peak safety
Quick start
- Select exactly one Sound object in Praat.
- Run
Rhythmic_Pitch_Percussion.praat. - Choose one of the five built-in presets or Custom.
- For Custom, enter a binary underscore-separated Rhythm_pattern, for example
1_0_1_1_0_1. - Adjust hit strength, decay, polyrhythmic density, and ghost-hit amount.
- Adjust analysis settings only when the source F0 requires a different range.
- Choose whether to draw the visualization and play the result.
Rhythm and pitch engine
Pattern parsing
Rhythm_pattern must contain only underscore-separated 0 and 1 tokens. At least one beat is required and the maximum is 512 beats.
Pattern semantics
1 activates the main percussive pitch envelope for that beat. 0 omits the main hit, although ghost events and the tension wave can still contribute small pitch offsets.
Beat duration is derived from the source duration:
Main hit envelope
Within a hit beat, normalized beat phase runs from 0 to 1. Three decays are summed:
body = 0.6 × exp(−0.8 × Decay_rate × phase)
tail = 0.2 × exp(−0.3 × Decay_rate × phase)
envelope = attack + body + tail
fundamental_hit = Hit_strength × envelope
harmonic_hit = 0.4 × Hit_strength × envelope × sin(8π × phase)
Hit_strength is a frequency offset in Hz, not semitones. The two hit components are summed and multiplied by one correlated humanization value for the entire beat.
Polyrhythmic ghost events
A second phase grid runs at Polyrhythm_factor times the main beat rate. At the first 10% of each polyrhythmic subdivision, a ghost event is added when Ghost_hits > 0:
ghost_hit = Ghost_hits × Hit_strength × ghost_envelope
Ghost events have their own correlated humanization value per polyrhythmic subdivision bucket. They are generated independently of whether the underlying main-pattern beat is 0 or 1.
Humanization and tension
Humanization is random but correlated: each main beat receives one multiplier uniformly drawn from 0.95…1.05, and each polyrhythmic subdivision bucket receives one independent multiplier in the same range. There is no seed control, so repeated runs can differ.
A small continuous tension component is always added:
tension_modulation = 1 + 0.3 × sin(7π × beat_position)
tension_wave_hz = 0.8 × tension_base × tension_modulation
Target pitch
The generated offset is added to the source median F0:
The final target is limited independently of the analysis range to 20 Hz through 0.45 × source sample rate. The Info window reports how many generated PitchTier points required this safety limiting.
Presets
The menu contains five built-in presets plus Custom. Presets replace only Rhythm_pattern, Hit_strength, Decay_rate, Polyrhythm_factor, and Ghost_hits. Analysis, Npoints, visualization, and playback settings remain as entered by the user.
| Preset | Pattern | Strength | Decay | Poly | Ghosts |
|---|---|---|---|---|---|
| Techno Kick | 1_0_0_0_1_0_0_0_1_0_0_0_1_0_0_0 | 150 Hz | 15 | 1 | 0 |
| Trap Hi-Hat | 1_1_1_1_0_1_1_1_1_1_0_1_1_1_1_0 | 8 Hz | 40 | 8 | 2.0 |
| Dubstep Wobble | 1_0_1_0_1_0_1_0_1_0_1_0_1_0 | 120 Hz | 2 | 11 | 0.8 |
| Breakbeat | 1_0_0_1_0_1_0_0_1_0_1_0_1_0_0_1 | 100 Hz | 20 | 7 | 1.2 |
| Minimal Pulse | 1_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0 | 180 Hz | 0.5 | 1 | 0 |
| Custom | Uses the form values unchanged. | ||||
Parameters
| Parameter | Default | Meaning |
|---|---|---|
| Preset | Custom | Five built-in configurations or direct use of the form values. |
| Rhythm_pattern | 1_0_1_1_0_1_0_1_1_0_0_1 | Binary pattern stretched once across the complete Sound. |
| Hit_strength | 25 | Main pitch-offset magnitude in Hz. Must be non-negative. |
| Decay_rate | 6 | Controls the speed of the three hit-envelope decays. Must be greater than zero. |
| Polyrhythm_factor | 3 | Multiplier for the ghost-event subdivision grid. It is a positive real value, not restricted to integers. |
| Ghost_hits | 0.3 | Scales the polyrhythmic ghost-event magnitude relative to Hit_strength. Zero disables ghost hits. |
| Time_step | 0.005 s | Pitch-analysis and Manipulation time step. It does not determine the generated PitchTier point density. |
| Floor_pitch | 50 Hz | Lower bound for source pitch analysis and Manipulation. |
| Ceiling_pitch | 900 Hz | Upper analysis/Manipulation bound; must remain below 45% of source sample rate. |
| Npoints | 600 | Number of points used to construct the generated target PitchTier; accepted range 2–20000. |
| Draw_visualization | Yes | Draw the current run in the Picture window. |
| Play_result | Yes | Play the final Sound after processing. |
Output behavior
- Name:
<source>_rhythm_<preset label>, using labels such asTechno,Trap,Dubstep,Breakbeat,Minimal, orCustom. - Pitch analysis: multichannel input is converted to mono only to estimate the median F0.
- Channels: each original channel is resynthesized independently with the same generated PitchTier, then rebuilt into the original channel count.
- Duration / time domain: preserved.
- Sample rate: preserved.
- Randomness: unseeded correlated humanization; repeated runs may differ.
- Peak handling: if the final absolute peak exceeds 0.95, the result is scaled down to 0.95. Quieter results are not boosted. This is an attenuate-only safety ceiling.
Visualization
When Draw_visualization is enabled, the script draws:
- Original waveform and result waveform. They are drawn with Praat automatic vertical scaling independently, so their panel amplitudes are not a shared quantitative scale.
- Pitch offset (Hz) — the generated offset relative to the source median F0. The corrected version stores the offset after synthesis safety limiting, so the displayed curve matches the pitch actually supplied to the PitchTier.
- Beat background — hit beats are shaded; vertical dotted lines mark beat boundaries.
- Pattern strip — tall bars for hit beats and short bars for rests.
- Statistics — beat count, hit count, hit strength, decay, and polyrhythm factor.
- Summary strip — compact description of the rhythmic trigger pattern, pitch events, and rendered output.
The synthesis curve uses all Npoints. Visualization storage is capped at 500 points and keeps the first generated sample that falls into each display bin.