You have four mono files created during a recording session:


Where "Corinthians_001" refers to the file name and the _1, _2, _3 and _4 refer to the track number.

You wish to join them as two stereo files: 1 and 2 as one stereo file, 3 and 4 as the other.

Here is an example script that will accomplish this task:


tell application "Myriad"
set theDestination to choose folder

begin processing with name "Join Corinthians"

repeat with theNumber from 1 to 3 by 2

set theLeftNumber to theNumber as string
set theRightNumber to theNumber + 1 as string 

set theLeftFile to first item of (every entity whose name is "Corinthians_001_" & theLeftNumber & ".aif")
set theRightFile to first item of (every entity whose name is "Corinthians_001_" & theRightNumber & ".aif")
set theOutputFile to "Corinthians_001_" & theLeftNumber & "+" & theRightNumber

process sources {{|entity|:theLeftFile, ties:{{|input channel|:0, |output channel|:0}}}, {|entity|:theRightFile, ties:{{|input channel|:0, |output channel|:1}}}} with instructions {|channels|:2} to folder theDestination with filename theOutputFile
end repeat

end processing
end tell