Cue sheets

Cue Sheets' are used to provide index and playlist information for a large audio file. They are generally used in conjunction with either extracting from, or burning to, Music AudioCD. Cue sheets have the file extension ".cue", and are simple plain text files.

The cue sheet may contain metadata information (e.g.: TITLE and PERFORMER statements), but must contain information regarding the file(s) referenced by the cue sheet (FILE command) and the TRACK and INDEX points within the file. INDEX points are specified using the MM:SS:FF format, where MM is the number of minutes, SS the number of seconds, and FF the number of frames (there are seventy five frames to one second).

The cue sheet has become popular thanks to EAC (Exact Audio Copy) software users who rip Music Audio CDs to one image file, with an accompanying cue sheet. EAC can create four different cue sheet layouts, three for use with separate track files (a cue sheet may reference more than one file), but the single file cue sheet is most likely the more popular.

Cue sheets can be used when writing data to discs, as well as Music Audio CDs. This document focuses solely on the audio-related commands.

The Background
The cue sheet format was invented by Jeff Arnold of GoldenHawk Technology for use with his DAO (Disc At Once) CD burning function and the CDRWIN CD burner applications. The format has since been adopted as the de facto standard, and is used by various other applications, including foobar2000 music player and of course also XBMC Media Center. The official cue sheet specification is widely accepted to be Appendix A of the CDRWIN User's Guide.

The name is taken from the SEND CUE SHEET command, when a cue sheet describing the disc layout must be sent to the drive before writing starts in SAO write mode. The drive writes to the disc, using the cue sheet information to generate the P and Q subchannel data, and to retrieve the format and block size of the data transfered with the WRITE command.

Text adapted from a post by Martin H.

Cue Sheet Commands
The following commands are detailed in the Appendix A of the CDRWIN User's Guide:
 * CATALOG
 * CDTEXTFILE
 * FILE
 * FLAGS
 * INDEX
 * ISRC
 * PERFORMER
 * POSTGAP
 * PREGAP
 * REM
 * SONGWRITER
 * TITLE
 * TRACK

Most Often Used

 * FILE
 * The FILE command specifies the file that the cue sheet is currently referencing. Valid file types are WAVE, MP3 and AIFF, although other audio formats, e.g.: lossless formats like WavPack and FLAC, can also be used under the WAVE file type.


 * INDEX
 * A number between 00 and 99. Index points are specified in MM:SS:FF format, and are relative to the start of the file currently referenced. INDEX 01 commands specify the beginning of a new track. INDEX 00 commands specify the pre-gap of a track; you may notice your Music AudioCD player count up from a negative value before beginning a new track - this is the period between INDEX 00 and INDEX 01.


 * PERFORMER
 * At top-level this will specify the CD artist, while at track-level it specifies the track artist.


 * PREGAP
 * Used to specify the length of a track pre-gap, in MM:SS:FF format.


 * REM
 * Used to record comments in a cue sheet. This command is often used to store additional meta data to TITLE and PERFORMER, e.g.: the date or genre of the disc.


 * TITLE
 * At top-level this will specify the album name, while at track-level it specifies the track name.


 * TRACK
 * A number between 01 and 99, indicating the track number.

A Few Examples
A standard single file cue sheet The cue sheet above, created by EAC (Exact Audio Copy) software, shows the first two tracks of a standard single file cue sheet. Note the use of REM commands to record additional metadata information, in the format REM  " ". The PERFORMER and TITLE commands at the top of the cue sheet detail the AudioCD artist and album name respectively. The PERFORMER and TITLE commands at track-level specify the track artist and title.

TRACK 02's INDEX 01 entry does not state that the track is 4m 17.693s long, but that the beginning of the track is 4m 17.693s into the file (so TRACK 01 was in fact 4m 17.693s long). If TRACK 02 was 3m long exactly, TRACK 03's INDEX 01 value would be 07:17:52.

Also note the file reference specifying a relative path to the file (references can also be absolute) and the file type: WAVE

A single file cue sheet with a TRACK 01 INDEX 00 hidden track
The cue sheet above shows the first two tracks of a single file cue sheet for a disc with a hidden track at the start. Note that TRACK 01 INDEX 01 starts at 03:22:70 (3m 22.933s) instead of 00:00:00 as in the first example, and most cue sheets. The INDEX 00 index on TRACK 02 displays the more usual behavior, being two seconds before INDEX 01.

As the INDEX 00 is on TRACK 01 you will not normally see the usual countdown from a negative value that you might see from an INDEX 00 command on a subsequent track. To listen to this track on a Music AudioCD player you will need to start the disc playing and press rewind, to rewind, essentially, from 3m 22s into the disc back to the true beginning.

Also note that the file referenced is FLAC audio format, but the WAVE (a.k.a. WAV) files type is used. For MP3 audio format files files the file type "MP3" should be used, for AIFF you should use "AIFF", but for all other types "WAVE" is used.

Multiple files with corrected gaps
This multiple file cue sheet, created by EAC (Exact Audio Copy) software, has gaps prepended to the next track. This method allows users to retain gaps, but by prepending the gap to the next track each track may begin with silence, which makes playback less satisfactory.

Multiple files with gaps left out
This mutiple file cue sheet, created by EAC (Exact Audio Copy) software, has removed the gaps, but artificially recreates silence between tracks using the PREGAP command. This is fine if the gap was silence, but unsatisfactory if it contained audio.

Multiple files with gaps (Noncompliant)
This multiple file cue sheet, created by EAC (Exact Audio Copy) software, has gaps appended to the previous track, and is a favorite among users who rip to track files but wish to retain gap information. This format allows the user to retain gaps, but in a position in the track file that does not hinder playback. Unfortunately, this format is non-compliant, so applications that adhere to the specification, like foobar2000 and XBMC Media Center, will not be able to read it. EAC software will obviously read these cue sheets, as will the AudioCD burning application Burrrn.

Note that INDEX 00 of TRACK 02 is set while still referencing the first FILE.

Single file version of the cue sheet used above
For reference, the cue sheet used in the examples above in single file format.

Example Cue Sheet
= Useful Cue Sheet Editing Applications =

Splitting

 * ACDIR: http://nyaochi.sakura.ne.jp/xoops/modules/mysoftwares/tc_2.html
 * CUE Splitter: http://www.enfis.it/downloads.php?cat_id=1
 * CueProc: http://nyaochi.sakura.ne.jp/xoops/modules/mysoftwares/tc_6.html
 * CueTools: http://www.hydrogenaudio.org/forums/index.php?showtopic=41476
 * foobar2000: http://www.foobar2000.org/
 * pcutmp3: http://www.hydrogenaudio.org/forums/index.php?showtopic=35654
 * shntool: http://www.etree.org/shnutils/shntool/
 * WavSplit: http://tangerine.uw.hu/prog/

Joining

 * CueMake: http://www.synthetic-soul.co.uk/files/cuemake/
 * CueTools: http://www.hydrogenaudio.org/forums/index.php?showtopic=41476
 * foobar2000: http://www.foobar2000.org/
 * shntool: http://www.etree.org/shnutils/shntool/

Creating

 * CD Wave: http://www.milosoftware.com/cdwave/
 * CueMaster: http://cuemaster.host.sk/
 * CueTools: http://www.hydrogenaudio.org/forums/index.php?showtopic=41476
 * foobar2000: http://www.foobar2000.org/
 * Goldwave: http://www.goldwave.com/
 * shntool: http://www.etree.org/shnutils/shntool/
 * Wave Repair: http://www.waverepair.com/

= External Links =
 * |en.wikipedia.org/wiki/Cue_sheet_(computing) Cue Sheet Wikipedia article
 * EAC CUE Sheets article on hydrogenaudio.org wiki
 * goldenhawk.com - The Goldenhawk website