voice
The noises a cat makes, computed in Luau. No service call and no network: an envelope over a formant-shaped harmonic stack, so it bakes headless, in a browser, and on a machine with no credit on it.
game.cats.voice
The noises a cat makes, computed in Luau. No service call and no network: an envelope over a formant-shaped harmonic stack, so it bakes headless, in a browser, and on a machine with no credit on it.
local Voice = require("game.cats.voice")
Voice.bake() -- authoring time: writes game/cats/sfx/*.soundClip
local clips = Voice.clips()
local v = Voice.attach(rig.root, breed, clips)
Voice.meow(v, clips, breed)
Voice.chirp(v, clips, breed)
Voice.step(v, clips, false, 0.26)
Voice.purrLevel(v, 0.3)
A meow is a mee-ow because its two formants move: F1 opens from 420 Hz to 900 and closes to 380 while F2 falls from 2100 to 850. The same harmonic stack with the formants held still is a kazoo.
Each cat carries three spatial sources — its voice, a purr held ready to fade in, and paws — so a footfall never cuts a meow short.
The purrs are codec = "pcm" and every partial in them completes a whole
number of cycles across the buffer, so they loop end to end with no click and
need no loop point. One-shots are Opus.
Scoped to this part · feeds back into the world's score.