EAC and Cue Sheets

From Hydrogenaudio Knowledgebase
Revision as of 22:46, 14 November 2006 by HotshotGG (Talk | contribs)

Jump to: navigation, search

This article is based on MestreLion's great research posted at hydrogenaudio forum.

All the knowledge shared here was gained by creating the 4 different CUE sheets, opening them in Notepad and comparing them to the content showed in EACs track window. Loading the CUEs into EACs CD Layout Editor also helped a lot, by showing the CUE's content in a more friendly way.

The 4 types

  • Single WAV File
  • Multiple Files With Gaps (Noncompliant)
  • Multiple Files With Left Out Gaps
  • Multiple Files With Corrected Gaps

"Current Gap Settings" is not really an option, but rather an alias for one of the other 4: The one that is currently seletected in the the gap settings. So, creating a CUE with this option will create a file identical to one of the other 4.

Most don't know, but actually the CUE Sheet is just a simple ASCII file, in a format quite easy to read and interpret (if needed you can also edit it).

For the test, the Rush album "Signals" was used. It was chosen because it has few tracks (8), simple format (7 gaps, all non-zero lenghts), no hidden tracks (no index 00 for the 1st track) and standard 2s before the 1st track.


Single WAV File - A.K.A "Copy Image"

FILE "D:\MP3\Ripados\Range.wav" WAVE
 TRACK 01 AUDIO
   INDEX 01 00:00:00
 TRACK 02 AUDIO
   INDEX 00 05:33:45
   INDEX 01 05:34:55
 TRACK 03 AUDIO
   INDEX 00 10:22:12
   INDEX 01 10:22:57
 TRACK 04 AUDIO
   INDEX 00 15:20:00
   INDEX 01 15:20:62
 TRACK 05 AUDIO
   INDEX 00 21:41:40
   INDEX 01 21:43:00
 TRACK 06 AUDIO
   INDEX 00 28:06:12
   INDEX 01 28:07:32
 TRACK 07 AUDIO
   INDEX 00 31:49:40
   INDEX 01 31:50:40
  TRACK 08 AUDIO
    INDEX 00 36:42:60
    INDEX 01 36:44:05


As we can see, this one is pretty straightforward. A single file, assumed by EAC to be Range.wav, is used in all tracks. Track 1 starts with index 1 (a track 1-index 0 would mean a hidden track), at the file's absolute position 00:00:00. All the times are the absolute position within the Range.wav file. Here the tracks (01 indices) and the gaps (00 indices) are so easy to see and figure out that I have nothing much to tell about this format, except that this simple format will help us to understand the basics, and will sure come in hand when things get dicy.

Just a note for future reference: the gap lenght of a given track can be calculated by subtracting the INDEX 00 start position from its INDEX 01 start position. For example, track 3 gap starts at 10:22:12, and the actual track starts at 10:22:57. That leads us to a 57-12 = 00:00:45 gap.


Multiple Files With Corrected Gaps - A.K.A "Append Gaps to (beginning of) Next Track"

FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 01 - Subdivisions.wav" WAVE
 TRACK 01 AUDIO
   INDEX 01 00:00:00
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 02 - The Analog Kid.wav" WAVE
 TRACK 02 AUDIO
   INDEX 00 00:00:00
   INDEX 01 00:01:10
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 03 - Chemistry.wav" WAVE
 TRACK 03 AUDIO
   INDEX 00 00:00:00
   INDEX 01 00:00:45
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 04 - Digital Man.wav" WAVE
 TRACK 04 AUDIO
   INDEX 00 00:00:00
   INDEX 01 00:00:62
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 05 - The Weapon.wav" WAVE
 TRACK 05 AUDIO
   INDEX 00 00:00:00
   INDEX 01 00:01:35
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 06 - New World Man.wav" WAVE
 TRACK 06 AUDIO
   INDEX 00 00:00:00
   INDEX 01 00:01:20
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 07 - Losing It.wav" WAVE
 TRACK 07 AUDIO
   INDEX 00 00:00:00
   INDEX 01 00:01:00
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 08 - Countdown.wav" WAVE
 TRACK 08 AUDIO
   INDEX 00 00:00:00
   INDEX 01 00:01:20

Note that this CUE is very similar to the previous, the difference being multiple wavs are used. This CUE assumes you appended gaps in the beginning of each track, and that's why, for example, Track 03-Index 00 starts at 00:00:00 of Chemistry.wav. The actual song (index 01) starts at 00:00:45 of that file. This way we can easily see that this pregap is 00:00:45 long.

NOTE: EAC displays times in the format 1:60:60.100 in the main window, meaning 1 second is divided in 100 "cents". But in CUE Sheets the format is 1:60:60:75. So, a gap displayed 00:00:50 in a CUE sheet does not mean a half second gap, but rather a 2/3 second gap (something like 0.66 or 0.67 in the usual notation. So the 00:00:45 gap would be displayed in EACs main window as 0:00:00.60. A curious thing is that in EACs CD Layout window the format used is the 0.75, not the "metric" one.

Multiple Files With Left Out Gaps - A.K.A "Leave Out Gaps"

FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 01 - Subdivisions.wav" WAVE
 TRACK 01 AUDIO
   INDEX 01 00:00:00
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 02 - The Analog Kid.wav" WAVE
 TRACK 02 AUDIO
   PREGAP 00:01:10
   INDEX 01 00:00:00
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 03 - Chemistry.wav" WAVE
 TRACK 03 AUDIO
   PREGAP 00:00:45
   INDEX 01 00:00:00
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 04 - Digital Man.wav" WAVE
 TRACK 04 AUDIO
   PREGAP 00:00:62
   INDEX 01 00:00:00
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 05 - The Weapon.wav" WAVE
 TRACK 05 AUDIO
   PREGAP 00:01:35
   INDEX 01 00:00:00
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 06 - New World Man.wav" WAVE
 TRACK 06 AUDIO
   PREGAP 00:01:20
   INDEX 01 00:00:00
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 07 - Losing It.wav" WAVE
 TRACK 07 AUDIO
   PREGAP 00:01:00
   INDEX 01 00:00:00
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 08 - Countdown.wav" WAVE
 TRACK 08 AUDIO
   PREGAP 00:01:20
   INDEX 01 00:00:00

This one also looks a lot like the previous. The difference is that now indices 01 start at the very beginning of the files (00:00:00). So, where are the gaps? They are artificially inserted with the "PREGAP" tag. PREGAP, as we can assume by reading this file and confirm its behaviour, tells the burner to create a 00 index of the specified lenght, filled with silence. Note that the INDEX 00 statement can't be used, because its time refers to the wav file, and in this case no gaps were appended anywere on the wavs. They were simply left out. PREGAP puts them back again (you better pray for what was left out was only silence, because that's all you'll get when using PREGAP). EAC's CD Layout Editor clearly shows that the 00 indices were re-created, but not from any wav file. In this format it is easy to see that the track 3 pregap that was removed when extracting the wavs was 00:00:45 long, because that's what the PREGAP statement of track 3 tells us.

Multiple Files With Gaps (Noncompliant) - A.K.A "Append Gaps to (end of) Previous Track (default)"

In my case, this is the option used when "Current Gap Settings" is selected. I hope in yours too.

FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 01 - Subdivisions.wav" WAVE
 TRACK 01 AUDIO
   INDEX 01 00:00:00
 TRACK 02 AUDIO
   INDEX 00 05:33:45
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 02 - The Analog Kid.wav" WAVE
   INDEX 01 00:00:00
 TRACK 03 AUDIO
   INDEX 00 04:47:32
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 03 - Chemistry.wav" WAVE
   INDEX 01 00:00:00
 TRACK 04 AUDIO
   INDEX 00 04:57:18
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 04 - Digital Man.wav" WAVE
   INDEX 01 00:00:00
 TRACK 05 AUDIO
   INDEX 00 06:20:53
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 05 - The Weapon.wav" WAVE
   INDEX 01 00:00:00
 TRACK 06 AUDIO
   INDEX 00 06:23:12
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 06 - New World Man.wav" WAVE
   INDEX 01 00:00:00
 TRACK 07 AUDIO
   INDEX 00 03:42:08
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 07 - Losing It.wav" WAVE
   INDEX 01 00:00:00
 TRACK 08 AUDIO
   INDEX 00 04:52:20
FILE "D:\MP3\Ripados\Rush\Signals\Rush - Signals - 08 - Countdown.wav" WAVE
   INDEX 01 00:00:00

The most tricky, yet "right", CUE Format. The 1st file, Subdivisions.wav, is used in both Track1-Index1 and Tack2-Index0 (track 2 pregap). This gap starts at 05:33:45 of the file, and last until the end of it. Then, we see the marker of a new file, The Analog Kid.wav. Track 02 Index 01 starts at the beginning of this file, and lasts until 04:47:18, where, while keep reading the same wav file, Index 00 of Track 03 starts to be recorded. This pattern keeps until the end of the album, and we can see that each wav file is used for a track (index 01) and then for a pregap (index 00 of the next track). Using CD Layout Editor makes this tricky "chaining" of tracks and files very easy to see. So this format assumes that the gaps were appended to the end of the previous track. It's not a surprise then that Countdown.wav is only used as Track 08 - Index 01. As there is no track 9 pregap, nothing was appended to it. Its own pregap was appended to the previous file, Losing It.wav.

Now lets try to find our now-famous 00:00:45 gap in this format. We already know that we are looking for Track 03 - Index 00. Looking at the CUE, we find that it is in The Analog Kid.wav file, starting from 04:47:32, and lasting until the end of this file. So we need to know, in a very accurate way, the length of this file.Winamp nor EncSpot? are accurate enough as they only have second precision. But we can again use EAC's CD Layout to manually "Append files as New Tracks" and see the lenght. And it tells us that "The Analog Kid.wav" is 04:48.16 long. Subtracting the gap's initial position from the file's lenght leads us to the actual gap lengh: 04:48:02 - 04:47:32 = 00:00:45!

For this weird math, remember that CUE Sheets use the "75 notation", so from 04:47:32 to 04:48:00 there are 75-32=00:00:43. So we add +2 (from 04:48:00 to 04:48:02), leading us to our so-loved 00:00:45.


Conclusion

By now, I think that this format, as all the other ones, are quite clear. With the info here, one now might be able to, given any CUE, calculate all gap lenghts and, if needed, edit the CUE Sheet to convert from one format to the other. Just in case you find out that in your mp3s the gaps were appended in the end of the tracks, as usual, but the CUE you have is the "corrected" one, where gaps are supposed to be at beginning. Now you can, with Notepad, Calculator, and a bit of Brains, (EACs CD Layout Editor may be handy too), convert this cue to the format you want. (in this case, the "Noncompliant").