Repository navigation
Stretch ratio simplification attempt - #12290
saintmatthieu merged 4 commits into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 📝 WalkthroughWalkthroughWaveClip now stores stretch as an absolute ratio instead of combining raw-audio tempo, clip tempo, and clip stretch ratio. During deserialization, it converts legacy tempo attributes using the project tempo when needed. Serialization no longer writes those legacy attributes. Tempo-matching workflows now handle project tempo changes, imported loops, and changes to the clip matching setting. New tests cover legacy clip conversion, clip operations, XML persistence, and tempo-matching behavior. Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant TempoDetection
participant ITrackeditProject
participant Au3TrackeditProject
participant WaveClip
TempoDetection->>ITrackeditProject: Set time signature with noStretch
ITrackeditProject->>Au3TrackeditProject: Update time signature
Au3TrackeditProject->>WaveClip: Temporarily disable and restore tempo matching
Merge Risk: 🟡 Moderate · up to Tempo changes can misalign a clip’s volume automation, and direct track XML loading can fail. Address these before merging. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Valid legacy tempo data has a defined conversion path and the changed workflows have targeted tests. The remaining design risk is that a failed project-tempo update could leave clips in a different tempo-following state; coverage of invalid import tempos and external users of the replaced APIs is also incomplete. No introduced security vulnerability was established. Retained concerns
Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Warning Linked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Advanced
Run ID: 4f34923d-aa7b-457a-8554-76e732a6ab80
📒 Files selected for processing (9)
au3/libraries/au3-wave-track/WaveClip.cppau3/libraries/au3-wave-track/WaveClip.hau3/libraries/au3-wave-track/WaveTrack.cppsrc/importexport/import/internal/au3/tempodetection.cppsrc/importexport/import/internal/au3/tempodetection.hsrc/project/tests/CMakeLists.txtsrc/project/tests/cliptempopersistence_tests.cppsrc/trackedit/internal/au3/au3clipsinteraction.cppsrc/trackedit/tests/au3clipsinteraction_tests.cpp
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
ef60dba to
9351725
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Advanced
Run ID: 2d2c17fa-0834-48d3-bab9-fbf62bcf3ab7
📒 Files selected for processing (10)
au3/libraries/au3-wave-track/WaveClip.cppau3/libraries/au3-wave-track/WaveClip.hau3/libraries/au3-wave-track/WaveTrack.cppsrc/importexport/import/internal/au3/tempodetection.cppsrc/importexport/import/internal/au3/tempodetection.hsrc/trackedit/internal/au3/au3trackeditproject.cppsrc/trackedit/internal/au3/au3trackeditproject.hsrc/trackedit/itrackeditproject.hsrc/trackedit/tests/au3clipsinteraction_tests.cppsrc/trackedit/tests/mocks/trackeditprojectmock.h
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Assisted-by: Claude Opus 5 (1M context)
Assisted-by: Claude Opus 5 (1M context)
It used to be based on `mRawAudioTempo`, `mClipStretchRatio` and `mClipTempo` (the latter being the current project's tempo or a freeze of it if the user unchecked the "Stretch to match project tempo" box). This simplification lumps those three in just one variable, `mStretchRatio`. It's based on the belief (reviewers please challenge this) that the raw tempo, issued from the detection, really only is needed once at import. Assisted-by: Claude Opus 5 (1M context)
9351725 to
83b31d2
Compare
Resolves: #12209 (resolves it on master - ticket is already resolved for 4.0.1)
Resolves: #12266
A clip's stretch ratio is now stored as one variable.
It used to be based on
mRawAudioTempo,mClipStretchRatioandmClipTempo(the latter being the current project's tempo or a freeze of it if the user
unchecked the "Stretch to match project tempo" box).
This simplification lumps those three in just one variable,
mStretchRatio.It's based on the belief (reviewers please challenge this) that the raw tempo,
issued from the detection, really only is needed once at import.
The PR also adds a plethora of test cases: that's because a wrong parsing of the stretch ratio from a legacy project file can lead to many bugs (clips cutting each other, trim boundaries not respected, etc). They are largely based on those in @kryksyh 's PR #12213
Recommended: