EAC Gap Settings

From Hydrogenaudio Knowledgebase
Jump to: navigation, search

This article is based on MestreLion's great research posted at EAC forum, but has since been edited.


The goal of this little tutorial is:

  • To save beginners a lot of time
  • To explain what a gap is and how the different gap menu options work in EAC
  • To explain what a CUE Sheet is
  • To explain why there are so many options for creating CUE Sheets, and how they relate to Gap settings

Here's what this tutorial should help you achieve:

  • Extract a CD into several WAV files which you can compress, tag, and save.
  • Use those same WAV files to burn an exact copy of the original CD.


Standard handling of gaps

Lets imagine a hypothetical CD with this layout:

 Track 1
 - Index 01: 1 minute

 Track 2
 - Index 00: 2 secs
 - Index 01: 2 minutes
  
 Track 3
 - Index 00: 3 secs
 - Index 01: 3 minutes

 Track 4
 - Index 00: 4 secs
 - Index 01: 4 minutes


The index 00 portions are the "gaps", sometimes called "pre-track gaps" or "pregaps". Typically they contain silence (or very quiet noise), and when played in a real CD player, the play position would count up from a negative time to zero, like -0:03, -0:02, -0:01, 0:00, with the song starting at 0:00, which is also where the player jumps to when you choose a specific track.

If you don't do anything special when ripping tracks to separate files (i.e., you just do "Action -> Copy Selected Tracks -> Uncompressed (F5)" or "-> Compressed (Shift+F5)"), then the gaps will be automatically appended to the end of the previous track in the WAV files. So your WAV files will be like this:

 Track1.wav : 1:02 (1st song + gap of the 2nd track)
 Track2.wav : 2:03 (2nd song + gap of the 3nd track)
 Track3.wav : 3:04 (3rd song + gap of the 4nd track)
 Track4.wav : 4:00 (4th song)

That's how file-per-track rips are normally made by all rippers, because people typically want the audio at the beginning of each file to be the beginning of the song.

Alternatives

If you do "Action -> Detect Gaps (F4)" before extracting the WAVs, you can have more control over the gaps. Doing so, you have now 3 ways to handle gaps (the last 3 options in the Action menu):

  • Leave Out Gaps
  • Append Gaps to Previous Track
  • Append Gaps to Next [sic] Track

These options, and more, are explained below.

Leave Out Gaps

This will simply ignore gap data (00 indexes). Only indexes 01 and over will be recorded to the WAVs. The WAV files will look like this:

 Track1.wav : 1:00 (1st song)
 Track2.wav : 2:00 (2nd song)
 Track3.wav : 3:00 (3rd song)
 Track4.wav : 4:00 (4th song)

The big problem with this option is that the gap data from the CD is lost in this process. If your goal is an exact copy, this option is not a good idea. Also, removing the gap data can interfere with the use of AccurateRip, preventing the rips of any gap-containing tracks from being checked against other people's for a match.

However, leaving out gaps might be useful under some circumstances. The gap data lost may be only "useless" silence between tracks, and you might want to store only actual music content. Or perhaps you want to manually change the silence between tracks when writing the CD, so having "trimmed" WAVs can help controlling the silent spacing when writing the CD-R.

But gaps are not only silence. This may be true for most albums, but not all. Remember that gaps can be silence, but also can be anything from audience clapping to actual music.

You can test if the gaps are silent using "Action - Test Gaps On Silence". (Poor grammar there; it really should read "Action - Test Gaps For Silence). Unfortunately this function is not sensitive enough to distinguish low-level noise from digital silence (null samples, or samples with zero amplitude).

For our example, we want our copy to be as exact as possible. So if the gaps are in the original, they must be in the copy just the way they are.

Append Gaps to Previous Track

This is the default action. It works the same way as if no gap detection is made, and was explained above.

Append Gaps to Next Track

This is similar to the default, but the gap is written in the beginning of the track, like this:

 Track1.wav : 1:00 (1st song)
 Track2.wav : 2:02 (pregap of the 2nd track + 2nd song)
 Track3.wav : 3:03 (pregap of the 3nd track + 3nd song)
 Track4.wav : 4:04 (pregap of the 4nd track + 4nd song)

This might look the most "natural" way to store the gaps, but actually its very odd. Usually the gaps are silences, so it's a bit weird for a track to start with a silence, instead of ending with it.

Also, when you use the seek button in any standalone player, for, say, Track 3, it will begin playing the Track 3 - index 01 (aka 3rd song), not it's 00 index! The only way for you to listen to the 3 secs pregap is to listen all the way from Track 2. The player will play Track 2 - index 01, then the pregap. When the pregap is playing, the player will display negative seconds: -0:03, -0:02, then -0:01).

So, if the only way to listen this gap is by playing track 2 until the end, it makes sense to say that the 3s pregap actually belongs to the 2nd track, not the 3rd! (even if in the actual CD layout the 3s gap is called "track 3 - index 00").

Index-based rip

There's actually a fourth option for handling gaps, and it doesn't require gap detection first (it will happen automatically).

For extraction, you could use Action -> Copy Selected Tracks Index-Based -> Uncompressed (Alt+X)" or "-> Compressed (Alt+Shift+X)" to cause the gaps to be written to disk as separate WAV files. For this to work, you'd need to make sure the %N (track number) is in the Naming scheme (under EAC Options (F9) -> Filename). Except for grabbing a hidden track before the first track, extracting gaps (and other non-01 indices) to their own files isn't typically done, so the discussion here will only focus on the main options.

Choose wisely

So, bottom line for reading gaps: For things to go perfect, you don't even have to detect gaps! If you don't, EAC will automatically read them and store them in the end of the previous track. If you do, make sure that the default option is selected, or select something else being very sure of what you're doing.

Writing gaps

WAVs recorded, you're ready to burn the CD-R. If you just want the CD copy to sound the same as the original, just go to Tools -> Write CD-R -> Layout -> Append Files As New Tracks (Index 1), select all the WAVs, and be happy.

As the gaps are recorded within the WAV files, the resulting cd will have the same "song, gap, song, gap" pattern. Also, gaps will behave like they ought to: if you seek to Track 3, it will jump directly to the 3rd song. To hear the gap before track 3, just listen track 2 until the end.

But, if you look carefully, something is different: In the CD layout, there will be no Index 0 in any of the tracks. After all, all data on the gaps were appended to the songs (01 indexes).

Should you care? Probably not. As far as I learned here, no software or hardware make any useful use of indexes. Most (if not all) PC Players just ignore this information. The only perceptible difference is the time count used in standalone players.

In the original CD, the 1st track will play from 00:00 to 01:00, then a negative -00:02 countdown (count-up, technically) will be displayed while the gap (track 02, index 00) is being played, and finally track 2 will start at 00:00. In the CD-R copy, track 1 will be 01:02 long. Display will go from 00:00 to 01:00 and continue to 01:01, 01:02 as the 1st song and the subsequent gap is played, and then track 2 will start at 00:00.

If you close your eyes and just listen, all will be the same. If you use seek and search buttons, all will be the same. Only the fancy -2s display countdown will now be displayed as part of the 1st track. That's it.

But do you care for this fancy display effect? Do you want to keep the index marking for the sake of fidelity, even if this is completely useless? Then the job can easily be done using CUE Sheets.

CUE sheets

See also: EAC and Cue Sheets

A CUE Sheet is a text file that defines a CD Layout. It tells the burner program what tracks and indexes the CD will have, its length, and how the source WAVs will be "sliced" in these tracks and indexes. The WAVs on disk won't be modified; it's just a guide for how the audio data in them will be burned onto the CD. So, before burning the blank CD, you must first Create a CUE Sheet based on the album you're reading and how you extracted the WAV files from it.

EAC gives 4 options for creating this CUE Sheet, the only difference being the way each handles the gaps found in the original CD. The options, accessed through the "Action -> Create CUE Sheet", are:

  • Current Gap Settings [not available in Beginner mode]
  • Single WAV File
  • Multiple WAV Files With Gaps (Noncompliant) [shown as Multiple WAV Files in Beginner mode]
  • Multiple WAV Files With Left Out Gaps [not available in Beginner mode]
  • Multiple WAV Files With Corrected Gaps [not available in Beginner mode]

Current Gap Settings creates a CUE Sheet based on the currently selected gap settings (the options to leave out or append gaps to the previous/next track). That is, it chooses one of the other options automatically. This will be what you want, unless you've forgotten or changed the gap settings from what they were at the time you extracted the tracks to WAVs, in which case you should select one of the other options manually.

Single WAV File generates a CUE Sheet where a single .wav is sliced in all the tracks in indexes. So, as the name suggests, it is the default when you extracted the full album to a single .wav file (presumably using the Action -> Create Image option). It creates both 01 and 00 indexes, thus preserving original CD layout and content.

Multiple WAV Files With Left Out Gaps creates a CD Layout identical to the original assuming the tracks were ripped with gaps left out (hence the name). All the data stored in the tracks will only be recorded in the 01 indices; the 00 indices will be filled with null samples.

Although it perfectly preserves the CD layout, the copy is only identical if the content of the gaps in the original CD is comprised only of null samples (samples with zero amplitude)! In other words, all non-zero samples in the gaps are lost upon ripping and replaced with samples that are null upon burning. It is a common misconception that one can safely tell EAC to detect gaps for silence by selecting Action -> Test Gaps On Silence (F3) and verify that all the gaps contains 100.0% silence. Unfortunately EAC can still report 100.0% silence for gaps that contain samples that are not null; therefore, EAC's Test Gaps On Silence function is not to be trusted!

Multiple WAV Files With Gaps (Noncompliant) slices the WAVs assuming that the gaps were appended to the end of each (previous) track. So, using our imaginary album, the first 2 minutes of Track2.wav would be recorded in Track 02 - Index 01, and the last 3 seconds would be Track 03 - Index 00.

This is the option that should be used when the WAVs are extracted the default way. The scary "Noncompliant" term means that many other burners, like CDRWin, can't correctly recognize CUE Sheets where WAVs are sliced this way as valid CUE Sheets. So that's something you should care about if you only use EAC for extraction (thus for creating the CUE Sheets) and another external programs for burning. If you use EAC for extraction and burning, there's nothing to fear, as EAC can properly read its own generated CUE Sheet quite well.

Multiple WAV Files With Corrected Gaps slices the WAVs assuming that the gaps were appended to the beginning of the next track. That is, this option should be used to correctly recreate the original CD layout and content when you used the "Append Gaps to Next Track" option when extracting the WAVs.

So, create the CUE Sheet that best represent the gap format you used when extracted the WAVs. Now it's very easy to burn a CD-R. Just go to Tools -> Write CD-R -> File -> Load CUE Sheet. Now see how the WAVs are properly sliced? (if not, you did something wrong.) Time to burn! Go to Cd-R -> Write CD and be happy!