Repository navigation
quest: plan a bus strip pan for the studio's Audio panel #8133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
dd32a4b
0bf0a82
3e703cd
4d190fd
14babab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 | ||
|
kixelated marked this conversation as resolved.
Resolved
|
||
| needs yet. | ||
| - ✅ **m3**: additive, with a named consumer. | ||
|
|
||
| The consumer is the studio's Audio panel and its `[audio.<source>]` 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). | ||
|
kixelated marked this conversation as resolved.
Resolved
|
||
|
|
||
| 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 | ||
|
Comment on lines
+45
to
+46
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ramp the pan position, not the channel gains.
|
||
| 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. | ||
Uh oh!
There was an error while loading. Please reload this page.