Skip to content

Repository files navigation

OpenUtau.AIAutoTunePlugin

OpenUtau.AIAutoTunePlugin is a managed OpenUtau piano-roll plugin that ports the ai-auto-tune branch behavior into the managed batch-edit API. It adds one contextual action under the piano-roll Notes menu:

  • AI Auto Tune

The action generates PITD pitch deviations for the current selection using the pitch.onnx model from the aiautotune release of hilmiyafia/openutau.

What It Does

  • Splits the current note selection into contiguous phrases.
  • Builds the same 6-channel ONNX input tensor used by the ai-auto-tune branch.
  • Filters generated frames through phoneme timing windows so pitch is only written where the phrase is actually sung.
  • Finds the nearest note using the final branch distance rule and converts absolute model output into relative PITD.
  • Replaces only the affected span of the existing PITD curve, preserving unrelated pitch data outside the generated range.

Source Compatibility

This plugin ports the final behavior of the ai-auto-tune branch, starting from commit 1959cd04fe3475b03848494d8b11fde4d120a1a1 and including later fixes from the same branch:

  • singer-local model lookup with fallback,
  • phoneme-window rest filtering,
  • phrase-based processing,
  • MergedSetCurveCommand writeback,
  • part-local PITD coordinates,
  • empty-phrase skip behavior.

Model Packaging

The project expects pitch.onnx to sit next to the plugin assembly at runtime. The repository copy should match the public release asset:

  • Release: https://github.com/hilmiyafia/openutau/releases/tag/aiautotune
  • Asset: https://github.com/hilmiyafia/openutau/releases/download/aiautotune/pitch.onnx
  • Published: December 7, 2025
  • Asset digest: sha256:ce000b0195265f8d221e655271c4fbdcc063c22716298be4a71d005598e6bf3a

Runtime model search order:

  1. <Singer.Location>\pitch.onnx
  2. <Singer.Location>\model.onnx
  3. <PluginDirectory>\pitch.onnx
  4. <PluginDirectory>\model.onnx
  5. <OpenUtau Plugins>\pitch.onnx
  6. <OpenUtau Plugins>\model.onnx

Build

dotnet build OpenUtau.AIAutoTunePlugin\OpenUtau.AIAutoTunePlugin.csproj -m:1

Build output:

  • OpenUtau.AIAutoTunePlugin\bin\Debug\net8.0\OpenUtau.AIAutoTunePlugin.dll
  • OpenUtau.AIAutoTunePlugin\bin\Debug\net8.0\pitch.onnx

Install

Copy the plugin output directory, or the staged demo output, into OpenUtau's data Plugins folder:

Plugins\OpenUtau.AIAutoTunePlugin\
  OpenUtau.AIAutoTunePlugin.dll
  pitch.onnx
  README.md

Restart OpenUtau after copying the files.

Test In OpenUtau

  1. Open a project and enter the piano roll.
  2. Select one note phrase or leave no selection to target the whole part.
  3. Open Notes.
  4. Confirm the submenu OpenUtau AI Auto Tune is present.
  5. Click AI Auto Tune.
  6. Wait for the processing dialog to complete.
  7. Inspect the PITD curve or listen back to confirm pitch data was generated for the selected phrase.

Known Limitations

  • The model file is required. The plugin fails clearly if pitch.onnx or model.onnx cannot be found in any supported location.
  • The action writes PITD; it does not convert the result into note-local pitch points.
  • Output quality depends on the model asset and the validated phoneme timing available in the current part.

Credits

About

OpenUtau.AIAutoTunePlugin Plugin API Example

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages