This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-07-04 08:28:01

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

lip sync problems

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?


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#2 2010-07-04 11:13:02

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: lip sync problems

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.


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

#3 2010-07-04 15:12:55

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: lip sync problems

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

 

#4 2010-07-04 15:15:36

Wolfie1996
Retired Community Moderator
Registered: 2009-07-08
Posts: 1000+

Re: lip sync problems

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  smile

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.)


"...Jargon - the practice of never calling a spade a spade, when you might instead call it a manual earth-restructing implement..." - Bill Bryson, Mother Tongue

Offline

 

Board footer