Skip to content

fix(editor): clip overlapping music once after mixing - #2746

Open
yashranaway wants to merge 2 commits into
CapSoftware:mainfrom
yashranaway:fix/music-mix-clipping
Open

yashranaway wants to merge 2 commits into
CapSoftware:mainfrom
yashranaway:fix/music-mix-clipping

Conversation

@yashranaway

@yashranaway yashranaway commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

when music tracks overlap on the timeline, each one was clipped to the -1..1 range as it got added, before the later tracks were mixed in. so the result depended on track order: two loud tracks could clip early and a third track that should have pulled the level back down couldn't, while the same tracks in another order came out fine.

now all the music is summed first, and only the frames that actually got music are clipped, once, at the end. recording only frames pass through untouched, since clip volume can push them past 1.0 and adding music elsewhere shouldn't change them. playback and export both go through this path, and the audio oracles pass.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

The PR sums overlapping music before clipping. The latest change limits clipping to frames that actually receive music.

  • Overlapping music tracks are summed before their shared output is clipped.

Reviews (2) · Last reviewed commit: "fix(editor): clip only frames that recei..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

@yashranaway is attempting to deploy a commit to the Cap Software Inc Team on Vercel.

A member of the Team first needs to authorize it.

@yashranaway

Copy link
Copy Markdown
Contributor Author

@greptileai review

Comment thread crates/editor/src/audio.rs Outdated
@yashranaway

Copy link
Copy Markdown
Contributor Author

@greptileai review

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant