[viewer] Weather audio: audible loop repetition (rain) -- two random-jump playheads with equal-power crossfades per bed #1012

Open
opened 2026-10-24 04:07:42 +00:00 by sky_line · 0 comments
Owner

A user can hear the rain sound loop. Measured: the files' wrap points are clean (sample jump at the seam ~165-375 against RMS ~700-1400, i.e. noise-level, no click). What repeats is the sequence: rain_light 43 s, rain_medium 47 s, rain_heavy 51 s, roof_metal 67 s. Sparse beds (light rain, drips) have distinctive drops that are recognisable on every pass. Today each bed is one looping source started at a random rotation (slweatheraudio.cpp decodeJob).

Fix (all beds: rain, roofs, drips, hail, wind, snow)

  1. Two playheads per bed over the same decoded PCM. Every 10-25 s (randomised per bed), the idle playhead starts at a random point and the two swap with an equal-power crossfade (~2-4 s; long enough for noise beds). The start point must not be within a few seconds of the other playhead's position (no doubled-sound phasing) and must not land on a quiet gap (choose by local RMS). Seam-free by construction; never repeats a long sequence.
  2. Sparse beds (light rain, drip): a light random one-shot drop layer, using short slices of the bed or dedicated drop samples, at random times / small random positions around the listener (the placed-shot path already exists for thunder / roof hits).
  3. Slow modulation: small random gain (+-1 dB) and gentle low-pass drift over 10-30 s per bed.

Keep the existing group cross-fades, ducks, #894 placed openings (setLocalLoopOffset) and the gain-0 pause behaviour working for both playheads. Cost: ~2x sources per active bed (no extra decode). Setting to turn the variation off for A/B.

A user can hear the rain sound loop. Measured: the files' wrap points are clean (sample jump at the seam ~165-375 against RMS ~700-1400, i.e. noise-level, no click). What repeats is the **sequence**: rain_light 43 s, rain_medium 47 s, rain_heavy 51 s, roof_metal 67 s. Sparse beds (light rain, drips) have distinctive drops that are recognisable on every pass. Today each bed is one looping source started at a random rotation (`slweatheraudio.cpp` decodeJob). **Fix (all beds: rain, roofs, drips, hail, wind, snow)** 1. **Two playheads per bed** over the same decoded PCM. Every 10-25 s (randomised per bed), the idle playhead starts at a random point and the two swap with an **equal-power crossfade** (~2-4 s; long enough for noise beds). The start point must not be within a few seconds of the other playhead's position (no doubled-sound phasing) and must not land on a quiet gap (choose by local RMS). Seam-free by construction; never repeats a long sequence. 2. **Sparse beds** (light rain, drip): a light random one-shot drop layer, using short slices of the bed or dedicated drop samples, at random times / small random positions around the listener (the placed-shot path already exists for thunder / roof hits). 3. **Slow modulation:** small random gain (+-1 dB) and gentle low-pass drift over 10-30 s per bed. Keep the existing group cross-fades, ducks, #894 placed openings (setLocalLoopOffset) and the gain-0 pause behaviour working for both playheads. Cost: ~2x sources per active bed (no extra decode). Setting to turn the variation off for A/B.
sky_line added this to the Slipstream project 2026-10-24 04:07:42 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#1012
No description provided.