Repository navigation
Pan each sound - #116
Pan each sound#116
Conversation
Quest-Claim: 1314fadc90271a72
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 37 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head: df89e6e
- [P2] Preserve mono layout until the bus applies pan —
rs/moq-scene/src/source.rs:357.
The newly exposed pan does not use the agreed mono constant-power law for mono broadcasts, media files, or replays. Those paths force decoder output to the stereo bus layout (source.rs:1219,1828) and register a stereo channel (1836), so the bus classifies them as stereo and balances them. Pinned moq's remix duplicates a mono sample onto both channels (resample.rs:427-431), and its bus selects the pan law from the channel's input layout (bus.rs:368,632-646). For a decoded mono sample of 0.5, the settled output is therefore (0.5, 0.5) at center and (0, 0.5) hard right: panning reduces total power by half, rather than maintaining it as a captured mono microphone does. Preserve mono through decode/channel registration, use the resulting channel count for writer strides and durations, and let the bus perform the remix and pan. Add a bus-output test for a mono decoded source, not only a strip.pan() assertion. This implements the law already chosen in the base audio-pan quest; it does not require new studio-side DSP.
- [P2] Make the pan rail recognize double-clicks —
rs/moq-studio/src/ui.rs:3691-3693.
Double-clicking the slider rail or handle away from center leaves pan at the clicked position instead of centering it as the tooltip promises. Pinned egui 0.36.2 allocates the rail with Sense::drag() (slider.rs:650-655); it sets the clicked flag only for click-sensitive widgets (context.rs:1524-1527), and double_clicked() requires that flag (response.rs:247-252). Combining the value editor's response does not make a rail click an editor click. Add a click-capable interaction that preserves dragging and numeric editing, or an explicit center control, and verify the reset through both Audio and Graph panels.
Direction: keep pan on the shared upstream strip and the existing Audio/history path; address the mono integration and reset interaction before treating the quest as complete. The previously reported grid-column and input-parser issues are fixed. No other actionable findings after reading all changed files, following persistence/undo/routing and both UI callers, and checking the pinned upstream pan implementation and tests.
Verification limits: GitHub-only static review. I could not run quest context, builds, tests, audio playback, or UI interactions. The returned Check run for this exact head was skipped, so no passing CI result was established. The PR's reported local checks and unrelated timestamp failure were not independently reproduced.

Finishes
quest/m0/audio-pan.md: each sound gets a pan beside its fader.Changes
moq_scene::Audiohas a newpan: f32field, from-1.0(hard left) to1.0(hard right). It is saved aspanin[audio.<source>]and left out of the file when centered.Collection::validaterefuses a value outside that range, or NaN.Sources::syncpasses it toStrip::set_panalong with gain, mute, and delay, so it applies in every audio scene holding the sound. The studio's bus is always stereo, the one layout that never refuses a pan, so a failedset_panpanics. moq-audio ramps the change across a block.strip_controlshas a pan slider labeledL50/C/R50. Double-clicking it re-centers. Because both panels draw fromstrip_controls, the slider shows on the Audio panel strip and on the Graph node, and its edits go into History as a gesture, as gain edits do.[audio.<source>]reference all describe pan.sync_restarts_only_what_changedchecks that pan reaches the strip without a restart, and the collection round trip carries a pan.Public API
moq_scene::Audiogained a public field, so struct literals without..Default::default()will no longer compile. The scene file is backward compatible becausepandefaults to center. No wire impact.Choices made without asking
moq_scene::Audiogains a publicpanfield without a!title: only this repo constructs it, and scene files stay compatible.Verification
just checkpasses.just test: 275/276 pass. The one failure ispublish::tests::a_media_file_is_published_on_one_timeline(a repeated 10550ms timestamp). It is pre-existing and unrelated; moq-dev/studio#113, which is queued, fixes it.Models
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.01a1bc6d-7cc5-7fe0-91e4-86dfe270cb00, round 2Both reported issues are fixed at the head, and the changes since the last review introduce no additional findings.rs/moq-studio/src/ui.rs:3667:Add the pan column to the Audio panel's grid;The Audio grid now includes a Pan header and a corresponding empty cell in each audio-scene row, aligning Delay and routing checkboxes.rs/moq-studio/src/ui.rs:3670:Pair the pan formatter with a matching input parser;The shared pan control now has a custom parser accepting case-insensitive C, L<n>, and R<n> notation plus bare numeric values.