A way to assign the soundtrack?

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

A way to assign the soundtrack?

Post by 7feet »

Hey, LM. I've been messing around with audio a good deal lately in Lua, which is a bit of a challenge since I have to right the routines from the ground up, but still kinda entertaining. The one thing I cannot find (I don't think it's there, but correct me if I'm wrong, please) is a way to assign the soundtrack file from within Lua. If it's not there, it would be an absolute godsend if you could throw that in there. There are a lot of the sound options that people seem to ask for a lot that I'd be able (and happy) to implement, like a mixer for various sound files.









hello?
User avatar
Rai López
Posts: 2242
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

I'm intrigated with this... LM!!! Answer to 7feet for he can do all that wonderfull things that he is talking about/above ( :D PLEEEASE :D ).
Last edited by Rai López on Tue Aug 30, 2005 2:52 pm, edited 1 time in total.
prabhat
Posts: 33
Joined: Fri Dec 31, 2004 12:41 pm

Re: A way to assign the soundtrack?

Post by prabhat »

7feet wrote: There are a lot of the sound options that people seem to ask for a lot that I'd be able (and happy) to implement, like a mixer for various sound files.
Hi!
Is there any possibility of inserting a sound file as well as switch ( lip sync) from a particular Key Frame on the time line? Some times you need character to give a particular gesture / expression before saying a dialogue. That means you need few frames before one inserts the sound file or switch layer for lip sync.

Infact, the bone wriggle for sound ( script>>sound>>bone wriggle ) inserts at any key frame other than Frame 0.

Regards

Prabhat MOHANTY
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

I don't know if it will help, but I wrote a script that will let you choose an audio file and make a copy of that audio file which has silence added to the beginning of the file so that the actual sound wont start until the currently selected frame. Then make that new file the soundtrack and you're good. Its pretty simple, seems to be working fine. Only works on uncompressed WAV files, but seems fine for any sample rate, 8 or 16 bit. I should probably throw in 24 bit, I'll get to that. It's over here:

http://www.lostmarble.com/forum/viewtop ... 3&start=15

That was the first reason I wanted to be able to assign the soundtrack, so it would be automated and you wouldn't have to reassign the sountrack by hand. Not a perfect solution but it does do the trick.
User avatar
Lost Marble
Site Admin
Posts: 2347
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

Unfortunately, no, there is no way for a script to add a soundtrack. I'm sure we can add this in the next update.
prabhat
Posts: 33
Joined: Fri Dec 31, 2004 12:41 pm

Post by prabhat »

7feet wrote:the actual sound wont start until the currently selected frame.
Hi,

Thanks for the suggestion. Even though I am yet try your suggested script, the idea seems just fine. Because we need to have flexibility for the number of frames we need to have before starting the dialogue.

Tried to keep expression scene and dialogue scene separately. But it's too cumbersome. Tried copy the last frame of the expression scene as the first frame of the dialgue scene by "save as" option and then deleting all frames but the last frame. ..... But it's another story altogether!!! I have mentioned about this problem elsewhere on the forum.

Thanks for kind suggestion.

Regards

Prabhat MOHANTY
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

Thanks, LM, that would be great. If it wouldn't be too hard, if you could throw in some sorta environment variable that is the path to the current Moho project file (if it's been saved of course) that would be good. And perhaps the Moho installation path. There are some times when I'd like to store peripheral information from a script for later use, and being able to save it with the .moho file or along with the script would make things a little easier. Two examples. One, although I've used the ScriptPrefs functions a lot to store presets and such, every time I'm writing a script and hit <F5> again, their all back to square 1 and having them in a file would be handy. The other is for a cue file for a mixer. Having that file sit with the .moho file would just make sense. Anyway thanks again.

Prabhat - I thought that there was a script around to set every single key on a layer at a particular frame. It wouldn't be that hard to extend it to key everything on every layer. If it were something that might be used a lot, and I can see that as being possible, it would make sense to automate the process, i.e. key everything possible at the frame you want, delete every other keyframe in the project, and move that final keyframe to frame one, all in a shot. If I'd ever got around to writing the generic parse through every layer function I've been meaning to, it should be pretty easy to whip up.
User avatar
Rai López
Posts: 2242
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

Ehmmm... 7feet, 7feet?? Are you beetwen us? (uf... I hope yes :)) It's only for curisity (you know), but have you some/any news about the progress (or not progress :( ) of this Super Audio Moho Script Proyect?? ( Jaja :) , now you'll know that LM feels...) I'm very intrigated/interesed since you post the first message about it long time ago... :roll:

PS: ...THANKS! :D
Post Reply