Skip to content

Show optional DiffSinger render phrase boundaries in piano roll#2182

Open
KakaruHayate wants to merge 3 commits into
openutau:masterfrom
KakaruHayate:edgecase
Open

Show optional DiffSinger render phrase boundaries in piano roll#2182
KakaruHayate wants to merge 3 commits into
openutau:masterfrom
KakaruHayate:edgecase

Conversation

@KakaruHayate
Copy link
Copy Markdown
Contributor

Summary

This PR adds an optional visual overlay for DiffSinger render phrases in the piano roll.

When enabled, OpenUtau draws dashed vertical boundary markers for each DiffSinger render phrase, using the renderer layout bounds so the displayed range matches the actual rendered segment. The overlay is only shown when the active renderer is DiffSinger.

A new DiffSinger preference is added for this behavior:

  • Show render phrase boundaries
  • Default: off

Testing

  • Built successfully with dotnet build OpenUtau.sln --nologo --verbosity:minimal
  • Launched the OpenUtau desktop app from the debug build

@nagotown
Copy link
Copy Markdown
Contributor

nagotown commented Jun 5, 2026

Very nice! Would it be possible to improve the visibility? It's a little difficult to read since the quantize lines are also dashed.

Quantize gridlines use a short [2,4] dash so the previous semi-opaque
[1,2] dashed boundary was hard to distinguish from them.
Switch the phrase boundary lines to a [4,2,1,2] dot-dash pattern at
full accent color.
@KakaruHayate
Copy link
Copy Markdown
Contributor Author

Very nice! Would it be possible to improve the visibility? It's a little difficult to read since the quantize lines are also dashed.

Thanks for the feedback! I switched the phrase boundary lines to a [4,2,1,2] dot-dash pattern at the full accent color (no longer semi-transparent), so they now read clearly against the [2,4] short-dash quantize grid. Pushed in cdbc5b8.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an optional piano roll overlay that visualizes DiffSinger render phrase boundaries, controlled by a new DiffSinger preference (default off) and only shown when the active renderer is DiffSinger.

Changes:

  • Added a new DiffSinger preference (Show render phrase boundaries) with UI binding and persistence.
  • Added a new localized string resource for the preference label.
  • Implemented phrase-boundary rendering in the piano roll (NotesCanvas) using DiffSinger renderer layout bounds.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
OpenUtau/Views/PreferencesDialog.axaml Adds a new toggle for showing DiffSinger render phrase boundaries.
OpenUtau/ViewModels/PreferencesViewModel.cs Introduces a reactive preference property, loads/saves it, and triggers a notes refresh.
OpenUtau/Strings/Strings.axaml Adds the display string for the new preference.
OpenUtau/Controls/NotesCanvas.cs Draws dashed vertical boundary markers (and a top rail) for DiffSinger render phrases.
OpenUtau.Core/Util/Preferences.cs Persists the new preference in SerializablePreferences.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread OpenUtau/Controls/NotesCanvas.cs
Comment on lines +372 to +378
private void DrawPhraseBoundaryLine(DrawingContext context, IPen pen, double x) {
if (x < 0 || x > Bounds.Width) {
return;
}
double crispX = Math.Round(x) + 0.5;
context.DrawLine(pen, new Point(crispX, 0), new Point(crispX, Bounds.Height));
}
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@nagotown
Copy link
Copy Markdown
Contributor

nagotown commented Jun 7, 2026

Another suggestion: I'm not sure how difficult this would be to implement, but it would be easier to immediately recognize if phrases are overlapping if if the overlapping region was made a different color.

Image below for clarification:

3QmkDoCiRW

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants