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.
 
 
 
 
 
 

583 lines
10 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. .. [#] ``file_fomat`` differs between software packages. The cdrtools_
  63. ``cue.c`` file also has ``file_format`` entries for ``AU`` and ``OGG``.
  64. FLAGS
  65. ~~~~~
  66. :Description: Sets track flags.
  67. :Section(s): track
  68. :Format:
  69. ``FLAGS [flag]...``
  70. ``flag``
  71. one of: ``PRE``, ``DCP``, ``4CH``, or ``SCMS``.
  72. INDEX
  73. ~~~~~
  74. :Description: Sets a track index.
  75. :Section(s): track
  76. :Format:
  77. ``INDEX <index_number> <index>``
  78. ``index_number``
  79. an integer in the range 0-99.
  80. ``index``
  81. time in MSF format.
  82. Having an ``INDEX 00`` and an ``INDEX 01`` defines a pregap using data from the
  83. ``FILE``.
  84. ISRC
  85. ~~~~
  86. :Description: Sets track ISRC number.
  87. :Section(s): track
  88. :Format:
  89. ``ISRC <ISRC_number>``
  90. ``ISRC_number``
  91. a string with the format CCOOOOYYSSSSS.
  92. POSTGAP
  93. ~~~~~~~
  94. :Description: Sets track postgap.
  95. :Section(s): track
  96. :Format:
  97. ``POSTGAP <postgap>``
  98. ``postgap``
  99. time in MSF format.
  100. PREGAP
  101. ~~~~~~
  102. :Description: Sets track pregap.
  103. :Section(s): track
  104. :Format:
  105. ``PREGAP <pregap>``
  106. ``pregap``
  107. time in MSF format.
  108. The pregap is filled with generated silence.
  109. REM
  110. ~~~
  111. :Description: Begins a comment line.
  112. :Section(s): any
  113. :Format:
  114. ``REM [comments]``
  115. TRACK
  116. ~~~~~
  117. :Description: Starts a new track.
  118. :Section(s): track
  119. :Format:
  120. ``TRACK <track_number> <track_mode>``
  121. ``track_number``
  122. a positive integer in the range 1-99.
  123. ``track_mode``
  124. one of: ``AUDIO``, ``CDG``, ``MODE1/2048``, ``MODE1/2352``,
  125. ``MODE2/2336``, ``MODE2/2352``, ``CDI/2336``, or ``CDI/2352``.
  126. (CD-TEXT keywords)
  127. ~~~~~~~~~~~~~~~~~~
  128. :Description: Sets CD-TEXT data.
  129. :Section(s): any
  130. :Format:
  131. ``<CDTEXT_keyword> <CDTEXT_field>``
  132. ``CDTEXT_keyword``
  133. one of: (see `CD-TEXT`_ section for a list of keywords).
  134. ``CDTEXT_field``
  135. a string.
  136. The cue format does not have native support for binary CD-TEXT.
  137. Table of Contents File Format
  138. =============================
  139. The standard file suffix for a toc file is ``.toc``.
  140. Certain keywords begin a block, which must be enclosed between ``{`` and ``}``
  141. brackets.
  142. Comments
  143. --------
  144. Comments begin with ``//`` and may be placed anywhere except inside quoted
  145. strings. A comment beginning with ``//`` is stripped from each line.
  146. Keywords
  147. --------
  148. AUDIOFILE
  149. ~~~~~~~~~
  150. :Description: Add file to current track.
  151. :Section(s): track
  152. :Format:
  153. ``AUDIOFILE "<filename>" <start> [length]``
  154. ``filename``
  155. a string.
  156. ``start``
  157. time in MSF format.
  158. ``length``
  159. time in MSF format.
  160. CATALOG
  161. ~~~~~~~
  162. :Description: Sets the catalog number of the CD.
  163. :Section(s): global
  164. :Format:
  165. ``CATALOG "<catalog_number>"``
  166. ``catalog_number``
  167. an integer consisting of exactly 13 digits.
  168. CD_DA
  169. ~~~~~
  170. :Description: Sets the CD format to audio.
  171. :Section(s): global
  172. :Format: ``CD_DA``
  173. CD_ROM
  174. ~~~~~~
  175. :Description: Sets the CD format to data.
  176. :Section(s): global
  177. :Format: ``CD_ROM``
  178. CD_ROM_XA
  179. ~~~~~~~~~
  180. :Description: Sets the CD format to mixed.
  181. :Section(s): global
  182. :Format: ``CD_ROM_XA``
  183. CD_TEXT
  184. ~~~~~~~
  185. :Section(s): any
  186. :Format: ``CD_TEXT {}``
  187. Begins a CD-TEXT block.
  188. COPY
  189. ~~~~
  190. :Description: Sets the copy permitted flag.
  191. :Section(s): track
  192. :Format: ``COPY``
  193. DATAFILE
  194. ~~~~~~~~
  195. :Description: Add data from file to current track.
  196. :Section(s): track
  197. :Format:
  198. ``DATAFILE "<filename>" [length]``
  199. ``filename``
  200. a string.
  201. ``length``
  202. time in MSF format.
  203. ISRC
  204. ~~~~
  205. :Description: Sets track ISRC number.
  206. :Section(s): track
  207. :Format:
  208. ``ISRC "<ISRC_number>"``
  209. ``ISRC_number``
  210. a string with the format CCOOOOYYSSSSS.
  211. FIFO
  212. ~~~~
  213. :Description: Add data from FIFO to current track.
  214. :Section(s): track
  215. :Format:
  216. ``FIFO "<fifoname>" <length>"``
  217. ``length``
  218. time in MSF format.
  219. FILE
  220. ~~~~
  221. :Description: Add data from file to current track.
  222. :Section(s): track
  223. :Format:
  224. ``FILE "<filename>" <start> [length]``
  225. ``filename``
  226. a string.
  227. ``start``
  228. time in MSF format.
  229. ``length``
  230. time in MSF format.
  231. FOUR_CHANNEL_AUDIO
  232. ~~~~~~~~~~~~~~~~~~
  233. :Description: Sets the four channel audio flag.
  234. :Section(s): track
  235. :Format: ``FOUR_CHANNEL_AUDIO``
  236. INDEX
  237. ~~~~~
  238. :Description: Sets a track index.
  239. :Section(s): track
  240. :Format: ``INDEX <index_number> <index_time>``
  241. ``index_number``
  242. a non-negative integer.
  243. ``index_time``
  244. time in MSF format.
  245. LANGUAGE
  246. ~~~~~~~~
  247. :Description: Begins a language block.
  248. :Section(s): track
  249. :Subsection(s): CD-TEXT block
  250. :Format:
  251. ``LANGUAGE language_number { cd_text }``
  252. ``language_number``
  253. an integer in the range 0-255.
  254. ``cd_text``
  255. a series of CD-TEXT keyword lines.
  256. LANGUAGE_MAP
  257. ~~~~~~~~~~~~
  258. :Description: Begins a language map block.
  259. :Section(s): global
  260. :Subsection(s): CD-TEXT block
  261. :Format:
  262. ``LANGUAGE_MAP { language_map... }``
  263. ``language_map``
  264. is a mapping of an integer in the range 0-255 to a country
  265. code. *TODO*
  266. NO
  267. ~~
  268. :Description: Negates (clears) track flags.
  269. :Section(s): track
  270. :Format:
  271. ``NO <flag>``
  272. ``flag``
  273. one of: ``COPY`` or ``PRE_EMPHASIS``.
  274. PREGAP
  275. ~~~~~~
  276. :Description: Sets track pregap.
  277. :Section(s): track
  278. :Format:
  279. ``PREGAP <pregap>``
  280. ``pregap``
  281. time in MSF format.
  282. SILENCE
  283. ~~~~~~~
  284. :Description: Add zero (silent) audio data to current track.
  285. :Section(s): track
  286. :Format:
  287. ``SILENCE <length>``
  288. ``length``
  289. time in MSF format.
  290. START
  291. ~~~~~
  292. :Description: Sets the length of the pregap.
  293. :Section(s): track
  294. :Format:
  295. ``START <start>``
  296. ``start``
  297. time in MSF format.
  298. TRACK
  299. ~~~~~
  300. :Description: Starts a new track.
  301. :Section(s): track
  302. :Format:
  303. ``TRACK <track_mode> [sub_channel_mode]``
  304. ``track_mode``
  305. one of: ``AUDIO``, ``MODE1``, ``MODE1_RAW``, ``MODE2``,
  306. ``MODE2_FORM1``, ``MODE2_FORM2``, ``MODE2_FORM_MIX``,
  307. ``MODE2_RAW``
  308. ``sub_channel_mode``
  309. one of: ``RW``, ``RW_RAW``
  310. TWO_CHANNEL_AUDIO
  311. ~~~~~~~~~~~~~~~~~
  312. :Description: Sets the two channel audio flag.
  313. :Section(s): track
  314. :Format: ``TWO_CHANNEL_AUDIO``
  315. ZERO
  316. ~~~~
  317. :Description: Add zero data to current track.
  318. :Section(s): track
  319. :Format:
  320. ``ZERO <length>``
  321. ``length``
  322. time in MSF format.
  323. (CD-TEXT keywords)
  324. ~~~~~~~~~~~~~~~~~~
  325. :Description: Sets CD-TEXT data.
  326. :Section(s): any
  327. :Subsection(s): language block
  328. :Format1:
  329. ``<CDTEXT_keyword> "<CDTEXT_field>"``
  330. ``CDTEXT_keyword``
  331. one of: (see `CD-TEXT`_ section for a list of keywords).
  332. ``CDTEXT_field``
  333. a string.
  334. :Format2:
  335. ``<CDTEXT_keyword> { CDTEXT_binary_data }``
  336. ``CDTEXT_binary_data``
  337. comma separated list of integers in the range 0-255.
  338. Format1 is for character data and Format2 is for binary data. See `CD-TEXT`_
  339. section for a list of CD-TEXT keywords.
  340. CD-TEXT
  341. =======
  342. MMC-3_ specifies 16 CD-TEXT types. Three are reserved and have no
  343. corresponding keywords. One is shared; the keyword depends on whether it is
  344. for the disc (``UPC_EAN``) or a track (``ISRC``). CD-TEXT entries are either
  345. character or binary data. All descriptions taken from MMC-3_.
  346. Keywords
  347. --------
  348. ARRANGER
  349. ~~~~~~~~
  350. :Description: Name(s) of the arranger(s)
  351. :Section: any
  352. :Format: character
  353. COMPOSER
  354. ~~~~~~~~
  355. :Description: Name(s) of the composer(s)
  356. :Section: any
  357. :Format: character
  358. DISC_ID
  359. ~~~~~~~
  360. :Description: Disc Identification information
  361. :Section: any
  362. :Format: binary
  363. GENRE
  364. ~~~~~
  365. :Description: Genre Identification and Genre information
  366. :Section: any
  367. :Format: binary
  368. Genre codes are in the Enhanced CD Specification or cdrtools_ ``cdtext.h`` file.
  369. ISRC
  370. ~~~~~
  371. :Description: ISRC Code of each track
  372. :Section: track
  373. :Format: character
  374. MESSAGE
  375. ~~~~~~~
  376. :Description: Message from the content provider and/or artist
  377. :Section: any
  378. :Format: character
  379. PERFORMER
  380. ~~~~~~~~~
  381. :Description: Name(s) of the performer(s)
  382. :Section: any
  383. :Format: character
  384. SONGWRITER
  385. ~~~~~~~~~~
  386. :Description: Name(s) of the songwriter(s)
  387. :Section: any
  388. :Format: character
  389. TITLE
  390. ~~~~~
  391. :Description: Title of album name or Track Titles
  392. :Section: any
  393. :Format: character
  394. TOC_INFO
  395. ~~~~~~~~~
  396. :Description: Table of Content information
  397. :Section: any
  398. :Format: binary
  399. TOC_INFO2
  400. ~~~~~~~~~
  401. :Description: Second Table of Content information
  402. :Section: any
  403. :Format: binary
  404. UPC_EAN
  405. ~~~~~~~
  406. :Description: UPC/EAN code of the album
  407. :Section: disc
  408. :Format: character
  409. SIZE_INFO
  410. ~~~~~~~~~
  411. :Description: Size information of the Block
  412. :Section: any
  413. :Format: binary
  414. Definitions
  415. ===========
  416. frame
  417. 1/75 of a second.
  418. International Standard Recording Code (ISRC)
  419. A 12 character identification code for sound recordings. See
  420. `ISRC intro`_ for details.
  421. MSF format
  422. a representation of time in the form ``m:s:f``. ``m`` is minutes,
  423. ``s`` is seconds, and ``f`` is frames. Fields may be zero padded.
  424. .. _MMC-3: ftp://ftp.t10.org/t10/drafts/mmc3/
  425. .. _cdrtools: http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html
  426. .. _ISRC intro: http://www.ifpi.org/site-content/online/isrc_intro.html