LOF Files

From Audacity Manual

Jump to: navigation, search

A LOF file is a plain text file ending with the extension ".lof" that contains a list of audio files to import into an Audacity project window. It can optionally contain commands to create new project windows.

Syntax

There are only two commands "file" and "window", each with associated options:

  • file: (required) specifies the full path to the file which then imports as a new track in the current window (the path must always be in double quotes)
    • offset: an optional parameter to the file command, specifying the start time of the audio file in seconds
  • window: (optional) creates a new Audacity project window for a subsequent file in the list (the first file always creates a new window unless the existing project is empty)
    • offset: an optional parameter to the window command, specifying the left-most time displayed in the window
    • duration: an optional parameter to the window command, specifying how much time should be displayed in the window
  • #: (optional) can be used anywhere on a line to precede a comment - everything after # on that line is ignored by the importer.

Tips:

  • Each command must be placed on a separate line.
  • If the file to be imported is in the same folder as the LOF file, you need only give the file name inside double quotes.

Example

Given an empty project window, the following LOF file located at C:\Desktop imports the audio file "sample1.wav" from the Desktop into that window, followed by "sample2.wav" and "sample3.wav" from other locations underneath. Then a new project window is created and the audio file "sample4.wav" from the Desktop is imported into it.

# everything following the hash character is ignored
window # an initial window command is implicit and optional
file "sample1.wav"                   # sample1.wav is displayed
file "C:\Ken\sample2.wav" offset 5   # sample2.wav is displayed with a 5s offset
file "C:\Dave\sample3.wav"           # sample3.wav is displayed with no offset
window offset 5 duration 10          # open a new window, then zoom to display
# 10 seconds of sample4.wav from 5 seconds to 15 seconds, offsetting it by 2.5 seconds
file "sample4.wav" offset 2.5

The file names shown are for a Windows system, but the same syntax applies on Macintosh and Linux with the obvious change to a suitable file path.

Views
Help Location