Get ya Lipsync! Get ya red hot Lipsync! (UPDATED)
Moderators: Víctor Paredes, Belgarath, slowtiger
I have 3 main references. First, he Lua Reference Manual. Second, I downloaded all the pages of the Programming in Lua book that's on the Lua.org site, and compiled it into a searchable e-book. I also did the same for the Moho Scripting Reference.
The Scripting reference has all of the API in there, but it could use a little bit more documentation. I have generally fished around in the existing scripts looking for examples of how the code is used, but there are a few that aren't used in any pre-existing scripts so I just have to wing it. I write the code in TextPad (there's a pretty good syntax file in this section of the forum somewhere, it was pretty early so look towards the end if you want it). I keep that and a copy of Moho open. Save the script into the appropriate Moho>Scripts folder, jump to Moho anf hit <F5> that reloads all of the scripts. When you do the reload, Lua compiles the scripts into an intermediate bytecode, so you'll see pretty quick if you've made any gross syntax errors. Try out the script, find all the dumb things I did, and repeat the cycle until it works. Except for the "why the hell did that happen?" part, it's a relatively painless developement cycle. Some improper API calls can crash Moho, I've done it plenty. Also, I find I have to put in a lot of code for error checking of values. Any variable in Lua can hold any data type, and it can change on the fly. But a lot of the Lua functions are pretty picky about what you send then, so you have to watch out for things like doing math where a value might be "nil", etc. Had a lot of that as I was figuring out how to parse through the audio file on this one.
Give it a shot, Lua's pretty straight forward and flexible.
The Scripting reference has all of the API in there, but it could use a little bit more documentation. I have generally fished around in the existing scripts looking for examples of how the code is used, but there are a few that aren't used in any pre-existing scripts so I just have to wing it. I write the code in TextPad (there's a pretty good syntax file in this section of the forum somewhere, it was pretty early so look towards the end if you want it). I keep that and a copy of Moho open. Save the script into the appropriate Moho>Scripts folder, jump to Moho anf hit <F5> that reloads all of the scripts. When you do the reload, Lua compiles the scripts into an intermediate bytecode, so you'll see pretty quick if you've made any gross syntax errors. Try out the script, find all the dumb things I did, and repeat the cycle until it works. Except for the "why the hell did that happen?" part, it's a relatively painless developement cycle. Some improper API calls can crash Moho, I've done it plenty. Also, I find I have to put in a lot of code for error checking of values. Any variable in Lua can hold any data type, and it can change on the fly. But a lot of the Lua functions are pretty picky about what you send then, so you have to watch out for things like doing math where a value might be "nil", etc. Had a lot of that as I was figuring out how to parse through the audio file on this one.
Give it a shot, Lua's pretty straight forward and flexible.
Thanks for the tips
Thanks for the tips. Love the Textpad. I'm using it right now for some HTML I'm writing.
Any chance you could post your searchable e-book?
Any chance you could post your searchable e-book?
Don't think it should be any problem for the Scripting reference, LM was fine with bupaje's version of the Moho manual. I'll check on that with him. The Programming in Lua I don't think I would want to post, but I'd be happy to email you a copy. I've also made some tweaks to the Textpad syntax file for completeness, I'll put that up when I get a chance.
Thx... grimble67@hotmail.com.
Seems like a rather old topic... Does this script not work anymore? I installed it and the required LISET program... Liset claims not to work due to MS AGENT not being installed (which comes with modern versions of windows)... I did however install MS agent anyway, still LISET claims that it still needs AGENT to be installed... So guess its back to Papagayo then.
I'm going to guess you're using Vista, right? (That piece of cr... Um, different type of OS).
It works fine for me here on XP. Indeed, I'm really happy you brought this up, as this looks *very* promising (much better than using Papagayo). I don't think I can hang up PG just yet (for one thing, this didn't work on one file I tried although it worked perfectly on a couple of others. And I suspect singing will be a real no-go) but you may have just saved my marriage (my wife has been doing the lip sync for our weekly series and she's about to kill whoever wrote PG. Then it will be me :>)
Why did this topic ever die? This should be required reading for anyone doing lip sync.
It works fine for me here on XP. Indeed, I'm really happy you brought this up, as this looks *very* promising (much better than using Papagayo). I don't think I can hang up PG just yet (for one thing, this didn't work on one file I tried although it worked perfectly on a couple of others. And I suspect singing will be a real no-go) but you may have just saved my marriage (my wife has been doing the lip sync for our weekly series and she's about to kill whoever wrote PG. Then it will be me :>)
Why did this topic ever die? This should be required reading for anyone doing lip sync.
Try setting the compatibility mode in the prog's properties panel.
I have old progs that absolutely refuse to work even with compatibility set to windows95, in XP but in vista this works much MUCH better.
For example I can use my old copy of painter3d in vista( -it's almost as good as bodypaint btw ) and does a better3d preview which I can paint directly on, than maya 2009. But it will not work at all without switching compatibility.
I think the lip synch add ons are a waste of time though, it is actually quicker and more fun doing that task directly in AS, I actually raced someone doing this task ,manual method 1- papapoopoo 0.
I have old progs that absolutely refuse to work even with compatibility set to windows95, in XP but in vista this works much MUCH better.
For example I can use my old copy of painter3d in vista( -it's almost as good as bodypaint btw ) and does a better3d preview which I can paint directly on, than maya 2009. But it will not work at all without switching compatibility.
I think the lip synch add ons are a waste of time though, it is actually quicker and more fun doing that task directly in AS, I actually raced someone doing this task ,manual method 1- papapoopoo 0.
- Víctor Paredes
- Site Admin
- Posts: 5814
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact:
I think you are crazychucky wrote:I think the lip synch add ons are a waste of time though, it is actually quicker and more fun doing that task directly in AS, I actually raced someone doing this task ,manual method 1- papapoopoo 0.

thanks 7feet! (wherever you be), this script works great.
and thanks d-soldier for put this thread up.
but I have a question for scripters, could it be implemented for actions? (as ramon's and vern's scripts).
You're right, Selgin, but perhaps Chucky doesn't have to do any heavy lip sync (he should try doing a half hour weekly show with dozens of characters and I suspect at the end the score would be Papagayo 48, Manual -10 :>).
This isn't going to be heaven for us because it will still involve a lot of up front prep work (like separating out characters from the sound file) but if it even works half of the time I think it will save a lot of effort. In any case, it's fun to play around with.
I don't know why this approach couldn't work for any sort of lip sync, Selgin. All that MS program is doing is generating the phoneme map, and the script just translates that.
This isn't going to be heaven for us because it will still involve a lot of up front prep work (like separating out characters from the sound file) but if it even works half of the time I think it will save a lot of effort. In any case, it's fun to play around with.
I don't know why this approach couldn't work for any sort of lip sync, Selgin. All that MS program is doing is generating the phoneme map, and the script just translates that.
Hi guys, in the papagaga stakes, I'll illustrate the situation further.
Another animator used papakaka on the same scene as I , we both settled into the blocks and started on go.
The manual method finished first with no noticeable errors.
Papamayo eventually crossed the line- but it wasn't even in synch and the character's speech looked straight from a low rent spaghetti western.
I'm glad that anyone can get results (I do get that massive dialogue amounts could be boring)- but one animator calling another crazy?- That's a pot and kettle situation if I ever heard one.
I prefer term "bananas"
Another animator used papakaka on the same scene as I , we both settled into the blocks and started on go.
The manual method finished first with no noticeable errors.
Papamayo eventually crossed the line- but it wasn't even in synch and the character's speech looked straight from a low rent spaghetti western.
I'm glad that anyone can get results (I do get that massive dialogue amounts could be boring)- but one animator calling another crazy?- That's a pot and kettle situation if I ever heard one.
I prefer term "bananas"

Just before I got my new laptop, I went through all the classic stages of grief--anger, denial, bargaining--trying to find a way to hack XP onto it but it was impossible.mkelley wrote:I'm going to guess you're using Vista, right? (That piece of cr... Um, different type of OS).
I am about to say something I thought I would NEVER say: on the right machine, Vista is great.
- Víctor Paredes
- Site Admin
- Posts: 5814
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact:
you are right, I forgot I'm an animator too, sorrychucky wrote:I'm glad that anyone can get results (I do get that massive dialogue amounts could be boring)- but one animator calling another crazy?- That's a pot and kettle situation if I ever heard one.
I prefer term "bananas"

anyway, papagayo works fine with me, I have not noticed any big problem using it. I recommend you to take a second look, if you want. It's better to have Papagayo as a friend, maybe someday you will need his talking beak.
- synthsin75
- Posts: 10253
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
After all this time, that's the first I've ever heard anyone say that.I am about to say something I thought I would NEVER say: on the right machine, Vista is great.

-------------------------------------------------
Myna is much faster than Papagayo, but that's only when it works. Most of my (non-studio quality) sound files aren't working. If I ever really start using this, I'll have to straighten out those endless dialog pop-ups.
Except for the icky task manager permissions screens and such, I much prefer Vista, it actually works much better.... that's why IT types tell you to stick with XP.
A/ They need the work so dodgy XP is better for them, how can they fix your network issues if the network can self diagnose and repair?.
B/ They haven't bothered learning Vista yet so they are lost anyway.
Don't believe the meme, it's just a myth .
A/ They need the work so dodgy XP is better for them, how can they fix your network issues if the network can self diagnose and repair?.
B/ They haven't bothered learning Vista yet so they are lost anyway.
Don't believe the meme, it's just a myth .