Re: Spectrum analyzer - mouth movements

Jean-Michel Trivi <[email protected]>
Newsgroups gmane.comp.lib.openal
Message-ID <[email protected]>
If you want to animate mouth movements based on your waveform, you can't use
a single sample value to decide by how much the mouth is open.
Let's say you animate the mouth at 60fps, then you need to compute the
energy of the last 16ms (1000/60) of audio (around your iOffset) to
compute iMouthOpen.

On Sat, Oct 16, 2010 at 12:34 AM, Nameless <[email protected]> wrote:

>
> Hi,
>
> I came to a problem, which I can't resolve by myself, that's why I'm asking
> here. I need mouth movements( byte 0 - 255 (255 - opened mouth, 0 - closed)
> which should be controlled by current spectrum / cur. frequency of actual
> byte/sample offset. For now, I've done this:
>
> alGetSourcei(m_pActiveSamples[i]->Source, AL_BYTE_OFFSET, &iOffset);
> ErrorCheck();
>
> if(m_pActiveSamples[i]->pCache->nBitRes == 8)
>        iMouthOpen = *(m_pActiveSamples[i]->pCache->pSampleData + iOffset);
> else
>        iMouthOpen = *(m_pActiveSamples[i]->pCache->pSampleData + iOffset *
> 2);
>
> pSample data is data chunk from wave file. But mouth movements are weird
> and
> I don't know how to "clean" them. So I'm asking if somebody knows how to
> resolve this.
>
> Thanks,
> Richard Rohac.
> --
> View this message in context:
> http://old.nabble.com/Spectrum-analyzer---mouth-movements-tp29977404p29977404.html
> Sent from the OpenAL - User mailing list archive at Nabble.com.
>
> _______________________________________________
> Openal mailing list
> [email protected]
> http://opensource.creative.com/mailman/listinfo/openal
>

_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.