├── cpp ├── BUILD.bazel ├── .bazelversion ├── third_party │ ├── BUILD.bazel │ ├── miniaudio.BUILD │ ├── spline.BUILD │ ├── libnpy.BUILD │ ├── libpyin.BUILD │ ├── libgvps.BUILD │ ├── world.BUILD │ ├── libpyin.patch │ └── spline.patch ├── .gitignore ├── MODULE.bazel ├── worldline │ ├── platinum │ │ ├── BUILD.bazel │ │ ├── synthesisplatinum.h │ │ └── platinum.h │ ├── f0 │ │ ├── BUILD.bazel │ │ ├── f0_estimator.h │ │ ├── dio_estimator.h │ │ ├── pyin_estimator.h │ │ ├── dio_ss_estimator.h │ │ ├── frq_estimator.h │ │ ├── dio_estimator.cpp │ │ ├── pyin_estimator.cpp │ │ ├── dio_ss_estimator.cpp │ │ └── frq_estimator.cpp │ ├── common │ │ ├── BUILD.bazel │ │ ├── timer.h │ │ ├── vec_utils.h │ │ └── timer.cpp │ ├── classic │ │ ├── classic_args.h │ │ ├── frq.h │ │ ├── timing.h │ │ ├── resampler.h │ │ ├── BUILD.bazel │ │ ├── frq.cpp │ │ └── timing.cpp │ ├── model │ │ ├── BUILD.bazel │ │ └── effects.h │ ├── synth_request.h │ ├── worldline_test.cpp │ └── phrase_synth.h ├── build_win.bat ├── .bazelrc ├── build_linux.sh ├── README.md ├── build_mac.sh ├── .vscode │ └── c_cpp_properties.json └── toolchain │ └── BUILD.bazel ├── OpenUtau.Test ├── Files │ ├── ja_cvvc │ │ ├── oto.ini │ │ ├── 弱 │ │ │ ├── oto.ini │ │ │ ├── 弱_A3 │ │ │ │ └── oto.ini │ │ │ ├── 弱_B4 │ │ │ │ └── oto.ini │ │ │ ├── 弱_C4 │ │ │ │ └── oto.ini │ │ │ └── 弱_E4 │ │ │ │ └── oto.ini │ │ ├── 強 │ │ │ ├── oto.ini │ │ │ ├── 強_B3 │ │ │ │ └── oto.ini │ │ │ ├── 強_B4 │ │ │ │ └── oto.ini │ │ │ └── 強_F4 │ │ │ │ └── oto.ini │ │ ├── character.txt │ │ ├── A3 │ │ │ └── oto.ini │ │ ├── B4 │ │ │ └── oto.ini │ │ ├── C4 │ │ │ └── oto.ini │ │ ├── F4 │ │ │ └── oto.ini │ │ └── character.yaml │ ├── ja_presamp │ │ ├── oto.ini │ │ ├── character.txt │ │ ├── C │ │ │ └── oto.ini │ │ ├── boat D4 │ │ │ └── oto.ini │ │ ├── sand A3 │ │ │ └── oto.ini │ │ ├── sand D4 │ │ │ └── oto.ini │ │ ├── wave A3 │ │ │ └── oto.ini │ │ ├── wave D4 │ │ │ └── oto.ini │ │ ├── wave F4 │ │ │ └── oto.ini │ │ ├── beach A3 │ │ │ └── oto.ini │ │ ├── beach A4 │ │ │ └── oto.ini │ │ ├── beach C5 │ │ │ └── oto.ini │ │ ├── beach D4 │ │ │ └── oto.ini │ │ ├── beach F4 │ │ │ └── oto.ini │ │ ├── nebura B3 │ │ │ └── oto.ini │ │ ├── nebura C5 │ │ │ └── oto.ini │ │ ├── nebura E3 │ │ │ └── oto.ini │ │ ├── nebura E4 │ │ │ └── oto.ini │ │ ├── nebura G#3 │ │ │ └── oto.ini │ │ ├── nebura G#4 │ │ │ └── oto.ini │ │ ├── shell A3 │ │ │ └── oto.ini │ │ ├── shell A4 │ │ │ └── oto.ini │ │ ├── shell D4 │ │ │ └── oto.ini │ │ ├── shell F4 │ │ │ └── oto.ini │ │ ├── beach vv A4 │ │ │ └── oto.ini │ │ ├── beach vv A4C5 │ │ │ └── oto.ini │ │ ├── - a │ │ │ └── oto.ini │ │ ├── a - │ │ │ └── oto.ini │ │ └── character.yaml │ ├── en_vccv │ │ ├── character.txt │ │ └── character.yaml │ ├── zh_cvvc │ │ ├── character.txt │ │ └── character.yaml │ ├── de_vccv │ │ ├── character.txt │ │ ├── character.yaml │ │ └── prefix.map │ ├── en_arpa │ │ ├── character.txt │ │ └── character.yaml │ ├── en_delta0 │ │ ├── character.txt │ │ └── character.yaml │ ├── en_delta7 │ │ └── character.txt │ ├── ja_cv │ │ ├── character.txt │ │ ├── character.yaml │ │ ├── oto.ini │ │ └── readme.txt │ ├── ja_vcv │ │ ├── character.txt │ │ ├── C_A3 │ │ │ └── oto.ini │ │ ├── C_C5 │ │ │ └── oto.ini │ │ ├── C_D4 │ │ │ └── oto.ini │ │ ├── C_G4 │ │ │ └── oto.ini │ │ ├── N_A3 │ │ │ └── oto.ini │ │ ├── N_C5 │ │ │ └── oto.ini │ │ ├── N_D4 │ │ │ └── oto.ini │ │ ├── N_G4 │ │ │ └── oto.ini │ │ ├── W_A3 │ │ │ └── oto.ini │ │ ├── W_D4 │ │ │ └── oto.ini │ │ ├── W_G4 │ │ │ └── oto.ini │ │ └── character.yaml │ ├── de_diphone │ │ ├── character.txt │ │ ├── character.yaml │ │ └── prefix.map │ ├── en_arpa-plus │ │ ├── character.txt │ │ └── character.yaml │ └── sine.wav ├── Usts │ └── _dummy.ust ├── Core │ └── Util │ │ └── MusicMathTest.cs ├── App │ └── AppTest.cs ├── Classic │ ├── VoicebankLoaderTest.cs │ └── Flags │ │ └── UstFlagParserTest.cs ├── Plugins │ └── JaVcvTest.cs └── OpenUtau.Test.csproj ├── py ├── .gitignore ├── g2p │ ├── requirements.txt │ ├── en_us │ │ ├── phones.txt │ │ └── cfg.yaml │ └── train.py └── README.md ├── Misc └── GIFs │ ├── undo.gif │ ├── editor.gif │ ├── editor2.gif │ ├── vibrato.gif │ └── playback.gif ├── OpenUtau ├── Assets │ ├── OpenUtau.icns │ ├── logotype.png │ ├── open-utau.ico │ └── logotype-w.png ├── Resources │ └── Unzipper.exe ├── FodyWeavers.xml ├── ViewModels │ ├── ViewModelBase.cs │ ├── ExeSetupViewModel.cs │ ├── Converters.cs │ ├── TrackColorViewModel.cs │ └── PasteParamViewModel.cs ├── nuget.config ├── Views │ ├── SearchNoteDialog.axaml.cs │ ├── PhoneticAssistant.axaml.cs │ ├── TrackSettingsDialog.axaml.cs │ ├── DebugWindow.axaml.cs │ ├── TypeInDialog.axaml │ ├── PasteParamDialog.axaml.cs │ ├── ExeSetupDialog.axaml.cs │ ├── ExpressionsDialog.axaml.cs │ ├── TrackColorDialog.axaml.cs │ ├── LyricsReplaceDialog.axaml.cs │ ├── SliderDialog.axaml │ ├── SingerSetupDialog.axaml.cs │ ├── VoiceColorMappingDialog.axaml.cs │ ├── TimeSignatureDialog.axaml.cs │ ├── PasteParamDialog.axaml │ ├── TimeSignatureDialog.axaml │ ├── PhoneticAssistant.axaml │ ├── TypeInDialog.axaml.cs │ ├── SearchNoteDialog.axaml │ ├── LyricsDialog.axaml.cs │ ├── ExeSetupDialog.axaml │ ├── SliderDialog.axaml.cs │ ├── NoteDefaultsDialog.axaml.cs │ ├── SingerPublishDialog.axaml │ └── TrackColorDialog.axaml ├── ViewLocator.cs ├── Controls │ ├── TrackAdder.axaml │ ├── TextLayoutCache.cs │ ├── NotePropertyExpression.axaml │ ├── ExpSelector.axaml.cs │ └── ViewScaler.axaml └── FodyWeavers.xsd ├── OpenUtau.Core ├── G2p │ └── Data │ │ ├── g2p-de.zip │ │ ├── g2p-es.zip │ │ ├── g2p-fr.zip │ │ ├── g2p-it.zip │ │ ├── g2p-ko.zip │ │ ├── g2p-pt.zip │ │ ├── g2p-ru.zip │ │ ├── g2p-arpabet.zip │ │ ├── g2p-ja-mono.zip │ │ └── g2p-arpabet-plus.zip ├── Vogen │ ├── Data │ │ ├── f0.man.onnx │ │ ├── f0.yue.onnx │ │ ├── po.man.onnx │ │ ├── po.yue.onnx │ │ ├── g2p.man.onnx │ │ └── g2p.yue.onnx │ ├── VogenMandarinPhonemizer.cs │ ├── VogenSingerInstaller.cs │ ├── VogenYuePhonemizer.cs │ └── TrieNode.cs ├── Analysis │ └── Crepe │ │ ├── tiny.onnx │ │ └── LICENSE.txt ├── Classic │ ├── IPlugin.cs │ ├── Flags │ │ └── UstFlag.cs │ ├── IResampler.cs │ ├── IWavtool.cs │ ├── ResamplerManifest.cs │ ├── Plugin.cs │ ├── ClassicSingerLoader.cs │ ├── OtoWatcher.cs │ └── WorldlineResampler.cs ├── DiffSinger │ └── Phonemizers │ │ ├── DiffSingerPhonemizer.cs │ │ ├── DiffSingerChinesePhonemizer.cs │ │ ├── DiffSingerJyutpingPhonemizer.cs │ │ ├── DiffSingerSpanishPhonemizer.cs │ │ ├── DiffSingerItalianPhonemizer.cs │ │ ├── DiffSingerPortuguesePhonemizer.cs │ │ ├── DiffSingerKoreanG2PPhonemizer.cs │ │ ├── DiffSingerEnglishPhonemizer.cs │ │ ├── DiffSingerGermanPhonemizer.cs │ │ ├── DiffSingerRussianPhonemizer.cs │ │ ├── DiffSingerKoreanPhonemizer.cs │ │ └── DiffSingerJapanesePhonemizer.cs ├── Util │ ├── SingletonBase.cs │ └── LocalizedSort.cs ├── Api │ ├── G2pDictionaryData.cs │ ├── PhonemizerInstaller.cs │ ├── IG2p.cs │ ├── PhonemizerFactory.cs │ ├── G2pFallbacks.cs │ └── README.md ├── Editing │ ├── README.md │ └── BatchEdit.cs ├── SignalChain │ ├── ISignalSource.cs │ ├── WaveMix.cs │ ├── ExportAdapter.cs │ ├── MasterAdapter.cs │ └── Fader.cs ├── Audio │ ├── DummyAudioOutput.cs │ └── IAudioOutput.cs ├── Enunu │ ├── EnunuClient.cs │ └── EnunuUtils.cs ├── Commands │ └── UCommand.cs ├── DefaultPhonemizer.cs └── Render │ └── IRenderer.cs ├── runtimes ├── osx │ └── native │ │ └── libworldline.dylib ├── win-arm64 │ └── native │ │ └── worldline.dll ├── win-x64 │ └── native │ │ └── worldline.dll ├── win-x86 │ └── native │ │ └── worldline.dll ├── linux-x64 │ └── native │ │ └── libworldline.so └── linux-arm64 │ └── native │ └── libworldline.so ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ └── config.yml └── workflows │ ├── test.yml │ ├── pr-test.yml │ └── release-cleanup.yml ├── Logo └── openutau.svg ├── OpenUtau.Plugin.Builtin ├── CantoneseCVVCPhonemizer.cs ├── OpenUtau.Plugin.Builtin.csproj ├── EnunuOnnx │ ├── EnunuOnnxEnglishPhonemizer.cs │ └── Python.cs ├── MonophonePhonemizer.cs ├── LatinDiphonePhonemizer.cs └── Data │ ├── arpasing.template.yaml │ └── german.template.yaml ├── LICENSE.txt ├── README_zh.md └── appcast.py /cpp/BUILD.bazel: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cpp/.bazelversion: -------------------------------------------------------------------------------- 1 | 6.5.0 -------------------------------------------------------------------------------- /cpp/third_party/BUILD.bazel: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cvvc/oto.ini: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cvvc/弱/oto.ini: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cvvc/強/oto.ini: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/oto.ini: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/en_vccv/character.txt: -------------------------------------------------------------------------------- 1 | name=en_vccv -------------------------------------------------------------------------------- /OpenUtau.Test/Files/zh_cvvc/character.txt: -------------------------------------------------------------------------------- 1 | name=zh_cvvc -------------------------------------------------------------------------------- /OpenUtau.Test/Files/de_vccv/character.txt: -------------------------------------------------------------------------------- 1 | name=DE VCCV Test -------------------------------------------------------------------------------- /OpenUtau.Test/Files/en_arpa/character.txt: -------------------------------------------------------------------------------- 1 | name=en_arpa 2 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/en_delta0/character.txt: -------------------------------------------------------------------------------- 1 | name=en_delta0 -------------------------------------------------------------------------------- /OpenUtau.Test/Files/en_delta7/character.txt: -------------------------------------------------------------------------------- 1 | name=en_delta7 -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cv/character.txt: -------------------------------------------------------------------------------- 1 | name=ja_cv 2 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cvvc/character.txt: -------------------------------------------------------------------------------- 1 | name=ja_cvvc 2 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_vcv/character.txt: -------------------------------------------------------------------------------- 1 | name=ja_vcv 2 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/character.txt: -------------------------------------------------------------------------------- 1 | name=ja_presamp -------------------------------------------------------------------------------- /py/.gitignore: -------------------------------------------------------------------------------- 1 | */*/* 2 | *.ptsd 3 | *.onnx 4 | test_log.txt 5 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/de_diphone/character.txt: -------------------------------------------------------------------------------- 1 | name=DE Diphone Test -------------------------------------------------------------------------------- /OpenUtau.Test/Files/en_arpa-plus/character.txt: -------------------------------------------------------------------------------- 1 | name=en_arpa_plus 2 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cv/character.yaml: -------------------------------------------------------------------------------- 1 | text_file_encoding: shift_jis -------------------------------------------------------------------------------- /cpp/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | build/ 3 | runtimes/ 4 | bazel-* 5 | 6 | .vscode/settings.json 7 | -------------------------------------------------------------------------------- /Misc/GIFs/undo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/Misc/GIFs/undo.gif -------------------------------------------------------------------------------- /Misc/GIFs/editor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/Misc/GIFs/editor.gif -------------------------------------------------------------------------------- /Misc/GIFs/editor2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/Misc/GIFs/editor2.gif -------------------------------------------------------------------------------- /Misc/GIFs/vibrato.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/Misc/GIFs/vibrato.gif -------------------------------------------------------------------------------- /Misc/GIFs/playback.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/Misc/GIFs/playback.gif -------------------------------------------------------------------------------- /OpenUtau.Test/Files/sine.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/sine.wav -------------------------------------------------------------------------------- /OpenUtau/Assets/OpenUtau.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau/Assets/OpenUtau.icns -------------------------------------------------------------------------------- /OpenUtau/Assets/logotype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau/Assets/logotype.png -------------------------------------------------------------------------------- /OpenUtau/Assets/open-utau.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau/Assets/open-utau.ico -------------------------------------------------------------------------------- /OpenUtau/Assets/logotype-w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau/Assets/logotype-w.png -------------------------------------------------------------------------------- /OpenUtau/Resources/Unzipper.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau/Resources/Unzipper.exe -------------------------------------------------------------------------------- /OpenUtau.Core/G2p/Data/g2p-de.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Core/G2p/Data/g2p-de.zip -------------------------------------------------------------------------------- /OpenUtau.Core/G2p/Data/g2p-es.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Core/G2p/Data/g2p-es.zip -------------------------------------------------------------------------------- /OpenUtau.Core/G2p/Data/g2p-fr.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Core/G2p/Data/g2p-fr.zip -------------------------------------------------------------------------------- /OpenUtau.Core/G2p/Data/g2p-it.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Core/G2p/Data/g2p-it.zip -------------------------------------------------------------------------------- /OpenUtau.Core/G2p/Data/g2p-ko.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Core/G2p/Data/g2p-ko.zip -------------------------------------------------------------------------------- /OpenUtau.Core/G2p/Data/g2p-pt.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Core/G2p/Data/g2p-pt.zip -------------------------------------------------------------------------------- /OpenUtau.Core/G2p/Data/g2p-ru.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Core/G2p/Data/g2p-ru.zip -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cv/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_cv/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Core/Vogen/Data/f0.man.onnx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Core/Vogen/Data/f0.man.onnx -------------------------------------------------------------------------------- /OpenUtau.Core/Vogen/Data/f0.yue.onnx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Core/Vogen/Data/f0.yue.onnx -------------------------------------------------------------------------------- /OpenUtau.Core/Vogen/Data/po.man.onnx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Core/Vogen/Data/po.man.onnx -------------------------------------------------------------------------------- /OpenUtau.Core/Vogen/Data/po.yue.onnx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Core/Vogen/Data/po.yue.onnx -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cv/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_cv/readme.txt -------------------------------------------------------------------------------- /OpenUtau.Core/Analysis/Crepe/tiny.onnx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Core/Analysis/Crepe/tiny.onnx -------------------------------------------------------------------------------- /OpenUtau.Core/G2p/Data/g2p-arpabet.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Core/G2p/Data/g2p-arpabet.zip -------------------------------------------------------------------------------- /OpenUtau.Core/G2p/Data/g2p-ja-mono.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Core/G2p/Data/g2p-ja-mono.zip -------------------------------------------------------------------------------- /OpenUtau.Core/Vogen/Data/g2p.man.onnx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Core/Vogen/Data/g2p.man.onnx -------------------------------------------------------------------------------- /OpenUtau.Core/Vogen/Data/g2p.yue.onnx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Core/Vogen/Data/g2p.yue.onnx -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cvvc/A3/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_cvvc/A3/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cvvc/B4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_cvvc/B4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cvvc/C4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_cvvc/C4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cvvc/F4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_cvvc/F4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_vcv/C_A3/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_vcv/C_A3/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_vcv/C_C5/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_vcv/C_C5/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_vcv/C_D4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_vcv/C_D4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_vcv/C_G4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_vcv/C_G4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_vcv/N_A3/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_vcv/N_A3/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_vcv/N_C5/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_vcv/N_C5/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_vcv/N_D4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_vcv/N_D4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_vcv/N_G4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_vcv/N_G4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_vcv/W_A3/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_vcv/W_A3/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_vcv/W_D4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_vcv/W_D4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_vcv/W_G4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_vcv/W_G4/oto.ini -------------------------------------------------------------------------------- /runtimes/osx/native/libworldline.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/runtimes/osx/native/libworldline.dylib -------------------------------------------------------------------------------- /runtimes/win-arm64/native/worldline.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/runtimes/win-arm64/native/worldline.dll -------------------------------------------------------------------------------- /runtimes/win-x64/native/worldline.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/runtimes/win-x64/native/worldline.dll -------------------------------------------------------------------------------- /runtimes/win-x86/native/worldline.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/runtimes/win-x86/native/worldline.dll -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/C/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/C/oto.ini -------------------------------------------------------------------------------- /runtimes/linux-x64/native/libworldline.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/runtimes/linux-x64/native/libworldline.so -------------------------------------------------------------------------------- /OpenUtau.Core/G2p/Data/g2p-arpabet-plus.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Core/G2p/Data/g2p-arpabet-plus.zip -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cvvc/弱/弱_A3/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_cvvc/弱/弱_A3/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cvvc/弱/弱_B4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_cvvc/弱/弱_B4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cvvc/弱/弱_C4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_cvvc/弱/弱_C4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cvvc/弱/弱_E4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_cvvc/弱/弱_E4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cvvc/強/強_B3/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_cvvc/強/強_B3/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cvvc/強/強_B4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_cvvc/強/強_B4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_cvvc/強/強_F4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_cvvc/強/強_F4/oto.ini -------------------------------------------------------------------------------- /runtimes/linux-arm64/native/libworldline.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/runtimes/linux-arm64/native/libworldline.so -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/boat D4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/boat D4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/sand A3/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/sand A3/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/sand D4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/sand D4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/wave A3/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/wave A3/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/wave D4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/wave D4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/wave F4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/wave F4/oto.ini -------------------------------------------------------------------------------- /py/g2p/requirements.txt: -------------------------------------------------------------------------------- 1 | editdistance==0.6.2 2 | hydra-core==1.3.2 3 | omegaconf==2.1.2 4 | torch==2.0.0 5 | torchaudio==2.0.1 6 | tqdm==4.65.0 7 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/beach A3/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/beach A3/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/beach A4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/beach A4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/beach C5/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/beach C5/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/beach D4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/beach D4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/beach F4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/beach F4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/nebura B3/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/nebura B3/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/nebura C5/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/nebura C5/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/nebura E3/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/nebura E3/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/nebura E4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/nebura E4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/nebura G#3/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/nebura G#3/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/nebura G#4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/nebura G#4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/shell A3/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/shell A3/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/shell A4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/shell A4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/shell D4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/shell D4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/shell F4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/shell F4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/beach vv A4/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/beach vv A4/oto.ini -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/beach vv A4C5/oto.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xunmengshe/OpenUtau/HEAD/OpenUtau.Test/Files/ja_presamp/beach vv A4C5/oto.ini -------------------------------------------------------------------------------- /OpenUtau/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /OpenUtau.Core/Classic/IPlugin.cs: -------------------------------------------------------------------------------- 1 | namespace OpenUtau.Classic { 2 | public interface IPlugin { 3 | string Encoding { get; } 4 | void Run(string tempFile); 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /cpp/third_party/miniaudio.BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | cc_library( 4 | name = "miniaudio", 5 | hdrs = ["miniaudio.h"], 6 | includes = ["."], 7 | ) 8 | -------------------------------------------------------------------------------- /cpp/third_party/spline.BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | cc_library( 4 | name = "spline", 5 | hdrs = ["src/spline.h"], 6 | includes = ["src"], 7 | ) 8 | -------------------------------------------------------------------------------- /cpp/third_party/libnpy.BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | cc_library( 4 | name = "libnpy", 5 | hdrs = ["include/npy.hpp"], 6 | includes = ["include"], 7 | ) 8 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/en_delta0/character.yaml: -------------------------------------------------------------------------------- 1 | subbanks: 2 | - color: "" 3 | prefix: "" 4 | suffix: _H 5 | tone_ranges: 6 | - G4-B7 7 | - color: "" 8 | prefix: "" 9 | suffix: _F3 10 | tone_ranges: 11 | - C1-F#4 12 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/en_vccv/character.yaml: -------------------------------------------------------------------------------- 1 | subbanks: 2 | - color: "" 3 | prefix: "" 4 | suffix: _H 5 | tone_ranges: 6 | - G4-B7 7 | - color: "" 8 | prefix: "" 9 | suffix: _F3 10 | tone_ranges: 11 | - C1-F#4 12 | -------------------------------------------------------------------------------- /OpenUtau/ViewModels/ViewModelBase.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace OpenUtau.App.ViewModels 7 | { 8 | public class ViewModelBase : ReactiveObject 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /cpp/MODULE.bazel: -------------------------------------------------------------------------------- 1 | """OpenUtau C++ module.""" 2 | module(name = "openutau-cpp") 3 | 4 | bazel_dep(name = "abseil-cpp", version = "20240116.1", repo_name = "absl") 5 | bazel_dep(name = "googletest", version = "1.14.0", repo_name = "gtest") 6 | 7 | bazel_dep(name = "xxhash", version = "0.8.2") -------------------------------------------------------------------------------- /OpenUtau.Core/DiffSinger/Phonemizers/DiffSingerPhonemizer.cs: -------------------------------------------------------------------------------- 1 | using OpenUtau.Api; 2 | 3 | namespace OpenUtau.Core.DiffSinger 4 | { 5 | [Phonemizer("DiffSinger Phonemizer", "DIFFS")] 6 | public class DiffSingerPhonemizer : DiffSingerBasePhonemizer 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /cpp/worldline/platinum/BUILD.bazel: -------------------------------------------------------------------------------- 1 | # platinum extracted from world 0.1.4_3. 2 | 3 | cc_library( 4 | name = "platinum", 5 | srcs = glob(["*.cpp"]), 6 | hdrs = glob(["*.h"]), 7 | visibility = ["//visibility:public"], 8 | deps = [ 9 | "@world", 10 | ], 11 | ) 12 | -------------------------------------------------------------------------------- /OpenUtau.Test/Usts/_dummy.ust: -------------------------------------------------------------------------------- 1 | [#SETTING] 2 | Tempo=84.00 3 | Tracks=1 4 | ProjectName=Main 5 | VoiceDir=%VOICE%�g�����c�E�L������Ver1.0 6 | OutFile= 7 | CacheDir= 8 | Tool1= 9 | Tool2= 10 | Mode2=True 11 | Flags=Y0H0F-10 12 | [#0000] 13 | Length=15 14 | Lyric=R 15 | NoteNum=60 16 | PreUtterance= -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | *.cs text diff=csharp eol=crlf 5 | *.cshtml text diff=html 6 | *.csx text diff=csharp 7 | *.sln text eol=crlf 8 | *.csproj text eol=crlf 9 | *.xaml text eol=crlf 10 | *.axaml text eol=crlf 11 | -------------------------------------------------------------------------------- /cpp/third_party/libpyin.BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | cc_library( 4 | name = "libpyin", 5 | srcs = glob(["*.c"]), 6 | hdrs = glob(["*.h"]), 7 | defines = ["FP_TYPE=double"], 8 | includes = ["."], 9 | deps = [ 10 | "@libgvps", 11 | ], 12 | ) 13 | -------------------------------------------------------------------------------- /cpp/worldline/f0/BUILD.bazel: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "f0", 7 | srcs = glob(["*.cpp"]), 8 | hdrs = glob(["*.h"]), 9 | deps = [ 10 | "//worldline/classic:frq", 11 | "@libpyin", 12 | "@world", 13 | ], 14 | ) 15 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/- a/oto.ini: -------------------------------------------------------------------------------- 1 | 01 -a.wav=bre,122,602,-780,70,160 2 | 02 -a.wav=bre2,157,565,-705,60,140 3 | 03 -a.wav=bre3,250,620,-662,60,140 4 | 04 -a.wav=bre4,195,440,-580,55,132 5 | 05 -a.wav=bre5,152,420,-445,45,115 6 | 06 -a.wav=bre6,77,207,-305,35,85 7 | 07 -a.wav=bre7,152,200,-272,37,82 8 | 08 -a.wav=bre8,322,687,-742,47,97 9 | -------------------------------------------------------------------------------- /OpenUtau/nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /cpp/third_party/libgvps.BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | cc_library( 4 | name = "libgvps", 5 | srcs = glob([ 6 | "*.c", 7 | ]), 8 | hdrs = glob([ 9 | "*.h", 10 | "*.hc", 11 | ]), 12 | defines = ["FP_TYPE=double"], 13 | include_prefix = "libgvps", 14 | includes = ["."], 15 | ) 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Discord Server 4 | url: https://discord.gg/UfpMnqMmEM 5 | about: Ask and answer questions here. 6 | - name: Chinese QQ Group 7 | url: https://qm.qq.com/cgi-bin/qm/qr?k=8EtEpehB1a-nfTNAnngTVqX3o9xoIxmT&jump_from=webapi 8 | about: Ask and answer questions in Chinese here. 9 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/zh_cvvc/character.yaml: -------------------------------------------------------------------------------- 1 | text_file_encoding: shift_jis 2 | portrait_opacity: 0.67000001668930054 3 | subbanks: 4 | - color: '' 5 | prefix: '' 6 | suffix: C#4 7 | tone_ranges: 8 | - C1-E4 9 | - color: '' 10 | prefix: '' 11 | suffix: F4 12 | tone_ranges: 13 | - F4-A4 14 | - color: '' 15 | prefix: '' 16 | suffix: A#4 17 | tone_ranges: 18 | - A#4-B7 -------------------------------------------------------------------------------- /cpp/worldline/common/BUILD.bazel: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "timer", 7 | srcs = ["timer.cpp"], 8 | hdrs = ["timer.h"], 9 | ) 10 | 11 | cc_library( 12 | name = "vec_utils", 13 | srcs = ["vec_utils.cpp"], 14 | hdrs = ["vec_utils.h"], 15 | deps = [ 16 | "@libnpy", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /OpenUtau.Core/Util/SingletonBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenUtau.Core.Util { 4 | public abstract class SingletonBase where T : class { 5 | private static readonly Lazy inst = new Lazy( 6 | () => (T)Activator.CreateInstance(typeof(T), true), 7 | isThreadSafe: true); 8 | public static T Inst => inst.Value; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /OpenUtau.Core/Classic/Flags/UstFlag.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | 4 | namespace OpenUtau.Classic.Flags { 5 | public class UstFlag { 6 | public readonly string Key; 7 | public readonly int Value; 8 | 9 | public UstFlag(string key, int value) { 10 | Key = key ?? throw new ArgumentNullException(nameof(key)); 11 | Value = value; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/de_vccv/character.yaml: -------------------------------------------------------------------------------- 1 | name: DE VCCV Test 2 | portrait_opacity: 0.67 3 | default_phonemizer: OpenUtau.Plugin.Builtin.GermanVCCVPhonemizer 4 | subbanks: 5 | - color: "" 6 | prefix: "" 7 | suffix: G3 8 | tone_ranges: 9 | - F3-B7 10 | - color: "" 11 | prefix: "" 12 | suffix: D3 13 | tone_ranges: 14 | - C3-E3 15 | - color: "" 16 | prefix: "" 17 | suffix: A2 18 | tone_ranges: 19 | - C1-B2 20 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/de_diphone/character.yaml: -------------------------------------------------------------------------------- 1 | name: DE Diphone Test 2 | portrait_opacity: 0.67 3 | default_phonemizer: OpenUtau.Plugin.Builtin.GermanDiphonePhonemizer 4 | subbanks: 5 | - color: "" 6 | prefix: "" 7 | suffix: _F4 8 | tone_ranges: 9 | - E4-B7 10 | - color: "" 11 | prefix: "" 12 | suffix: _C4 13 | tone_ranges: 14 | - B3-D#4 15 | - color: "" 16 | prefix: "" 17 | suffix: _F3 18 | tone_ranges: 19 | - C1-A#3 20 | -------------------------------------------------------------------------------- /py/g2p/en_us/phones.txt: -------------------------------------------------------------------------------- 1 | AA vowel 2 | AE vowel 3 | AH vowel 4 | AO vowel 5 | AW vowel 6 | AY vowel 7 | B - 8 | CH - 9 | D - 10 | DH - 11 | EH vowel 12 | ER vowel 13 | EY vowel 14 | F - 15 | G - 16 | HH - 17 | IH vowel 18 | IY vowel 19 | JH - 20 | K - 21 | L - 22 | M - 23 | N - 24 | NG - 25 | OW vowel 26 | OY vowel 27 | P - 28 | R - 29 | S - 30 | SH - 31 | T - 32 | TH - 33 | UH vowel 34 | UW vowel 35 | V - 36 | W - 37 | Y - 38 | Z - 39 | ZH - 40 | -------------------------------------------------------------------------------- /OpenUtau/Views/SearchNoteDialog.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using OpenUtau.App.ViewModels; 3 | 4 | namespace OpenUtau.App.Views { 5 | public partial class SearchNoteDialog : Window { 6 | public SearchNoteDialog() { 7 | InitializeComponent(); 8 | Closing += (s, e) => 9 | { 10 | (DataContext as SearchNoteViewModel)?.OnClose(); 11 | }; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /cpp/build_win.bat: -------------------------------------------------------------------------------- 1 | @goto :MAIN 2 | 3 | :BUILD 4 | @echo Building %~1 5 | 6 | if not exist ..\runtimes\%~1\native mkdir ..\runtimes\%~1\native 7 | bazel build //worldline:worldline -c opt --cpu=%~2 8 | attrib -r bazel-bin\worldline\worldline.dll 9 | copy bazel-bin\worldline\worldline.dll ..\runtimes\%~1\native 10 | 11 | @EXIT /B 12 | 13 | :MAIN 14 | @call :BUILD win-x64 x64_windows 15 | @call :BUILD win-x86 x64_x86_windows 16 | @call :BUILD win-arm64 arm64_windows 17 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/en_arpa/character.yaml: -------------------------------------------------------------------------------- 1 | portrait_opacity: 0.67000001668930054 2 | subbanks: 3 | - color: '' 4 | prefix: '' 5 | suffix: '' 6 | tone_ranges: 7 | - C1-A#2 8 | - D4-D5 9 | - F6-B7 10 | - color: '' 11 | prefix: '' 12 | suffix: _1 13 | tone_ranges: 14 | - D#5-E6 15 | - color: '' 16 | prefix: '' 17 | suffix: _3 18 | tone_ranges: 19 | - B2-C#4 20 | - color: Whisper 21 | prefix: '' 22 | suffix: _W 23 | tone_ranges: 24 | - C1-B7 25 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/en_arpa-plus/character.yaml: -------------------------------------------------------------------------------- 1 | portrait_opacity: 0.67000001668930054 2 | subbanks: 3 | - color: '' 4 | prefix: '' 5 | suffix: '' 6 | tone_ranges: 7 | - C1-A#2 8 | - D4-D5 9 | - F6-B7 10 | - color: '' 11 | prefix: '' 12 | suffix: _A#3 13 | tone_ranges: 14 | - D#5-E6 15 | - color: '' 16 | prefix: '' 17 | suffix: _C3 18 | tone_ranges: 19 | - B2-C#4 20 | - color: Whisper 21 | prefix: '' 22 | suffix: _W 23 | tone_ranges: 24 | - C1-B7 25 | -------------------------------------------------------------------------------- /OpenUtau.Core/Classic/IResampler.cs: -------------------------------------------------------------------------------- 1 | using OpenUtau.Core.Ustx; 2 | using Serilog; 3 | 4 | namespace OpenUtau.Classic { 5 | public interface IResampler { 6 | string FilePath { get; } 7 | float[] DoResampler(ResamplerItem args, ILogger logger); 8 | string DoResamplerReturnsFile(ResamplerItem args, ILogger logger); 9 | void CheckPermissions(); 10 | ResamplerManifest Manifest { get; } 11 | bool SupportsFlag(string abbr); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /OpenUtau.Core/Classic/IWavtool.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading; 3 | 4 | namespace OpenUtau.Classic { 5 | public interface IWavtool { 6 | // 7 | // [ [ [ ]]] 8 | float[] Concatenate(List resamplerItems, string tempPath, CancellationTokenSource cancellation); 9 | void CheckPermissions(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /cpp/worldline/classic/classic_args.h: -------------------------------------------------------------------------------- 1 | #ifndef WORLDLINE_CLASSIC_CLASSIC_ARGS_H_ 2 | #define WORLDLINE_CLASSIC_CLASSIC_ARGS_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include "worldline/synth_request.h" 8 | 9 | namespace worldline { 10 | 11 | SynthRequest ParseClassicArgs(const std::vector& args); 12 | 13 | void LogClassicArgs(const SynthRequest& request, const std::string& logfile); 14 | 15 | } // namespace worldline 16 | 17 | #endif // WORLDLINE_CLASSIC_CLASSIC_ARGS_H_ 18 | -------------------------------------------------------------------------------- /cpp/worldline/f0/f0_estimator.h: -------------------------------------------------------------------------------- 1 | #ifndef WORLDLINE_F0_F0_ESTIMATOR_H_ 2 | #define WORLDLINE_F0_F0_ESTIMATOR_H_ 3 | 4 | #include 5 | 6 | namespace worldline { 7 | 8 | class F0Estimator { 9 | public: 10 | virtual void Estimate(const std::vector& samples, int fs, 11 | double frame_ms, std::vector* f0, 12 | std::vector* time_axis) = 0; 13 | }; 14 | 15 | } // namespace worldline 16 | 17 | #endif // WORLDLINE_F0_F0_ESTIMATOR_H_ 18 | -------------------------------------------------------------------------------- /cpp/worldline/classic/frq.h: -------------------------------------------------------------------------------- 1 | #ifndef WORLDLINE_CLASSIC_FRQ_H_ 2 | #define WORLDLINE_CLASSIC_FRQ_H_ 3 | 4 | #include 5 | #include 6 | 7 | namespace worldline { 8 | 9 | typedef struct { 10 | int hop_size; 11 | double avg_frq; 12 | std::vector f0; 13 | std::vector amp; 14 | } FrqData; 15 | 16 | FrqData LoadFrq(const std::string_view data); 17 | 18 | std::string DumpFrq(const FrqData& frq_data); 19 | 20 | } // namespace worldline 21 | 22 | #endif // WORLDLINE_CLASSIC_FRQ_H_ 23 | -------------------------------------------------------------------------------- /OpenUtau.Test/Files/ja_presamp/a -/oto.ini: -------------------------------------------------------------------------------- 1 | 01 a-.wav=bre-,180,242,-312,10,60 2 | 02 a-.wav=bre-2,285,287,-352,20,90 3 | 03 a-.wav=bre-3,232,352,-387,15,80 4 | 04 a-.wav=bre-4,382,265,-310,20,85 5 | 05 a-.wav=bre-5,375,230,-262,25,95 6 | 06 a-.wav=bre-6,265,190,-237,17,67 7 | 07 a-.wav=bre-7,335,205,-250,10,70 8 | 08 a-.wav=bre-8,342,282,-322,12,77 9 | 09 a-.wav=bre-9,322,97,-200,17,60 10 | 10 a-.wav=bre-10,272,342,-357,20,85 11 | 11 a-.wav=bre-11,305,240,-297,22,87 12 | 12 a-.wav=bre-12,247,267,-315,15,85 13 | 13 a-.wav=bre-13,232,182,-252,20,77 14 | -------------------------------------------------------------------------------- /cpp/worldline/model/BUILD.bazel: -------------------------------------------------------------------------------- 1 | package( 2 | default_visibility = ["//visibility:public"], 3 | ) 4 | 5 | cc_library( 6 | name = "effects", 7 | srcs = ["effects.cpp"], 8 | hdrs = ["effects.h"], 9 | deps = [ 10 | "@spline", 11 | ], 12 | ) 13 | 14 | cc_library( 15 | name = "model", 16 | srcs = ["model.cpp"], 17 | hdrs = ["model.h"], 18 | deps = [ 19 | "//worldline/common:vec_utils", 20 | "//worldline/f0", 21 | "//worldline/platinum", 22 | "@world", 23 | ], 24 | ) 25 | -------------------------------------------------------------------------------- /cpp/worldline/f0/dio_estimator.h: -------------------------------------------------------------------------------- 1 | #ifndef WORLDLINE_F0_DIO_ESTIMATOR_H_ 2 | #define WORLDLINE_F0_DIO_ESTIMATOR_H_ 3 | 4 | #include 5 | 6 | #include "worldline/f0/f0_estimator.h" 7 | 8 | namespace worldline { 9 | 10 | class DioEstimator : public F0Estimator { 11 | public: 12 | void Estimate(const std::vector& samples, int fs, double frame_ms, 13 | std::vector* f0, 14 | std::vector* time_axis) override; 15 | }; 16 | 17 | } // namespace worldline 18 | 19 | #endif // WORLDLINE_F0_DIO_ESTIMATOR_H_ 20 | -------------------------------------------------------------------------------- /cpp/worldline/f0/pyin_estimator.h: -------------------------------------------------------------------------------- 1 | #ifndef WORLDLINE_F0_PYIN_ESTIMATOR_H_ 2 | #define WORLDLINE_F0_PYIN_ESTIMATOR_H_ 3 | 4 | #include 5 | 6 | #include "worldline/f0/f0_estimator.h" 7 | 8 | namespace worldline { 9 | 10 | class PyinEstimator : public F0Estimator { 11 | public: 12 | void Estimate(const std::vector& samples, int fs, double frame_ms, 13 | std::vector* f0, 14 | std::vector* time_axis) override; 15 | }; 16 | 17 | } // namespace worldline 18 | 19 | #endif // WORLDLINE_F0_PYIN_ESTIMATOR_H_ 20 | -------------------------------------------------------------------------------- /cpp/.bazelrc: -------------------------------------------------------------------------------- 1 | common --enable_platform_specific_config 2 | common --experimental_cc_shared_library 3 | common --enable_bzlmod 4 | 5 | run --define absl=1 6 | test --define absl=1 7 | 8 | build:linux --cxxopt='-std=c++17' 9 | build:macos --cxxopt='-std=c++17' 10 | build:macos --macos_minimum_os=10.12 11 | build:windows --cxxopt='/std:c++17' 12 | 13 | build:ubuntu-aarch64 --cxxopt='-std=c++17' 14 | build:ubuntu-aarch64 --linkopt='-lm' 15 | build:ubuntu-aarch64 --crosstool_top=//toolchain:arm_suite 16 | build:ubuntu-aarch64 --cpu=aarch64 17 | build:ubuntu-aarch64 --compiler=gcc 18 | -------------------------------------------------------------------------------- /cpp/worldline/f0/dio_ss_estimator.h: -------------------------------------------------------------------------------- 1 | #ifndef WORLDLINE_F0_DIO_SS_ESTIMATOR_H_ 2 | #define WORLDLINE_F0_DIO_SS_ESTIMATOR_H_ 3 | 4 | #include 5 | 6 | #include "worldline/f0/dio_estimator.h" 7 | 8 | namespace worldline { 9 | 10 | class DioSsEstimator : public DioEstimator { 11 | public: 12 | void Estimate(const std::vector& samples, int fs, double frame_ms, 13 | std::vector* f0, 14 | std::vector* time_axis) override; 15 | }; 16 | 17 | } // namespace worldline 18 | 19 | #endif // WORLDLINE_F0_DIO_SS_ESTIMATOR_H_ 20 | -------------------------------------------------------------------------------- /cpp/build_linux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | setup() 4 | { 5 | sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi binutils-arm-linux-gnueabi 6 | sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu 7 | } 8 | 9 | build() 10 | { 11 | mkdir -p ../runtimes/linux-$1/native 12 | bazel build //worldline:worldline -c opt $2 13 | chmod +w bazel-bin/worldline/libworldline.so 14 | cp bazel-bin/worldline/libworldline.so ../runtimes/linux-$1/native 15 | } 16 | 17 | build x64 "--cpu=k8" 18 | build arm64 "--config=ubuntu-aarch64" 19 | -------------------------------------------------------------------------------- /OpenUtau.Core/Api/G2pDictionaryData.cs: -------------------------------------------------------------------------------- 1 | namespace OpenUtau.Api { 2 | /// 3 | /// Data class used to deserialize yaml dictionary. 4 | /// 5 | public class G2pDictionaryData { 6 | public struct SymbolData { 7 | public string symbol; 8 | public string type; 9 | } 10 | 11 | public struct Entry { 12 | public string grapheme; 13 | public string[] phonemes; 14 | } 15 | 16 | public SymbolData[] symbols; 17 | public Entry[] entries; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /cpp/worldline/common/timer.h: -------------------------------------------------------------------------------- 1 | #ifndef WORLDLINE_COMMON_TIMER_H_ 2 | #define WORLDLINE_COMMON_TIMER_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace worldline { 10 | 11 | class Timer { 12 | public: 13 | Timer(std::string name); 14 | void AddPoint(std::string name); 15 | void Print(); 16 | 17 | private: 18 | std::string name_; 19 | std::vector> 20 | time_points_; 21 | }; 22 | 23 | } // namespace worldline 24 | 25 | #endif // WORLDLINE_COMMON_TIMER_H_ 26 | -------------------------------------------------------------------------------- /OpenUtau.Core/Editing/README.md: -------------------------------------------------------------------------------- 1 | # Batch Edit Macros 2 | 3 | Contributions to editing macros are welcomed. 4 | 5 | An batch edit should: 6 | - Starts with `docManager.StartUndoGroup();` 7 | - Performs modifications by calling `docManager.ExecuteCmd();` with commands. 8 | - Some commands come with a single note variation and a multiple notes variation, e.g., `AddNoteCommand(UVoicePart part, UNote note)` and `AddNoteCommand(UVoicePart part, List notes)`. Use the multiple notes varitaion for batch edits. 9 | - Ends with `docManager.EndUndoGroup();` 10 | - Has a localized name. 11 | -------------------------------------------------------------------------------- /OpenUtau.Core/SignalChain/ISignalSource.cs: -------------------------------------------------------------------------------- 1 | namespace OpenUtau.Core.SignalChain { 2 | public interface ISignalSource { 3 | bool IsReady(int position, int count); 4 | /// 5 | /// Add float audio samples to existing buffer values. 6 | /// 7 | /// 8 | /// 9 | /// 10 | /// 11 | /// End position after read. 12 | int Mix(int position, float[] buffer, int index, int count); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /OpenUtau/Views/PhoneticAssistant.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Interactivity; 3 | using OpenUtau.App.ViewModels; 4 | 5 | namespace OpenUtau.App.Views { 6 | public partial class PhoneticAssistant : Window { 7 | PhoneticAssistantViewModel viewModel; 8 | public PhoneticAssistant() { 9 | InitializeComponent(); 10 | DataContext = viewModel = new PhoneticAssistantViewModel(); 11 | } 12 | 13 | public void OnCopy(object sender, RoutedEventArgs e) { 14 | Clipboard?.SetTextAsync(viewModel.Phonemes); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /cpp/README.md: -------------------------------------------------------------------------------- 1 | # Building 2 | 3 | 1. Install Bazelisk 4 | 2. `cd` to `cpp` folder 5 | 3. Run `bazelisk build //worldline` to build `dll` on Windows, `dylib` on macOS or `so` on Linux. 6 | 4. You can also run `bazelisk build //worldline:main` to build a executable version, though curve expressions won't be available. 7 | 8 | Notes: 9 | - On Windows omits `//` in commands. 10 | - Recommends Visual Studio Code to leverage IntelliSense. 11 | - If Bazel ever freezes on Windows, open up Task Manager and kill the Java process. 12 | - `bazelisk clean` cleans up build cache. 13 | - `bazelisk clean --expunge` cleans up build cache and dependencies. 14 | -------------------------------------------------------------------------------- /cpp/build_mac.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | build() 4 | { 5 | bazel build //worldline:worldline -c opt $2 6 | chmod +w bazel-bin/worldline/libworldline.dylib 7 | cp bazel-bin/worldline/libworldline.dylib ../runtimes/osx/native/libworldline-$1.dylib 8 | } 9 | 10 | mkdir -p ../runtimes/osx/native 11 | 12 | build x64 "--cpu=darwin_x86_64" 13 | build arm64 "--cpu=darwin_arm64" 14 | 15 | lipo -create ../runtimes/osx/native/libworldline-x64.dylib ../runtimes/osx/native/libworldline-arm64.dylib -output ../runtimes/osx/native/libworldline.dylib 16 | rm ../runtimes/osx/native/libworldline-x64.dylib ../runtimes/osx/native/libworldline-arm64.dylib 17 | -------------------------------------------------------------------------------- /cpp/worldline/classic/timing.h: -------------------------------------------------------------------------------- 1 | #ifndef WORLDLINE_CLASSIC_TIMING_H_ 2 | #define WORLDLINE_CLASSIC_TIMING_H_ 3 | 4 | #include 5 | 6 | #include "worldline/model/model.h" 7 | #include "worldline/synth_request.h" 8 | 9 | namespace worldline { 10 | 11 | double GetInTotalMs(Model& model, const SynthRequest& request); 12 | 13 | std::vector GetTimeMapping(Model& model, const SynthRequest& request); 14 | 15 | void ShiftTimeMapping(std::vector& mapping, double shift); 16 | 17 | void PadTimeMapping(std::vector& mapping, int frames); 18 | 19 | } // namespace worldline 20 | 21 | #endif // WORLDLINE_CLASSIC_TIMING_H_ 22 | -------------------------------------------------------------------------------- /OpenUtau.Core/DiffSinger/Phonemizers/DiffSingerChinesePhonemizer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | using OpenUtau.Api; 4 | 5 | namespace OpenUtau.Core.DiffSinger { 6 | [Phonemizer("DiffSinger Chinese Phonemizer", "DIFFS ZH", language: "ZH")] 7 | public class DiffSingerChinesePhonemizer : DiffSingerBasePhonemizer { 8 | protected override string GetDictionaryName()=>"dsdict-zh.yaml"; 9 | protected override string GetLangCode()=>"zh"; 10 | protected override string[] Romanize(IEnumerable lyrics) { 11 | return BaseChinesePhonemizer.Romanize(lyrics); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | on: 2 | workflow_dispatch: 3 | inputs: {} 4 | 5 | jobs: 6 | release: 7 | runs-on: ${{ matrix.os.runs-on }} 8 | 9 | strategy: 10 | fail-fast: false 11 | matrix: 12 | os: 13 | - runs-on: windows-latest 14 | arch: win-x64 15 | - runs-on: macos-latest 16 | arch: osx-x64 17 | - runs-on: ubuntu-latest 18 | arch: linux-x64 19 | 20 | steps: 21 | - uses: actions/checkout@v1 22 | 23 | - name: restore 24 | run: dotnet restore OpenUtau -r ${{ matrix.os.arch }} 25 | 26 | - name: test 27 | run: dotnet test OpenUtau.Test 28 | -------------------------------------------------------------------------------- /cpp/third_party/world.BUILD: -------------------------------------------------------------------------------- 1 | package(default_visibility = ["//visibility:public"]) 2 | 3 | cc_library( 4 | name = "world", 5 | srcs = glob(["src/*.cpp"]), 6 | hdrs = glob(["src/world/*.h"]), 7 | includes = ["src"], 8 | ) 9 | 10 | cc_library( 11 | name = "audioio", 12 | srcs = ["tools/audioio.cpp"], 13 | hdrs = ["tools/audioio.h"], 14 | includes = ["tools"], 15 | ) 16 | 17 | cc_library( 18 | name = "parameterio", 19 | srcs = ["tools/parameterio.cpp"], 20 | hdrs = ["tools/parameterio.h"], 21 | includes = ["tools"], 22 | ) 23 | 24 | filegroup( 25 | name = "vaiueo2d_wav", 26 | srcs = ["test/vaiueo2d.wav"], 27 | ) 28 | -------------------------------------------------------------------------------- /cpp/worldline/f0/frq_estimator.h: -------------------------------------------------------------------------------- 1 | #ifndef WORLDLINE_F0_FRQ_ESTIMATOR_H_ 2 | #define WORLDLINE_F0_FRQ_ESTIMATOR_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include "f0_estimator.h" 8 | #include "worldline/classic/frq.h" 9 | 10 | namespace worldline { 11 | 12 | class FrqEstimator : public F0Estimator { 13 | public: 14 | FrqEstimator(const std::string_view frq_data); 15 | 16 | void Estimate(const std::vector& samples, int fs, double frame_ms, 17 | std::vector* f0, 18 | std::vector* time_axis) override; 19 | 20 | private: 21 | FrqData frq_data_; 22 | }; 23 | 24 | } // namespace worldline 25 | 26 | #endif // WORLDLINE_F0_FRQ_ESTIMATOR_H_ 27 | -------------------------------------------------------------------------------- /OpenUtau.Core/Audio/DummyAudioOutput.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using NAudio.Wave; 4 | 5 | namespace OpenUtau.Audio { 6 | public class DummyAudioOutput : IAudioOutput { 7 | public PlaybackState PlaybackState => PlaybackState.Stopped; 8 | public int DeviceNumber => 0; 9 | public List GetOutputDevices() => new List(); 10 | public long GetPosition() => 0; 11 | public void Init(ISampleProvider sampleProvider) { } 12 | public void Pause() { } 13 | public void Play() { } 14 | public void SelectDevice(Guid guid, int deviceNumber) { } 15 | public void Stop() { } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /OpenUtau.Core/Editing/BatchEdit.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Threading; 4 | using OpenUtau.Core.Ustx; 5 | 6 | namespace OpenUtau.Core.Editing { 7 | public interface BatchEdit { 8 | string Name { get; } 9 | bool IsAsync => false; 10 | void Run(UProject project, UVoicePart part, List selectedNotes, DocManager docManager); 11 | 12 | void RunAsync( 13 | UProject project, UVoicePart part, List selectedNotes, DocManager docManager, 14 | Action setProgressCallback, CancellationToken cancellationToken) { 15 | Run(project, part, selectedNotes, docManager); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /OpenUtau.Core/Api/PhonemizerInstaller.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Threading.Tasks; 3 | 4 | namespace OpenUtau.Core.Api 5 | { 6 | public class PhonemizerInstaller 7 | { 8 | public static void Install(string filePath) { 9 | string fileName = Path.GetFileName(filePath); 10 | string destName = Path.Combine(PathManager.Inst.PluginsPath, fileName); 11 | File.Copy(filePath, destName, true); 12 | new Task(() => { 13 | DocManager.Inst.ExecuteCmd(new SingersChangedNotification()); 14 | DocManager.Inst.ExecuteCmd(new ProgressBarNotification(0, $"Installed {fileName}")); 15 | }).Start(DocManager.Inst.MainScheduler); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /.github/workflows/pr-test.yml: -------------------------------------------------------------------------------- 1 | on: 2 | pull_request: 3 | branches: [ master ] 4 | 5 | jobs: 6 | pr-test: 7 | runs-on: ${{ matrix.os.runs-on }} 8 | 9 | strategy: 10 | fail-fast: false 11 | matrix: 12 | os: 13 | - runs-on: windows-latest 14 | arch: win-x64 15 | - runs-on: macos-13 16 | arch: osx-x64 17 | - runs-on: ubuntu-latest 18 | arch: linux-x64 19 | 20 | steps: 21 | - uses: actions/checkout@v1 22 | 23 | - uses: actions/setup-dotnet@v4 24 | with: 25 | dotnet-version: '6.0.x' 26 | 27 | - name: restore 28 | run: dotnet restore OpenUtau -r ${{ matrix.os.arch }} 29 | 30 | - name: test 31 | run: dotnet test OpenUtau.Test 32 | -------------------------------------------------------------------------------- /Logo/openutau.svg: -------------------------------------------------------------------------------- 1 | Artboard 1 -------------------------------------------------------------------------------- /OpenUtau.Core/Api/IG2p.cs: -------------------------------------------------------------------------------- 1 | namespace OpenUtau.Api { 2 | public interface IG2p { 3 | bool IsValidSymbol(string symbol); 4 | bool IsVowel(string symbol); 5 | 6 | /// 7 | /// Returns true if the symbol is a semivowel or liquid phoneme, like y, w, l, r in English. 8 | /// 9 | bool IsGlide(string symbol); 10 | 11 | /// 12 | /// Produces a list of phonemes from grapheme. 13 | /// 14 | string[] Query(string grapheme); 15 | 16 | /// 17 | /// Produces a list of phonemes from hint, removing invalid symbols. 18 | /// 19 | string[] UnpackHint(string hint, char separator = ' '); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenUtau.Core/Classic/ResamplerManifest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Text; 5 | using OpenUtau.Core; 6 | using OpenUtau.Core.Ustx; 7 | 8 | namespace OpenUtau.Classic { 9 | public class ResamplerManifest { 10 | public Dictionary expressions = new Dictionary { }; 11 | public bool expressionFilter = false; 12 | 13 | public ResamplerManifest() { } 14 | 15 | public static ResamplerManifest Load(string path) { 16 | return Yaml.DefaultDeserializer.Deserialize( 17 | File.ReadAllText(path, encoding: Encoding.UTF8) 18 | ); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /cpp/worldline/model/effects.h: -------------------------------------------------------------------------------- 1 | #ifndef WORLDLINE_MODEL_EFFECTS_H_ 2 | #define WORLDLINE_MODEL_EFFECTS_H_ 3 | 4 | #include 5 | #include 6 | 7 | namespace worldline { 8 | 9 | // value range [-100, 100] 10 | void ShiftGender(std::vector>& sp, int value); 11 | 12 | // value range [-100, 100] 13 | void ShiftGender(double* sp, int width, int value); 14 | 15 | // value range [-100, 100] 16 | std::vector GetTensionCoefficients(double f0, int fs, int value, 17 | int width); 18 | 19 | void AutoGain(std::vector& samples, double src_max, double out_max, 20 | double voiced_ratio, int volume, int peakComp); 21 | 22 | } // namespace worldline 23 | 24 | #endif // WORLDLINE_MODEL_EFFECTS_H_ 25 | -------------------------------------------------------------------------------- /OpenUtau/Views/TrackSettingsDialog.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Interactivity; 3 | using OpenUtau.App.ViewModels; 4 | using OpenUtau.Core; 5 | using OpenUtau.Core.Ustx; 6 | 7 | namespace OpenUtau.App.Views { 8 | public partial class TrackSettingsDialog : Window { 9 | 10 | TrackSettingsViewModel viewModel; 11 | 12 | public TrackSettingsDialog() : this(new UTrack(DocManager.Inst.Project)) { } 13 | 14 | public TrackSettingsDialog(UTrack track) { 15 | InitializeComponent(); 16 | DataContext = viewModel = new TrackSettingsViewModel(track); 17 | } 18 | 19 | public void OnOkClicked(object sender, RoutedEventArgs e) { 20 | viewModel.Finish(); 21 | Close(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /OpenUtau.Core/DiffSinger/Phonemizers/DiffSingerJyutpingPhonemizer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using IKg2p; 4 | using OpenUtau.Api; 5 | 6 | namespace OpenUtau.Core.DiffSinger { 7 | [Phonemizer("DiffSinger Jyutping Phonemizer", "DIFFS ZH-YUE", language: "ZH-YUE")] 8 | public class DiffSingerJyutpingPhonemizer : DiffSingerBasePhonemizer { 9 | protected override string GetDictionaryName() => "dsdict-zh-yue.yaml"; 10 | protected override string GetLangCode()=>"yue"; 11 | protected override string[] Romanize(IEnumerable lyrics) { 12 | List g2pResults = ZhG2p.CantoneseInstance.Convert(lyrics.ToList(), false, false); 13 | return g2pResults.Select(res => res.syllable).ToArray(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /OpenUtau/ViewLocator.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Controls.Templates; 3 | using OpenUtau.App.ViewModels; 4 | using System; 5 | 6 | namespace OpenUtau.App { 7 | public class ViewLocator : IDataTemplate { 8 | public Control? Build(object? data) { 9 | if (data is null) { 10 | return null; 11 | } 12 | var name = data.GetType().FullName!.Replace("ViewModel", "View"); 13 | var type = Type.GetType(name); 14 | if (type != null) { 15 | return (Control)Activator.CreateInstance(type)!; 16 | } 17 | return new TextBlock { Text = "Not Found: " + name }; 18 | } 19 | 20 | public bool Match(object? data) { 21 | return data is ViewModelBase; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /OpenUtau.Core/Audio/IAudioOutput.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using NAudio.Wave; 4 | 5 | namespace OpenUtau.Audio { 6 | public class AudioOutputDevice { 7 | public string name; 8 | public string api; 9 | public int deviceNumber; 10 | public Guid guid; 11 | 12 | public override string ToString() => $"[{api}] {name}"; 13 | } 14 | 15 | public interface IAudioOutput { 16 | PlaybackState PlaybackState { get; } 17 | int DeviceNumber { get; } 18 | 19 | void SelectDevice(Guid guid, int deviceNumber); 20 | void Init(ISampleProvider sampleProvider); 21 | void Pause(); 22 | void Play(); 23 | void Stop(); 24 | long GetPosition(); 25 | 26 | List GetOutputDevices(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /OpenUtau.Test/Core/Util/MusicMathTest.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | using Xunit.Abstractions; 3 | 4 | namespace OpenUtau.Core.Util { 5 | public class MusicMathTest { 6 | readonly ITestOutputHelper output; 7 | 8 | public MusicMathTest(ITestOutputHelper output) { 9 | this.output = output; 10 | } 11 | 12 | [Fact] 13 | public void ToneNameTest() { 14 | for (int i = 24; i < 108; ++i) { 15 | string name = MusicMath.GetToneName(i); 16 | int tone = MusicMath.NameToTone(name); 17 | output.WriteLine($"{i} -> {name} -> {tone}"); 18 | Assert.Equal(i, tone); 19 | } 20 | Assert.Equal("C1", MusicMath.GetToneName(24)); 21 | Assert.Equal("B7", MusicMath.GetToneName(107)); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /cpp/worldline/classic/resampler.h: -------------------------------------------------------------------------------- 1 | #ifndef WORLDLINE_CLASSIC_RESAMPLER_H_ 2 | #define WORLDLINE_CLASSIC_RESAMPLER_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "worldline/model/model.h" 9 | #include "worldline/synth_request.h" 10 | 11 | namespace worldline { 12 | 13 | class Resampler { 14 | public: 15 | Resampler(SynthRequest request); 16 | Resampler(std::vector args); 17 | 18 | std::vector Resample(); 19 | 20 | private: 21 | void ApplyEffects(std::vector>* tension, 22 | std::vector* breathiness, 23 | std::vector* voicing); 24 | void ApplyPitch(); 25 | 26 | SynthRequest request_; 27 | std::unique_ptr model_; 28 | }; 29 | 30 | } // namespace worldline 31 | 32 | #endif // WORLDLINE_CLASSIC_RESAMPLER_H_ 33 | -------------------------------------------------------------------------------- /OpenUtau.Core/SignalChain/WaveMix.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | 4 | namespace OpenUtau.Core.SignalChain { 5 | public class WaveMix : ISignalSource { 6 | private readonly List sources; 7 | 8 | public WaveMix(IEnumerable sources) { 9 | this.sources = sources.ToList(); 10 | } 11 | 12 | public bool IsReady(int position, int count) { 13 | return sources.Count == 0 || sources.All(source => source.IsReady(position, count)); 14 | } 15 | 16 | public int Mix(int position, float[] buffer, int index, int count) { 17 | if (sources.Count == 0) { 18 | return 0; 19 | } 20 | return sources.Max(source => source.Mix(position, buffer, index, count)); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OpenUtau/Views/DebugWindow.axaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Avalonia.Controls; 3 | using OpenUtau.App.ViewModels; 4 | 5 | namespace OpenUtau.App.Views { 6 | public partial class DebugWindow : Window { 7 | DebugViewModel viewModel; 8 | 9 | public DebugWindow() { 10 | InitializeComponent(); 11 | DataContext = viewModel = new DebugViewModel(); 12 | viewModel.SetWindow(this); 13 | viewModel.Attach(); 14 | } 15 | public void CopyLogText() { 16 | CopyTextBox.Text = DebugViewModel.Sink.Inst.ToString(); 17 | CopyTextBox.SelectAll(); 18 | CopyTextBox.Copy(); 19 | CopyTextBox.Clear(); 20 | } 21 | 22 | void OnClosed(object? sender, EventArgs e) { 23 | viewModel.Detach(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /cpp/worldline/synth_request.h: -------------------------------------------------------------------------------- 1 | #ifndef WORLDLINE_SYNTH_REQUEST_H_ 2 | #define WORLDLINE_SYNTH_REQUEST_H_ 3 | 4 | #include 5 | 6 | extern "C" { 7 | 8 | struct SynthRequest { 9 | std::int32_t sample_fs; 10 | std::int32_t sample_length; 11 | double* sample; 12 | std::int32_t frq_length = 0; 13 | char* frq = 0; 14 | std::int32_t tone; 15 | double con_vel; 16 | double offset; 17 | double required_length; 18 | double consonant; 19 | double cut_off; 20 | double volume; 21 | double modulation; 22 | double tempo; 23 | std::int32_t pitch_bend_length = 0; 24 | std::int32_t* pitch_bend = 0; 25 | 26 | int flag_g; 27 | int flag_O; 28 | int flag_P; 29 | int flag_Mt; 30 | int flag_Mb; 31 | int flag_Mv; 32 | }; 33 | 34 | struct SynthOutput { 35 | std::int64_t data_length; 36 | char* data; 37 | }; 38 | } 39 | 40 | #endif // WORLDLINE_SYNTH_REQUEST_H_ 41 | -------------------------------------------------------------------------------- /OpenUtau.Core/Vogen/VogenMandarinPhonemizer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.ML.OnnxRuntime; 2 | using OpenUtau.Api; 3 | 4 | namespace OpenUtau.Core.Vogen { 5 | [Phonemizer("Vogen Chinese Mandarin Phonemizer", "VOGEN ZH", language: "ZH")] 6 | public class VogenMandarinPhonemizer : VogenBasePhonemizer { 7 | private static InferenceSession? g2p; 8 | private static InferenceSession? prosody; 9 | 10 | public VogenMandarinPhonemizer() { 11 | g2p ??= new InferenceSession(Data.VogenRes.g2p_man); 12 | G2p = g2p; 13 | prosody ??= new InferenceSession(Data.VogenRes.po_man); 14 | Prosody = prosody; 15 | } 16 | protected override string LangPrefix => "man:"; 17 | 18 | protected override string[] Romanize(string[] lyrics) { 19 | return BaseChinesePhonemizer.Romanize(lyrics); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /cpp/worldline/worldline_test.cpp: -------------------------------------------------------------------------------- 1 | #include "worldline.h" 2 | 3 | #include "gmock/gmock.h" 4 | #include "gtest/gtest.h" 5 | 6 | #if defined(_MSC_VER) 7 | #include 8 | #else 9 | #include 10 | #endif 11 | 12 | #if defined(_MSC_VER) 13 | #define DLL_IMPORT __declspec(dllimport) 14 | #elif defined(__GNUC__) 15 | #define DLL_IMPORT __attribute__((visibility("default"))) 16 | #endif 17 | 18 | extern "C" { 19 | DLL_API PhraseSynth* PhraseSynthNew(); 20 | DLL_API void PhraseSynthDelete(PhraseSynth* phrase_synth); 21 | } 22 | 23 | TEST(WorldlineTest, TestF0) { 24 | #if defined(_MSC_VER) 25 | HMODULE handle = LoadLibrary("worldline.dll"); 26 | EXPECT_THAT(handle, testing::NotNull()); 27 | #else 28 | dlopen("libworldline", RTLD_LAZY); 29 | #endif 30 | 31 | PhraseSynth* phrase_synth = PhraseSynthNew(); 32 | EXPECT_THAT(phrase_synth, testing::NotNull()); 33 | PhraseSynthDelete(phrase_synth); 34 | } 35 | -------------------------------------------------------------------------------- /OpenUtau.Core/Enunu/EnunuClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NetMQ; 3 | using NetMQ.Sockets; 4 | using Newtonsoft.Json; 5 | using Serilog; 6 | 7 | namespace OpenUtau.Core.Enunu { 8 | class EnunuClient : Util.SingletonBase { 9 | internal T SendRequest(string[] args) { 10 | using (var client = new RequestSocket()) { 11 | client.Connect("tcp://localhost:15555"); 12 | string request = JsonConvert.SerializeObject(args); 13 | Log.Information($"EnunuProcess sending {request}"); 14 | client.SendFrame(request); 15 | client.TryReceiveFrameString(TimeSpan.FromSeconds(300), out string? message); 16 | Log.Information($"EnunuProcess received {message}"); 17 | return JsonConvert.DeserializeObject(message ?? string.Empty)!; 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OpenUtau.Plugin.Builtin/CantoneseCVVCPhonemizer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using IKg2p; 4 | using OpenUtau.Api; 5 | 6 | namespace OpenUtau.Plugin.Builtin { 7 | /// 8 | /// Cantonese CVVC phonemizer. 9 | /// It works similarly to the Chinese CVVC phonemizer, including presamp.ini requirement. 10 | /// The big difference is that it converts hanzi to jyutping instead of pinyin. 11 | /// 12 | [Phonemizer("Cantonese CVVC Phonemizer", "ZH-YUE CVVC", "Lotte V", language: "ZH-YUE")] 13 | public class CantoneseCVVCPhonemizer : ChineseCVVCPhonemizer { 14 | protected override string[] Romanize(IEnumerable lyrics) { 15 | List g2pResults = ZhG2p.CantoneseInstance.Convert(lyrics.ToList(), false, false); 16 | return g2pResults.Select(res => res.syllable).ToArray(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /OpenUtau/Controls/TrackAdder.axaml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /OpenUtau/Views/TypeInDialog.axaml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /cpp/worldline/platinum/synthesisplatinum.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright 2012-2014 Masanori Morise. All Rights Reserved. 3 | // Author: mmorise [at] yamanashi.ac.jp (Masanori Morise) 4 | //----------------------------------------------------------------------------- 5 | #ifndef WORLDLINE_PLATINUM_SYNTHESISPLATINUM_H_ 6 | #define WORLDLINE_PLATINUM_SYNTHESISPLATINUM_H_ 7 | 8 | //----------------------------------------------------------------------------- 9 | // SynthesisPlatinum() synthesizes the voice from three parameters. 10 | // Input: 11 | // f0 : f0 contour 12 | // f0_length : Length of f0 13 | // spectrogram : Spectrogram (WORLD assumes spectrogram by Star()) 14 | // residual_spectrogram : Extracted spectrum of the excitation signal 15 | // fft_size : FFT size used for Star() and Platinum() 16 | // frame_period : Temporal inverval for Dio() 17 | // fs : Sampling frequency 18 | // y_length : Length of Output (allocated in advance) 19 | // Output: 20 | // y : Synthesized voice 21 | //----------------------------------------------------------------------------- 22 | void SynthesisPlatinum(double *f0, int f0_length, double **spectrogram, 23 | double **residual_spectrogram, int fft_size, 24 | double frame_period, int fs, int y_length, double *y); 25 | 26 | #endif // WORLDLINE_PLATINUM_SYNTHESISPLATINUM_H_ 27 | -------------------------------------------------------------------------------- /OpenUtau.Plugin.Builtin/LatinDiphonePhonemizer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using OpenUtau.Api; 6 | using OpenUtau.Core.Ustx; 7 | using Serilog; 8 | 9 | namespace OpenUtau.Plugin.Builtin { 10 | /// 11 | /// A base diphone phonemizer for latin languages. 12 | /// 13 | public abstract class LatinDiphonePhonemizer : PhonemeBasedPhonemizer { 14 | protected override string GetPhonemeOrFallback(string prevSymbol, string symbol, int tone, string color, string alt) { 15 | if (!string.IsNullOrEmpty(alt) && singer.TryGetMappedOto($"{prevSymbol} {symbol}{alt}", tone, color, out var oto)) { 16 | return oto.Alias; 17 | } 18 | if (singer.TryGetMappedOto($"{prevSymbol} {symbol}", tone, color, out var oto1)) { 19 | return oto1.Alias; 20 | } 21 | if (vowelFallback.TryGetValue(symbol, out string[] fallbacks)) { 22 | foreach (var fallback in fallbacks) { 23 | if (singer.TryGetMappedOto($"{prevSymbol} {fallback}", tone, color, out var oto2)) { 24 | return oto2.Alias; 25 | } 26 | } 27 | } 28 | if (singer.TryGetMappedOto($"- {symbol}", tone, color, out var oto3)) { 29 | return oto3.Alias; 30 | } 31 | return $"{prevSymbol} {symbol}{alt}"; 32 | } 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /OpenUtau.Core/DefaultPhonemizer.cs: -------------------------------------------------------------------------------- 1 | using OpenUtau.Api; 2 | using OpenUtau.Core.Ustx; 3 | using System.Linq; 4 | 5 | namespace OpenUtau.Core { 6 | /// 7 | /// The simplest Phonemizer possible. Simply pass the lyric as phoneme. 8 | /// 9 | [Phonemizer("Default Phonemizer", "DEFAULT")] 10 | public class DefaultPhonemizer : Phonemizer { 11 | private USinger singer; 12 | public override void SetSinger(USinger singer) => this.singer = singer; 13 | public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevNeighbour, Note? nextNeighbour, Note[] prevNeighbours) { 14 | // Note that even when input has multiple notes, only the leading note is used to produce phoneme. 15 | // This is because the 2nd+ notes will always be extender notes, i.e., with lyric "+" or "+". 16 | // For this simple phonemizer, all these notes maps to a single phoneme. 17 | string alias = notes[0].lyric; 18 | var attr0 = notes[0].phonemeAttributes?.FirstOrDefault(attr => attr.index == 0) ?? default; 19 | if (singer.TryGetMappedOto(notes[0].lyric, notes[0].tone + attr0.toneShift, attr0.voiceColor, out var oto)) { 20 | alias = oto.Alias; 21 | } 22 | return new Result { 23 | phonemes = new Phoneme[] { 24 | new Phoneme { 25 | phoneme = alias, 26 | } 27 | } 28 | }; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /OpenUtau/Controls/NotePropertyExpression.axaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 18 | 19 | -------------------------------------------------------------------------------- /cpp/worldline/platinum/platinum.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright 2012-2014 Masanori Morise. All Rights Reserved. 3 | // Author: mmorise [at] yamanashi.ac.jp (Masanori Morise) 4 | //----------------------------------------------------------------------------- 5 | #ifndef WORLDLINE_PLATINUM_PLATINUM_H_ 6 | #define WORLDLINE_PLATINUM_PLATINUM_H_ 7 | 8 | //----------------------------------------------------------------------------- 9 | // Platinum() calculates the spectrum of the excitation signal. 10 | // Exciation signal is calculated by convoluting the windowed signal and 11 | // Inverse function of the spectral envelope. The minimum phase is used as the 12 | // phase of the spectral envelope. 13 | // Input: 14 | // x : Input signal 15 | // x_length : Length of x 16 | // fs : Sampling frequency 17 | // time_axis : Temporal positions used for calculating the 18 | // excitation signal 19 | // f0 : f0 contour 20 | // spectrogram : Spectrogram (WORLD assumes spectrogram by Star()) 21 | // Output: 22 | // residual_spectrogram : Extracted spectrum of the excitation signal 23 | //----------------------------------------------------------------------------- 24 | void Platinum(double *x, int x_length, int fs, double *time_axis, double *f0, 25 | int f0_length, double **spectrogram, int fft_size, 26 | double **residual_spectrogram); 27 | 28 | #endif // WORLDLINE_PLATINUM_PLATINUM_H_ 29 | -------------------------------------------------------------------------------- /appcast.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | from datetime import datetime 3 | 4 | def main(): 5 | parser = argparse.ArgumentParser('Writes Appcast XML file') 6 | parser.add_argument('-v', '--version', help='Version number', required=True) 7 | parser.add_argument('-o', '--os', help='OS name', required=True) 8 | parser.add_argument('-r', '--rid', help='RID', required=True) 9 | parser.add_argument('-f', '--file', help='File name', required=True) 10 | args = parser.parse_args() 11 | 12 | appcast_ver = args.version 13 | appcast_os = args.os 14 | appcast_rid = args.rid 15 | appcast_file = args.file 16 | 17 | xml = ''' 18 | 19 | 20 | OpenUtau 21 | en 22 | 23 | OpenUtau %s 24 | %s 25 | 31 | 32 | 33 | ''' % (appcast_ver, datetime.now().strftime("%a, %d %b %Y %H:%M:%S %z"), 34 | appcast_ver, appcast_file, appcast_ver, appcast_ver, appcast_os) 35 | 36 | with open("appcast.%s.xml" % (appcast_rid), 'w') as f: 37 | f.write(xml) 38 | 39 | 40 | if __name__ == '__main__': 41 | main() 42 | -------------------------------------------------------------------------------- /OpenUtau/Controls/ExpSelector.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | using Avalonia.Input; 4 | using OpenUtau.App.ViewModels; 5 | 6 | namespace OpenUtau.App.Controls { 7 | public partial class ExpSelector : UserControl { 8 | public static readonly DirectProperty IndexProperty = 9 | AvaloniaProperty.RegisterDirect( 10 | nameof(Index), 11 | o => o.Index, 12 | (o, v) => o.Index = v); 13 | 14 | public int Index { 15 | get => index; 16 | set => SetAndRaise(IndexProperty, ref index, value); 17 | } 18 | 19 | private int index; 20 | 21 | 22 | public ExpSelector() { 23 | InitializeComponent(); 24 | DataContext = new ExpSelectorViewModel(); 25 | ((ExpSelectorViewModel)DataContext!).Index = Index; 26 | } 27 | 28 | protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) { 29 | base.OnPropertyChanged(change); 30 | if (change.Property == IndexProperty) { 31 | ((ExpSelectorViewModel)DataContext!).Index = Index; 32 | } 33 | } 34 | 35 | private void TextBlockPointerPressed(object sender, PointerPressedEventArgs e) { 36 | ((ExpSelectorViewModel)DataContext!).OnSelected(true); 37 | } 38 | 39 | public void SelectExp() { 40 | ((ExpSelectorViewModel)DataContext!).OnSelected(false); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /OpenUtau.Core/Classic/WorldlineResampler.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using NAudio.Wave; 3 | using OpenUtau.Core; 4 | using OpenUtau.Core.Render; 5 | using OpenUtau.Core.SignalChain; 6 | using Serilog; 7 | 8 | namespace OpenUtau.Classic { 9 | internal class WorldlineResampler : IResampler { 10 | public const string name = "worldline"; 11 | public string FilePath { get; private set; } 12 | 13 | public WorldlineResampler() { 14 | string ext = OS.IsWindows() ? ".dll" : OS.IsMacOS() ? ".dylib" : ".so"; 15 | FilePath = Path.Join(PathManager.Inst.RootPath, name + ext); 16 | } 17 | 18 | public float[] DoResampler(ResamplerItem item, ILogger logger) { 19 | return Worldline.Resample(item); 20 | } 21 | 22 | public string DoResamplerReturnsFile(ResamplerItem item, ILogger logger) { 23 | var samples = DoResampler(item, logger); 24 | var source = new WaveSource(0, 0, 0, 1); 25 | source.SetSamples(samples); 26 | lock (Renderers.GetCacheLock(item.outputFile)) { 27 | WaveFileWriter.CreateWaveFile16(item.outputFile, new ExportAdapter(source).ToMono(1, 0)); 28 | } 29 | return item.outputFile; 30 | } 31 | 32 | public void CheckPermissions() { } 33 | 34 | //TODO: A list of flags supported by worldline resampler 35 | public ResamplerManifest Manifest { get; } = new ResamplerManifest(); 36 | 37 | public bool SupportsFlag(string abbr) { 38 | return true; 39 | } 40 | 41 | public override string ToString() => name; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /OpenUtau.Test/Classic/VoicebankLoaderTest.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Text; 3 | using Xunit; 4 | using Xunit.Abstractions; 5 | 6 | namespace OpenUtau.Classic { 7 | public class VoicebankLoaderTest { 8 | readonly ITestOutputHelper output; 9 | 10 | public VoicebankLoaderTest(ITestOutputHelper output) { 11 | this.output = output; 12 | } 13 | 14 | [Fact] 15 | public void OtoSetRoundTrip() { 16 | string text = @"a.wav=,,,,, 17 | a.wav=- a, 18 | a.wav=a R,500,,, 19 | !@#$!@#$ 20 | aoieu.wav=- a,,,,,,,,, 21 | 22 | aoieu.wav=a o,, 23 | aoieu.wav=o i,,, 24 | aoieu.wav=i e,,100,150,,, 25 | aoieu.wav=e u,20, 26 | aoieu.wav=u R,5,,33,44,, 27 | ".Replace("\r\n", "\n"); 28 | string expected = @"a.wav=,,,,, 29 | a.wav=- a,,,,, 30 | a.wav=a R,500,,,, 31 | !@#$!@#$ 32 | aoieu.wav=- a,,,,, 33 | 34 | aoieu.wav=a o,,,,, 35 | aoieu.wav=o i,,,,, 36 | aoieu.wav=i e,,100,150,, 37 | aoieu.wav=e u,20,,,, 38 | aoieu.wav=u R,5,,33,44, 39 | ".Replace("\r\n", "\n"); 40 | 41 | using (MemoryStream stream = new MemoryStream(Encoding.ASCII.GetBytes(text))) { 42 | VoicebankLoader.IsTest = true; 43 | var otoSet = VoicebankLoader.ParseOtoSet(stream, "oto.ini", Encoding.ASCII); 44 | using (MemoryStream stream2 = new MemoryStream()) { 45 | VoicebankLoader.WriteOtoSet(otoSet, stream2, Encoding.ASCII); 46 | string actual = Encoding.ASCII.GetString(stream2.ToArray()); 47 | Assert.Equal(expected, actual); 48 | } 49 | } 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /cpp/worldline/f0/frq_estimator.cpp: -------------------------------------------------------------------------------- 1 | #include "frq_estimator.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "world/constantnumbers.h" 8 | #include "world/dio.h" 9 | #include "worldline/classic/frq.h" 10 | 11 | extern "C" { 12 | #include "pyin.h" 13 | } 14 | 15 | namespace worldline { 16 | 17 | static double avg_f0(double* data, int count) { 18 | int non_zeros = 0; 19 | double sum = 0; 20 | for (int i = 0; i < count; ++i) { 21 | if (data[i] > world::kFloorF0StoneMask) { 22 | non_zeros++; 23 | sum += data[i]; 24 | } 25 | } 26 | if (non_zeros == 0) { 27 | return 0; 28 | } 29 | return sum / non_zeros; 30 | } 31 | 32 | FrqEstimator::FrqEstimator(const std::string_view frq_data) { 33 | frq_data_ = LoadFrq(frq_data); 34 | } 35 | 36 | void FrqEstimator::Estimate(const std::vector& samples, int fs, 37 | double frame_ms, std::vector* f0, 38 | std::vector* time_axis) { 39 | int f0_len = GetSamplesForDIO(fs, samples.size(), frame_ms); 40 | *f0 = std::vector(f0_len); 41 | *time_axis = std::vector(f0_len); 42 | double hop_size = fs * frame_ms / 1000.0; 43 | double ratio = hop_size / frq_data_.hop_size; 44 | for (int i = 0; i < f0_len; ++i) { 45 | int low = std::max(0, (int)std::floor(ratio * i)); 46 | int high = 47 | std::min((size_t)std::ceil(ratio * (1 + i)), frq_data_.f0.size()); 48 | // when high <= low, avg_f0 simply returns 0. 49 | (*f0)[i] = avg_f0(frq_data_.f0.data() + low, high - low); 50 | (*time_axis)[i] = i * frame_ms / 1000.0; 51 | } 52 | } 53 | 54 | } // namespace worldline 55 | -------------------------------------------------------------------------------- /OpenUtau/Views/SliderDialog.axaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Avalonia.Controls; 3 | using Avalonia.Input; 4 | using Avalonia.Interactivity; 5 | using ReactiveUI; 6 | 7 | namespace OpenUtau.App.Views { 8 | public partial class SliderDialog : Window { 9 | public Action? onFinish; 10 | 11 | public SliderDialog() { 12 | InitializeComponent(); 13 | } 14 | public SliderDialog(string title, double value, double min, double max, double tick) { 15 | InitializeComponent(); 16 | Title = title; 17 | Slider.Value = value; 18 | Slider.Minimum = min; 19 | Slider.Maximum = max; 20 | Slider.TickFrequency = tick; 21 | 22 | this.WhenAnyValue(d => d.Slider.Value) 23 | .Subscribe(value => { 24 | TextBlock.Text = value.ToString(); 25 | }); 26 | } 27 | 28 | private void OkButtonClick(object? sender, RoutedEventArgs e) { 29 | Finish(); 30 | } 31 | 32 | private void Finish() { 33 | if (onFinish != null) { 34 | onFinish.Invoke(Slider.Value); 35 | } 36 | Close(); 37 | } 38 | 39 | protected override void OnKeyDown(KeyEventArgs e) { 40 | if (e.Key == Key.Escape) { 41 | e.Handled = true; 42 | Close(); 43 | } else if (e.Key == Key.Enter) { 44 | e.Handled = true; 45 | Finish(); 46 | } else { 47 | base.OnKeyDown(e); 48 | } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /OpenUtau.Plugin.Builtin/Data/arpasing.template.yaml: -------------------------------------------------------------------------------- 1 | %YAML 1.2 2 | --- 3 | symbols: 4 | - {symbol: aa, type: vowel} 5 | - {symbol: ae, type: vowel} 6 | - {symbol: ah, type: vowel} 7 | - {symbol: ao, type: vowel} 8 | - {symbol: aw, type: vowel} 9 | - {symbol: ax, type: vowel} 10 | - {symbol: ay, type: vowel} 11 | - {symbol: b, type: stop} 12 | - {symbol: ch, type: affricate} 13 | - {symbol: d, type: stop} 14 | - {symbol: dh, type: fricative} 15 | - {symbol: dr, type: fricative} 16 | - {symbol: dx, type: tap} 17 | - {symbol: eh, type: vowel} 18 | - {symbol: er, type: vowel} 19 | - {symbol: ey, type: vowel} 20 | - {symbol: f, type: fricative} 21 | - {symbol: g, type: stop} 22 | - {symbol: hh, type: aspirate} 23 | - {symbol: ih, type: vowel} 24 | - {symbol: iy, type: vowel} 25 | - {symbol: jh, type: affricate} 26 | - {symbol: k, type: stop} 27 | - {symbol: l, type: liquid} 28 | - {symbol: m, type: nasal} 29 | - {symbol: n, type: nasal} 30 | - {symbol: ng, type: nasal} 31 | - {symbol: ow, type: vowel} 32 | - {symbol: oy, type: vowel} 33 | - {symbol: p, type: stop} 34 | - {symbol: q, type: stop} 35 | - {symbol: r, type: liquid} 36 | - {symbol: s, type: fricative} 37 | - {symbol: sh, type: fricative} 38 | - {symbol: t, type: stop} 39 | - {symbol: th, type: fricative} 40 | - {symbol: tr, type: fricative} 41 | - {symbol: uh, type: vowel} 42 | - {symbol: uw, type: vowel} 43 | - {symbol: v, type: fricative} 44 | - {symbol: w, type: semivowel} 45 | - {symbol: y, type: semivowel} 46 | - {symbol: z, type: fricative} 47 | - {symbol: zh, type: fricative} 48 | entries: 49 | - grapheme: openutau 50 | phonemes: [ow, p, eh, n, w, uw, t, ah, w, uw] 51 | -------------------------------------------------------------------------------- /OpenUtau.Core/Vogen/VogenYuePhonemizer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.ML.OnnxRuntime; 2 | using OpenUtau.Api; 3 | using System; 4 | 5 | namespace OpenUtau.Core.Vogen { 6 | [Phonemizer("Vogen Chinese Yue Phonemizer", "VOGEN ZH-YUE", language: "ZH-YUE")] 7 | public class VogenYuePhonemizer : VogenBasePhonemizer { 8 | private static TrieNode? trie; 9 | private static InferenceSession? g2p; 10 | private static InferenceSession? prosody; 11 | 12 | public VogenYuePhonemizer() { 13 | trie ??= TrieNode.LoadDictionary( 14 | Data.VogenRes.yue 15 | .Split(new string[] { "\r\n", "\r", "\n" }, StringSplitOptions.None)); 16 | g2p ??= new InferenceSession(Data.VogenRes.g2p_yue); 17 | G2p = g2p; 18 | prosody ??= new InferenceSession(Data.VogenRes.po_yue); 19 | Prosody = prosody; 20 | } 21 | 22 | protected override string LangPrefix => "yue:"; 23 | 24 | protected override string[] Romanize(string[] lyrics) { 25 | var result = new string[lyrics.Length]; 26 | int index = 0; 27 | while (index < lyrics.Length) { 28 | string[]? romanized = trie!.Query(new Span(lyrics, index, lyrics.Length - index)); 29 | if (romanized == null) { 30 | result[index] = lyrics[index]; 31 | index++; 32 | } else { 33 | Array.Copy(romanized, 0, result, index, romanized.Length); 34 | index += romanized.Length; 35 | } 36 | } 37 | return result; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /OpenUtau/Views/NoteDefaultsDialog.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.Interactivity; 3 | using OpenUtau.App.ViewModels; 4 | using OpenUtau.Core.Util; 5 | 6 | namespace OpenUtau.App.Views { 7 | public partial class NoteDefaultsDialog : Window { 8 | internal readonly NoteDefaultsViewModel ViewModel; 9 | public NoteDefaultsDialog() { 10 | InitializeComponent(); 11 | DataContext = ViewModel = new NoteDefaultsViewModel(); 12 | } 13 | 14 | void OnSavePortamentoPreset(object sender, RoutedEventArgs e) { 15 | var dialog = new TypeInDialog() { 16 | Title = ThemeManager.GetString("notedefaults.preset.namenew"), 17 | onFinish = name => ViewModel.SavePortamentoPreset(name), 18 | }; 19 | dialog.ShowDialog(this); 20 | } 21 | 22 | void OnRemovePortamentoPreset(object sender, RoutedEventArgs e) { 23 | ViewModel.RemoveAppliedPortamentoPreset(); 24 | } 25 | 26 | void OnSaveVibratoPreset(object sender, RoutedEventArgs e) { 27 | var dialog = new TypeInDialog() { 28 | Title = ThemeManager.GetString("notedefaults.preset.namenew"), 29 | onFinish = name => ViewModel.SaveVibratoPreset(name), 30 | }; 31 | dialog.ShowDialog(this); 32 | } 33 | 34 | void OnRemoveVibratoPreset(object sender, RoutedEventArgs e) { 35 | ViewModel.RemoveAppliedVibratoPreset(); 36 | } 37 | 38 | void OnReset(object sender, RoutedEventArgs e) { 39 | NotePresets.Reset(); 40 | ViewModel.ResetSettings(); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /OpenUtau.Core/DiffSinger/Phonemizers/DiffSingerKoreanPhonemizer.cs: -------------------------------------------------------------------------------- 1 | using OpenUtau.Api; 2 | using OpenUtau.Core.Ustx; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | 6 | namespace OpenUtau.Core.DiffSinger 7 | { 8 | [Phonemizer("DiffSinger Korean Phonemizer", "DIFFS KO","EX3", language:"KO")] 9 | public class DiffSingerKoreanPhonemizer : DiffSingerBasePhonemizer 10 | { 11 | protected override string GetDictionaryName()=>"dsdict-ko.yaml"; 12 | protected override string GetLangCode()=>"ko"; 13 | 14 | public override void SetUp(Note[][] groups, UProject project, UTrack track) { 15 | if (groups.Length == 0) { 16 | return; 17 | } 18 | // variate lyrics 19 | KoreanPhonemizerUtil.RomanizeNotes(groups, false); 20 | 21 | //Split song into sentences (phrases) 22 | var phrase = new List { groups[0] }; 23 | for (int i = 1; i < groups.Length; ++i) { 24 | //If the previous and current notes are connected, do not split the sentence 25 | if (groups[i - 1][^1].position + groups[i - 1][^1].duration == groups[i][0].position) { 26 | phrase.Add(groups[i]); 27 | } else { 28 | //If the previous and current notes are not connected, process the current sentence and start the next sentence 29 | ProcessPart(phrase.ToArray()); 30 | phrase.Clear(); 31 | phrase.Add(groups[i]); 32 | } 33 | } 34 | if (phrase.Count > 0) { 35 | ProcessPart(phrase.ToArray()); 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /OpenUtau/Controls/ViewScaler.axaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 11 | 14 | 17 | 20 | 23 | 26 | 27 | 31 | 32 | -------------------------------------------------------------------------------- /OpenUtau.Core/Render/IRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | using System.Threading.Tasks; 4 | using OpenUtau.Core.Ustx; 5 | 6 | namespace OpenUtau.Core.Render { 7 | public class NoResamplerException : Exception { } 8 | public class NoWavtoolException : Exception { } 9 | 10 | /// 11 | /// Render result of a phrase. 12 | /// 13 | public class RenderResult { 14 | public float[] samples; 15 | 16 | /// 17 | /// The length of leading samples. 18 | /// 19 | public double leadingMs; 20 | 21 | /// 22 | /// Start position of non-leading samples. 23 | /// 24 | public double positionMs; 25 | 26 | /// 27 | /// Length estimated before actual render. 28 | /// 29 | public double estimatedLengthMs; 30 | } 31 | 32 | public class RenderPitchResult { 33 | public float[] ticks; 34 | public float[] tones; 35 | } 36 | 37 | /// 38 | /// Interface of phrase-based renderer. 39 | /// 40 | public interface IRenderer { 41 | USingerType SingerType { get; } 42 | bool SupportsRenderPitch { get; } 43 | bool SupportsExpression(UExpressionDescriptor descriptor); 44 | RenderResult Layout(RenderPhrase phrase); 45 | Task Render(RenderPhrase phrase, Progress progress, int trackNo, CancellationTokenSource cancellation, bool isPreRender = false); 46 | RenderPitchResult LoadRenderedPitch(RenderPhrase phrase); 47 | UExpressionDescriptor[] GetSuggestedExpressions(USinger singer, URenderSettings renderSettings); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /OpenUtau.Core/Api/PhonemizerFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | 5 | namespace OpenUtau.Api { 6 | public class PhonemizerFactory { 7 | public Type type; 8 | public string name; 9 | public string tag; 10 | public string author; 11 | public string language; 12 | 13 | public Phonemizer Create() { 14 | var phonemizer = Activator.CreateInstance(type) as Phonemizer; 15 | phonemizer.Name = name; 16 | phonemizer.Tag = tag; 17 | phonemizer.Language = language; 18 | return phonemizer; 19 | } 20 | 21 | public override string ToString() => string.IsNullOrEmpty(author) 22 | ? $"[{tag}] {name}" 23 | : $"[{tag}] {name} (Contributed by {author})"; 24 | 25 | private static Dictionary factories = new Dictionary(); 26 | public static PhonemizerFactory Get(Type type) { 27 | if (!factories.TryGetValue(type, out var factory)) { 28 | var attr = type.GetCustomAttribute(); 29 | if (attr == null || string.IsNullOrEmpty(attr.Name) || string.IsNullOrEmpty(attr.Tag)) { 30 | return null; 31 | } 32 | factory = new PhonemizerFactory() { 33 | type = type, 34 | name = attr.Name, 35 | tag = attr.Tag, 36 | author = attr.Author, 37 | language = attr.Language, 38 | }; 39 | factories[type] = factory; 40 | } 41 | return factory; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /cpp/worldline/classic/frq.cpp: -------------------------------------------------------------------------------- 1 | #include "frq.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | namespace worldline { 8 | 9 | static int ReadInt(const char* data) { 10 | return *reinterpret_cast(data); 11 | } 12 | 13 | static double ReadDouble(const char* data) { 14 | return *reinterpret_cast(data); 15 | } 16 | 17 | FrqData LoadFrq(const std::string_view data) { 18 | FrqData frq_data; 19 | assert(data.substr(0, 8) == "FREQ0003"); 20 | frq_data.hop_size = ReadInt(data.data() + 8); 21 | frq_data.avg_frq = ReadDouble(data.data() + 12); 22 | int num_frames = ReadInt(data.data() + 36); 23 | frq_data.f0 = std::vector(num_frames); 24 | frq_data.amp = std::vector(num_frames); 25 | const double* ptr = reinterpret_cast(data.data() + 40); 26 | for (int i = 0; i < num_frames; ++i) { 27 | frq_data.f0[i] = *(ptr++); 28 | frq_data.amp[i] = *(ptr++); 29 | } 30 | return frq_data; 31 | } 32 | 33 | static void WriteInt(std::string& s, int v) { 34 | s.append(reinterpret_cast(&v), sizeof(int)); 35 | } 36 | 37 | static void WriteDouble(std::string& s, double v) { 38 | s.append(reinterpret_cast(&v), sizeof(double)); 39 | } 40 | 41 | std::string DumpFrq(const FrqData& frq_data) { 42 | std::string result; 43 | result.append("FREQ0003"); 44 | WriteInt(result, frq_data.hop_size); 45 | WriteDouble(result, frq_data.avg_frq); 46 | for (int i = 0; i < 4; ++i) { 47 | WriteInt(result, 0); 48 | } 49 | WriteInt(result, frq_data.f0.size()); 50 | for (int i = 0; i < frq_data.f0.size(); ++i) { 51 | WriteDouble(result, frq_data.f0.data()[i]); 52 | WriteDouble(result, frq_data.amp.data()[i]); 53 | } 54 | return result; 55 | } 56 | 57 | } // namespace worldline 58 | -------------------------------------------------------------------------------- /OpenUtau.Core/Enunu/EnunuUtils.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.IO; 3 | using System.Linq; 4 | using System.Text; 5 | using OpenUtau.Core.Ustx; 6 | 7 | namespace OpenUtau.Core.Enunu { 8 | public struct EnunuNote { 9 | public string lyric; 10 | public int length; 11 | public int noteNum; 12 | public int noteIndex; 13 | public string timbre; 14 | } 15 | 16 | internal static class EnunuUtils { 17 | static readonly Encoding ShiftJIS = Encoding.GetEncoding("shift_jis"); 18 | 19 | internal static void WriteUst(IList notes, double tempo, USinger singer, string ustPath) { 20 | using (var writer = new StreamWriter(ustPath, false, ShiftJIS)) { 21 | writer.WriteLine("[#SETTING]"); 22 | writer.WriteLine($"Tempo={tempo}"); 23 | writer.WriteLine("Tracks=1"); 24 | writer.WriteLine($"Project={ustPath}"); 25 | writer.WriteLine($"VoiceDir={singer.Location}"); 26 | writer.WriteLine($"CacheDir={PathManager.Inst.CachePath}"); 27 | writer.WriteLine("Mode2=True"); 28 | for (int i = 0; i < notes.Count; ++i) { 29 | writer.WriteLine($"[#{i}]"); 30 | writer.WriteLine($"Lyric={notes[i].lyric}"); 31 | writer.WriteLine($"Length={notes[i].length}"); 32 | writer.WriteLine($"NoteNum={notes[i].noteNum}"); 33 | if (!string.IsNullOrEmpty(notes[i].timbre)) { 34 | writer.WriteLine($"Flags={notes[i].timbre}"); 35 | } 36 | } 37 | writer.WriteLine("[#TRACKEND]"); 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /OpenUtau/Views/SingerPublishDialog.axaml: -------------------------------------------------------------------------------- 1 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |