Add external renderer plugin API - #2340
Open
Astel123457 wants to merge 9 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Renderers.GetDefaultRenderer does not honor newly listed external renderer defaults from Preferences, making the new default-renderer option ineffective.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR introduces an external renderer plugin API (v1 public preview), adding discovery/identity for external renderers, exposing renderer-declared capabilities/expressions/analysis/cache services, and integrating those renderers into both UI selection and singer/oto workflows.
Changes:
- Add external renderer discovery/registry plus plugin surface types (metadata, analysis provider, cache/analysis services).
- Integrate stable renderer IDs into track settings selection and render-phrase hashing.
- Add UI entry point to generate renderer-provided analysis files and add targeted registry/compatibility tests.
File summaries
| File | Description |
|---|---|
| OpenUtau/Views/SingersDialog.axaml.cs | Adds a context-menu flow for generating external renderer analysis from selected oto sources. |
| OpenUtau/Views/SingersDialog.axaml | Adds a context menu entry for “Generate renderer analysis”. |
| OpenUtau/ViewModels/TrackHeaderViewModel.cs | Updates renderer selection menu to use stable renderer IDs; adds error handling around renderer selection. |
| OpenUtau/Strings/Strings.axaml | Adds localized strings for renderer analysis generation UI. |
| OpenUtau.Test/Render/ExternalRendererRegistryTest.cs | Adds unit tests covering discovery, identity, analysis generation, and runtime/manifest compatibility checks. |
| OpenUtau.Core/Ustx/UTrack.cs | Enhances render settings validation with stable renderer identity + controlled fallback and load error reporting. |
| OpenUtau.Core/Render/RenderPhrase.cs | Switches render cache hash contribution to stable renderer ID rather than ToString(). |
| OpenUtau.Core/Render/Renderers.cs | Adds renderer options (Id/Name), external renderer integration, and stable renderer identity helpers. |
| OpenUtau.Core/Render/ExternalRendererRegistry.cs | Introduces the external renderer registry: discovery, loading, analysis orchestration, and collectible load contexts. |
| OpenUtau.Core/Render/ExternalRendererPlugin.cs | Adds the public plugin API types: attribute, metadata, analysis provider interfaces, and cache/analysis services. |
| OpenUtau.Core/Commands/TrackCommands.cs | Makes renderer changes fail-fast (no silent fallback) when explicitly selecting a renderer. |
| OpenUtau.Core/Classic/ToolsManager.cs | Hooks external renderer discovery into the resampler search path. |
| OpenUtau.Core/Classic/ResamplerManifest.cs | Extends YAML manifest model to include renderer + analysis metadata blocks. |
| OpenUtau.Core/Classic/ResamplerItem.cs | Allows injecting a resampler override for classic rendering paths. |
| OpenUtau.Core/Classic/ExeResampler.cs | Makes ExeResampler public (for broader use/interop). |
| OpenUtau.Core/Classic/ClassicRenderer.cs | Adds resampler override support and renderer name override to keep stable identity. |
Review details
Suppressed comments (1)
OpenUtau.Core/Render/Renderers.cs:68
GetDefaultRenderercurrently only honors the "Classic" preference; aftergetRendererOptions()started listing external renderer IDs, selecting an external default renderer in Preferences will still fall back to the first supported renderer. This makes the new preference option ineffective.
public static string GetDefaultRenderer(USingerType singerType) {
if (Preferences.Default.DefaultRenderer == "Classic" && singerType == USingerType.Classic) {
return CLASSIC;
} else {
return GetSupportedRenderers(singerType)[0];
- Files reviewed: 16/16 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Summary
This introduces API version 1 as a public preview for renderer developers.