@@ -494,10 +494,11 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN
494
494
495
495
if ( ( TCLfinal == "M" ) && ( TNLconsonant == "r" ) ) { TNLconsonant = "n" ; }
496
496
497
- if ( ( TCLfinal == "T" ) && ( TNLconsonant == "s" ) ) { TCLfinal = "" ; TNLconsonant = "ss" ; }
497
+ if ( ( TCLfinal == "T" ) && ( TNLconsonant == "s" || TNLconsonant == "ss" ) ) { TCLfinal = "" ; TNLconsonant = "ss" ; }
498
498
499
499
if ( ( TCLfinal == "NG" ) && ( TNLconsonant == "r" ) ) { TNLconsonant = "n" ; }
500
500
501
+ if ( ( TCLfinal == "L" ) && ( TNLconsonant == "d" ) ) { TNLconsonant = "dd" ; }
501
502
502
503
// Hanja batchim base ㄱ(g)ㄷ(d)ㅂ(b) + ㄹ(l) = ㅇ(ng)ㄴ(n)ㅁ(m) + ㄴ(n)(2)
503
504
if ( ( TCLfinal == "K" ) && ( NLconsonant == 5 ) ) { TCLfinal = "NG" ; TCLplainfinal = "NG" ; } else if ( ( TCLfinal == "T" ) && ( NLconsonant == 5 ) ) { TCLfinal = "N" ; TCLplainfinal = "N" ; } else if ( ( TCLfinal == "P" ) && ( NLconsonant == 5 ) ) { TCLfinal = "M" ; TCLplainfinal = "M" ; }
@@ -737,12 +738,20 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN
737
738
} else {
738
739
ccLength = MsToTick ( oto0 . Preutter ) ;
739
740
}
740
- fcLength = fcLength + ccLength ;
741
741
}
742
742
743
743
var nextAttr = nextNeighbour . Value . phonemeAttributes ? . FirstOrDefault ( attr => attr . index == 0 ) ?? default ;
744
+ if ( ( TCLfinal == "K" || TCLfinal == "T" || TCLfinal == "P" ) && singer . TryGetMappedOto ( CC , nextNeighbour . Value . tone + attr0 . toneShift , attr0 . voiceColor , out var oto4 ) ) {
745
+ if ( oto4 . Overlap < 0 ) {
746
+ fcLength = MsToTick ( oto4 . Preutter - oto4 . Overlap ) ;
747
+ } else {
748
+ fcLength = MsToTick ( oto4 . Preutter ) ;
749
+ }
750
+ }
751
+
744
752
// Minimum is 5 tick, maximum is half of note
745
753
ccLength = Convert . ToInt32 ( Math . Min ( totalDuration / 2 , Math . Max ( 5 , ccLength * ( nextAttr . consonantStretchRatio ?? 1 ) ) ) ) ;
754
+ fcLength = Convert . ToInt32 ( Math . Min ( totalDuration / 1.5 , Math . Max ( 5 , fcLength + ( ccLength * ( nextAttr . consonantStretchRatio ?? 1 ) ) ) ) ) ;
746
755
747
756
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 ) ) {
748
757
CV = oto1 . Alias ;
@@ -777,11 +786,19 @@ public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevN
777
786
} else {
778
787
ccLength = MsToTick ( oto0 . Preutter ) ;
779
788
}
780
- fcLength = fcLength + ccLength ;
781
789
}
782
790
783
791
var nextAttr = nextNeighbour . Value . phonemeAttributes ? . FirstOrDefault ( attr => attr . index == 0 ) ?? default ;
792
+ if ( ( TCLfinal == "K" || TCLfinal == "T" || TCLfinal == "P" ) && singer . TryGetMappedOto ( CC , nextNeighbour . Value . tone + attr0 . toneShift , attr0 . voiceColor , out var oto4 ) ) {
793
+ if ( oto4 . Overlap < 0 ) {
794
+ fcLength = MsToTick ( oto4 . Preutter - oto4 . Overlap ) ;
795
+ } else {
796
+ fcLength = MsToTick ( oto4 . Preutter ) ;
797
+ }
798
+ }
799
+
784
800
// Minimum is 5 tick, maximum is half of note
801
+ fcLength = Convert . ToInt32 ( Math . Min ( totalDuration / 1.5 , Math . Max ( 5 , fcLength + ( ccLength * ( nextAttr . consonantStretchRatio ?? 1 ) ) ) ) ) ;
785
802
ccLength = Convert . ToInt32 ( Math . Min ( totalDuration / 2 , Math . Max ( 5 , ccLength * ( nextAttr . consonantStretchRatio ?? 1 ) ) ) ) ;
786
803
787
804
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 ) ) {
0 commit comments