From 298b3036a76d49977e9dc72f1d2385ab071f569b Mon Sep 17 00:00:00 2001 From: Lotte V Date: Sat, 14 Oct 2023 03:11:14 +0200 Subject: [PATCH] Oops, CC not FC vel change --- KoreanCVVCPlusPhonemizer/KoreanCVVCPlusPhonemizer.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/KoreanCVVCPlusPhonemizer/KoreanCVVCPlusPhonemizer.cs b/KoreanCVVCPlusPhonemizer/KoreanCVVCPlusPhonemizer.cs index 2f0a47c..e102bc7 100644 --- a/KoreanCVVCPlusPhonemizer/KoreanCVVCPlusPhonemizer.cs +++ b/KoreanCVVCPlusPhonemizer/KoreanCVVCPlusPhonemizer.cs @@ -743,7 +743,8 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN var nextAttr = nextNeighbour.Value.phonemeAttributes?.FirstOrDefault(attr => attr.index == 0) ?? default; // Minimam is 30 tick, maximum is half of note - fcLength = Convert.ToInt32(Math.Min(totalDuration / 2, Math.Max(30, fcLength * (nextAttr.consonantStretchRatio ?? 1)))); + ccLength = Convert.ToInt32(Math.Min(totalDuration / 2, Math.Max(30, ccLength * (nextAttr.consonantStretchRatio ?? 1)))); + if (singer.TryGetMappedOto(CV, note.tone + attr0.toneShift, attr0.voiceColor, out var oto1) && singer.TryGetMappedOto(FC, note.tone + attr0.toneShift, attr0.voiceColor, out var oto2) && singer.TryGetMappedOto(CC, note.tone + attr0.toneShift, attr0.voiceColor, out var oto3)) { CV = oto1.Alias; FC = oto2.Alias; @@ -782,7 +783,7 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN var nextAttr = nextNeighbour.Value.phonemeAttributes?.FirstOrDefault(attr => attr.index == 0) ?? default; // Minimam is 30 tick, maximum is half of note - fcLength = Convert.ToInt32(Math.Min(totalDuration / 2, Math.Max(30, fcLength * (nextAttr.consonantStretchRatio ?? 1)))); + ccLength = Convert.ToInt32(Math.Min(totalDuration / 2, Math.Max(30, ccLength * (nextAttr.consonantStretchRatio ?? 1)))); if (singer.TryGetMappedOto(CV, note.tone + attr0.toneShift, attr0.voiceColor, out var oto1) && singer.TryGetMappedOto(FC, note.tone + attr0.toneShift, attr0.voiceColor, out var oto2) && singer.TryGetMappedOto(CC, note.tone + attr0.toneShift, attr0.voiceColor, out var oto3)) { CV = oto1.Alias;