A simple and inexpensive mass and spring model that can serve as lips, among other things. The harmonic oscillator models a mass attached to a spring of a given stiffness, fixed at one end. The frequency of resonance of the object is given by the formula 1/(2 pi) sqrt(stiffness / mass).
A 'harmonic-oscillator can be created using the following Lisp syntax (the default values are shown for each of the physical parameters):
(make-object 'harmonic-oscillator
(mass .01)
(stiffness 15000)
(freq-loss 100)
(const-loss 10))
All physical parameters can be numerical values or controllers.
As usual, the freq-loss and const-loss parameters control the rate of decay of the sound. The higher they are, the more damped the sound is.
The 'harmonic-oscillator can be accessed in only one direction: 'normal:
(make-access my-harmonic-oscillator my-controller 'normal)
A harmonic-oscillator can be tuned to a specific pitch, using the (set-pitch ... ) function, by adjusting one of the following physical parameters:
For example:
(setq my-lips (make-object 'harmonic-oscillator
(mass 5e-3)
(stiffness 10)
(freq-loss 10)
(const-loss 1) ))
(set-pitch my-lips 'stiffness 220)