fix(rig-builder): amp swap not reloading live engine; drop stale 8x input-drive fallback - #59
Open
Duali98 wants to merge 1 commit into
Open
Conversation
…nput-drive fallback The per-song "Swap..." gear-replace handler (rbConfirmGearSwap) persisted a gear swap correctly but never reloaded the currently-listening preview, so the engine kept playing the OLD amp/gear until the user left the song and reopened it. Other edit paths (bypass toggle, master-chain edits) already force a live reload after a structural change; this one was missed. Now refetches and reloads the preview when the swapped tone is the one playing. Also: nam_chain_input_drive's server default was already lowered from 8.0 (~+18dB) to 1.0 after players reported over-distorted amps, but the frontend's own fallback (used whenever a chain loads before the async /settings fetch resolves, e.g. right after app/plugin startup) still hardcoded the old 8.0 - silently re-introducing the over-drive bug on a race-condition timing. Fallback now matches the corrected server default.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughChangesAudio runtime behavior
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant GearSwap
participant rbReloadPreview
participant Engine
GearSwap->>rbReloadPreview: reload affected preset preview
rbReloadPreview->>Engine: refetch recomputed model payload
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The per-song "Swap..." gear-replace handler (
rbConfirmGearSwap) persisted a gear swap correctly (via/gear/replace_with) but never reloaded the currently-listening preview afterward. Other edit paths in the same editor (bypass toggle, master-chain edits) already force a live reload after a structural change; this one path was missed. Net effect: the swap was saved to the tone DB immediately, but the live audio engine kept playing the old amp/gear until the user left the song and reopened it (which forces a fresh fetch) - reported as "you have to go to another page and when you come back thats when it gets loaded."Also fixes a related regression:
nam_chain_input_drive's server-side default was already lowered from8.0(~+18dB) to1.0after players reported over-distorted/blown-out amp tones, but the frontend's own fallback constant (used whenever a chain loads before the async/settingsfetch resolves - e.g. right after app/plugin startup) still hardcoded the old8.0. That silently re-introduced the over-drive bug on a race-condition timing, which also compounds throughrbPostAmpMakeupForChain's post-amp makeup gain (computed as a ratio against this same value).Changes
rbConfirmGearSwap: after a successful swap, refetch + reload the live preview when the swapped tone is the one currently playing (rbReloadPreview(presetId)), mirroring the pattern already used byrbToggleBypass/rbAfterMasterEdit.rbConfiguredChainInputDrive(): fallback changed from8.0to1.0to match the corrected server default inroutes.py. Updated the surrounding comment, which was stale and still described the old default.Test plan
Summary by CodeRabbit