Hey all, I'm working on a project (for my German presentation) that has a man who lip syncs the voice over. My problem is that the time it takes to switch between the 9 costumes (the standard mouth positions) is different in fullscreen than in standard mode, and this means he's not in sync in one or the other... any suggestions?
Offline
Cut the voice over into shorter segments (multiple files) and have each one trigger the next animation part when it starts. Won't be perfect but will be better. I think Scratch has serious issues with audio timing btw.
Offline
Like Locomule said, different computers will run the animation at different speeds. It won't always take exactly 2 minutes to get through the costumes, with waits, and can vary to about 1:30 to 2:30 depending on the computer. Lag plays a big role in Scratch!
Offline
I seem to remember that JtxT had a way round it, involving the timer... I think he said that the timer runs the same everywhere... I'll find his post
EDIT: Here it is:
JTxt wrote:
The problem is the wait blocks.
I'll show a better way below.
The "wait until" blocks do just that, wait for so many seconds...
However, the actions you put between wait blocks take time... even if just a tiny bit of time.
These actions (move, change costume, effects..) work faster or slower depending on the speed of the computer and if it's online or in scratch...
How we usually write this:
[blocks]
<play sound[ talking
<switch to costume[ closed mouth (this may take a little more time online)
<wait( 2 )secsc>
<switch to costume[ open mouth (just a little time)
<wait( .5 )secsc>
<switch to costume[ closed mouth (but it's adding up)
<wait( 5 )secsc>
<switch to costume[ open mouth (and the action starts to get out of sync with the sound.)
<wait( .5 )secsc>
<switch to costume[ closed mouth
After a bunch of this, it's going to get out of sync. Each action takes time, so the total time is going up... and becomes more noticeable as time goes by.
--------------------------------
So instead of using wait blocks, consider using the timer. <timer>
The timer always counts the same rate. it's a number that goes up by the second. and it's the same in scratch as it is online...
Here's how you would do the above with the timer.
<reset timer> (this makes the timer block start at 0)
<play sound[ talking
<switch to costume[ closed mouth
<wait until> <( <timer> <>> 2 )>
<switch to costume[ open mouth
<wait until> <( <timer> <>> 2.5 )>
<switch to costume[ closed mouth
<wait until> <( <timer> <>> 7.5 )>
<switch to costume[ open mouth
<wait until> <( <timer> <>> 8 )>
<switch to costume[ closed mouth (this happens at 8 seconds into the audio)
[/blocks]
This way, the actions will always happen exactly at the second you tell it to, no mater if you're online or off, or the computer is fast or slow.
So that's the solution, use the timer instead of wait blocks if you want to keep a ton of actions in sync.
(otherwise, I think the solution for the scratch team would be to make actions take no time at all: make the wait blocks compensate and treat actions between waits, as if they took no time at all.)
Offline