BPM Rhythmic Panning — User Guide
BPM-locked rhythmic stereo panning with musical subdivisions, swing, accent grids, polyrhythms, gates, constant-power pan law, tempo-aware control-rate rendering, and drum-machine-style visualisation.
What this does
BPM Rhythmic Panning turns one mono or stereo Sound into a stereo rhythmic spatial pattern locked to a user-defined tempo and musical subdivision. Unlike a free-running autopanner, its movement is organised around beats, subdivision steps, swing, accent patterns, and named rhythmic figures.
→ validate mono/stereo input
→ derive BPM/subdivision timing grid
→ apply swing + accent logic where relevant
→ generate pan + amplitude trajectories
→ constant-power left/right gain envelopes
→ AmplitudeTier rendering
→ stereo output
→ optional normalisation + visualisation
Downmix to mono and pan, stereo input is first converted to mono and the complete source can travel anywhere between left and right. Preserve stereo and modulate balance keeps the original channels separate; material that exists only on one side cannot cross to the other, so this mode is balance modulation rather than true panning.
Rhythmic engine
Eight subdivision choices are available: quarter notes, eighth notes, eighth-note triplets, sixteenth notes, sixteenth-note triplets, thirty-second notes, dotted quarters, and dotted eighths. Swing uses the conventional scale: 50% = straight, 66.7% = triplet swing, and 75% = hard shuffle. Swing warps the boundary inside each pair of subdivision steps while preserving the total duration of the pair.
Constant-power pan law
For pan position p and pattern amplitude a:
gR = a × sqrt((1 + p) / 2)
gL² + gR² = a²
This keeps the squared gain sum constant while the image moves across the stereo field.
Quick start
- In Praat, select exactly one mono or stereo Sound object.
- Run script… →
BPM_Panning.praat. - Set Tempo_bpm and choose a musical Subdivision.
- Set Swing_percent if the selected pattern uses the subdivision grid. Use 50 for straight timing, 66.7 for triplet swing, or 75 for a hard shuffle.
- Edit the Accent_grid if desired. Any character other than
1is treated as an unaccented step; the grid is limited to 32 characters. - Choose one of the 15 rhythmic Pattern options.
- Adjust Edge_transition_percent to smooth rapid envelope changes in musical units: the value is a percentage of one subdivision step.
- For true panning of a stereo source, keep Stereo_input at
Downmix to mono and pan. Choose the preserve-stereo option only when balance modulation is intentional. - Choose the desired Output_normalisation mode and Peak_target.
- Enable or disable Draw_visualization and Play_result, then click OK.
Parameters (form fields)
| Name (GUI) | Type | Default | Description |
|---|---|---|---|
| Tempo_bpm | real | 120 | Tempo in beats per minute. Accepted range: 1–999 BPM. |
| Subdivision | option menu | 1/16 | Rhythmic grid: 1/4, 1/8, 1/8T, 1/16, 1/16T, 1/32, 1/4D, or 1/8D. |
| Swing_percent | real | 50 | Swing position inside each pair of subdivision steps. 50 = straight, 66.7 = triplet swing, 75 = hard shuffle. Values are clamped to 25–75. Some independently-clocked patterns do not use swing. |
| Accent_grid | sentence | 1010100110101001 | Repeating accent pattern. Character 1 means accented; all other characters are unaccented. Empty input falls back to 1000100010001000; maximum length is 32 steps. |
| Pattern | option menu | Ping-pong | One of 15 BPM-locked rhythmic figures: Ping-pong, Two-beat pendulum, Backbeat snap, Hat 16ths, Dotted dub, Trance gate, Pulse train, Ghost notes, Stutter, Roll, 3-against-4, 5-against-7, Two-bar arc, Phrase build, or Polymeter shift. |
| Edge_transition_percent | real | 12 | One-pole transition time expressed as a percentage of one subdivision step. Clamped to 0–100. At 0%, AmplitudeTier interpolation still makes transitions very fast rather than mathematically square. |
| Stereo_input | option menu | Downmix to mono and pan | Downmix to mono and pan provides true panning. Preserve stereo and modulate balance keeps original channels separate and therefore cannot move one-sided material across the stereo image. |
| Output_normalisation | option menu | Peak | Peak scales the final stereo output to the target, Attenuate only reduces level only when the peak exceeds the target, and None leaves output level unchanged. |
| Peak_target | real | 0.95 | Target absolute peak for the normalization modes. Invalid values fall back to 0.95. |
| Draw_visualization | boolean | 1 | Draws the drum-machine-style diagnostic display. |
| Play_result | boolean | 1 | Plays the final stereo Sound after processing. |
15 Patterns
Ping-pong
Alternates left and right on the selected subdivision grid.
Two-beat pendulum
Slower beat-scale movement with a pendulum-like arc.
Backbeat snap
Emphasises backbeat positions with abrupt spatial contrast.
Hat 16ths
Fast sixteenth-note spatial articulation.
Dotted dub
Dotted-eighth movement suited to dub-style rhythmic spacing.
Trance gate
Regular gated motion with strong subdivision locking.
Pulse train
Repeated pulses articulated through both level and position.
Ghost notes
Uses accent and non-accent steps to create foreground/background motion.
Stutter
Rapid repeated directional attacks.
Roll
Dense rolling movement with fast spatial repetition.
3-against-4
Polyrhythmic spatial cycle based on three against four.
5-against-7
More complex polyrhythmic spatial interference.
Two-bar arc
Long-form motion shaped across a two-bar span.
Phrase build
Progressively develops movement over a phrase-scale trajectory.
Polymeter shift
Uses mismatched repeating cycles to create slowly shifting spatial alignment.
1 is accented; every other character is treated as unaccented.
Visualisation
When Draw_visualization is enabled, the script produces a compact drum-machine-style diagnostic view of the rhythmic spatial process.
- Rhythmic grid — subdivision steps, beat lines, swing displacement, and accent states.
- Pan trajectory — left/right spatial position through time.
- Amplitude trajectory — rhythmic gain contour used by the pattern.
- Left/right gains — complementary constant-power gain envelopes.
- Output waveform — final stereo result for structural reference.
- Summary panel — BPM, subdivision, swing status, pattern, control rate, transition time, normalisation mode, and peak statistics.
Outputs
- Object name:
[OriginalName]_rhy_[PatternName] - Channels: stereo.
- Duration: same duration as the source Sound.
- Sample rate: same as the source Sound.
- Normalization: selectable: peak to target, attenuate only, or none.
- Info report: source properties, input-handling mode, BPM/subdivision and step duration, pattern, accent grid, swing status, control rate and points per event, edge-transition time, constant-power pan law, normalization mode, peak before/after, and processing timing.
- Visualization: when enabled, shows the swung/accented step grid with beat lines, pan and amplitude trajectories, left/right gain envelopes, stereo output waveform, and a compact summary panel.