From b62fe8af98af34828d9588a949970afffc9c3a1a Mon Sep 17 00:00:00 2001 From: Daniel Wolf Date: Thu, 4 Aug 2016 22:21:48 +0200 Subject: [PATCH] Improved timing of bilabial stops ("B", "P") --- src/mouthAnimation.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mouthAnimation.cpp b/src/mouthAnimation.cpp index 67c756b..eb8c541 100644 --- a/src/mouthAnimation.cpp +++ b/src/mouthAnimation.cpp @@ -41,10 +41,12 @@ Timeline animate(optional phone, centiseconds duration, centiseco }; 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{ - { -closedDuration, 0cs, { A } }, - { 0cs, duration, {{ B, C, D, E, F }} } + { -leftOverlap, rightOverlap, { A } }, + { rightOverlap, duration, {{ B, C, D, E, F }} } }; };