diff --git a/quest/m3/README.md b/quest/m3/README.md index 4026818f465..c2572cdb9e4 100644 --- a/quest/m3/README.md +++ b/quest/m3/README.md @@ -136,6 +136,7 @@ federation) land. - [Lint override and deprecation audit](/quest/m3/audit-lints.md) - repeat the suppression and deprecation audit after the release ships, starting with clippy on the macOS and Windows targets - [Clean ALSA playback onset](/quest/m3/audio-alsa-onset.md) - no onset restarts or clicks over PulseAudio - [Read a bus source's own samples](/quest/m3/audio-strip-tap.md) - a tap reads one source's samples before its delay with their bus-clock positions, for the studio's clap sync +- [Pan a bus source](/quest/m3/audio-strip-pan.md) - a strip's constant-power pan places its source between left and right in every mix, for the studio's Audio panel - [Interop audit](/quest/m3/audit-interop.md) - our interop runner entries match what we ship, and every red interop cell with a moq.dev side is fixed, reported, or noted as down or unsupported - [moq-hls exposes each rendition's bound source](/quest/m3/hls-rendition-source.md) - playlists and segments report the source path and instance they read, so a cache can key on the source - [The memory bench finishes at 1 MiB frames](/quest/m3/memory-bench-hang.md) - the allocation mode's park at `size=1048576` is root-caused and fixed diff --git a/quest/m3/audio-strip-pan.md b/quest/m3/audio-strip-pan.md new file mode 100644 index 00000000000..876cb59d7e0 --- /dev/null +++ b/quest/m3/audio-strip-pan.md @@ -0,0 +1,49 @@ +# [S] Pan a bus source + +## Goal + +A `moq_audio::bus` `Strip` has a pan, set and read like its gain, that +places its source between left and right in every mix that plays it. +Setting a pan other than center on a bus that is not stereo is an error. + +## Plan + +Decided 2026-11-07 (maintainer, on moq-dev/studio's /quest-complete of +[moq-dev/studio#77](https://github.com/moq-dev/studio/pull/77)): + +- ✅ **Pan lives on the strip**, so it applies wherever the sound plays, + as gain, mute, and delay do. Rejected: a pan per mix the source is + routed to. +- ✅ **Constant power, -3 dB at center** (a sine/cosine law), so a sound + keeps its loudness as it moves. Rejected: linear (-6 dB) and 0 dB center. +- ✅ **A stereo source is balanced**: the far side is attenuated by the same + law and each channel stays where it is. Rejected: moving both channels + together. The even loudness holds for a mono source; balance only turns a + side down, so a stereo source with sound on one side only goes silent when + balanced hard to the other, as a mixer's balance control does. +- ✅ **Stereo buses only.** A non-center pan on a mono or surround bus is + refused with an error. Rejected: ignoring it, and a surround pan nobody + needs yet. +- ✅ **m3**: additive, with a named consumer. + +The consumer is the studio's Audio panel and its `[audio.]` scene +file settings, through +[the studio's pan quest](https://github.com/moq-dev/studio/blob/main/quest/m0/audio-pan.md); +the studio bumps its pin in +[its own quest](https://github.com/moq-dev/studio/blob/main/quest/m0/pin-audio-pan.md). + +A `Strip` holds no layout today and meets one only in `Bus::channel`, and +`Driver::advance` has no error path, so the refusal needs a call that +returns it. Recommendation, not settled: `Bus::channel` refuses a strip +already panned off center on a bus that is not stereo, and the strip keeps +a count of its open channels on such buses (counted up in `Bus::channel`, +down when the channel drops), so a later `Strip::set_pan` off center returns +the error while any is open. A strip outlives its channels, so a flag would +keep refusing after the last one closes. The driver never sees a refused pan. + +Also recommended, not settled: store the pan atomically beside the gain and +ramp each channel's pan gain across the block as `Driver::advance` already +ramps the strip's gain (`rs/moq-audio/src/bus.rs`), so a pan move is +click-free. Test a mono impulse panned hard left, center, and hard right, a +stereo source balanced, and a hard-left to hard-right move during a +sustained tone, against the expected channel levels.