Myriad supports the batch processing of audio files with AppleScript. In fact, Myriad was designed with AppleScript in mind, and can send and recieve AppleScripts from and to itself and accomplish the same results as running a workflow!

If you've used AppleScript with Sample Manager, you'll notice that very little is the same. Sample Manager had different AppleScript commands for each possible Action. This was good for compartmentalizing Actions and understanding what gets processed in what order, but it was inefficient and didn't work well with lossy file formats.

Myriad inverts the architecture and has one command for creating new audio files: process. The simple rule is that each process AppleScript command generates one audio file. The process command allows for defining the sources of the audio, how they are combined and/or processed, and the formatting instructions for the file output. Every Action in Myriad simply adds its own instructions to a process command for a single output file to be created - from any number of source files.

The structure of the process command is:

process sources [ ] with instructions [ ] to folder [ ] with filename [ ]

There are also two companion commands that are very important:

  1. begin processing
  2. end processing

Before executing any process commands, begin processing must be called, followed by the process commands, and finally followed by the end processing command, which will start the processes.

The process command has 4 important arguments:

  1. sources: a list of records used as sources for the output
  2. with instructions: this is a record of properties defining the output
  3. to folder: the directory into which the resulting file is placed
  4. with filename: the name of the resulting file (note that this should NOT include the extension)

Here is an example script using all of the arguments:


   tell application "Myriad"
   set theFirstEntity to first entity
   set theSecondEntity to second entity
   begin processing
   process sources {{|entity|:theFirstEntity, |location|:0.5},{|entity|:theSecondEntity, |length|:0.5}}
   with instructions {|gain|:6} to folder "Desktop" with filename "ResultFile"
   end processing
   end tell


This command will create a file called "ResultFile" in the Desktop that is the first 0.5 seconds of the second entity in the files list followed by the entire contents of the first entity in the files list, with 6dB of gain over the whole file.