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.
 
 
 
 
 
 

491 lines
8.1 KiB

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