Subject:is it possible...?
Posted by: peahicks
Date:8/17/2010 2:14:33 PM
hi, i have a large number of wav files of slightly varying lengths, all of which i want to vari-speed to exactly 2 seconds (sample accurate). is there a way to write a sound forge script to batch process all these files? basically it would need to look at the length of each file, calculate the proper vari-speed ratio, and then process the file. doing this by hand is long and laborious, as i have hundreds of files to process. thanks for any help! |
Subject:RE: is it possible...?
Reply by: roblesinge
Date:8/17/2010 2:23:31 PM
I would think you could do this with the Batch Converter tool. Are you using "Time Stretch" to accomplish this, or some other plug-in? Just set up a preset to stretch to "Final Time" of 00:00:02.000. Then load up your files and fire away. Am I missing something? --Rob. |
Subject:RE: is it possible...?
Reply by: peahicks
Date:8/20/2010 3:29:22 PM
yes, i don't want to time-stretch, but use the pitch change tool, to vari-speed (ie analog tape style, with pitch/tempo change and all, no "pitch shifting" or "time compression") the files. the sound forge pitch change tool doesn't allow you to enter a desired target duration- it only displays it. in order to get to a specific duration, you have to enter in a pitch change in half-steps and cents, watching the final duration change as you do. normally i just calculate the ratio between the sample length of my file and the desired ending sample length, and adjust the half steps and cents controls to get the ratio display as close as possible. but i'd like to be able to program the computer to do all this work for me. |
Subject:RE: is it possible...?
Reply by: ExSonyTJ
Date:8/21/2010 12:09:12 PM
If you want to change the length and pitch at the same time, then you can use resample, and then set the file's sample rate back to what it was. Forge 9 has a DoResample method on the ISfFileHost object that can change the length/pitch, and it can also be used to set the rate. So you end up calling this method twice. first with fSetRateOnly of false, and a calculated sample rate, then again with the original sample rate and fSetRateOnly of true. |