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.
 
 
 
 
 
 

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