Importing Audio

From Audacity Development Manual
Revision as of 12:54, 10 July 2011 by PeterSampson (talk | contribs) (Using the Format drop-down menu in the Open and Import Audio Dialogs)
Jump to: navigation, search
Bill07Jun11: ToDo-2 Review and approve this page for 2.0
  • Peter 7Jul11: Reviewed and made some minor changes for readability and clarity. For me the page is over-long and I would personally either remove the section titled "Using the Format drop-down menu ..." or severely precis it to a brief sentence or two. Users should be familiar with this UI from most other applications they use.
  • Gale 10Jul11: I've alluded to this in the editornote at the bottom and suggested how it could possibly be pruned. The point of the section though is not to educate about file opening windows generally, but about the effect of choosing a particular filter on the importer that will be used.

Audio File Formats Supported by Audacity

The "native" audio formats (importable by Audacity as shipped) are:

Gale: MP2 imports failing unrecognised is fixed now.

  • Steve wrote: Not sure how to work this in, but when importing, Audacity treats FLAC files like uncompressed audio. If "import faster" is selected, FLAC files are not copied and are dependencies.
  • Gale: Looks like a bug here. On Windows, FLAC files come in with libflac, copied in. On Linux they come in with libsndfile, so trigger the Importing Uncompressed Audio Files warning. Bill, can you initialise and say what happens on Mac?
  • Bill: On Mac with initialized cfg libflac is used, copied in.
    But FLAC is a compressed format, so the "when importing uncompresed files" header is misleading if FLAC files can be read-directly?
    • Gale: no answer made when I enquired on -devel.

The optional FFmpeg library may be installed to enable import from a much larger range of audio formats (as long as the files are not protected to work only in particular software). FFmpeg will also import audio from most video files that are not DRM protected.

Audacity also supports importing Audacity's AU data files. This format should not be confused with Sun Microsystems AU files, which are usually u-law encoded PCM files but may be headerless.

Old PCM file types such as SND and AU files are normally supported provided they contain correctly formatted header information. If they do not have header information (headerless) or have non-standard header information, it may still be possible to import them as Raw Data.

Raw Data formats such as headerless AU files and Dialogic ADPCM (VOX) have no header information and must be imported using File > Import > Raw Data....

Four Ways to Import Audio

No matter which method you use to select an audio file, the file is always imported into an Audacity project. Each imported audio file appears in the Audacity project in its own track.

1. File > Open

This command will behave differently in the following situations:
  • With no Audacity project window open, or an Audacity project window open containing (or that has ever contained) at least one track:
    If you select the File > Open command, then choose one or more audio files (as opposed to an Audacity project file), Audacity will, for each file chosen, open a new project window then import one of the selected audio files into that new project. Thus if you choose, for example, three audio files, Audacity will create three new project windows with each audio file imported into its own project.
  • With a clean, empty Audacity project window open (one with no tracks in it and that has never contained any tracks):
    If you select the File > Open command, then choose one or more audio files, Audacity will import the first file into the empty project window, and import subsequent files into new project windows.
Note that you are not actually "opening" the audio file. You are "importing" it into an Audacity project. See Audacity Projects for details of the difference between audio files and Audacity projects.

Gale:As someone who understands the distinction in the first place, the above note div just confuses me. Better to attack this further up the article IMO, explaining that any of the four actions that bring audio into the project window are regarded as "importing". The point of importing in the sense of the menu item of that name is that it always brings audio into the same project.
Bill: The issue I was trying to address is users who "open" a WAV file and then wonder why they can't "save" it. I've tried it both ways for comparison. What do others think?
Peter 26Apr11: seems perfectly clear (and necessary) to me. But note that the need for this will go away if James' recent proposal incorporating the restriction of "Open" to operate only on projects and not audio files is implemented. See Menu Reorganization in the Wiki.


2. File > Recent Files (Open Recent on Mac)

This command behaves identically to File > Open.


3. File > Import > Audio

If you select the File > Import > Audio command, then choose one or more audio files, Audacity will import the selected file(s) into the existing project. This is the way to get several audio files into one project.
Tip: if you want to bring the content of one or more audio files into a project that already contains audio (for example, to mix several audio files together), use the File > Import > Audio command.


4. Drag and drop

On Windows and on Macintosh:
  • Drag and drop one or more audio files onto the Audacity icon: this is equivalent to File > Open.
  • Drag and drop one or more audio files into an open Audacity project window: this is equivalent to File > Import > Audio.

On Linux:
  • Drag and drop one or more audio files onto the Audacity icon: only the first file will open. More than one file dragged and dropped onto the icon will do the same as the File > Open command for the first file, but the other files will generate an error message saying that Audacity is already running.
  • Drag and drop files into an open Audacity Project window: this is equivalent to File > Import > Audio.
In all cases each imported audio file will appear in a new track in the Audacity project window.

Importing Uncompressed Audio Files

The two most common uncompressed file types you will encounter are WAV and AIF.

Peter 16Apr11: I would place the "safer" option as point 1 especially since it is now the default post 1.3.13. It's not strictly true that for the "faster" setting that "long files can be imported in ony a few seconds" as you say. It can take quite a time to get the full waveform graphic drawn - and technically you are not actually "importing" the audio, just linking to it. What you can do is start editing on the file quicker (before the full waveform is drawn) when using "faster".
Bill 16Apr11: Yes, I'm aware of those points, which were raised in a recent thread on one of the lists. The text is copied from the File menu page. Note that while the waveform is being calculated the message "Import Complete - calculating waveform" appears in the status area. I don't want to contradict what the UI says!
Steve 16Apr11: Personally I prefer "faster" as point 1. The great value of the faster option for me is that I can immediately start work. If a user has got as far as reading this page of the manual, they should be able to take full advantage of this feature safely. It's a good feature and deserves promoting. I think it also makes more sense to talk about "copying in" audio files after talking about linking to external files.

  • Gale: Yes, unfortunately, the status bar when OD importing says imports are "complete" at the point the waveform drawing starts. I said that was a contradictory use of "import" at the time... But I would say (again), let's stick to the item ordering in the Audacity buttons (mention copy in first) and use the wording on the warning (edit almost immediately).
    • Peter: Not on Mrs. Waxcylinder's W7 laptop with 1.3.14 it doesn't. While drawing the waveform the status bar only shows the remaining recording time. I could not get it to show the "percentage completion" or "complete" messages - see the image I recently uploaded for the manual: http://manual.audacityteam.org/man/File:ODinprogress.png

Uncompressed files can be imported into Audacity in two ways.

  1. Make a copy before editing (safer)
    When this option is chosen Audacity makes a copy of all imported file(s). It is essential that files are copied into the project if the Audacity project is to be moved, opened on another computer, or sent to someone else. This is the default setting.
  2. Read directly from the original (faster)
    When this option is chosen Audacity always reads imported files from the computer folder you first imported them from, without copying them into the project. Therefore with this option set, you must not move, rename or delete imported uncompressed files, or the folder they are in. The advantage of this option is that you can begin editing a long file almost immediately, since On-Demand Loading will be used to import the file.

Dependencies

If you import any uncompressed audio files into your project using the "read directly" option, then your project depends on those files. At any time you can check which files your project depends on by clicking on File > Check Dependencies. See the Dependencies Dialog page for details.

When you save a project you can choose whether or not to copy dependent files into the project. See the Projects Preferences page for details.

Warning Dialog when Importing Uncompressed Audio Files

The first time you import an uncompressed audio file into Audacity, you will see this dialog.

Warning Importing Uncompressed Audio dialog

For each file selected, you can choose:

  • Which method to use to import the file.
  • Whether to make your choice permanent and never show this warning again.
You can change your import preference at any time in Import / Export Preferences, and you can turn this warning on and off in Warnings Preferences

Importing Compressed Audio Files

Some of the compressed audio file types you may encounter are MP2, MP3, Ogg Vorbis and FLAC, among others.

When you import a compressed audio file into your project there is no choice between "safer" and "faster"; the audio file is always copied into the project.


Using the Files of type: or Format drop-down menu in the Open and Import Audio Dialogs

The file types that are available for import can be filtered by file type or by using the Extended Import Preferences; this is used to shorten the list of files that are available for import.

See the Filtering file types on Import page in the manual.

Peter 10Jul11: Note that in Windows-XP and W7 it is "Files of type: ..." not "Format" to enable the drop-down filter. Where does "Format" come from?