Copy link to clipboard
Copied
So this should be the simplest of tasks but it's proving to be a real PITA. I want to have a script that selects EXACTLY 30 seconds from the beginning of a file and then trims it, so I'm left with a 30 second clip (I'm working on a music bingo game)
I opened a file, started to record an action, selected from 0 to 30 seconds, then trimmed. Stopped the action. I closed the file without saving and reopened. Ran the action and it worked perfectly. GREAT. Open another file and run the action and I get a 27 second clip...what? Open another file and run it and I get a 35 second clip....huh?
I look at the action and the selection does not appear to be referencing milliseconds (that'd make too much sense)
I cannot seem to select EXACTLY 30 seconds of the beginning of any file automatically.
what am I missing? Any ideas?
Copy link to clipboard
Copied
Did post a reply but realised that you were asking about AA3 and my reply was for Audition CC. Will have to come back to you when I have some more time to remind myself about AA3 Scripting which is completely different ( and, in fact, far more comprehensive that the new versions). But it is possible.
Copy link to clipboard
Copied
OK I have dug out AA3 and scratched my brains to remember what went on with scripting in AA3. The reason why your 30 sec Trim script works differently on different files is that when you record the script Audition references a scale to the length of that particular file. When you apply your script to a different file with a different duration the scaling factor screws up the calculation. In the changed Selected line below 1322999 is how many samples that there are in 30 secs less 1 for a sample rate of 44100 samples per second.
So hopefully the following few lines changed in your script should make it do what you want.
Selected: 0 to 1322999 scaled 0 SR 44100
Freq: Off
cmd: Trim