Skip to content

diffsinger: always retake pitch locally; remove the LocalRetaking option - #2406

Open
KakaruHayate wants to merge 1 commit into
openutau:masterfrom
KakaruHayate:diffsinger/always-local-retaking
Open

diffsinger: always retake pitch locally; remove the LocalRetaking option#2406
KakaruHayate wants to merge 1 commit into
openutau:masterfrom
KakaruHayate:diffsinger/always-local-retaking

Conversation

@KakaruHayate

Copy link
Copy Markdown
Contributor

What and why

"Load rendered pitch" (the batch edit behind pianoroll.menu.notes.loadrenderedpitch) calls DiffSingerRenderer's selected-notes overload. Until now that overload only performed local retaking when the DiffSingerLocalRetaking preference was enabled; by default it fell back to re-predicting the whole phrase and ignored the selection.

Local retaking is what the edit's name implies, and what the live path (LoadRenderedPitchLive) already does unconditionally — it bypasses the preference. So the option added a second, mutually exclusive behaviour to the same operation and made the default the less useful one.

This removes the option and always retakes locally:

  • with a selection, only the selected notes are re-predicted and spliced into the existing pitch curve;
  • with no selection (or a selection covering the phrase), all notes are re-predicted — unchanged;
  • playback and the regular render path go through the single-phrase overload and are unaffected.

The preference, its UI toggle in the preferences dialog, the view-model wiring and its string are removed. Existing preferences files that still contain the key are ignored by the JSON deserializer.

Verification

dotnet build with the patch 0 errors, 0 warnings
dotnet test full suite 238 passed, 0 failed — identical to the baseline
forceLocalRetake references on master exactly the 4 removed by this patch

The retake logic itself is covered by the existing BuildRetakeFrameMask_* / GetRetakeFrameRanges_* tests; this PR changes no retake behaviour.

"Load rendered pitch" (the batch edit) calls DiffSingerRenderer's
selected-notes overload. Until now that overload only performed local
retaking when the DiffSingerLocalRetaking preference was enabled; by default
it fell back to re-predicting the whole phrase, ignoring the selection.

Local retaking is what the edit's name implies, and what the live path
(LoadRenderedPitchLive) already does unconditionally, so the preference added
a second, mutually exclusive behaviour to the same operation and made the
default the less useful one. Remove the option and always retake locally:

* with a selection, only the selected notes are re-predicted and spliced
  into the existing pitch curve;
* with no selection (or a selection covering the phrase), all notes are
  re-predicted -- unchanged;
* playback and the regular render path go through the single-phrase overload
  and are unaffected.

The preference, its UI toggle, the view-model wiring and its string are
removed. Preferences files that still contain the key are ignored by the
JSON deserializer.
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