Suggestions

Post Reply
Vig
Posts: 3
Joined: Tue Aug 07, 2007 12:42 pm

Suggestions

Post by Vig »

SoundTrax is a great tool and I want to thank you guys for making it and for making the help doc that includes all kinds of wonderful maxscript help, kudos to you guys its been a life saver!

I have a few suggestions that would help us use SoundTrax to it's fullest potential. I'm in the process of writing most of these suggestions into scripts but started thinking it might be nice to have them included in soundtrax for other people to use.

- *Add a frame buffer between tracks when using the sequence option. It would be great if the user could choose how many frames are added between tracks. It would be icing on the cake if it placed the next track on the start on the next 10's slot.
Example: Track1 starts on 0 and is 14 frames long, so track2 would start on 20.

- *If there was an option to round up or down to the nearest whole frame. Many sound clips end on a fraction of the frame. Creating a maxscript that converts soundtrax.filelength() to an integer (and in some cases dividing it by a number like /320 for 15fps) works fine, but not everyone is willing or knows how to code their own rounder.

- Set active time segment to the selected tracks frame range. HUGE time saver when working with lots of audio clips and doing lipsync for each track.

- *Reset all track frames to original file lengths and set the start frames to 0. Again a script can be written for this by the user but its not as intuitive as having a button.

I'm pretty new to maxscript but if you want a copy of the .ms files I have astrisked above I would be more than happy to supply them to you. But something tells me if you can code up this wonderful tool you won't need me crappy code =P

Vig AKA MarkD.
www.vigville.com
Lead Character Animator
Her Interactive
boomer
Site Admin
Posts: 272
Joined: Fri Aug 11, 2006 9:03 pm

Post by boomer »

Vig,

Thanks for your suggestions.

I'm curious, why do you need the first feature? Is there something specific about your workflow that needs a specific gap betwen audio files? The reason I ask is that usually, our users are adjusting the timing of multiple audio events to suit the animation. I'm surprised that there would be demand for something that spaced them out evenly.

Thanks for the scripting offer. As it would probably be a while before this functionality was embedded into Sound Trax, it would be great if you could post your scripts (I can host if need be) for others to use as well.

Cheers,

Matt
Vig
Posts: 3
Joined: Tue Aug 07, 2007 12:42 pm

SoundTraxBuffTrack V0.25

Post by Vig »

Matt,
I mostly use SoundTrax to load and line up a bunch of conversation tracks. The game engine we use needs a gap between tracks, normally 5 tracks. For us the sequence feature is useless since it piggy backs each track and to get around typing in each start and end frame for all the tracks, I wrote the script.

SoundTraxBuffTrack V0.25 (supports up to 40 tracks)
http://www.vigville.com/forum_images/So ... _V0.25.zip
Install notes:
- Main Menu > MaxScript > New Script
- Copy and paste the code below, save it where ever you put your scripts
- Before you close the script select all the text and drag it into an empty tool bar. This will give you a button. If you need to change the frame buffer you can right click the button and choose edit script.
Below is a sample of the script of tracks 1-3 the script linked above supports 40 tracks and can be modified to include all 100 if you feel like tediously editing text. I have no need for anything above 40 at this time, so it stops there.

Code: Select all

--*********************************************************************
-- SoundTraxBuffTracks V 0.25
-- Script written by Mark Dygert, 
-- Lead Character Artist, 
-- Her Interactive 8-16-07
--	This Script will sequence each track and allow you to pad frames between each track
-- 	This script requires SoundTrax from www.Boomerlabs.com
--*********************************************************************

--#####################################################################
frmbuff = 5 --Change this number to adjust the frame buffer between tracks.
--#####################################################################
soundtrax.setactiveplayback
--StxTrack 1
t1name = getfilenamefile (soundtrax.name(1)) --Gathers sound file name
t1leg = soundtrax.filelength(1)as integer/320 --Gathers track length
--Resets the track to frame 0
t1f = soundtrax.filelength(1)as integer/320
soundtrax.setstart 1 0 
soundtrax.setend 1 (t1f)
t1startf = soundtrax.start(1)as integer/320 --Regathers the new start frame
t1endf = soundtrax.end(1) as integer/320 --Regathers the new end frame
StxTrack1 = #(t1name, t1leg, t1startf, t1endf) --Track array to be used later.

--StxTrack 2
t2name = getfilenamefile (soundtrax.name(2)) --Gathers sound file name
t2leg = soundtrax.filelength(2)as integer/320 --Gathers track length
--Resets the track to frame 0
t2f = soundtrax.filelength(2)as integer/320
soundtrax.setstart 2 0 
soundtrax.setend 2 (t2f)
-- Shift track 5 frames after previous track
soundtrax.shift 2 (StxTrack1[4] + frmbuff)
t2startf = soundtrax.start(2)as integer/320 --Regathers the new start frame
t2endf = soundtrax.end(2) as integer/320 --Regathers the new end frame
StxTrack2 = #(t2name, t2leg, t2startf, t2endf) --Track array to be used later.

--StxTrack 3
t3name = getfilenamefile (soundtrax.name(3)) --Gathers sound file name
t3leg = soundtrax.filelength(3)as integer/320 --Gathers track length
--Resets the track to frame 0
t3f = soundtrax.filelength(3)as integer/320
soundtrax.setstart 3 0 
soundtrax.setend 3 (t3f)
-- Shift track 5 frames after previous track
soundtrax.shift 3 (StxTrack2[4] + frmbuff)
t3startf = soundtrax.start(3)as integer/320 --Regathers the new start frame
t3endf = soundtrax.end(3) as integer/320 --Regathers the new end frame
StxTrack3 = #(t3name, t3leg, t3startf, t3endf) --Track array to be used later.
Modify one number (frmbuff) at the top of the script if you need to change the # of frames between tracks. The script also creates an array for each track which may not be necessary for most people but I use those arrays to create a batch render file later, so the code may look a little convoluted.

I'm not sure if some kind of loop could be made that sequences each track and spits out the arrays I need. I'm new to maxscript so if I find a better way of handling it, I will post it later. Either way it does what I need it to do =)
Vig
Posts: 3
Joined: Tue Aug 07, 2007 12:42 pm

Lip Sync Helper v0.33

Post by Vig »

Looking back over the script, it was hidieous, but I have learned much since I first started writing it which lead me to this incarnation. Much thanks to Christoph Kubisch. I never would have been able to fully realize this tool without his nudges toward the proper way of doing things =)


Image
Final Script is HERE

Changes:
Added a UI -- OooOo pretty...
Created a proper sequencer -- That will allow for a user specified frame buffer. Leave it blank to set the tracks back to back.
Reset all -- Sets all of the sound tracks to start at frame zero
Seq Tracks -- sets each track to start where the other left off. If you want the tracks to be padded by a few frames put that number in the empty box and hit "Seq Tracks".
Active Time Tool -- This lists the tracks by name, clicking on a track will set the active time segment to the length of the track. Handy when working on one track at a time and many tracks make it impossible to work effectively in track view.
Set Active To All -- Sets the active time segment to show all tracks
Create/Update Batch -- This takes info from the tracks such as track name, start/end frame and file path, then creates a batch render file. Note: The path is gathered from the sound file path and then changed to a folder called "head". This is specific to my work flow if you would like it to go somewhere else you can edit the script. The lines containing the path are easy to find if you search for "head".
Launch SoundTrax -- launches SoundTrax

So there ya go, some well thought out code, a UI and a few features I hadn't yet talked about =P
boomer
Site Admin
Posts: 272
Joined: Fri Aug 11, 2006 9:03 pm

Post by boomer »

Vig,

Well done! Thank you for posting for the use of the Sound Trax user community!

Cheers,
Mathew Kaustinen
Boomer Labs
Post Reply