Tutorial - Editing an Existing File

From Audacity Manual

Jump to: navigation, search
The easiest way to use Audacity is to open up an existing audio file and make small changes. If you've never used Audacity before, this is a great place to start.

Objective

The objective of this tutorial is to learn how to edit a sound file. To achieve this objective, we are going to open an existing sound file, remove all but 10 seconds of this file, apply a 1-second fade-out at the end, export the results, and play it in your favorite audio player. These steps will introduce the basic steps commonly used when editing a file.

Step 1: Find a file to edit

Audacity can open many common audio file formats, including WAV, AIFF, and MP3. If the optional ffmpeg library is installed, a larger range of formats, including WMA and the audio content of most video files, can be opened. Audacity cannot open copy-protected music files.

If you want to edit music that you have on an audio CD, you need to "rip" the music into an audio file. See the Audio CDs page for information on getting the audio off of CDs and into Audacity.

Don't have any audio files handy? There's lots of free music online! Here's one site where you can download free music: Opsound

The recordings on this site are free, distributed under the Creative Commons Attribution-Sharealike license, which gives you the right to create a derivative work without paying royalties, as long as you give credit and make your derivative work free, too. This is similar to the license for Audacity, which allows any programmer to modify it and redistribute it for free.

Step 2: Open the file with Audacity

Open Audacity. To open an audio file, you can select "Open" from the "File" menu, but a handy shortcut is to just drag and drop the file into Audacity:

       Opening an audio file in Windows      Opening an audio file on a Mac
       Windows: Drag the audio file icon
into the open Audacity window.
     Mac: Drag the audio file icon
to the Audacity icon in the Dock.

Linux users: you can also run Audacity on the command line and give the name of the file to open as a command-line argument.

Step 3: Look at the waveform

Picture of a stereo waveform in a track

This image shows a stereo waveform. The left channel is displayed in the top half of the track, and the right channel on the bottom. When the waveform is "larger", the audio is louder, and vice versa.

The ruler above the waveform shows you the length of the audio in minutes and seconds.

Step 4: Listen to the audio file

The Control toolbar

The image above show the Control Toolbar. The functions of the buttons are (from left to right): Skip to Start, Play, Record, Pause, Stop and Skip to End.

Click the Play button Image:Play.png to listen to the audio. Click the Stop button Image:Stop.png to stop playback. If you don't hear anything, see Audacity Setup and Configuration.

You can use the spacebar as a shortcut for Play and Stop.

Click on the selection tool Image:IBeam.png, then click on the waveform to choose a place to start, then click the Play button. Click and drag to create a selection, and then when you click Play, only the selection will play.

You can also select audio entirely using the keyboard. For example you can use the left-arrow and right-arrow keys to move the cursor left and right in the waveform. Holding down the shift key while pressing the arrow keys will create and extend a selection. Holding down the shift and control (CTRL) keys while pressing the arrow keys will contract an existing selection.

Clicking the Skip to Start button Image:Rewind.png or pressing the Home key the will move the cursor to the beginning of the track. It's kind of like rewind, but it's not for playback - it will only work when playback is stopped.

Similarly, clicking the Skip to End button Image:FFwd.png or pressing the End key the will move the cursor to the end of the track.

You can use the keyboard to skip around the audio file while listening. For example:

  • Press left-arrow to move the playback cursor back one second
  • Press right-arrow to move the playback cursor forward one second
  • Press SHIFT + left-arrow to move the playback cursor back 15 seconds
  • Press SHIFT + right-arrow to move the playback cursor forward 15 seconds

The amount the cursor moves in this situation is called the "seek time". The long and short seek times (one second and 15 seconds in the examples above) can be set in the Seek Time When Playing section of Playback Preferences.

Step 5: Create a 10-second clip from your audio

You edit audio waveforms in Audacity in much the same way as you would edit text in a word-processing document. When you are editing text you first select the text you want to change and then choose what you want to do with it. You might want to cut or copy the text, delete it, paste new text in it's place, or change it to bold. You do the same thing in Audacity: first zoom and select the range of audio you want to change, and then choose what you want to do with it.

Image of edit toolbar with zoom controls highlighted

The image above shows the Edit Toolbar with the Zoom buttons highlighted. This image of zoom in button is the Zoom In tool, and this image of zoom out button is the Zoom Out tool.

To zoom in to get a closer look at the waveform, first choose the Selection Tool image of selection tool, then click near the point you're interested in, then click the Zoom In button. Keep clicking the Zoom In button until you see the detail you need. Note that when you click the Zoom In button the cursor is centered on the screen.

There are also menu commands and keyboard shortcuts for zooming. View > Zoom In (or CTRL + 1) is the same as clicking the Zoom In button. View > Zoom Out (or CTRL + 3) is the same as clicking the Zoom Out button. View > Fit in Window (or CTRL + F) will zoom the waveform so it fits in the window.

Use the Zoom commands so that you can make maximal use of your Audacity window to see as much detail as you need, or to make sure you see the entire file when necessary.

Walk through deleting all but approximately 10 seconds of audio.

To cut this audio file down to 10 seconds, follow these steps:

  • Click near the point where you want the 10-second piece to begin.
  • Zoom in until the timeline shows 10 seconds or more before and after the cursor.
  • While holding down the shift key, click 10 seconds to the right of the cursor.
    • Note that this is just like selecting a range of text in a word processor
image of audio with 10 seconds selected
  • Press the spacebar to listen to the selection.
  • Adjust the start and end of the selection with the mouse:
    • Move the pointer over the start of the selection - the cursor will change to a left-pointing hand
    • Click and drag to adjust the beginning of the selection
    • You can adjust the end of the selection in a similar manner
  • Optional - try adjusting the start and end of the selection with the keyboard
    • Pressing SHIFT + Left-arrow will expand the selection to the left
    • Pressing SHIFT + Right-arrow will expand the selection to the right
    • Pressing SHIFT + CTRL + Left-arrow will contract the selection from the right
    • Pressing SHIFT + CTRL + Right-arrow will contract the selection from the left
  • Optional - try adjusting the start and end of the selection using the Selection Toolbar
    • Click the "Length" radio button above the second group of numbers in the Selection Toolbar if it is not already selected
    • Click on the first digit to the right of the decimal point in the Length box
    • Press the 0 (zero) key - the digit changes to zero, the digit to the right is selected and the selection in the waveform changes to match
    • Press the 0 key - the selection length is now 10.00 seconds.

You've now selected the portion of the audio that you want to keep. To delete everything except the selected audio, click on Edit > Trim.

If you make a mistake, you can always click on Edit > Undo. Audacity has unlimited Undo and Redo. You can undo your editing actions all the way back to when you opened the file. You can also Redo actions that you have undone.

You now have a region of audio that starts several seconds (or perhaps minutes) from the beginning of the track. Before you export this audio you want to move it to the beginning of the track. If you don't do this, the exported file will contain silence, then your 10-second piece of audio. To correct this, click on Tracks > Align Tracks > Align with Zero. This moves your audio to the beginning of the track.

Step 6: Fade out the last second

  • Click the Skip to End button image of skip to end button
  • Zoom In until you can see the last two or three seconds of the waveform
  • Click in the waveform about 1 second before the end
  • Click on Edit > Select > Cursor to Track End
  • Click on Effect > Fade Out. The last second of the audio is smoothly faded out.

Note that we always select some audio first, then choose what action we want to perform on it.

Step 7: Export the resulting file

When you save an Audacity project with File > Save you are doing just that - saving an Audacity project. Audacity projects can be opened only by Audacity. If you want other programs (such as iTunes or Windows Media Player) to be able to open this file we need to export it.

Before we export this 10 second clip to a separate file we're going to simplify things a bit. Click on Edit > Preferences, then click on the Import / Export tab. Under When exporting tracks to an audio file uncheck "Show Metatdata editor prior to export step". You can find out what the Metatdata Editor is and what it's for by following the link under the For More Information section below. Once you understand what the Metadata Editor is and decide you'd like to use it, you can go back to the Import / Export Preferences and turn it on.

Exporting a WAV file

  • Click on File > Export - the standard "Save" dialog for your operating system appears.
  • Give the file a different name. Audacity always suggests a name for the file that is the same as the name of your Audacity project. It is always best to alter this so you don't confuse your exported file with your Audacity project.
  • Choose a location to save the file in the usual manner.
  • At the bottom of the Save dialog is a popup menu labelled "Format". From this menu choose "WAV (Microsoft) signed 16-bit PCM".
  • There are no options for the WAV file format, so there is no need to click the "Options" button.
  • Click the "Save" button to complete the export of your project to a WAV file.

Exporting to an MP3 file

In order to export files from Audacity in MP3 format you will need to download and install the optional LAME MP3 encoder. Instruction are here . Once you have downloaded and installed the LAME encoder you will be able to create MP3 files using Audacity.

The steps for exporting a file in MP3 format are the same as for a WAV file, except:

  • In the Save dialog, from the "Format" popup menu, choose "MP3 files"
  • Then click the "Options..." button to set the bitrate and other options for the MP3 file.

Step 8 - Testing your new Audio Production

To demonstrate the difference between an Audacity project (the AUP) file, and a sound file you export from an Audacity project:

  • Click on File > Close, saving changes if asked.
  • Find the AUP file on your computer and attempt to open it with the audio player of your choice (e.g. iTunes, Windows Media Player). You can't.
  • Find the exported WAV file on your computer and attempt to open it with the audio player of your choice. Success!

You can't open an Audacity project in a media player. Only by exporting your project can you listen to it in a media player.

Once you've exported your project you should keep the original project file (AUP) and its associated _data folder around in case you want to make some changes to it in the future.

Where to go from here

More tutorials

For more information

Views
Help Location