I want to make a Dorkly animation (
), that is, 8-bit puppets opening and closing their mouths. The difference I want to add is when the mouth is open the puppet get stretched (scaled) in the Y axis and when is closed the puppet returns to its original size. I have managed to get an automatic sync method so the problem now lies with the scale thing.I've assigned a null that responds to the values adopted by the mouth so I ordered it when the mouth is open, stretch the puppet. To do this, I've used the following expression:
x=thisComp.layer("SIDE MOUTH GREEN").effect("LJ - visemes - MSD")("viseme nr.")
if(x==1)[148,199];
else if (x==3) [148,199];
else if (x==7) [148,199];
else if (x==10) [148,199];
else if (x==11) [148,199];
else [148,189];
The problem is as follows. When there are two consecutive sounds that are equivalent to an open mouth (FOR - GO - tten), the puppet doesn't move and that's a pretty dull stuff. What should be said to AF is: if after an open mouth value goes another open mouth value, on the changed value disable the stretching for X time. What'd be the expression that would be needed to achieve that?
I know I could do it manually but I want to broaden my skills.