-
Automating Insertion of External Sound Clips
Hi
Is there a simple script to insert external audio files at specific time points in the compostion?
I have 50 short audio files that last for 5 seconds each. I want to play them with a 5 second gap between each one. So the audio output would look like this:
0-5secs : 01.mp3
5-10secs : <>
10-15secs : 02.mp3
15-20secs : <>
20-25secs : 03.mp3
etcThe filenames are listed in a TXT file, with each filename on a new line.
(This is linked to similar question that I asked last week, but I can’t work out how to amend that script to achieve this requirement: https://forums.creativecow.net/docs/forums/post.php?forumid=227&postid=44792)
Thanks!
Here is the script that Andrei Popa provided for last week's question...var myTextProp = app.project.activeItem.selectedLayers[0]("ADBE Text Properties")("ADBE Text Document");
var myFile = File.openDialog("Select your source file");
if(myFile != null&&myFile.open("r")){
var myString = myFile.read();
myFile.close();
}var arrayOfWords = myString.split('\n');
for(var i = 0; i < arrayOfWords.length;i++){
myTextProp.setValueAtTime(5*i,arrayOfWords[i])
}