Show optional DiffSinger render phrase boundaries in piano roll#2182
Show optional DiffSinger render phrase boundaries in piano roll#2182KakaruHayate wants to merge 3 commits into
Conversation
|
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.
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. |
There was a problem hiding this comment.
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.
| 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>

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 boundariesTesting
dotnet build OpenUtau.sln --nologo --verbosity:minimal