Rhythmatist — User Guide
Rhythmic reassembly from mathematically generated segment boundaries. Rhythmatist builds one of five normalized split-point series, optionally snaps those boundaries to a BPM grid, shuffles the resulting source segments, and can assign per-segment varispeed pitch and constant-power stereo positions before hard concatenation.
What this does
Rhythmatist creates a new temporal ordering of material already present in one selected Sound. It first generates a set of boundaries on a normalized 0–1 time axis, converts them to seconds, optionally snaps them to a musical pulse grid, extracts the resulting segments, randomizes their order with Fisher–Yates, and concatenates them.
Bpm_value > 0; pitch is active when Pitch_levels > 1; stereo panning is active when Stereo_width > 0.
Pitch_levels = 4 and Stereo_width = 0.8. Set Pitch_levels to 1 and Stereo_width to 0 if you want shuffle-only processing.
Quick start
- Select exactly one Sound object.
- Run
Rhythmatist.praat. - Choose Custom or one of the six named series presets.
- For Custom, choose Su, Sc, Sy, Sd, or SRC and set the relevant Param_a…Param_e values.
- Set Bpm_value = 0 to keep the mathematically generated boundaries unsnapped, or enter a positive BPM to quantize them.
- Set Pitch_levels = 1 to disable pitch processing; use more than one level to activate per-segment varispeed transposition.
- Set Stereo_width = 0 to disable new stereo panning; use a positive width for stereo placement.
- Run the script. The result is named
<source>_rhythmatist.
Five rhythmic series
All series are generated as interior points on a normalized 0–1 axis. After any BPM snap and boundary sanitation, the final number of segments is one more than the number of retained interior boundaries.
Su — Uniform Regular
Param_a = n. Creates n equal segments:
Sc — Regular Compound
Param_a = a, Param_b = b. Creates the sorted, deduplicated union of the two regular grids:
The resulting segment count is determined by the unique combined boundaries; it is not simply a+b.
Sy — Irregular Cumulative
Param_a = n. The current v2.4 convention generates exactly n−1 independent uniform random interior split positions, sorts them, and therefore targets n segments before later snapping/sanitation:
Sd — Irregular Individual
Param_a = n. Generates n positive random duration weights, normalizes them by their total, and converts the first n−1 cumulative sums into boundaries:
SRC — Combined strata
The generic parameter mapping is:
| Parameter | SRC role |
|---|---|
| Param_a | Su segment count |
| Param_b | Sc first grid count |
| Param_c | Sc second grid count |
| Param_d | Sy segment count |
| Param_e | Sd segment count |
SRC merges:
The combined boundaries are sorted, deduplicated, and stripped of points at the exact 0/1 endpoints.
Complexity guard
Before deduplication, the requested number of interior split points may not exceed 5000. This prevents pathological custom settings from creating an excessive number of indexed variables and Praat objects.
Six series presets + Custom
The named presets overwrite only Series_type and the series parameters they need.
| Preset | Series | Parameters |
|---|---|---|
| Simple Pulse | Su | n = 8 |
| Binary Grid | Sc | 2 + 4 |
| Golden Split | Sc | 3 + 5 |
| Cloud | Sy | n = 12 |
| Fragmented | Sd | n = 16 |
| Dense Strata | SRC | Su=3, Sc=2+5, Sy=4, Sd=3 |
BPM grid snapping
BPM mode is active when Bpm_value > 0. The script does not detect tempo from the audio.
| Grid_division | Units per quarter-note beat |
|---|---|
| Quarter notes | 1 |
| Eighth notes | 2 |
| Triplet eighths | 3 |
| Sixteenth notes — default | 4 |
| Triplet sixteenths | 6 |
Grid-duration trim
When possible, the private processing copy is shortened to the largest whole number of grid units that fits inside the source:
The source object itself is never changed. If targetDuration is zero, or the source already ends on a grid unit, no shortening is performed.
Boundary snapping
Every generated boundary is rounded to its nearest grid position:
Snapped endpoints and duplicate boundaries are removed. If the available duration contains fewer than two grid units, there is no legal interior grid boundary and the segmentation collapses to one segment.
Shuffle
After extraction, the segment-object IDs and their original segment indices are permuted together using Fisher–Yates:
The Info window reports the resulting mapping as:
Because Praat's normal Concatenate ordering depends on object IDs, the script rebuilds the sequence iteratively from the end toward the beginning so the delivered audio follows the stored shuffled array.
Per-segment pitch assignment
Pitch processing is active when Pitch_levels > 1.
Level to pitch ratio
Levels begin at 0. With the default four levels and +7 semitone step, the available shifts are therefore 0, +7, +14 and +21 semitones. A negative Pitch_step_semitones produces downward levels.
Assignment modes
| Pitch_assign | Actual rule |
|---|---|
| Cycle | (originalSegmentIndex−1) mod Pitch_levels |
| Alternating | (originalSegmentIndex−1) mod 2; only levels 0 and 1 are used even when Pitch_levels > 2. |
| Random | One random integer from 0 to Pitch_levels−1 for each shuffled segment. |
What the pitch processor actually does
Rhythmatist uses varispeed:
Varispeed naturally changes both pitch and duration. Rhythmatist then forces the transformed segment back to its original pre-transposition duration:
- if the varispeed result is longer, it is truncated from the end;
- if it is shorter, digital silence is appended to restore the requested duration.
Pitch_step_semitones is restricted to −96…+96. The script does not impose an upper bound on Pitch_levels, so extremely large custom level counts can imply impractically extreme ratios.
Per-segment stereo assignment
Stereo processing is active when Stereo_width > 0. Width is clamped to 0…1.
Every processed segment is mono before panning, and the pan law is constant power:
Stereo modes
| Mode | Pan rule |
|---|---|
| Alternating L-R | odd original segment → −width; even original segment → +width |
| Sweep L to R | linear pan from −width to +width according to original segment index |
| Cycle 4-positions | −1, −0.33, +0.33, +1 multiplied by width, cycling by original segment index |
| Random | uniform random value in [−width,+width] |
As with deterministic pitch assignment, the non-random spatial pattern follows original segment identity through the shuffle.
Input-channel behavior
If either pitch or stereo processing is active and the selected source has more than one channel, the processing source is first converted to mono.
- Stereo active: a new two-channel result is synthesized from the mono segments.
- Pitch active, stereo off: multichannel input is still folded to mono, so the result is mono.
- Pitch off and stereo off: no mono conversion occurs; the original channel count and spatial layout travel with the shuffled segments.
Assembly, joins & output duration
The final segments are concatenated directly in shuffled order. There is no overlap, fade, crossfade, smoothing envelope or gap inserted at the joins.
Duration
Every extracted segment keeps its original segmentation duration, including after pitch processing because the varispeed result is truncated or zero-padded back to that duration. Consequently:
Without BPM mode this is the source duration. With BPM mode it is the private grid-trimmed duration when trimming was applicable. Minor sample-grid rounding can affect the exact numerical result.
No final gain stage
Rhythmatist performs no final peak normalization, safety ceiling, limiter or global gain adjustment. Praat Sounds can contain floating-point samples outside ±1; such peaks may require attention before integer-file export.
Parameters & defaults
| Parameter | Default | Role |
|---|---|---|
| Preset | Custom | Custom or one of six rhythmic-series presets. |
| Series_type | Su | Su, Sc, Sy, Sd, or SRC. |
| Param_a | 8 | Su/Sy/Sd count; Sc first count; SRC Su count. |
| Param_b | 4 | Sc second count; SRC Sc first count. |
| Param_c | 5 | SRC Sc second count. |
| Param_d | 4 | SRC Sy count. |
| Param_e | 3 | SRC Sd count. |
| Bpm_value | 0 | 0 = off; positive = grid trim/snap active. |
| Grid_division | Sixteenth notes | Quarter, eighth, triplet eighth, sixteenth, or triplet sixteenth. |
| Pitch_levels | 4 | 1 = off; more than 1 activates pitch processing. |
| Pitch_step_semitones | 7 | Pitch interval per level; validated −96…+96. |
| Pitch_assign | Cycle | Cycle, Alternating, or Random. |
| Stereo_width | 0.8 | 0 = off; otherwise clamped to 0…1. |
| Stereo_mode | Alternating L-R | Alternating, Sweep, 4-position Cycle, or Random. |
| Draw_visualization | On | Draw source, boundaries, permutation map and result. |
| Play_result | On | Play completed result. |
Visualization
The v2.4 Picture view preserves the tool's original segment-order concept while correcting label placement and dense-segmentation readability.
- Source waveform: private processing source with final split boundaries. BPM mode also shows grid and beat lines.
- Segment-order diagram: blue upper row = original order; orange lower row = actual shuffled order. Numbers are shown only when cells are wide enough.
- Result waveform: mono or L/R depending on the actual result channel count.
- Footer/legend: series, number of shuffled segments, and active BPM/pitch/stereo settings.
Boundary display
Red source markers show the final boundaries after BPM snapping and one-sample sanitation, not the raw pre-quantization random or mathematical boundaries.
Permutation map
The orange row uses the actual stored segIndex order that produced the output. Its cell widths remain the original segment durations, because pitch processing restores every transformed segment to its original segmentation duration before assembly.
Waveform scales
The Source and Result are drawn separately with Praat's automatic waveform ranges. They are therefore useful for shape/timing inspection but are not a shared-amplitude-scale comparison.
Output behavior
- Name:
<source>_rhythmatist. - Original source: unchanged.
- Processing time domain: private copy begins at 0.
- Sample rate: source sample rate.
- Duration: approximately the source or BPM-grid-trimmed duration.
- Random seed: no user control.
- Final normalization: none.
- Playback: optional through Play_result.
The Info window reports the active series, grid information, pitch/stereo setup, every retained split, the final shuffled order, per-segment pitch/pan decisions, and the measured result duration.