1<HTML><HEAD><TITLE>Manpage of CDA</TITLE> 2</HEAD><BODY BACKGROUND="bkgnd.gif" BGCOLOR="#FFFFFF"> 3<DIV ALIGN="center"> 4<A HREF="http://www.amb.org/xmcd/"><IMG SRC="xmcdlogo.gif" ALT="xmcd" BORDER="0"></A> 5</DIV> 6<B>CDA</B>(1)<BR> 7<HR> 8 9<P> 10<A NAME="NAME" id="NAME"> </A><A NAME="lbAB" id="lbAB"> </A> 11<H3>NAME</H3> 12<DIR> 13 14cda - Compact disc digital audio player utility 15<P> 16 17</DIR> 18<A NAME="SYNOPSIS" id="SYNOPSIS"> </A><A NAME="lbAC" id="lbAC"> </A> 19<H3>SYNOPSIS</H3> 20<DIR> 21 22<B>cda</B> 23 24 25[-<I>dev</I> device] [-<I>batch</I>] [-<I>debug</I> level#] 26[-<I>online</I> | -<I>offline</I>] <I>command</I> 27<P> 28 29</DIR> 30<A NAME="DESCRIPTION" id="DESCRIPTION"> </A><A NAME="lbAD" id="lbAD"> </A> 31<H3>DESCRIPTION</H3> 32<DIR> 33 34<I>Cda</I> 35 36is a program that allows the use of the CD-ROM, CD-R, CD-RW or DVD 37drive as a full-featured stereo compact-disc player and "ripper" 38from the shell command line. It can be used interactively in line 39mode or visual (screen) mode, or as a script-driven utility. 40This is a companion utility to <B><A HREF="xmcd.html">xmcd</A></B>(1), 41a Motif-based CD audio player application 42for the X window system. 43<I>Cda</I> 44 45uses the same configuration and support files as 46<I>xmcd.</I> 47 48<P> 49 50Most of the features found on "real" CD players are available in 51<I>cda,</I> 52 53such as shuffle and repeat, and track programming functions. 54<P> 55 56CDDA (CD digital audio) data extraction, playback, save-to-file, 57and pipe-to-program are supported on many platforms. For 58data extraction to file or pipe, 59<I>cda</I> 60 61can generate the data in MP3 (MPEG-1 layer 3), MPEG-2/MPEG-4 AAC, MP4 62Ogg Vorbis, FLAC, WAV, AU, AIFF, AIFF-C and raw headerless formats. 63Simultaneous extraction to file/pipe and real-time playback is 64possible on high performance computers. 65<P> 66 67Multi-disc changers are also supported. You can switch to a 68soecified disc, select to play only a single disc or auto-play all 69discs in normal or reverse order. 70<P> 71 72The Gracenote CDDB® Music Recognition Service(sm) feature is supported by 73<I>cda,</I> 74 75which allows the CD artist/title and track titles, and other 76information associated with the loaded CD to be displayed. 77For CDDA extraction to MP3, MP4, Ogg Vorbis and FLAC formats, 78<I>cda</I> 79 80can auto-fill the CD information tags embedded in these files. 81<P> 82 83This release of 84<I>cda</I> 85 86supports the enhanced Gracenote CDDB<SUP>2</SUP>® service on a number of platforms, 87and offers much richer features and content than the "classic" CDDB. 88Moreover, CDDB<SUP>2</SUP>-supplied information is now in UTF-8 89data format, providing international language support. 90See "LOCALIZATION" below. 91<P> 92 93In addition to CDDB, this release of 94<I>cda</I> 95 96supports reading CD-TEXT data from the disc for the disc/track 97artist and title information. 98<P> 99 100No capability is provided to add, modify or submit CDDB entries in 101<I>cda.</I> 102 103You must use the X-based <B><A HREF="xmcd.html">xmcd</A></B>(1) utility (or another 104CDDB-enabled application with the appropriate features) 105for that purpose. 106<P> 107 108On systems with more than one CD drive, multiple 109invocations of 110<I>cda</I> 111 112can be used to operate each drive independently. 113<P> 114 115<I>Cda</I> 116 117is designed to be easy to use, with particular care taken 118to make all output easily parsable by other programs. 119<P> 120 121The internal architecture of 122<I>cda</I> 123 124is designed to be easily portable to many UNIX operating 125system variants, and adaptable to the myriad of CD drives 126available. 127<P> 128 129</DIR> 130<A NAME="OPTIONS" id="OPTIONS"> </A><A NAME="lbAE" id="lbAE"> </A> 131<H3>OPTIONS</H3> 132<DIR> 133 134<I>Cda</I> 135 136supports the following options: 137<P> 138<DL COMPACT> 139<DT><I>-dev device</I><DD> 140Specifies the path name to the raw CD device. If this option is 141not used, the default device to be used is the first 142drive set up with the 143<I>xmcd</I> 144 145configuration program (See below). 146<DT><I>-batch</I><DD> 147Signifies that 148<I>cda</I> 149 150should run in batch mode. This suppresses all interaction with the 151user (i.e., will not prompt the user to type anything). Batch mode 152is not meaningful in visual mode. 153<DT><I>-online</I>, <I>-offline</I><DD> 154Forces 155<I>cda</I> 156 157to enable or disable Internet access. If this option is not specified, 158then the default is configured via the <I>internetOffline</I> 159parameter in the <B>common.cfg</B> file. In offline mode, CDDB lookup will 160only be done from the local cache. Please note that the daemon 161as well as the client will both perform CDDB lookups. If you want 162to disable Internet access in both, then the -offline option should be 163used when you start the daemon via the <B>cda on</B> command, as well as 164when you issue any 165<I>cda</I> 166 167client command. 168<DT><I>-debug level#</I><DD> 169Causes verbose debugging diagnostics to be displayed on <I>stderr</I>. 170Note that if you are running in visual mode, the stderr output should 171be redirected to a file, or the debug information will corrupt the 172screen. The level specifies the type of debugging messages desired: 173<P> 174<PRE> 1751 General debugging 1762 Device I/O debugging 1774 CD information debugging 17832 Sound DSP and output file/pipe debugging 17964 Message of the day debugging 180</PRE> 181 182<P> 183You may add the values together to enable multiple debugging types 184(i.e., A value of 3 turns on both General and Device I/O debugging). 185<P> 186</DL> 187 188</DIR> 189<A NAME="COMMANDS" id="COMMANDS"> </A><A NAME="lbAF" id="lbAF"> </A> 190<H3>COMMANDS</H3> 191<DIR> 192 193<I>Cda</I> 194 195supports the following commands: 196<P> 197<DL COMPACT> 198<DT><I>on</I><DD> 199Start the 200<I>cda daemon.</I> 201 202<DT><I>off</I><DD> 203Terminate the 204<I>cda daemon.</I> 205 206<DT><I>disc <load | eject | prev | next | disc#></I><DD> 207Load or eject the CD, or change discs on a multi-disc changer. 208<DT><I>lock <on | off></I><DD> 209Enable/disable the CD disc lock. When locked, the CD cannot be 210ejected using the CD drive front-panel eject button. You can only 211change the lock state when a CD is loaded and is not playing. 212<DT><I>play [track# [mm:ss]]</I><DD> 213Start playback. If the 214<I>track#</I> 215 216is used, the playback starts from the specified track. The optional 217<I>mm:ss</I> 218 219argument specifies the minutes and seconds offset into 220the track from where to start playback. 221<DT><I>pause</I><DD> 222Pauses the playback. Use 223<I>cda</I> 224 225<B>play</B> 226to resume playback. 227<DT><I>stop</I><DD> 228Stop the plaback. 229<DT><I>track <prev | next></I><DD> 230Proceed to the previous or the next track. This command is only 231valid when playback is already in progress. 232<DT><I>index <prev | next></I><DD> 233Proceed to the previous or the next index. This command is only 234valid when playback is already in progress. 235<DT><I>program [clear | save | track# ...]</I><DD> 236If no argument is specified, this command displays the current 237program play sequence, if any. The <B>clear</B> argument will 238cause the current program to be cleared. The <B>save</B> argument 239will save the current program, so that a future load of the 240same CD will automatically get the program sequence. 241To define a new program, specify a list of track numbers separated 242by spaces. To start program play, use the <B>play</B> command. 243You cannot define a new program while shuffle mode is enabled. 244Entering a program will disengage shuffle mode. 245<DT><I>shuffle <on | off></I><DD> 246Enable/disable shuffle play mode. When shuffle is enabled, 247<I>cda</I> 248 249will play the CD tracks in a random order. You can use this 250command only when audio playback is not in progress. Also, 251you must clear any program sequence before enabling shuffle. 252<DT><I>repeat <on | off></I><DD> 253Enable/disable the repeat mode. 254<DT><I>volume [value# | linear | square | invsqr ]</I><DD> 255If no argument is specified, this command displays the current 256audio volume and taper setting. If a 257<I>value</I> 258 259is used, then the audio volume level is set to the specified 260value. The valid range is 0 to 100. If one of <B>linear</B>, 261<B>square</B> or <B>invsqr</B> is specified, then the volume 262control taper is set to the specified curve. This control 263operates the hardware volume control on the CD drive in <I>standard</I> 264playback mode, or the computer's audio hardware in <I>cdda-play</I> mode. 265It has no effect on the data of the <I>cdda-save</I> or <I>cdda-pipe</I> 266outputs. 267<DT><I>balance [value#]</I><DD> 268If no argument is specified, this command displays the current 269balance control setting. If a 270<I>value</I> 271 272is used, then the balance is set to the specified value. 273The valid range is 0 to 100, where 0 is full left, 50 is 274center and 100 is full right. This control operates the hardware 275volume control on the CD drive in <I>standard</I> playback mode, 276or the computer's audio hardware in <I>cdda-play</I> mode. It has 277no effect on the data of the <I>cdda-save</I> or <I>cdda-pipe</I> 278outputs. 279<DT><I>route [stereo | reverse | mono-l | mono-r | mono | value#]</I><DD> 280If no argument is specified, this command displays the current 281channel routing setting. Otherwise, to set the routing, 282use one of the appropriate keywords 283or a 284<I>value</I> 285 286as follows: 287<P> 288<PRE> 2890 Normal stereo 2901 Reverse stereo 2912 Mono-L 2923 Mono-R 2934 Mono-L+R 294</PRE> 295 296<DT><I>outport [speaker | headphone | line-out | value#]</I><DD> 297CDDA playback output port selection. The <I>speaker</I>, <I>headphone</I> 298and <I>line-out</I> keywords are toggles. Alternatively, you may 299specify a numeric <I>value</I>, as follows: 300<P> 301<PRE> 3021 Speaker 3032 Headphone 3044 Line-out 305</PRE> 306 307<P> 308You may add the values together to enable multiple output ports 309(i.e., A value of 3 turns on both Speaker and Headphones). 310When the value is set to 0, the port setting is unmodified. 311If no argument is specified, this command displays the current output 312port setting. 313Note that this command may be meaningful only on some platforms, 314and only certain ports may be available on a particular architecture. 315See the PLATFORM file for details. 316<DT><I>cdda-att [value#]</I><DD> 317If no argument is specified, this command displays the current 318CDDA attenuator setting. If a 319<I>value</I> 320 321is used, then the CDDA attenuator level is set to the specified 322value. The valid range is 0 to 100. Note that in contrast to the 323<I>volume</I> command, this setting does not operate any hardware. 324It works by scaling the CDDA audio samples, and thus has no effect 325in <I>standard</I> playback mode, but affects all CDDA modes 326(<I>cdda-play</I>, <I>cdda-save</I> and <I>cdda-pipe</I>). 327<DT><I>status [cont [secs#]]</I><DD> 328Display the current disc status, disc number, track number, 329index number, time, modes, and repeat count. If the <B>cont</B> 330argument is specified, then the display will run continuously 331until the user types the interrupt character (typically <I>Delete</I> or 332<I>Ctrl-C</I>). The optional <B>secs</B> sub-argument is the 333display update time interval. The default is 1 second. 334<DT><I>toc [offsets]</I><DD> 335Display the CD Table of Contents. The disc artist/title 336and track titles associated with the current disc, queried from 337CDDB, is also shown. If the disc has associated notes or credits, 338an asterisk (*) is displayed after the genre description. Similarly, 339if a track has associated notes or credits, an asterisk is 340displayed after the track title. 341<P> 342If the CDDB server cannot determine an exact match for your CD, but 343found a list of possible matches, then the user will 344be prompted to select from that list. If batch mode is active 345(i.e., the -batch option is used), then no such prompt will 346occur. 347<P> 348If the <B>offsets</B> argument is used, 349then the track times are the absolute offsets from the start 350of the CD. Otherwise, the times shown are the track lengths. 351<DT><I>extinfo [track#]</I><DD> 352Display extended information associated with 353the current CD, if available from CDDB. If the 354CD is currently playing, then extended information 355associated with the playing track is also displayed. If a 356track number is used in the argument, then the extended 357information of the specified track is shown instead. 358<DT><I>notes [track#]</I><DD> 359Display disc notes information text associated with 360the current CD, if available from CDDB. If the 361CD is currently playing, then the track notes information 362associated with the playing track is also displayed. If a 363track number is used in the argument, then the track notes 364information text of the specified track is shown instead. 365<DT><I>on-load [none | spindown | autoplay | autolock | noautolock]</I><DD> 366Display, enable or disable options when a CD is loaded. The 367<I>spindown</I> 368 369option will cause the CD to stop after loading to conserve the laser 370and motor. The 371<I>autoplay</I> 372 373option will cause the CD to automatically start playing after loading. The 374<I>autolock</I> 375 376option causes the caddy or disc tray to be automatically locked. The 377<I>none,</I> 378 379<I>spindown</I> 380 381and 382<I>autoplay</I> 383 384options are mutually-exclusive. If no argument is used, then the 385current settings are displayed. 386<DT><I>on-exit [none | autostop | autoeject]</I><DD> 387Display, enable or disable options when the 388<I>cda daemon</I> 389 390exits. The 391<I>autostop</I> 392 393option will cause cda to stop playback, 394and the 395<I>autoeject</I> 396 397option will cause cda to eject the CD. Use 398<I>none</I> 399 400to cancel these options. If no argument is used, then 401te current settings are displayed. 402<DT><I>on-done [autoeject | noautoeject | autoexit | noautoexit]</I><DD> 403Display, enable or disable options when 404<I>cda</I> 405 406is done with playback. The 407<I>autoeject</I> 408 409option causes the 410<I>cda daemon</I> 411 412to eject the CD. The 413<I>autoexit</I> 414 415option will cause the 416<I>cda daemon</I> 417 418to exit. If no argument is used, then 419the current settings are displayed. 420<DT><I>on-eject [autoexit | noautoexit]</I><DD> 421Display, enable or disable options when 422<I>cda</I> 423 424ejects a CD. The 425<I>autoexit</I> 426 427option will cause the 428<I>cda daemon</I> 429 430to exit after ejecting the CD. If no 431argument is used, then the current settings are displayed. 432<DT><I>changer [multiplay | nomultiplay | reverse | noreverse]</I><DD> 433Display, enable or disable multi-disc changer options. The 434<I>multiplay</I> 435 436option specifies that 437<I>cda</I> 438 439plays all discs in sequence. The 440<I>nomultiplay</I> 441 442option will cause cda to stop after the current disc is done. 443The 444<I>reverse</I> 445 446option implies 447<I>multiplay,</I> 448 449except that the disc order is reversed. If no argument is used, 450then the current settings are displayed. 451<DT><I>mode [standard | cdda-play | cdda-save | cdda-pipe]</I><DD> 452Selects the playback mode. If no argument is used, then the 453current setting is displayed. See "PLAYBACK MODES" below for 454details about the modes. Please note that the cdda modes are 455toggles. If the current mode is cdda-play, specifying cdda-save 456will enable both cdda-play and cdda-save modes. Specifying a 457cdda mode twice will disable that mode. If no cdda mode is 458active, then the mode will revert to standard. Specifying standard 459mode will disable all cdda modes. 460<DT><I>jittercorr [on | off]</I><DD> 461Enables or disables CDDA jitter correction. If no argument is used, 462then the current setting is displayed. 463<DT><I>trackfile [on | off]</I><DD> 464For <I>CDDA-save</I> mode, specifies whether a separate file should be 465created for each CD track. If no argument is used, then the current 466setting is displayed. 467<DT><I>subst [on | off]</I><DD> 468For <I>CDDA-save</I> mode, specifies whether space and tab characters 469in the output file path name should be substituted with underscores ('_'). 470This makes the files easier to manipulate while using the UNIX command shell. 471If no argument is used, then the current setting is displayed. 472<DT><I>filefmt format<DD> 473Specifies the output audio file format if running in cdda-save</I> or 474<I>cdda-pipe</I> modes. The <I>format</I> is one of the following: 475raw, au, wav, aiff, aiff-c, mp3, ogg, flac, aac or mp4. 476<DT><I>outfile ["template"]</I><DD> 477Specifies the output audio file path name if running in <I>cdda-save</I> 478mode. If no argument is used, then the currently 479defined template is displayed. See the 480<I>xmcd</I> 481 482help file on the output file path template for information about the 483special tokens that could be used in the template. 484<DT><I>pipeprog ["path [arg ...]"]</I><DD> 485Specifies the external program to which the audio stream will be piped to 486when running in <I>cdda-pipe</I> mode. If no argument is used, then the 487currently defined program is displayed. 488<DT><I>compress [<0 | 3> [bitrate#] | <1 | 2> [qual#]]</I><DD> 489Selects the compression mode for compressed file formats, as follows: 490<P> 491For MP3, the modes are as follows: 492<PRE> 4930 Constant bitrate (CBR) 4941 Variable bitrate (VBR, old algorithm) 4952 Variable bitrate (VBR, new algorithm, faster) 4963 Average bit rate (ABR) 497</PRE> 498 499<P> 500For Ogg Vorbis and MP4, all modes are VBR, as follows: 501<PRE> 5020, 3 Use an average bit rate 5031, 2 Use a quality factor 504</PRE> 505 506<P> 507For FLAC, the modes are as follows: 508<PRE> 5090 None 5101 Enable exhaustive LP coefficient quant. search 5112 Enable encoding correctness verification 5123 Enable both 513</PRE> 514 515<P> 516For AAC, all modes are VBR, as follows: 517<PRE> 5180 Use an average bit rate, MPEG-2 5191 Use a quality factor, MPEG-2 5202 Use a quality factor, MPEG-4 5213 Use an average bit rate, MPEG-4 522</PRE> 523 524<P> 525For modes <I>0</I> and <I>3</I>, an optional bitrate (in kb/s) 526sub-argument can be specified. The supported bitrates are a discrete 527set of numbers from 32 to 320. A value of 0 can also be used to indicate 528the use of an internal default. For modes <I>1</I> and <I>2</I>, an optional 529quality factor (from 1 to 10) sub-argument can be used. 530Lower bitrates and quality factor values yield smaller 531files whereas higher numbers produce higher audio quality. 532For AAC and MP4 formats, the bitrate you specify will be double the 533actual bitrate (e.g., if you specify 128kbps, the actual bitrate used 534will be 64kbps). The bitrate or quality values, if specified, are 535ignored for the FLAC format. If no argument is used, then the current 536settings are displayed. 537<DT><I>min-brate [bitrate#]</I><DD> 538In average bitrate and variable bitrate modes, this commands lets you 539specify a low bitrate limit. The encoder will not drop below this limit 540while dynamically changing the bitrate. A value of 0 can be specified 541to indicate the use of an internal default. 542If no argument is used, then the current setting is displayed. 543This parameter has no effect on the FLAC, AAC or MP4 format. 544<DT><I>max-brate [bitrate#]</I><DD> 545In average bitrate and variable bitrate modes, this commands lets you 546specify a high bitrate limit. The encoder will not go above this limit 547while dynamically changing the bitrate. A value of 0 can be specified 548to indicate the use of an internal default. 549If no argument is used, then the current setting is displayed. 550This parameter has no effect on the FLAC, AAC or MP4 format. 551<DT><I>coding [stereo | j-stereo | force-ms | mono | algo#>]fR<DD> 552This command selects the stereo mode and encoding 553noise-shaping/psychoacoustics algorithm. 554If no argument is used, then the current settings are displayed. 555<P> 556For MP3, the algorithm is a number from 1 to 10. Lower numbers gives 557faster encoding whereas higher numbers produce higher audio quality. 558<P> 559For AAC and MP4, stereo</I> disables the mid/side coding, 560<I>j-stereo</I> and <I>force-ms</I> are synonymous, and <I>mono</I> 561is not supported. An algorithm value of 10 enables 562temporal noise shaping (TNS). 563<P> 564For FLAC, the stereo modes have no effect, but the algorithm value 565selects between faster encoding versus slightly better compression. 566<P> 567For Ogg Vorbis, this parameter has no effect. 568<DT><I>lowpass [off | auto | freq# [width#]]</I><DD> 569This allows a lowpass filter to be added. 570The <I>off</I> setting means no filter, the <I>auto</I> setting causes the 571encoder to determine whether a filter should be added and its parameters. 572Specifying a frequency (and optionally, a width) will enable the filter 573in manual mode. The frequency and width are both in Hz. 574The valid frequency range is from 16 to 50000 Hz. 575For MP3, the filter functions fully as described. 576For AAC and MP4, the <I>freq</I> can be used to limit the bandwidth, 577but the <I>width</I> is ignored. 578For Ogg Vorbis and FLAC, these parameters have no effect. 579If no argument is used, then the current settings are displayed. 580<DT><I>highpass [off | auto | freq# [width#]]</I><DD> 581For encoding to MP3 files, this allows a highpass filter to be added. 582The <I>off</I> setting means no filter, the <I>auto</I> setting causes the 583encoder to determine whether a filter should be added and its parameters. 584Specifying a frequency (and optionally, a width) will enable the filter 585in manual mode. The frequency and width are both in Hz. 586The valid frequency range is from 500 to 50000 Hz. The lower limit 587is imposed by the polyphase filter implementation in the MP3 encoder. 588For non-MP3 formats, these parameters have no effect. 589If no argument is used, then the current settings are displayed. 590<DT><I>flags [C|c][O|o][N|n][E|e][I|i]</I><DD> 591This allows you to specify some MP3 header and frame flags. 592The letter <I>c</I> denotes the "copyright" flag, the letter <I>o</I> 593denotes the "original" flag, the letter <I>n</I> denotes the "no res" 594(no bit reservoir) flag, the letter <I>e</I> denotes the addition of a 5952-byte checksum to each frame for error correction, and the letter 596<I>i</I> indicates strict ISO compatibility. The use of a upper-case 597letter turns on the flag, and lower-case turns off the flag. Multiple 598flags may be specified together. If no argument is used, then the current 599settings are displayed. 600<DT><I>lameopts [<disable | insert | append | replace> ["options"]]</I><DD> 601This command allows you to query or set command line options to 602be passed directly to the LAME MP3 encoder, and control how those 603options will be passed. This facilitates the use of advanced or 604experimental LAME features that cannot otherwise be invoked via the 605<I>cda</I> 606 607command line interface for setting encoding parameters. 608The following keywords control how the command line options 609are to be passed: 610<P> 611<I>disable</I>: No additional command line options are to be passed. 612<BR> 613 614<I>insert</I>: The specified options are to be inserted before 615the standard options. 616<BR> 617 618<I>append</I>: The specified options are to be appended after 619the standard options. 620<BR> 621 622<I>replace</I>: The specified options are to be used instead of 623the standard options. 624<P> 625Standard options refers to the LAME command line options that 626<I>cda</I> 627 628generates, based on the current settings (and can be altered by 629other encoding related cda commands above). 630If no argument is used, then the current settings are displayed. 631<DT><I>tag [off | v1 | v2 | both]</I><DD> 632This command specifies whether CD information (such as album and track 633artists and titles, genre type, etc.) should be added to the CDDA output 634file. For MP3, the information is added to either the version 1, version 2 635or both versions of the ID3 tag areas. For Ogg Vorbis, FLAC and MP4, 636the information is added to the metadata area. 637<BR> 638 639Note: An ID3v2 tag will not be added to the 640<I>cdda-pipe</I> 641 642MP3 stream regardless of the setting of this command. 643<DT><I>device</I><DD> 644Displays the CD drive and device information. 645<DT><I>version</I><DD> 646Displays the 647<I>cda</I> 648 649version and copyright information. 650<DT><I>cddbreg</I><DD> 651Invoke dialog to register with Gracenote in order to access the CDDB<SUP>2</SUP> service. 652This command can be used to do the initial registration, as well as to 653change or update user registration information. This function is not 654available with the "classic" CDDB service. 655<DT><I>cddbhint</I><DD> 656Ask Gracenote to send the password hint via e-mail. This is used in case you 657forget the CDDB user password. The password and password hint are both 658initially set via the <I>cddbreg</I> command. This function is not 659available with the "classic" CDDB service. 660<DT><I>motd</I><DD> 661Retrieve and display messages from the xmcd MOTD server, if any. 662Note that messages are displayed by the 663<I>cda</I> 664 665daemon rather than the client process. Thus, it will be displayed 666on the terminal where the daemon was started. 667<DT><I>debug [level#]</I><DD> 668Show, or set the debug level. If set, verbose debugging 669diagnostics will be printed on <I>stderr</I> of the terminal 670that the 671<I>cda daemon</I> 672 673is started from. If this is the same terminal that is running 674<I>cda</I> 675 676in visual mode, the debug information will corrupt the screen. 677See the description of the <I>-debug</I> option above for supported 678debug levels. 679<DT><I>visual</I><DD> 680Enter an interactive, screen-oriented visual mode. Most 681other cda commands can also be invoked within this mode. 682<P> 683</DL> 684 685</DIR> 686<A NAME="DEVICE_CONFIGURATION" id="DEVICE_CONFIGURATION"> </A><A NAME="lbAG" id="lbAG"> </A> 687<H3>DEVICE CONFIGURATION</H3> 688<DIR> 689 690See <B><A HREF="xmcd.html">xmcd</A></B>(1) for a description of the device configuration requirements. 691<P> 692 693<B>WARNING:</B> 694 695If 696<I>cda</I> 697 698is not correctly configured, you may cause 699<I>cda</I> 700 701to deliver commands that are not supported by your CD drive. 702Under some environments this may lead to system hang or crash. 703<P> 704 705</DIR> 706<A NAME="USING_CDA" id="USING_CDA"> </A><A NAME="lbAH" id="lbAH"> </A> 707<H3>USING CDA</H3> 708<DIR> 709 710Start the 711<I>cda daemon</I> 712 713with the <B>cda on</B> command (or the F1 (o) function in visual mode). 714This reserves the CD device and initializes the program for 715further commands. All other 716<I>cda</I> 717 718functions will not work unless the 719<I>cda daemon</I> 720 721is running. 722The other 723<I>cda</I> 724 725commands should be self explanatory. 726<P> 727 728The <B>off</B> command (or the F1 (o) function in visual mode) 729can be used to terminate the 730<I>cda daemon</I> 731 732and release the CD drive for use by other software. 733<P> 734 735</DIR> 736<A NAME="VISUAL_MODE" id="VISUAL_MODE"> </A><A NAME="lbAI" id="lbAI"> </A> 737<H3>VISUAL MODE</H3> 738<DIR> 739 740If the 741<I>cda visual</I> 742 743command is used, it enters a screen-oriented visual mode. 744In this mode, the status and other information available 745is continuously displayed and updated on the screen, and 746most functions are available via a single key stroke. 747<P> 748 749The minimum terminal screen size for the visual mode is 80 columns by 7509 rows. If your terminal is made to be smaller than that (for example, 751an <B>xterm</B>(1) window that has been sized too small), the 752output will be garbled. For best results, an 80x24 or larger terminal 753screen should be used. 754<P> 755 756Visual mode uses the curses screen library to control the screen. 757It is essential that the TERM environment variable reflect the current 758terminal type, which ideally should have 8 (or more) function keys. 759Since function key definitions in terminfo descriptions are often 760unreliable, alphabetic key alternatives are also available. 761<P> 762 763The screen is divided into two windows: an information window and a 764status window. According to context, the information window displays 765a help screen, device and version information, disc information and 766table of contents, or extended information about the track. This window is 767scrollable if it overflows its allotted screen area. 768The status window consists of the last few lines of the screen, 769enclosed in a box. The first line contains the program list, or 770track number and offset together with volume, balance and stereo/mono 771information. The remaining lines contain the function keys 772(with their alphabetic synonymns) and the functions they invoke. 773These functions are highlighted when they are on, making 774it easy to see the current state. 775<P> 776 777Screen annotation and online help make operation self explanatory, 778but for reference, a list of commands follows. Alphabetic key 779alternatives to function keys are given in parenthesis. 780<P> 781<DL COMPACT> 782<DT><I>?</I><DD> 783Display help screen. Dismiss this screen by pressing the space bar. 784<DT><I>F1 (o)</I><DD> 785On/Off. Start or stop the 786<I>cda daemon.</I> 787 788<DT><I>F2 (j)</I><DD> 789Load or eject the CD. 790<DT><I>F3 (p)</I><DD> 791Play, pause or unpause. 792<DT><I>F4 (s)</I><DD> 793Stop. 794<DT><I>F5 (k)</I><DD> 795Enable/disable the CD caddy lock. When locked, the CD cannot be ejected 796using the CD drive front-panel eject button. 797<DT><I>F6 (u)</I><DD> 798Shuffle/Program. Pressing this key cycles through three states: 799normal, shuffle and program. In shuffle mode, the tracks of the CD 800will be played in random order. On entering program mode, 801<I>cda</I> 802 803will prompt for a space or comma separated list of track numbers, 804representing a desired playing order. The list should be terminated by 805carriage return. An empty list returns 806<I>cda</I> 807 808to normal mode. Shuffle and program mode cannot be engaged 809unless a CD is loaded but not playing or paused. 810<DT><I>F7 (e)</I><DD> 811Enable/disable repeat mode. 812<DT><I>F8 (q)</I><DD> 813Terminate the visual mode. If the 814<I>cda daemon</I> 815 816is running, a reminder of the fact is given and it is allowed to 817continue. The CD drive will continue operating in the same state. 818<I>Cda</I> 819 820may be invoked again in either visual or line mode when required. 821<DT><I>D/d</I><DD> 822Change to the previous/next disc on multi-disc changes. 823<DT><I>Cursor left/right (C/c)</I><DD> 824Previous/next track. This is only valid if playback is already in 825progress. 826<DT><I></></I><DD> 827Proceed to the previous/next index mark. This is only valid if 828playback is already in progress. 829<DT><I>Cursor up/down (^/v)</I><DD> 830Scroll the information portion of the screen up or down. It may be 831scrolled up only until the last line is on the top line of the screen, 832and may not be scrolled down beyond the initial position. The initial 833scroll position is restored when different information is displayed, 834(e.g., when switching to or from the help information). 835<DT><I>+/-</I><DD> 836Increase or decrease volume by 5%. 837<DT><I>l/r</I><DD> 838Move balance 5% to left or right. 839<DT><I>Tab</I><DD> 840Successive depressions of this key change the mode from stereo to mono, 841mono right, mono left, reverse stereo, and back to normal stereo. 842<DT><I><n> [mins secs]</I><DD> 843Proceed to track 844<I>n</I> 845 846at 847<I>mins</I> 848 849minutes and 850<I>secs</I> 851 852seconds from the start. If 853<I>mins secs</I> 854 855is not given, start at the beginning of track 856<I>n.</I> 857 858<DT><I>^l/^r</I><DD> 859Control-l or control-r repaints the screen. This is useful if the 860screen content has been corrupted (e.g., by operator messages sent 861by the 862<I>wall(1M)</I> 863 864command). 865<P> 866</DL> 867 868</DIR> 869<A NAME="CD_DATABASE" id="CD_DATABASE"> </A><A NAME="lbAJ" id="lbAJ"> </A> 870<H3>CD DATABASE</H3> 871<DIR> 872 873The Gracenote CDDB® Music Recognition Service(sm) feature is supported by 874<I>cda,</I> 875 876which allows you to display the disc artists/title, 877track titles, and other information about the CD 878or tracks via the <B>toc</B>, <B>extinfo</B> and <B>notes</B> commands of 879<I>cda.</I> 880 881In visual mode, this information is displayed automatically 882if available. You cannot add, modify or submit CDDB information via 883<I>cda.</I> 884 885For more details about CDDB, see <B><A HREF="xmcd.html">xmcd</A></B>(1) 886and the CDDB file that comes with this release. 887<P> 888 889This release of 890<I>cda</I> 891 892also supports reading the CD-TEXT data from the disc for 893CD information. Only some recent CDs are produced with CD-TEXT 894data and this data can only be read on CD drives with CD-TEXT 895capability. 896<P> 897 898The priority of the CD information schemes (CDDB, CD-TEXT or local CD 899database files) is controlled via the cdinfoPath parameter in the 900<B>common.cfg</B> file. 901<P> 902 903</DIR> 904<A NAME="PLAYBACK_MODES" id="PLAYBACK_MODES"> </A><A NAME="lbAK" id="lbAK"> </A> 905<H3>PLAYBACK MODES</H3> 906<DIR> 907 908This release supports the following user-selectable playback modes 909(via the 910<I>cda</I> 911 912<B>mode</B> 913command): 914<P> 915<DL COMPACT> 916<DT><I>standard</I><DD> 917<BR> 918 919When playing an audio CD, the audio output is the analog "line out" 920connection on the back of your CD drive. There should be an audio 921cable connecting this output to your computer audio hardware CD 922input (or to an externally amplfied speaker or stereo system). The 923audio output is also available at the CD drive's front panel 924headphone connection, if so equipped. The 925<I>cda</I> 926 927<B>volume</B> 928command affect the CD drive's built-in volume control, if the drive 929has such controls. This is the mode that previous releases 930(<I>cda</I> version 1.x through 3.0) supported. 931<P> 932<DT><I>cdda-play</I><DD> 933<BR> 934 935When playing a CD in this mode, 936<I>cda</I> 937 938extracts the CD digital audio data off the CD drive over the 939data cable (e.g., SCSI or ATAPI/IDE). Then, it sends the data to the 940DSP (digital signal processor) device in your computer's audio hardware 941for real-time playback. The audio is typically heard through the 942computer's built-in speakers. No signal is produced at the line-out 943or headphone connections of the CD drive. The 944<I>cda</I> 945 946<B>volume</B> 947command affects the computer's DSP device. 948<P> 949<DT><I>cdda-save</I><DD> 950<BR> 951 952When playing a CD in this mode, 953<I>cda</I> 954 955extracts the CD digital audio data off the CD drive over the 956data cable (e.g., SCSI or ATAPI/IDE). Then, it writes the data 957into a file of your choosing. The 958<I>cda</I> 959 960<B>volume</B> 961command does not affect the data written to 962the output file. The output file format can be selected to be one 963of the following: 964<P> 965<PRE> 966Format Ext Description 967------ ----- --------------------------------------- 968RAW .raw Little-endian, 16 bit, 44.1 kHz, stereo 969AU .au Big-endian, 16 bit, 44.1 kHz, stereo 970WAV .wav Little-endian, 16 bit, 44.1 kHz, stereo 971AIFF .aiff Big-endian, 16 bit, 44.1 kHz, stereo 972AIFF-C .aifc Big-endian, 16 bit, 44.1 kHz, stereo 973MP3 .mp3 MPEG 1.0 Layer III compressed 974OGG .ogg Ogg Vorbis compressed 975FLAC .flac Free Lossless Audio CODEC compressed 976AAC .aac AAC (MPEG-2 or MPEG-4) compressed 977MP4 .mp4 MP4 (MPEG-4) compressed 978</PRE> 979 980<P> 981The file can be played later using an appropriate playback utility, 982or converted to another format. This mode will typically run faster than 983real-time with the non-compressed formats. With the compressed formats, 984it depends on the CPU performance of your system. 985<P> 986<DT><I>cdda-pipe</I><DD> 987<BR> 988 989When playing a CD in this mode, 990<I>cda</I> 991 992extracts the CD digital audio data off the CD drive over the 993data cable (e.g., SCSI or ATAPI/IDE). Then, it pipes the data 994stream to an external program that you specify. The output 995format is selected as in the <I>CDDA save to file</I> mode. 996This mode can be used with an external audio player, encoder, or 997other digital audio manipulation program. 998The external program must be capable of accepting audio data on its 999standard input, in one of the formats listed above. 1000</DL> 1001<P> 1002 1003More than one of the three CDDA modes can be selected at the same time. 1004For example, if both the <I>cdda-play</I> and the 1005<I>cdda-save</I> modes are enabled, the two functions 1006will be performed simultaneously. Note that on most systems, only one 1007program can access the system's DSP at a time, therefore you will 1008likely not be able to select <I>cdda-play</I> and 1009<I>cdda-pipe</I> at the same time, where the external program 1010is itself an audio player. 1011<P> 1012 1013<B>NOTE</B>: The CDDA (CD digital audio) modes will function only on 1014CD drives that provides this capability, and only on some OS and 1015hardware platforms. See the RELNOTES file for details about platform 1016support and other CDDA related notes. 1017<P> 1018 1019</DIR> 1020<A NAME="LOCALIZATION" id="LOCALIZATION"> </A><A NAME="lbAL" id="lbAL"> </A> 1021<H3>LOCALIZATION</H3> 1022<DIR> 1023 1024The "classic" CDDB service supplies data in the ISO Latin-1 format only, 1025multi-byte characters are not supported. 1026<P> 1027 1028The CDDB<SUP>2</SUP> service supplies data in UTF-8 data format, which is 1029identical to US-ASCII for single-byte characters. Multi-byte UTF-8 1030characters are also supported. 1031By default, cda will translate the characters to ISO Latin-1 1032(ISO 8859-1, for English and many European character sets). 1033By changing the setting of the <B>charsetConvMode</B> parameter in 1034the <B>common.cfg</B> file, you can have 1035<I>cda</I> 1036 1037display the UTF-8 data without conversion (good for US-ASCII 1038or if you are using UTF-8 fonts), 1039or attempt to convert UTF-8 strings to the default character set 1040as specified by the <B>LANG</B> environment variable. This conversion 1041will occur only if the system's list of locales also support UTF-8. 1042<P> 1043 1044If you desire to view CDDB data in languages other than English or the 1045ISO Latin-1 European character set, you may need to configure 1046your display terminal to display the appropriate fonts (if the 1047terminal has such capabilities). Terminal font configuration is 1048device-dependent, OS-dependent and beyond the scope of this document. 1049Please see your display terminal's documentation (or in the case of 1050a computer graphics console, the operating system's console font 1051related documentation for information. 1052<P> 1053 1054Non-CDDB text (such as headings, labels and error messages) are not 1055localized in 1056<I>cda.</I> 1057 1058<P> 1059 1060</DIR> 1061<A NAME="NOTES" id="NOTES"> </A><A NAME="lbAM" id="lbAM"> </A> 1062<H3>NOTES</H3> 1063<DIR> 1064 1065Not all platforms and CD drives support all the features of 1066<I>cda.</I> 1067 1068For example, some drives do not support a software-driven 1069volume control. On these drives the 1070<I>cda</I> 1071 1072<B>volume</B> and <B>balance</B> commands may have no effect, or may 1073simply change the volume between full mute and maximum. 1074Similarly, the <B>lock</B>, <B>disc</B>, <B>index</B>, 1075and <B>route</B> commands of 1076<I>cda</I> 1077 1078may not have any effect on drives that 1079do not support the appropriate functionality. 1080<P> 1081 1082The lame(1) MP3 encoder program must be installed on your system in 1083order for 1084<I>cda</I> 1085 1086to perform CD ripping to MP3 format files. Similarly, the 1087faac(1) encoder program must be installed on your system for 1088the AAC and MP4 formats. 1089<P> 1090 1091Your copy of the 1092<I>cda</I> 1093 1094executable must be compiled and linked with the Ogg Vorbis and FLAC encoder 1095libraries in order to perform CD ripping to these formats. See the 1096INSTALL file for details. 1097<P> 1098 1099</DIR> 1100<A NAME="ENVIRONMENT_VARIABLES" id="ENVIRONMENT_VARIABLES"> </A><A NAME="lbAN" id="lbAN"> </A> 1101<H3>ENVIRONMENT VARIABLES</H3> 1102<DIR> 1103 1104The <B>LANG</B> environment variable sets the default character set. 1105See "LOCALIZATION" above. 1106<P> 1107 1108The <B>LAME_PATH</B> environment variable may be used to specify the 1109path to the lame(1) MP3 encoder program. 1110<P> 1111 1112The <B>FAAC_PATH</B> environment variable may be used to specify the 1113path to the faac(1) AAC/MP4 encoder program. 1114<P> 1115 1116The <B>AUDIODEV</B> environment variable may be used to specify an 1117alternate audio device when running 1118<I>cda</I> 1119 1120in the <I>cdda-play</I> mode. 1121The default audio device is write method dependent as follows: 1122 1123<PRE> 1124 1125AIX write method: /dev/paud0/1 (PCI audio) 1126AIX write method: /dev/baud0/1 (MCA audio) 1127ALSA write method: plughw:0,0 1128HP-UX write method: /dev/audio 1129Linux/OSS write method: /dev/dsp 1130OSF1 write method: 0 1131Solaris write method: /dev/audio 1132</PRE> 1133 1134<P> 1135 1136In addition, with the OSS and ALSA write methods, the <B>MIXERDEV</B> 1137environment variable may be used to specify the PCM mixer channel device. 1138The default is <I>/dev/mixer</I> for OSS, and <I>default</I> for ALSA. 1139<P> 1140 1141On FreeBSD with ATAPI CD drives, cda will automatically use either 1142the CDIOCREADAUDIO ioctl or the pread(2) system call for CDDA reads, 1143based on the running kernel version. You may override the default 1144by setting the environment variable <B>CDDA_USE_PREAD</B> to 0 or 1, 1145respectively. Normally this is not necessary. 1146<P> 1147 1148</DIR> 1149<A NAME="FILES" id="FILES"> </A><A NAME="lbAO" id="lbAO"> </A> 1150<H3>FILES</H3> 1151<DIR> 1152 1153$HOME/.cddb2/* 1154<BR> 1155 1156$HOME/.xmcdcfg/* 1157<BR> 1158 1159XMCDLIB/cdinfo/* 1160<BR> 1161 1162XMCDLIB/config/config.sh 1163<BR> 1164 1165XMCDLIB/config/common.cfg 1166<BR> 1167 1168XMCDLIB/config/device.cfg 1169<BR> 1170 1171XMCDLIB/config/.tbl/* 1172<BR> 1173 1174XMCDLIB/config/* 1175<BR> 1176 1177XMCDLIB/help/* 1178<BR> 1179 1180BINDIR/cda 1181<BR> 1182 1183MANDIR/cda.1 1184<BR> 1185 1186/tmp/.cdaudio/* 1187<P> 1188 1189</DIR> 1190<A NAME="RELATED_WEB_SITES" id="RELATED_WEB_SITES"> </A><A NAME="lbAP" id="lbAP"> </A> 1191<H3>RELATED WEB SITES</H3> 1192<DIR> 1193 1194Xmcd/cda web site: <I><A HREF="http://www.amb.org/xmcd/">http://www.amb.org/xmcd/</A></I> 1195<BR> 1196 1197Gracenote web site: <I><A HREF="http://www.cddb.com/">http://www.cddb.com/</A></I> 1198<BR> 1199 1200Xmmix web site: <I><A HREF="http://www.amb.org/xmmix/">http://www.amb.org/xmmix/</A></I> 1201<BR> 1202 1203LAME MP3 encoder: <I><A HREF="http://www.mp3dev.org/">http://www.mp3dev.org/</A></I> 1204<BR> 1205 1206Ogg Vorbis: <I><A HREF="http://www.xiph.org/ogg/vorbis/">http://www.xiph.org/ogg/vorbis/</A></I> 1207<BR> 1208 1209FLAC (Free Lossless Audio CODEC): <I><A HREF="http://flac.sourceforge.net/">http://flac.sourceforge.net/</A></I> 1210<BR> 1211 1212FAAC (AAC/MP4 encoder): <I><A HREF="http://www.audiocoding.com/">http://www.audiocoding.com/</A></I> 1213<BR> 1214 1215Hydrogen Audio (discussion forums): <I><A HREF="http://www.hydrogenaudio.org/">http://www.hydrogenaudio.org/</A></I> 1216<BR> 1217 1218Sox audio format conversion utility: <I><A HREF="http://www.spies.com/Sox/">http://www.spies.com/Sox/</A></I> 1219<P> 1220 1221</DIR> 1222<A NAME="SEE_ALSO" id="SEE_ALSO"> </A><A NAME="lbAQ" id="lbAQ"> </A> 1223<H3>SEE ALSO</H3> 1224<DIR> 1225 1226<A HREF="xmcd.html">xmcd</A>(1), xmmix(1), X(1), lame(1), faac(1), sox(1) 1227<BR> 1228 1229Xmcd's README, PLATFORM, DRIVES, INSTALL and RELNOTES files 1230<P> 1231 1232</DIR> 1233<A NAME="AUTHOR" id="AUTHOR"> </A><A NAME="lbAR" id="lbAR"> </A> 1234<H3>AUTHOR</H3> 1235<DIR> 1236 1237Ti Kan (<I><A HREF="mailto:xmcd@amb.org">xmcd@amb.org</A></I>) 1238<BR> 1239 1240AMB Laboratories, Sunnyvale, CA, U.S.A. 1241<BR> 1242 1243<I>Cda</I> 1244 1245also contains code contributed by several dedicated individuals. 1246See the ACKS file in the 1247<I>cda</I> 1248 1249distribution for information. 1250<BR> 1251 1252Comments, suggestions, and bug reports are always welcome. 1253<P> 1254</DIR> 1255 1256<HR> 1257<A NAME="index"> </A><H2>Table of Contents</H2> 1258<OL> 1259<OL> 1260<LI><A HREF="#lbAB">Name</A> 1261<LI><A HREF="#lbAC">Synopsis</A> 1262<LI><A HREF="#lbAD">Description</A> 1263<LI><A HREF="#lbAE">Options</A> 1264<LI><A HREF="#lbAF">Commands</A> 1265<LI><A HREF="#lbAG">Device configuration</A> 1266<LI><A HREF="#lbAH">Using cda</A> 1267<LI><A HREF="#lbAI">Visual mode</A> 1268<LI><A HREF="#lbAJ">Cd database</A> 1269<LI><A HREF="#lbAK">Playback modes</A> 1270<LI><A HREF="#lbAL">Localization</A> 1271<LI><A HREF="#lbAM">Notes</A> 1272<LI><A HREF="#lbAN">Environment variables</A> 1273<LI><A HREF="#lbAO">Files</A> 1274<LI><A HREF="#lbAP">Related web sites</A> 1275<LI><A HREF="#lbAQ">See also</A> 1276<LI><A HREF="#lbAR">Author</A> 1277</OL> 1278</OL> 1279<H3>Local Discography</H3> 1280<UL> 1281<LI><A HREF="index.html">Main Index</A> 1282<LI><A HREF="discog.html">How to use Local Discography</A> 1283</UL> 1284</BODY> 1285</HTML> 1286