Skip to content

Build the remaining setting models from the effect parameters - #12909

Open
luapmartin wants to merge 12 commits into
audacity:masterfrom
luapmartin:luapmartin/12908
Open

luapmartin wants to merge 12 commits into
audacity:masterfrom
luapmartin:luapmartin/12908

Conversation

@luapmartin

@luapmartin luapmartin commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Part of: #12908

#12864 introduced setting models built from a list of specs (SettingSpecModelFactory). This moves the other effects that use setting models to it, so there is a single way to build them:

  • Reverb: gets a spec list and its view uses SettingKnob. "Wet only" goes through the same models (a bool setting is handled as 0 or 1, covered by a new test). ReverbViewModel is removed.
  • Compressor, Limiter: spec lists replace the two setting model classes; no view change.
  • Sliding Stretch: same, and its view names the settings by their parameter keys.
  • EffectSettingModelImpl and its factories are removed, as nothing uses them anymore.

One behaviour change: double-clicking a Reverb knob restores the parameter's default; before, it set 0 because the view passed no default.

Rebased on master after #12864 was merged: builds locally and effects_builtin_tests passes. Before the rebase the four dialogs opened without QML errors (testflow). The controls of the four dialogs have not been checked on screen since the move to spec lists.

  • I signed CLA
  • This PR includes AI assistance (Claude Code, Claude Fable 5.2)
  • If the PR is AI-assisted, I have read, understood and complied with the guidelines for AI-assisted contributions
  • The title of the pull request describes an issue it addresses
  • If changes are extensive, then there is a sequence of easily reviewable commits
  • Each commit's message describes its purpose and effects
  • There are no behavior changes unnecessary for the stated purpose of the PR

Recommended:

  • Each commit compiles and runs on my machine without known undesirable changes of behavior

🤖 Generated with Claude Code

@luapmartin luapmartin changed the title Use the setting-model idiom in the Reverb view Build the remaining setting models from the effect parameters Nov 30, 2026
@luapmartin luapmartin self-assigned this Dec 1, 2026
The view uses setting knobs, and "Wet only" goes through the same models, so the Reverb view model is gone. Double-clicking a knob now restores the parameter's default, not 0.

Assisted-by: Claude Fable 5.2
The view now names the settings by their parameter keys.

Assisted-by: Claude Fable 5.2
@luapmartin
luapmartin marked this pull request as ready for review December 2, 2026 10:05
@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9731c5bc-57da-4751-9461-b555143b077f
Commits

Reviewing files that changed from the base of the PR and between 3f98010 and feefa00.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The change adds setting specifications for Compressor, Limiter, Reverb, and Sliding Stretch. It replaces their dedicated setting-model registrations with setting-spec model factories and removes the legacy setting models and Reverb view model. ReverbView now uses setting models for its controls, while Sliding Stretch views bind controls to updated parameter identifiers. The change also updates unit handling in setting specifications and adds a test for boolean setting access.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: Minimal · previous review 3f980

This moves the Reverb, Compressor, Limiter and Sliding Stretch effect settings onto the shared setting-spec models. The one visible change is that double-clicking a Reverb knob now restores its default instead of setting it to 0. No concrete defect was found, so merge risk is minimal. A quick on-screen check of the four dialogs' controls is still worthwhile.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "Build the remaining setting models from the effect parameters" matches the main change. The PR moves Reverb, Compressor, Limiter, and Sliding Stretch from dedicated setting model classes to…
Description check Passed The description follows the repository template. It links the issue (#12908 as part of the work), explains the motivation and the changes for each effect, and records a behavior change (Reverb knob do…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Build the remaining setting models from the effect parameters" matches the main change. The PR moves Reverb, Compressor, Limiter, and Sliding Stretch from dedicated setting model classes to SettingSpecModelFactory with spec lists, and removes EffectSettingModelImpl and its factories. The title is specific enough for a teammate to understand the primary change, though it does not name the specific effects or the removal of ReverbViewModel.

Full details: Description check

Explanation

The description follows the repository template. It links the issue (#12908 as part of the work), explains the motivation and the changes for each effect, and records a behavior change (Reverb knob double-click now restores the default). The AI assistance, CLA, and title checkboxes are ticked. The only unticked item is the recommended check that each commit compiles and runs, and the author states the build passes after rebase but does not confirm per-commit compilation. The 'Resolves' line gives an issue link rather than a direct issue link to the issue being resolved, which is a minor gap. The author also notes that the four dialogs have not been checked on screen, which is useful reviewer context.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped musescore/musescore.

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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 213cf889-8f0f-4050-9695-f6b69106da27
Commits

Reviewing files that changed from the base of the PR and between 6b42d1f and 3f98010.

Files selected for processing: 12

  • src/effects/builtin_collection/common/settingspecmodel.h
  • src/effects/builtin_collection/dynamics/compressor/compressorsettingspecs.cpp
  • src/effects/builtin_collection/dynamics/limiter/limitersettingspecs.cpp
  • src/effects/builtin_collection/dynamics/timeline/DynamicsPanel.qml
  • src/effects/builtin_collection/echo/echosettingspecs.cpp
  • src/effects/builtin_collection/phaser/phasersettingspecs.cpp
  • src/effects/builtin_collection/reverb/reverbsettingspecs.cpp
  • src/effects/builtin_collection/slidingstretch/SlidingStretchCard.qml
  • src/effects/builtin_collection/slidingstretch/SlidingStretchPitchControls.qml
  • src/effects/builtin_collection/slidingstretch/SlidingStretchView.qml
  • src/effects/builtin_collection/slidingstretch/slidingstretchsettingspecs.cpp
  • src/effects/builtin_collection/wahwah/wahwahsettingspecs.cpp
Files with no reviewable changes: 1

  • src/effects/builtin_collection/slidingstretch/SlidingStretchView.qml
Files skipped from review as they are similar to previous changes: 1

  • src/effects/builtin_collection/dynamics/compressor/compressorsettingspecs.cpp

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

The spec lists name the unit, and the model picks the symbol.

Assisted-by: Claude Fable 5.2
The titles were written twice, in the view and in the spec list, and
only the view's were shown. The specs now use the view's translation
context, so the existing translations still apply.

Assisted-by: Claude Fable 5.2
They keep the translation context the panel was using.

Assisted-by: Claude Fable 5.2
@luapmartin

Copy link
Copy Markdown
Contributor Author

@chinakov or @dozzzzer could you please do those Main checks on the Reverb effect could you check:

  • the nine knobs show the right title, unit and range
  • mouse drag, mouse wheel and typed values work as expected
  • The "Wet only" checkbox toggles and is kept when reopening the dialog
  • NEW BEHAVIOUR: Double-clicking a knob now resets it to its default, where before it went to 0

On Compressor and Limiter:

  • the knobs show dB and ms as before
  • The three checkboxes after "Show:" read Input, Output and Compression and still work (show/hide their curves in the graph)

On Sliding Stretch: all text are unchanged, the tempo and percentage fields show "%", and the semitone and percentage fields of a pitch card still are linked together

Lighter checks on Echo, Phaser, WahWah: only that the units (s, Hz, °, %, dB) still appear next to the values.

thanks

@dozzzzer

dozzzzer commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

@luapmartin Tested on macOS, all good.

  • Reverb: titles, units and defaults are correct on all nine knobs. Mouse drag, mouse wheel and typed values work, and out-of-range values are clamped. Double-click resets each knob to its default, not to 0. "Wet only" toggles and is kept after Apply and reopening
  • Compressor and Limiter: dB and ms units as before. As realtime effects, the Show checkboxes read Input / Output / Compression, and each one shows and hides its curve on the Compressor. On the Limiter, Input and Output toggle fine
  • Sliding Stretch: texts unchanged, and "%" shows on the tempo and percentage fields. Semitones and percentage are still linked both ways
  • Echo, Phaser, Wahwah: s, Hz, °, % and dB all show next to the values

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.

3 participants