You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

506 lines
8.4 KiB

  1. ===========================================================
  2. Description of the Cue Sheet/Table of Contents File Formats
  3. ===========================================================
  4. :Author: Svend Sorensen
  5. :Contact: sorensen@users.berlios.de
  6. :Date: $LastChangedDate$
  7. .. contents::
  8. The Cue Sheet (cue) and Table of Contents (toc) file formats both describe the
  9. layout of a CD.
  10. Notes
  11. =====
  12. A cue or toc file has an (optional) global section, followed by any number of
  13. track sections.
  14. Lines (with a few exceptions for the toc format) begin with a keyword, which
  15. may be followed by whitespace separated fields. Some keywords are only allowed
  16. in the global section or a track section.
  17. Format Notation
  18. ---------------
  19. A string may be enclosed in single or double quotation marks. If the string
  20. contains whitespace, it must be enclosed in quotation marks.
  21. ``<field>``
  22. a required field
  23. ``[field]``
  24. an optional field
  25. ``...``
  26. preceding field may be repeated any number of times
  27. Cue Sheet Format
  28. ================
  29. The standard file suffix for a cue file is ``.cue``.
  30. Keywords
  31. --------
  32. CATALOG
  33. ~~~~~~~
  34. :Description: Sets the catalog number of the CD.
  35. :Section(s): global
  36. :Format:
  37. ``CATALOG <catalog_number>``
  38. ``catalog_number``
  39. an integer consisting of exactly 13 digits.
  40. CDTEXTFILE
  41. ~~~~~~~~~~
  42. :Description: Sets an external file for CD-TEXT data.
  43. :Section(s): global
  44. :Format:
  45. ``CDTEXTFILE <filename>``
  46. ``filename``
  47. a string.
  48. The CD-TEXT file contains encoded CD-TEXT data. The standard extension for
  49. CD-TEXT files is ``.cdt``.
  50. FILE
  51. ~~~~
  52. :Description: Sets a new input file.
  53. :Section(s): track
  54. :Format:
  55. ``FILE <filename> [file_format]``
  56. ``filename``
  57. a string.
  58. ``file_format``
  59. one of: ``BINARY``, ``MOTOROLA``, ``AIFF``, ``WAVE``, or
  60. ``MP3``.
  61. ``FILE`` line precedes the beginning of the track section.
  62. FLAGS
  63. ~~~~~
  64. :Description: Sets track flags.
  65. :Section(s): track
  66. :Format:
  67. ``FLAGS [flag]...``
  68. ``flag``
  69. one of: ``PRE``, ``DCP``, ``4CH``, or ``SCMS``.
  70. INDEX
  71. ~~~~~
  72. :Description: Sets a track index.
  73. :Section(s): track
  74. :Format:
  75. ``INDEX <index_number> <index>``
  76. ``index_number``
  77. an integer in the range 0-99.
  78. ``index``
  79. time in MSF format.
  80. ISRC
  81. ~~~~
  82. :Description: Sets track ISRC number.
  83. :Section(s): track
  84. :Format:
  85. ``ISRC <ISRC_number>``
  86. ``ISRC_number``
  87. a string with the format CCOOOOYYSSSSS.
  88. POSTGAP
  89. ~~~~~~~
  90. :Description: Sets track postgap.
  91. :Section(s): track
  92. :Format:
  93. ``POSTGAP <postgap>``
  94. ``postgap``
  95. time in MSF format.
  96. PREGAP
  97. ~~~~~~
  98. :Description: Sets track pregap.
  99. :Section(s): track
  100. :Format:
  101. ``PREGAP <pregap>``
  102. ``pregap``
  103. time in MSF format.
  104. REM
  105. ~~~
  106. :Description: Begins a comment line.
  107. :Section(s): any
  108. :Format:
  109. ``REM [comments]``
  110. TRACK
  111. ~~~~~
  112. :Description: Starts a new track.
  113. :Section(s): track
  114. :Format:
  115. ``TRACK <track_number> <track_mode>``
  116. ``track_number``
  117. a positive integer in the range 1-99.
  118. ``track_mode``
  119. one of: ``MODE1/2048``, ``MODE1/2352``, ``MODE2/2336``,
  120. ``MODE2/2048``, ``MODE2/2324``, ``MODE2/2336``, or
  121. ``MODE2/2352``.
  122. (CD-TEXT keywords)
  123. ~~~~~~~~~~~~~~~~~~
  124. :Description: Sets CD-TEXT data.
  125. :Section(s): any
  126. :Format:
  127. ``<CDTEXT_keyword> <CDTEXT_field>``
  128. ``CDTEXT_keyword``
  129. one of: (see `CD-TEXT`_ section for a list of keywords).
  130. ``CDTEXT_field``
  131. a string.
  132. The cue format does not have native support for binary CD-TEXT.
  133. Table of Contents File Format
  134. =============================
  135. The standard file suffix for a toc file is ``.toc``.
  136. Certain keywords begin a block, which must be enclosed between ``{`` and ``}``
  137. brackets.
  138. Comments
  139. --------
  140. Comments begin with ``//`` and may be placed anywhere. Because they can be
  141. placed anywhere in a line, toc comments are treated as a special case (not as a
  142. keyword). Any text beginning with ``//`` is stripped from each line.
  143. Keywords
  144. --------
  145. CATALOG
  146. ~~~~~~~
  147. :Section(s): global
  148. :Format: ``CATALOG "<catalog_number>"``
  149. Sets the catalog number of the CD. ``catalog_number`` must be exactly 13
  150. digits.
  151. CD_DA
  152. ~~~~~
  153. :Section(s): global
  154. :Format: ``CD_DA``
  155. Sets the CD format to audio.
  156. CD_ROM
  157. ~~~~~~
  158. :Section(s): global
  159. :Format: ``CD_ROM``
  160. Sets the CD format to data.
  161. CD_ROM_XA
  162. ~~~~~~~~~
  163. :Section(s): global
  164. :Format: ``CD_ROM_XA``
  165. Sets the CD format to mixed.
  166. TRACK
  167. ~~~~~
  168. :Section(s): track
  169. :Format: ``TRACK <track_mode> [sub_channel_mode]``
  170. NO
  171. ~~
  172. :Section(s): track
  173. :Format: ``NO <flag>``
  174. Negates (clears) track flags. Allowable ``flag`` entries are ``COPY`` and
  175. ``PRE_EMPHASIS``.
  176. COPY
  177. ~~~~
  178. :Section(s): track
  179. :Format: ``COPY``
  180. Sets the copy permitted flag.
  181. PRE_EMPHASIS
  182. ~~~~~~~~~~~~
  183. :Section(s): track
  184. :Format: ``PRE_EMPHASIS``
  185. Sets the pre-emphasis flag.
  186. TWO_CHANNEL_AUDIO
  187. ~~~~~~~~~~~~~~~~~
  188. :Section(s): track
  189. :Format: ``TWO_CHANNEL_AUDIO``
  190. Sets the two channel audio flag.
  191. FOUR_CHANNEL_AUDIO
  192. ~~~~~~~~~~~~~~~~~~
  193. :Section(s): track
  194. :Format: ``FOUR_CHANNEL_AUDIO``
  195. Sets the four channel audio flag.
  196. ISRC
  197. ~~~~
  198. :Section(s): track
  199. :Format: ``ISRC "<ISRC_number>"``
  200. Sets track ISRC number. ``ISRC_number`` must be of the format CCOOOOYYSSSSS.
  201. SILENCE
  202. ~~~~~~~
  203. :Section(s): track
  204. *TODO*
  205. ZERO
  206. ~~~~
  207. :Section(s): track
  208. *TODO*
  209. FILE
  210. ~~~~
  211. :Section(s): track
  212. :Format: ``FILE "<filename>" <start> [length]``
  213. Add file to current track. ``start`` and ``length`` must be in MSF format.
  214. AUDIOFILE
  215. ~~~~~~~~~
  216. :Section(s): track
  217. :Format: ``AUDIOFILE "<filename>" <start> [length]``
  218. Add file to current track. ``start`` and ``length`` must be in MSF format.
  219. DATAFILE
  220. ~~~~~~~~
  221. :Section(s): track
  222. *TODO*
  223. FIFO
  224. ~~~~
  225. :Section(s): track
  226. *TODO*
  227. START
  228. ~~~~~
  229. :Section(s): track
  230. :Format: ``START <start>``
  231. *TODO*
  232. PREGAP
  233. ~~~~~~
  234. Section(s): track
  235. Format: ``PREGAP <pregap>``
  236. Sets track pregap. ``pregap`` must be in MSF format.
  237. INDEX
  238. ~~~~~
  239. :Section(s): track
  240. :Format: ``INDEX <index_number> <index_time>``
  241. Sets a track index. ``index_number`` must be a non-negative integer.
  242. ``index_time`` must be in MSF format.
  243. CD_TEXT
  244. ~~~~~~~
  245. :Section(s): any
  246. :Format: ``CD_TEXT {}``
  247. Begins a CD-TEXT block.
  248. LANGUAGE_MAP
  249. ~~~~~~~~~~~~
  250. :Section(s): global
  251. :Subsection(s): CD-TEXT block
  252. :Format: ``LANGUAGE_MAP { language_map... }``
  253. Begins a language map block. ``language_map`` is a mapping of an integer in
  254. the range 0-255 to a country code.
  255. LANGUAGE
  256. ~~~~~~~~
  257. :Section(s): track
  258. :Subsection(s): CD-TEXT block
  259. :Format: ``LANGUAGE language_number { cd_text }``
  260. Begins a language block. ``language_number`` must be an integer in the range
  261. 0-255. ``cd_text`` is a series of CD-TEXT keyword lines.
  262. (CD-TEXT keywords)
  263. ~~~~~~~~~~~~~~~~~~
  264. :Section(s): any
  265. :Subsection(s): language block
  266. :Format1: ``<CDTEXT_keyword> "<CDTEXT_field>"``
  267. :Format2: ``<CDTEXT_keyword> { CDTEXT_binary_data }``
  268. See `CD-TEXT`_ section for a list of CD-TEXT keywords. Format1 is for
  269. character data and Format2 is for binary data. ``CDTEXT_binary_data`` is a
  270. comma seperated list of integers in the range 0-255.
  271. CD-TEXT
  272. =======
  273. The CD-TEXT specification sets aside 16 CD-TEXT types. Three are reserved and
  274. have no corresponding keywords. One is shared; the keyword depends on whether
  275. it is for the disc (``UPC_EAN``) or a track (``ISRC``). CD-TEXT entries are
  276. either character or binary data.
  277. Keywords
  278. --------
  279. ARRANGER
  280. ~~~~~~~~
  281. :Description: Name(s) of the arranger(s)
  282. :Section: any
  283. :Format: character
  284. COMPOSER
  285. ~~~~~~~~
  286. :Description: Name(s) of the composer(s)
  287. :Section: any
  288. :Format: character
  289. DISC_ID
  290. ~~~~~~~
  291. :Description: Disc Identification information
  292. :Section: any
  293. :Format: binary
  294. GENRE
  295. ~~~~~
  296. :Description: Genre Identification and Genre information
  297. :Section: any
  298. :Format: binary
  299. ISRC
  300. ~~~~~
  301. :Description: ISRC Code of each track
  302. :Section: track
  303. :Format: character
  304. MESSAGE
  305. ~~~~~~~
  306. :Description: Message from the content provider and/or artist
  307. :Section: any
  308. :Format: character
  309. PERFORMER
  310. ~~~~~~~~~
  311. :Description: Name(s) of the performer(s)
  312. :Section: any
  313. :Format: character
  314. SONGWRITER
  315. ~~~~~~~~~~
  316. :Description: Name(s) of the songwriter(s)
  317. :Section: any
  318. :Format: character
  319. TITLE
  320. ~~~~~
  321. :Description: Title of album name or Track Titles
  322. :Section: any
  323. :Format: character
  324. TOC_INFO
  325. ~~~~~~~~~
  326. :Description: Table of Content information
  327. :Section: any
  328. :Format: binary
  329. TOC_INFO2
  330. ~~~~~~~~~
  331. :Description: Second Table of Content information
  332. :Section: any
  333. :Format: binary
  334. UPC_EAN
  335. ~~~~~~~
  336. :Description: UPC/EAN code of the album
  337. :Section: disc
  338. :Format: character
  339. SIZE_INFO
  340. ~~~~~~~~~
  341. :Description: Size information of the Block
  342. :Section: any
  343. :Format: binary
  344. Definitions
  345. ===========
  346. MSF format
  347. a representation of time in the form ``mm:ss:ff``. ``mm`` is minutes,
  348. ``ss`` is seconds, and ``ff`` is frames.
  349. frame
  350. 1/74 of a second.