Improved timing of bilabial stops ("B", "P")

This commit is contained in:
Daniel Wolf 2016-08-04 22:21:48 +02:00
parent c566ac56cc
commit b62fe8af98
1 changed files with 5 additions and 3 deletions

View File

@ -41,10 +41,12 @@ Timeline<Viseme> animate(optional<Phone> phone, centiseconds duration, centiseco
}; };
auto bilabialStop = [&]() { auto bilabialStop = [&]() {
centiseconds closedDuration = clamp(previousPhoneDuration / 2, 4cs, 16cs); centiseconds maxDuration = 12cs;
centiseconds leftOverlap = clamp(previousPhoneDuration / 2, 4cs, maxDuration);
centiseconds rightOverlap = min(duration, maxDuration - leftOverlap);
return Timeline<Viseme>{ return Timeline<Viseme>{
{ -closedDuration, 0cs, { A } }, { -leftOverlap, rightOverlap, { A } },
{ 0cs, duration, {{ B, C, D, E, F }} } { rightOverlap, duration, {{ B, C, D, E, F }} }
}; };
}; };