The cue sheet came from Golden Hawk Technology’s CDRWIN burning software, and the original definition is its user’s guide. No standards body maintains it. This reference draws on the description in Appendix C of the GNU ccd2cue manual and the CueSharp command reference. The commands themselves are on Commands, and their code values on File types, track modes and flags.
General syntax
- Each command takes up one whole line.
- Commands are not case-sensitive.
- Lines may be indented freely, and blank lines are ignored.
- The file holds only commands, their arguments, blank space and line ends.
- A string containing a space must be enclosed in quotation marks.
- The usual extension is
.cue.
The original format does not say what text encoding to use. Text outside ASCII is therefore a matter of each program’s habits.
Contexts
A command belongs to one of three contexts and may appear only after its context has been opened.
| Context | Opened by | Commands |
|---|---|---|
| None (disc level) | The start of the file | CATALOG, CDTEXTFILE, TITLE, PERFORMER, SONGWRITER, FILE |
| File | FILE | TRACK |
| Track | TRACK | FLAGS, ISRC, TITLE, PERFORMER, SONGWRITER, PREGAP, INDEX, POSTGAP |
| Any | REM |
TITLE, PERFORMER and SONGWRITER work in the
disc context and the track context, describing the disc or the track respectively.
FILE, TRACK, INDEX and REM may
appear many times in one context; all others at most once.
Order of commands
Within its context, each command must keep to this order.
| Command | Must come after | Must come before |
|---|---|---|
CATALOG | CDTEXTFILE, disc-level TITLE, PERFORMER, SONGWRITER, FILE | |
Disc-level TITLE, PERFORMER, SONGWRITER | CATALOG, CDTEXTFILE | FILE |
FILE | CATALOG, CDTEXTFILE | |
FLAGS | INDEX | |
ISRC | INDEX | |
Track-level TITLE, PERFORMER, SONGWRITER | INDEX | |
PREGAP | INDEX | |
INDEX | FLAGS, ISRC, TITLE, PERFORMER, SONGWRITER, PREGAP | POSTGAP |
POSTGAP | INDEX |
Time values
Times are written mm:ss:ff, in minutes, seconds and frames. There are
75 frames to a second, and each frame is one CD sector. The frame count ends at 74,
and the seconds at 59. An INDEX time is measured from the beginning of
the file named by the current FILE command. Worked example:
03:35:12 is 3 minutes, 35 seconds and 12 frames, which is 16,137 frames,
or 215.16 seconds.
Pregaps and postgaps
| Way of writing it | Audio comes from |
|---|---|
INDEX 00 and INDEX 01 | The file: the pregap’s length is the distance between the two index times. |
PREGAP mm:ss:ff | Nowhere: silence generated when the disc is written. No data is consumed from the file. |
POSTGAP mm:ss:ff | Nowhere: generated, after the track. No data is consumed from the file. |
A pregap on track 1 is how a hidden track before the first track is stored.
Examples
REM GENRE Rock
REM DATE 1999
CATALOG 3203040601052
PERFORMER "Artist Name"
TITLE "Album Title"
FILE "Album.wav" WAVE
TRACK 01 AUDIO
TITLE "First Song"
PERFORMER "Artist Name"
ISRC DKKH50800101
FLAGS DCP
INDEX 01 00:00:00
TRACK 02 AUDIO
TITLE "Second Song"
INDEX 00 03:33:12
INDEX 01 03:35:12
INDEX 02 05:10:00
FILE "game.bin" BINARY
TRACK 01 MODE1/2352
INDEX 01 00:00:00
TRACK 02 AUDIO
PREGAP 00:02:00
INDEX 01 58:41:36
Non-standard sheets
Some programs write sheets the CDRWIN manual does not allow. Exact Audio Copy can
place FILE commands so that the gap audio sits at the end of each
file, and some software, foobar2000 among it, does not support that layout. Programs
including VLC and foobar2000 also accept a WavPack or FLAC file marked as
WAVE.
Also, REM lines are commonly used for metadata, in forms like
REM GENRE, REM DATE, REM DISCID and
REM COMMENT. These are program conventions, not part of the format.
Some software treats a REM alone on a line as a syntax error.