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.
 
 
 
 
 
 

398 lines
6.6 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. REM
  32. ~~~
  33. Begin a comment line. All lines beginning with ``REM`` are ignored.
  34. :Section(s): any
  35. :Format: ``REM [comments]``
  36. CATALOG
  37. ~~~~~~~
  38. Sets the catalog number of the CD.
  39. :Section(s): global
  40. :Format: ``CATALOG <catalog_number>``
  41. ``catalog_number``
  42. an integer consisting of exactly 13 digits.
  43. FILE
  44. ~~~~
  45. Sets a new input file. ``FILE`` line precedes the beginning of the track
  46. section.
  47. :Section(s): track
  48. :Format: ``FILE <filename> [file_format]``
  49. ``filename``
  50. a string.
  51. ``file_format``
  52. one of: ``BINARY``, ``MOTOROLA``, ``AIFF``, ``WAVE``, or ``MP3``.
  53. TRACK
  54. ~~~~~
  55. Starts a new track.
  56. :Section(s): track
  57. :Format: ``TRACK <track_number> <track_mode>``
  58. ``track_number``
  59. a positive integer in the range 1-99.
  60. ``track_mode``
  61. one of: ``MODE1/2048``, ``MODE1/2352``, ``MODE2/2336``, ``MODE2/2048``,
  62. ``MODE2/2324``, ``MODE2/2336``, or ``MODE2/2352``.
  63. FLAGS
  64. ~~~~~
  65. Sets track flags.
  66. :Section(s): track
  67. :Format: ``FLAGS [flag]...``
  68. ``flag``
  69. one of: ``PRE``, ``DCP``, ``4CH``, or ``SCMS``.
  70. ISRC
  71. ~~~~
  72. Sets track ISRC number.
  73. :Section(s): track
  74. :Format: ``ISRC <ISRC_number>``
  75. ``ISRC_number``
  76. a string with the format CCOOOOYYSSSSS.
  77. PREGAP
  78. ~~~~~~
  79. Sets track pregap.
  80. :Section(s): track
  81. :Format: ``PREGAP <pregap>``
  82. ``pregap``
  83. time in MSF format.
  84. INDEX
  85. ~~~~~
  86. Sets a track index.
  87. :Section(s): track
  88. :Format: ``INDEX <index_number> <index>``
  89. ``index_number``
  90. an integer in the range 0-99.
  91. ``index``
  92. time in MSF format.
  93. (CD-TEXT keywords)
  94. ~~~~~~~~~~~~~~~~~~
  95. Sets CD-TEXT data. The cue format does not have native support for binary
  96. CD-TEXT.
  97. :Section(s): any
  98. :Format: ``<CDTEXT_keyword> <CDTEXT_field>``
  99. ``CDTEXT_keyword``
  100. (see `CD-TEXT`_ section for a list of CD-TEXT keywords)
  101. ``CDTEXT_keyword``
  102. a string.
  103. TOC File Format
  104. ===============
  105. The standard file suffix for a TOC file is ``.toc``.
  106. Certain keywords begin a block, which must be enclosed between ``{`` and ``}``
  107. brackets.
  108. Comments
  109. --------
  110. Comments begin with ``//`` and may be placed anywhere. Because they can be
  111. placed anywhere in a line, toc comments are treated as a special case (not as a
  112. keyword). Any text beginning with ``//`` is stripped from each line.
  113. Keywords
  114. --------
  115. CATALOG
  116. ~~~~~~~
  117. :Section(s): global
  118. :Format: ``CATALOG "<catalog_number>"``
  119. Sets the catalog number of the CD. ``catalog_number`` must be exactly 13
  120. digits.
  121. CD_DA
  122. ~~~~~
  123. :Section(s): global
  124. :Format: ``CD_DA``
  125. Sets the CD format to audio.
  126. CD_ROM
  127. ~~~~~~
  128. :Section(s): global
  129. :Format: ``CD_ROM``
  130. Sets the CD format to data.
  131. CD_ROM_XA
  132. ~~~~~~~~~
  133. :Section(s): global
  134. :Format: ``CD_ROM_XA``
  135. Sets the CD format to mixed.
  136. TRACK
  137. ~~~~~
  138. :Section(s): track
  139. :Format: ``TRACK <track_mode> [sub_channel_mode]``
  140. NO
  141. ~~
  142. :Section(s): track
  143. :Format: ``NO <flag>``
  144. Negates (clears) track flags. Allowable ``flag`` entries are ``COPY`` and
  145. ``PRE_EMPHASIS``.
  146. COPY
  147. ~~~~
  148. :Section(s): track
  149. :Format: ``COPY``
  150. Sets the copy permitted flag.
  151. PRE_EMPHASIS
  152. ~~~~~~~~~~~~
  153. :Section(s): track
  154. :Format: ``PRE_EMPHASIS``
  155. Sets the pre-emphasis flag.
  156. TWO_CHANNEL_AUDIO
  157. ~~~~~~~~~~~~~~~~~
  158. :Section(s): track
  159. :Format: ``TWO_CHANNEL_AUDIO``
  160. Sets the two channel audio flag.
  161. FOUR_CHANNEL_AUDIO
  162. ~~~~~~~~~~~~~~~~~~
  163. :Section(s): track
  164. :Format: ``FOUR_CHANNEL_AUDIO``
  165. Sets the four channel audio flag.
  166. ISRC
  167. ~~~~
  168. :Section(s): track
  169. :Format: ``ISRC "<ISRC_number>"``
  170. Sets track ISRC number. ``ISRC_number`` must be of the format CCOOOOYYSSSSS.
  171. SILENCE
  172. ~~~~~~~
  173. :Section(s): track
  174. *TODO*
  175. ZERO
  176. ~~~~
  177. :Section(s): track
  178. *TODO*
  179. FILE
  180. ~~~~
  181. :Section(s): track
  182. :Format: ``FILE "<filename>" <start> [length]``
  183. Add file to current track. ``start`` and ``length`` must be in MSF format.
  184. AUDIOFILE
  185. ~~~~~~~~~
  186. :Section(s): track
  187. :Format: ``AUDIOFILE "<filename>" <start> [length]``
  188. Add file to current track. ``start`` and ``length`` must be in MSF format.
  189. DATAFILE
  190. ~~~~~~~~
  191. :Section(s): track
  192. *TODO*
  193. FIFO
  194. ~~~~
  195. :Section(s): track
  196. *TODO*
  197. START
  198. ~~~~~
  199. :Section(s): track
  200. :Format: ``START <start>``
  201. *TODO*
  202. PREGAP
  203. ~~~~~~
  204. Section(s): track
  205. Format: ``PREGAP <pregap>``
  206. Sets track pregap. ``pregap`` must be in MSF format.
  207. INDEX
  208. ~~~~~
  209. :Section(s): track
  210. :Format: ``INDEX <index_number> <index_time>``
  211. Sets a track index. ``index_number`` must be a non-negative integer.
  212. ``index_time`` must be in MSF format.
  213. CD_TEXT
  214. ~~~~~~~
  215. :Section(s): any
  216. :Format: ``CD_TEXT {}``
  217. Begins a CD-TEXT block.
  218. LANGUAGE_MAP
  219. ~~~~~~~~~~~~
  220. :Section(s): global
  221. :Subsection(s): CD-TEXT block
  222. :Format: ``LANGUAGE_MAP { language_map... }``
  223. Begins a language map block. ``language_map`` is a mapping of an integer in
  224. the range 0-255 to a country code.
  225. LANGUAGE
  226. ~~~~~~~~
  227. :Section(s): track
  228. :Subsection(s): CD-TEXT block
  229. :Format: ``LANGUAGE language_number { cd_text }``
  230. Begins a language block. ``language_number`` must be an integer in the range
  231. 0-255. ``cd_text`` is a series of CD-TEXT keyword lines.
  232. (CD-TEXT keywords)
  233. ~~~~~~~~~~~~~~~~~~
  234. :Section(s): any
  235. :Subsection(s): language block
  236. :Format1: ``<CDTEXT_keyword> "<CDTEXT_field>"``
  237. :Format2: ``<CDTEXT_keyword> { CDTEXT_binary_data }``
  238. See `CD-TEXT`_ section for a list of CD-TEXT keywords. Format1 is for
  239. character data and Format2 is for binary data. ``CDTEXT_binary_data`` is a
  240. comma seperated list of integers in the range 0-255.
  241. CD-TEXT
  242. =======
  243. Keywords
  244. --------
  245. ========== ======
  246. Keyword Format
  247. ========== ======
  248. TITLE char
  249. PERFORMER char
  250. SONGWRITER char
  251. COMPOSER char
  252. ARRANGER char
  253. MESSAGE char
  254. DISC_ID binary
  255. GENRE binary
  256. TOC_INFO binary
  257. TOC_INFO2 binary
  258. UPC_EAN char
  259. ISRC char
  260. SIZE_INFO binary
  261. ========== ======
  262. Definitions
  263. ===========
  264. MSF format
  265. a representation of time in the form ``mm:ss:ff``. ``mm`` is minutes,
  266. ``ss`` is seconds, and ``ff`` is frames
  267. frame
  268. 1/74 of a second