Stereo Mosaic — User Guide
Builds a stereo collage from two or more selected Sounds. Each source is converted to mono, partitioned into regions, optionally transformed, assigned to either the left or right stream, concatenated within that stream, then combined with optional M/S width and cross-channel bleed processing.
What this does
Stereo Mosaic turns multiple source Sounds into two independently assembled mono streams that become the final left and right channels.
Quick start
- Select at least two Sound objects.
- Run
Stereo_Mosaic.praat. - Choose Custom or one of the six named presets.
- Set Regions_per_file and the channel-assignment strategy.
- For Custom, adjust source-region overlap, output-stream gaps, pitch range, reverse probability and stereo width.
- Run. The result name includes the number of files, regions, preset and strategy.
Source preparation
Common sample rate
The script finds the highest sample rate among all selected Sounds. Every lower-rate work copy is resampled to that rate with Praat quality 50.
Mono source bank
Every source is processed as mono:
- mono sources are copied directly;
- stereo and multichannel sources are converted to mono;
- the original selected Sounds remain unchanged.
Private work copies are shifted to a zero-based time domain before 0…duration region extraction.
Region partitioning
Each file is processed independently. A preset may first choose one random positive source-time offset; Custom uses zero offset.
Overlap geometry
Overlap_percent is internally clamped to 0…50%. Without duration variation, this geometry makes the final region end exactly at the end of the available source interval.
Preset duration variation
Some named presets independently vary each region's duration around the base region duration. The varied end is clipped to the source boundary. The start grid itself is still derived from the unvaried partition.
Random source offset
Presets that enable this feature draw one offset per file:
The complete partition is then fitted into the source interval from that offset to the file end.
Channel-assignment strategies
Strategies operate on the region number within each source file, except Random and Spiral which also introduce their own logic.
| Strategy | Assignment rule |
|---|---|
| Alternating regions | Odd region numbers → L; even region numbers → R. The pattern restarts for every source file. |
| Left first / Right second | Region is L when region ≤ Regions_per_file / 2; all later regions are R. With an odd region count, the two groups are not necessarily equal. |
| Random split | Independent 50/50 L/R draw for every region. |
| Reverse order | Odd region numbers → R; even region numbers → L. This reverses the Alternating channel assignment; it does not reverse temporal region order. |
| Inside out | Assignment alternates according to the integer distance from the file's region midpoint. |
| Spiral pattern | Deterministic assignment from (fileIndex × 1.618 + regionIndex) mod 2. |
Pan jitter used by presets
Some presets apply an additional stochastic L↔R reassignment after the main strategy. The internal control does not perform continuous panning.
An L region can flip to R only when panShift > 0, followed by a second random test against panShift. An R region uses the symmetric negative case.
Region transformations
After extraction, each valid region can pass through the following stages.
1. Duration scaling
Presets can draw a duration factor and use:
This is Praat overlap-add time scaling. Custom leaves this stage at 100%.
2. Pitch shift
Pitch is shifted with Praat Manipulation and a modified PitchTier:
The segment is then resynthesized with overlap-add. This is pitch-tier resynthesis rather than varispeed source reading.
In Custom, Pitch_shift_semitones is treated as a magnitude: both +X and −X create the same random range −|X|…+|X|.
3. Channel-dependent filters
Only named presets can activate these hidden controls. The current Spectral Dance preset uses:
- Left: high-pass at 300 Hz;
- Right: low-pass at 4000 Hz.
The filters use Praat Filter (pass Hann band) with a 100 Hz smoothing width.
4. Reverse
When Reverse_percent is active, each region receives an independent 0…100 random draw and is reversed when the draw falls below the requested threshold.
5. Preset amplitude variation
Amplitude variation is implemented as a random target peak, not multiplication of the existing level:
After that, every region is divided by the preset's attenuation divisor.
6. Edge fades
Every processed region receives linear edge fades:
The attack rises linearly from zero and the release falls linearly to zero. This is edge tapering, not a crossfade between adjacent output regions.
Independent L/R stream assembly
Regions are visited file by file and region by region. After processing, each region is appended only to the accumulator chosen by its final channel assignment:
There is no placeholder silence inserted into the opposite stream for that event.
Gaps
If Gap_ms > 0, that amount of silence is appended to the same channel immediately after every assigned region, including the final assigned region in that stream.
Channel length
After all regions are assembled, the shorter stream is padded with silence to match the longer one. If a strategy produces no regions on one side, that side becomes a full-length silence stream.
The exact duration depends on region assignment, source durations, preset duration scaling, clipping of varied regions, and any gaps.
Stereo width & cross-channel bleed
M/S width
After L/R lengths are equalized, Stereo_width_percent is applied through mid/side algebra:
| Width | Meaning |
|---|---|
| 0% | Both channels become the same mid signal. |
| 100% | The assembled L/R streams are unchanged. |
| >100% | The side component is amplified. |
The public field is not internally clamped, so Custom values outside the usual 0…200% range extrapolate the same formula.
Cross-channel bleed
Some presets add a scaled copy of the opposite channel:
The two additions use preserved pre-bleed copies, so the second assignment does not recursively feed the already-modified first channel.
Presets
Named presets overwrite both the visible controls and their internal transformation settings.
| Preset | Regions / strategy | Visible controls | Important internal processing |
|---|---|---|---|
| Classic Ping Pong | 4 / Alternating | Overlap 0%, gap 0, pitch 0, reverse 0%, width 100% | No time/pitch variation; fade 50 ms; attenuation ÷1.1. |
| Glitchy Scatter | 8 / Random | Overlap 0%, gap 50 ms, pitch field 6, reverse 40%, width 150% | 20% source offset; ±30% duration variation; OLA factor 70–150%; pitch −5…+7 st; pan jitter 30; bleed 10%; random peak target 60–140% ×0.95; ÷1.3. |
| Spectral Dance | 6 / Spiral | Overlap 15%, gap 0, pitch field 5, reverse 0%, width 130% | 10% source offset; OLA 90–110%; pitch −7…+5 st; L HPF 300 Hz; R LPF 4000 Hz; pan jitter 20; bleed 5%; random peak target 80–120% ×0.95; ÷1.1. |
| Wide Stereo Field | 5 / Alternating | Overlap 10%, gap 0, pitch 0, reverse 0%, width 180% | Pan jitter 50; fade 60 ms; no bleed; no duration/pitch variation. |
| Dense Overlap | 12 / Random | Overlap 40%, gap 0, pitch field 3, reverse 25%, width 120% | 15% source offset; ±20% duration variation; OLA 85–115%; pitch −3…+3 st; pan jitter 40; bleed 15%; random peak target 70–130% ×0.95; ÷1.4. |
| Minimal Sparse | 3 / Split | Overlap 0%, gap 300 ms, pitch 0, reverse 10%, width 100% | 5% source offset; ±10% duration variation; OLA 95–105%; pan jitter 10; random peak target 90–110% ×0.95. |
Public parameters
| Parameter | Default | Exact behavior |
|---|---|---|
| Preset | Custom | Custom plus six named configurations. |
| Regions_per_file | 4 | Positive integer; number of source regions requested for every selected file. |
| Channel_strategy | Alternating | One of the six L/R assignment rules above. |
| Overlap_percent | 0 | Source-extraction overlap; internally clamped to 0…50%. |
| Gap_ms | 0 | Positive values append silence after every assigned output-stream region; zero or negative values add no gap. |
| Pitch_shift_semitones | 0 | In Custom, magnitude of a symmetric random pitch range −|X|…+|X|. |
| Reverse_percent | 0 | Per-region random reversal threshold. |
| Stereo_width_percent | 100 | M/S side multiplier after assembly; no internal clamp. |
| Draw_visualization | On | Draw current region distribution, output waveform, file legend and summary. |
| Play_result | On | Play the completed stereo Sound. |
Visualization
The v0.5 Picture view contains:
- Left channel region map — one rectangle for every region ultimately assigned to L.
- Right channel region map — the same for R.
- Output stereo waveform — the completed normalized result.
- File color legend — one color per source file, with truncated real object names when necessary.
- Summary bar — preset, file/region counts, strategy, overlap, gap, reverse, width, bleed, output duration, RMS and sample rate.
Reading the region maps
The x-axis is sequential position inside that output channel's region stream. The y-axis is the original source-file number. Rectangle color identifies the source file.
The current v0.5 map also does not display the stored pitch-shift or reversal values as markers. Those transformations affect the audio but are not encoded in the region rectangles.
Output waveform
The stereo result is drawn with Praat's automatic waveform range. The panel is a view of the final result, not a calibrated comparison against the source files.
Output behavior
- Name:
mosaic_<N>f_<R>r_<preset>_<strategy>. - Channels: stereo.
- Sample rate: highest sample rate among the selected sources.
- Duration: duration of the longer independently assembled L/R stream after region processing and gaps.
- Original sources: unchanged.
- Final level: non-silent stereo output receives target Sinc70 peak scaling to 0.99.
- Random seed: no user control.
- Playback: optional through Play_result.
Final peak scaling is performed once on the combined stereo Sound so the L/R balance created by width and bleed processing is retained.