From 80b84775a64fa71eb95f9a890a1745acd2109459 Mon Sep 17 00:00:00 2001 From: Maiko Date: Fri, 27 Oct 2023 20:42:03 +0900 Subject: [PATCH] Fix rendering track No. --- OpenUtau.Core/Classic/ClassicRenderer.cs | 4 ++-- OpenUtau.Core/Classic/WorldlineRenderer.cs | 2 +- OpenUtau.Core/DiffSinger/DiffSingerRenderer.cs | 2 +- OpenUtau.Core/Enunu/EnunuRenderer.cs | 2 +- OpenUtau.Core/Vogen/VogenRenderer.cs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenUtau.Core/Classic/ClassicRenderer.cs b/OpenUtau.Core/Classic/ClassicRenderer.cs index a4ebe403b..2f1d19fda 100644 --- a/OpenUtau.Core/Classic/ClassicRenderer.cs +++ b/OpenUtau.Core/Classic/ClassicRenderer.cs @@ -78,7 +78,7 @@ public Task RenderInternal(RenderPhrase phrase, Progress progress, VoicebankFiles.Inst.CopyBackMetaFiles(item.inputFile, item.inputTemp); } } - progress.Complete(1, $"Track {trackNo}: {item.resampler} \"{item.phone.phoneme}\""); + progress.Complete(1, $"Track {trackNo + 1}: {item.resampler} \"{item.phone.phoneme}\""); }); var result = Layout(phrase); var wavtool = new SharpWavtool(true); @@ -97,7 +97,7 @@ public Task RenderExternal(RenderPhrase phrase, Progress progress, resamplerItems.Add(new ResamplerItem(phrase, phone)); } var task = Task.Run(() => { - string progressInfo = $"Track {trackNo} : {phrase.wavtool} \"{string.Join(" ", phrase.phones.Select(p => p.phoneme))}\""; + string progressInfo = $"Track {trackNo + 1} : {phrase.wavtool} \"{string.Join(" ", phrase.phones.Select(p => p.phoneme))}\""; progress.Complete(0, progressInfo); var wavPath = Path.Join(PathManager.Inst.CachePath, $"cat-{phrase.hash:x16}.wav"); var result = Layout(phrase); diff --git a/OpenUtau.Core/Classic/WorldlineRenderer.cs b/OpenUtau.Core/Classic/WorldlineRenderer.cs index b3bc19510..065e0f43e 100644 --- a/OpenUtau.Core/Classic/WorldlineRenderer.cs +++ b/OpenUtau.Core/Classic/WorldlineRenderer.cs @@ -55,7 +55,7 @@ public Task Render(RenderPhrase phrase, Progress progress, int tra var task = Task.Run(() => { var result = Layout(phrase); var wavPath = Path.Join(PathManager.Inst.CachePath, $"wdl-{phrase.hash:x16}.wav"); - string progressInfo = $"Track {trackNo}: {this} {string.Join(" ", phrase.phones.Select(p => p.phoneme))}"; + string progressInfo = $"Track {trackNo + 1}: {this} {string.Join(" ", phrase.phones.Select(p => p.phoneme))}"; progress.Complete(0, progressInfo); if (File.Exists(wavPath)) { try { diff --git a/OpenUtau.Core/DiffSinger/DiffSingerRenderer.cs b/OpenUtau.Core/DiffSinger/DiffSingerRenderer.cs index 792c2aafb..e3aa65862 100644 --- a/OpenUtau.Core/DiffSinger/DiffSingerRenderer.cs +++ b/OpenUtau.Core/DiffSinger/DiffSingerRenderer.cs @@ -90,7 +90,7 @@ public Task Render(RenderPhrase phrase, Progress progress, int tra ? $"ds-{phrase.hash:x16}-depth{depth}-{speedup}x.wav" // if the depth changes, phrase should be re-rendered : $"ds-{phrase.hash:x16}-{speedup}x.wav"; // preserve this for not invalidating cache from older versions var wavPath = Path.Join(PathManager.Inst.CachePath, wavName); - string progressInfo = $"{this}{speedup}x \"{string.Join(" ", phrase.phones.Select(p => p.phoneme))}\""; + string progressInfo = $"Track {trackNo + 1}: {this}{speedup}x \"{string.Join(" ", phrase.phones.Select(p => p.phoneme))}\""; if (File.Exists(wavPath)) { try { using (var waveStream = Wave.OpenFile(wavPath)) { diff --git a/OpenUtau.Core/Enunu/EnunuRenderer.cs b/OpenUtau.Core/Enunu/EnunuRenderer.cs index d5545f86a..c16700cf5 100644 --- a/OpenUtau.Core/Enunu/EnunuRenderer.cs +++ b/OpenUtau.Core/Enunu/EnunuRenderer.cs @@ -74,7 +74,7 @@ public Task Render(RenderPhrase phrase, Progress progress, int tra if (cancellation.IsCancellationRequested) { return new RenderResult(); } - string progressInfo = $"Track {trackNo}: {this} \"{string.Join(" ", phrase.phones.Select(p => p.phoneme))}\""; + string progressInfo = $"Track {trackNo + 1}: {this} \"{string.Join(" ", phrase.phones.Select(p => p.phoneme))}\""; progress.Complete(0, progressInfo); var tmpPath = Path.Join(PathManager.Inst.CachePath, $"enu-{phrase.preEffectHash:x16}"); var ustPath = tmpPath + ".tmp"; diff --git a/OpenUtau.Core/Vogen/VogenRenderer.cs b/OpenUtau.Core/Vogen/VogenRenderer.cs index 5b3599cec..0f861f589 100644 --- a/OpenUtau.Core/Vogen/VogenRenderer.cs +++ b/OpenUtau.Core/Vogen/VogenRenderer.cs @@ -62,7 +62,7 @@ public Task Render(RenderPhrase phrase, Progress progress, int tra } var result = Layout(phrase); var wavPath = Path.Join(PathManager.Inst.CachePath, $"vog-{phrase.hash:x16}.wav"); - string progressInfo = $"Track {trackNo}: {this} \"{string.Join(" ", phrase.phones.Select(p => p.phoneme))}\""; + string progressInfo = $"Track {trackNo + 1}: {this} \"{string.Join(" ", phrase.phones.Select(p => p.phoneme))}\""; progress.Complete(0, progressInfo); if (File.Exists(wavPath)) { try {