How to import files from iTunes
- Peter 8Jun14: I have transferred an edited version of this page to the Manual.
ToDo-206 This page can be deleted after the release of 2.0.6
|Generally, files in iTunes can be imported into Audacity either by dragging them in, or using Audacity's Import Audio menu item. Files in unprotected Apple formats like M4A must either be converted to WAV in iTunes before importing, or imported using Audacity 2.x.
Finding the location and format of your iTunes files
The iTunes Library is not a collection of actual files, but a collection of links to the actual physical location of the files on your hard drive. To view the actual location of your iTunes files and what format they are in, either:
- Right-click or control-click over the file in the iTunes window
- Click "Get Info"
- Look in the line that says "Where" near the bottom. This gives the full path to the file, and the file format is given at the end of the file path (the last three characters after the filename and the dot).
or in iTunes 7 and later:
- Right click or control-click over the file in the iTunes window
- Click "Show in Windows Explorer" or "Show in Finder"
- The new window will have the file selected in the correct folder. Windows by default may not show the file format, but you can right-click the file and hit "Properties" to show the file details.
|Don't move the file from its current location, or iTunes will no longer be able to find it - instead, copy it to a new location if required.|
Importing WAV, AIFF and MP3 files
In current Audacity, WAV, AIFF and MP3 files should be draggable from iTunes on both Mac and Windows.
Or, import these files into any version of Audacity thus:
- Launch Audacity
- Click in current Audacity
- Navigate to the actual location of the file.
- Select the file by clicking on it
- Click Open
Importing MP4/M4A files
MP4 and M4A files can be imported directly into Audacity:
- Windows/Linux: Download the latest Windows version of Audacity, or compile or install Audacity for Linux. Then follow the Windows or Linux instructions to download and install the optional FFmpeg library.
- OS X: Download the latest version of Audacity, then use the normal command. current Audacity now requires OS X 10.4 or later. Users on OS X 10.3 can download the previous 1.3.3 version instead.
Then import the converted files into Audacity normally from the location stated in iTunes.
Importing protected M4P files from iTunes Store
If the files are shown as M4P they will be DRM-protected (copyrighted) files purchased from iTunes store. Some files shown as AAC may also be protected. If so, you cannot convert them directly to another format in iTunes because of that protection. There are two main solutions: either burn the files to an audio CD in iTunes, then extract the CD tracks to WAV or AIFF; or play the files in iTunes and record them.
Burn to audio CD then extract to WAV/AIFF
To burn the file to an audio CD in iTunes:
- Drag the file from your iTunes Music window (under Library in the left-hand panel) into an iTunes playlist (all files from this playlist will be burned to the CD)
- Click the button bottom right of the window (in iTunes 10, click )
- In the "Burn Settings" window that appears, select the "Preferred Speed" and make sure "Audio CD" is selected. Note: in iTunes 7, this should be configured on the small "Burning" tab inside the Advanced tab of Preferences
- Click "Burn"
- If you receive a "computer not authorised" error, double-click the file in the iTunes playlist and enter the password you use to login to iTunes store; additionally, you cannot burn a playlist containing M4P files that have been burned more than seven times.
- If you receive "Error 4880" this means burning cannot initialise because of a hardware defect or because the burn speed is too high
Then extract the CD tracks to WAV or AIFF in iTunes, using the following instructions. These instructions are for iTunes 9 or later. If you have iTunes 7, the import setting is changed on the small "Importing" tab inside the "Advanced" tab of Preferences. If you have iTunes 7 or 8, the WAV or AIFF is created by right-click or control-click over the tracks(s) to be extracted.
- Click (or on Mac)
- Click on the leftmost "General" tab
- Click the "Import Settings" button half way down on the right
- In the "Import Using" dropdown, choose "WAV Encoder" or "AIFF Encoder"
- Click OK and OK
- If the CD tracks have imported automatically to your Library, select "Music" under "Library" top left, otherwise select the CD that you burned in "Devices" further down on the left
- In the main window opposite, deselect any track(s) you do not want to extract
- Select the required tracks then click or (if you are in "Devices" this will import the songs into the iTunes Library)
- In "Music", right-click or control-click over the extracted file(s), click "Get Info", and check the location of the file at "Where"
A WAV or AIFF file gives a lossless digital copy of your iTunes file which can now be imported into Audacity from the location given in "Where".
Recording the file
If you prefer to record the file, what you can do depends on your operating system. On Windows or Linux you can usually play the file and record it directly into Audacity - see the Audacity FAQ on recording computer playback.
On OS X it is recommended instead to use either Soundflower, Audio Hijack or Wiretap to record the file. Soundflower can be set up to send the iTunes audio to Audacity as described here in the Manual. Audio Hijack and Wiretap work by saving an AIFF file. If using Wiretap, turn off "compression" in its Preferences to avoid problems importing the AIFF file into Audacity.
If you have a lot of files to deal with, recording will obviously take longer than burning to CD as it is usually done in real time. Recording into Audacity may result in some minor errors or noise because of the digital > analog and analog > digital conversions involved, though many users would not notice these. On the other hand no digital > analog conversions are involved with either Soundflower, Audio Hijack or Wiretap as the sound is grabbed before it reaches the sound card. If preferred, there are a few Windows program (shareware) that can similarly grab the audio and make a digital copy before it reaches the soundcard. Two good programs are Total Recorder and Tunebite.
Tunebite is able to make a high speed digital recording in faster than real time but has the disadvantage that it cannot save recordings in WAV or AIFF format. Audacity can import two of the formats it saves in (MP3 and OGG) but unlike WAV and AIFF, MP3 and OGG are both lossy compressed formats. As a result, some audio data would be lost in recording with Tunebite, which is not ideal if you want to edit the files in Audacity.
- Note: one potential problem with Total Recorder is that Audacity cannot work with its drivers. So make sure on the Audio I/O tab of Audacity Preferences that you explicitly choose your inbuilt sound as the recording device, and not Total Recorder or "Microsoft SoundMapper".
There is one remaining method of extracting audio from M4P files which is to use a program called jHymn. This program removes the iTunes encryption from M4P and protected AAC files and converts them to unprotected M4A files. The M4A files can then be converted to WAV or AIFF in iTunes as described in Section 3 above. Unfortunately this program only works with iTunes 5 or earlier. Older iTunes versions are still available from oldapps.com.
Exporting the audio back to iTunes/iPod
When exporting from Audacity back to iTunes, be aware that you need to export as WAV or AIFF to avoid losing audio data in the export, but you can still export as MP3 from Audacity if you want to keep the file size down (at the expense of some slight quality loss). iTunes will play MP3s. To export an MP3 from Audacity you need to add the LAME encoder to your computer (see Lame Installation in the Audacity Manual). Of course you can also convert from WAV or AIFF to MP3 or M4A (AAC) in iTunes by selecting the appropriate encoder in the of iTunes Preferences ( in iTunes 7). For more help, see our additional tutorial Exporting your Audacity Project into iTunes and iPod.