Lip sync¶
mouth() matches a character’s mouth to speech, using the shapes from
Rhubarb Lip Sync.
Using mouth shapes in expressions¶
mouth() uses the master mix at the current time. mouth([1]) uses audio
track 1. mouth([0, 2]) uses those tracks.
The result is one of these shapes:
A through F are the basic shapes. G, H, and X are extended
shapes that can improve animation when the character artwork supports them.
Expressions can branch on the result:
let shape = mouth()
if shape == "A" {
return 0
} else if shape == "B" {
return 1
}
2
While a preview is still analyzing, mouth() reports that it is loading.
Export waits until analysis finishes.
The mouth-shape images are from the Rhubarb Lip Sync README and are used under its MIT License.