1
Support / how to synch wav audio and 3D animation?
« on: April 10, 2010, 02:20:54 pm »
Hi all.
This is really a 'any ideas?' sort of post .....
What's the best approach would be for synching an audio track to an animatio? A use case here would be lip synching an avatar to dialog.
The audio is WAV format, being played with Paul's SoundSystemJPCT, and the game loop and timing is derived from from the Slick2D libraries, and uses LWJGL's Sys class to generate deltas as milliseconds. It all works OK, but various latencies and system loads mean the audio and animation can get out of synch very easily.
If it helps, I'm using Acid Pro 7 to sequence and create the audio.
My thoughts at the moment are to create time markers, then
or to do the audio as MIDI, which would entail
Does anyone have an other ideas?
On a slightly different topic, anyone interested in using a Wiimote for game input? If there's interest I'll post my sample code and details of setting it all up.
--Tim.
This is really a 'any ideas?' sort of post .....
What's the best approach would be for synching an audio track to an animatio? A use case here would be lip synching an avatar to dialog.
The audio is WAV format, being played with Paul's SoundSystemJPCT, and the game loop and timing is derived from from the Slick2D libraries, and uses LWJGL's Sys class to generate deltas as milliseconds. It all works OK, but various latencies and system loads mean the audio and animation can get out of synch very easily.
If it helps, I'm using Acid Pro 7 to sequence and create the audio.
My thoughts at the moment are to create time markers, then
- at runtime calculate the number of bytes to be played until the next marker,
- count bytes
- call a listener method
or to do the audio as MIDI, which would entail
- implement a custom MIDI sequencer
- intercept 'Wire' protocol data
- call listeners for 'note on' and 'note off' messages
Does anyone have an other ideas?
On a slightly different topic, anyone interested in using a Wiimote for game input? If there's interest I'll post my sample code and details of setting it all up.
--Tim.