home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / CDROM / ShowTOC / ShowTOC.readme < prev    next >
Text File  |  2000-01-09  |  10KB  |  295 lines

  1. Short:    Shows TOC of AudioCDs in various ways
  2. Kurz:     zeigt TOC von AudioCDs in vielen Varianten
  3. Author:   amiga@rripley.de (Ralph Reuchlein)
  4. Uploader: amiga@rripley.de (Ralph Reuchlein)
  5. Type:     disk/cdrom
  6. Version:  1.0
  7. Date:     09-Jan-2000
  8.  
  9.                                ShowTOC
  10.                                =======
  11.  
  12.  
  13. PURPOSE
  14.  
  15.    Since I own a CD burner I made my own compilations from various CDs
  16.    including AudioCDs containing my favourite Amiga modules.  I also
  17.    create my own CD labels I print and stick on my burnt CDs.  Now I
  18.    had the problem to find out the length of each burnt track and the
  19.    information provided by the source CDs is wrong in most cases, so I
  20.    decided to write a program that prints the contents of an AudioCD
  21.    in a configurable way.
  22.  
  23.    This software is eMailware, which means, that if you like this
  24.    piece of software, you have to write me an eMail (address see end
  25.    of readme).
  26.  
  27.  
  28. HISTORY
  29.  
  30.    v1.0:
  31.    - public release
  32.  
  33.  
  34.  
  35. INSTALL
  36.  
  37.    Simply unpack the archive to anywhere you want.  I prefer to copy
  38.    the executable to C:.
  39.  
  40.  
  41.  
  42. REQUIREMENTS
  43.  
  44.    - OS 3.0 and higher
  45.    - CDROM
  46.    - AudioCDs :-)
  47.  
  48.  
  49.  
  50. USAGE
  51.  
  52.    The template is
  53.  
  54.       DEVICE=D/K/A,UNIT=U/N/K/A,FORMAT=FMT/K,INTRODUCER=INTR/K,CDIDDIR/K,
  55.       HEADFORMAT=HEADFMT/K,TAILFORMAT=TAILFMT/K,
  56.       NOHEADER/S,NOLIST/S,NOTAIL/S
  57.  
  58.    You always have to provide the device name of your SCSI interface
  59.    and the unit number of the device, which is usually
  60.  
  61.       unit = (BOARD * 100) + (LUN * 10) + SCSI_ID
  62.  
  63.    If you have only one SCSI interface, only the SCSI_ID is needed.
  64.  
  65.    FORMAT is the format string for each track on CD, HEADFORMAT is
  66.    used for a header of the track list (e.g. CD ID) and TAILFORMAT for
  67.    the end of the track list (e.g. length of CD).  Each of the format
  68.    parameters have default parameter:
  69.  
  70.       HEADFORMAT: "       CD: %i%\n    Title: %T%\nArtist(s): %a"
  71.       FORMAT:     "Track  %2n: %d  %t"
  72.       TAILFORMAT: "CD length: %f"
  73.  
  74.    Available format types are:
  75.  
  76.       %sm   Minutes of start time
  77.       %ss   Seconds of start time
  78.       %sf   frame fraction of start time
  79.       %sd   decimal fraction of start time
  80.       %sa   all frames of start time
  81.       %s    start time with format "%2sm:%02ss;%02sf"
  82.       %sn   number of first track
  83.  
  84.       %em   Minutes of end time
  85.       %es   Seconds of end time
  86.       %ef   frame fraction of end time
  87.       %ed   decimal fraction of end time
  88.       %ea   all frames of end time
  89.       %e    end time with format "%2em:%02es;%02ef"
  90.       %en   number of last track
  91.  
  92.       %dm   Minutes of duration
  93.       %ds   Seconds of duration
  94.       %df   frame fraction of duration
  95.       %dd   decimal fraction of duration
  96.       %da   all frames of duration
  97.       %d    duration with format "%2dm:%02ds;%02df"
  98.  
  99.       %fm   Minutes of full CD time
  100.       %fs   Seconds of full CD time
  101.       %ff   frame fraction of full CD time
  102.       %fd   decimal fraction of full CD time
  103.       %fa   all frames of full CD time
  104.       %f    full CD time with format "%2fm:%02fs;%02ff"
  105.  
  106.       %n    track number
  107.       %N    number of tracks
  108.  
  109.       %i    CD id
  110.       %T    Title of CD
  111.       %t    Title of track
  112.       %a    Artist(s) of CD
  113.       %l    TOC length on CD in bytes
  114.  
  115.       %\n   Special character: New line
  116.       %\r   Special character: Carriage return
  117.       %\f   Special character: Form feed
  118.       %\t   Special character: Tabulator
  119.  
  120.    As you can see, you have many opportunities to build your own
  121.    format strings.  Usage of format types for tracks in the header or
  122.    tail strings is senseless, but possible (you will get unpredictable
  123.    results).  By the way I have to describe the difference between the
  124.    'frame fraction' and 'decimal fraction':  Each second on an AudioCD
  125.    has 75 frames, therefore I have two ways to show these fraction.
  126.    First I can print out the number of frame in that second (the %xf
  127.    format type, which is default) or I can calculate the decimal
  128.    fraction (1/75th part) of one second (the %xd format type).  For
  129.    example a frame count of 47 (format type %xf) would print a 63
  130.    (rounded up) with the format type %xd, where x is one of s, e, d
  131.    and f.
  132.  
  133.    Each format type can be formatted like the printf() function from
  134.    the C standard libraries. There is only one restriction: You cannot
  135.    add a type qualifier to the type, e.g. "%lw" (must only be "%w").
  136.    Some examples of formatting:
  137.  
  138.       %30t  Track title will be displayed in a 30 column wide space.
  139.             If the basename length is less than 30, it will be right
  140.             filled by spaces.
  141.       %-30t Equals %30n, but field will be left filled by spaces.
  142.       %.4t  Truncates track name to 4 characters or will be right
  143.             filled if name length is less than 4.
  144.       %04fm Writes minutes of complete CD in a 4 column wide field.
  145.             If the number has less than 4 digits, it will be left
  146.             filled with zeros instead of spaces.
  147.  
  148.    For more information refer to the C standard library documentation
  149.    of printf(), sprintf() or fprintf().
  150.  
  151.    If you use ShowTOC in a script that also uses '%' as format
  152.    introducer, you can switch to another introducer with the parameter
  153.    INTRODUCER, e.g. '$' or '&'.  I recommend non-alpha characters.
  154.  
  155.    The parameter CDIDDIR is used to retrieve the CD title and contents
  156.    from a so-called CDID file which is supported by many CD-Players
  157.    written for Amiga, e.g. OptyCDPlayer, ACDPlay, etc.  If you do not
  158.    provide that parameter or if ShowTOC cannot find a CDID file for
  159.    your CD, the format types %t, %T and %a were not used.  You can
  160.    find huge CDID archives in the Aminet.
  161.  
  162.    Finally you can turn off the three output blocks header, list
  163.    and/or tail with the NOHEADER, NOLIST and NOTAIL switches.
  164.  
  165.    ShowTOC makes no difference between real audio tracks and data
  166.    tracks, therefore you can print a track listing of e.g. an
  167.    Aminet CD.
  168.  
  169.  
  170.  
  171. EXAMPLES
  172.  
  173.    A call of ShowTOC with the device and unit only
  174.  
  175.       ShowTOC DEVICE=2060scsi.device UNIT=2
  176.  
  177.    will return a simple track list:
  178.  
  179.              CD: ID11009b58037ca6
  180.           Title: 
  181.       Artist(s): 
  182.       Track   1:  4:18;15
  183.       Track   2:  4:31;40
  184.       Track   3:  4:11;45
  185.       Track   4:  4:11;15
  186.       Track   5:  4:30;55
  187.       Track   6:  4:56;10
  188.       Track   7:  4:27;45
  189.       Track   8:  4:02;10
  190.       Track   9:  4:40;02
  191.       Track  10:  5:35;68
  192.       Track  11:  5:21;25
  193.       CD length: 50:46;68
  194.  
  195.    The lines "Title:" and "Artist(s):" are empty, because ShowTOC
  196.    couldn't resolve the CD's name despite of the lack of parameter
  197.    CDIDDIR.  Using the same command including that parameter
  198.  
  199.       ShowTOC DEVICE=2060scsi.device UNIT=2 CDIDDIR=AUDIO:disks
  200.  
  201.    does print out
  202.  
  203.              CD: ID11009b58037ca6
  204.           Title: Break Every Rule
  205.       Artist(s): Tina Turner
  206.       Track   1:  4:18;15  Typical Male
  207.       Track   2:  4:31;40  What You Get Is What You See
  208.       Track   3:  4:11;45  Two People
  209.       Track   4:  4:11;15  Till The Right Man Comes Along
  210.       Track   5:  4:30;55  Afterglow
  211.       Track   6:  4:56;10  Girls
  212.       Track   7:  4:27;45  Back Where You Started
  213.       Track   8:  4:02;10  Break Every Rule
  214.       Track   9:  4:40;02  Overnight Sensation
  215.       Track  10:  5:35;68  Paradise Is Here
  216.       Track  11:  5:21;25  I'll Be Thunder
  217.       CD length: 50:46;68
  218.  
  219.  
  220.    If you are only interested in the ID of the CD, the number of
  221.    frames and the analogue runtime stored on your AudioCD, you simply
  222.    need following shell command:
  223.  
  224.       ShowTOC DEVICE=2060scsi.device UNIT=2 NOHEADER NOLIST TAILFORMAT="%i: %fa frames = %f mins"
  225.  
  226.    that returns
  227.  
  228.       ID11009b58037ca6: 228518 frames = 50:46;68 mins
  229.  
  230.    It makes no difference if you use TAILFORMAT and NOHEADER or
  231.    HEADFORMAT and NOTAIL, because both will print the same result.
  232.  
  233.  
  234.    Final note:  Using NOHEADER, NOLIST and NOTAIL together is silly,
  235.    because you got no outout, but this combination can be used to
  236.    check whether a CD is inserted in your CDROM drive (you will get a
  237.    error message otherwise).
  238.  
  239.  
  240.  
  241. BUGS
  242.  
  243.    *kough* What's that?
  244.  
  245.  
  246.  
  247. DISCLAIMER
  248.  
  249.    THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS"
  250.    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  251.    TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  252.    PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR
  253.    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  254.    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  255.    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  256.    USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  257.    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  258.    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  259.    OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  260.    SUCH DAMAGE.
  261.  
  262.  
  263.  
  264. MISC
  265.  
  266.    Suggestions and bug reports are welcome, but I think the little
  267.    program's purpose is fully accomplished.
  268.  
  269.  
  270.  
  271. OTHER TOOLS
  272.  
  273.    picsize        Shows picture dimensions using datatypes
  274.                   (Aminet: util/dtype/picsize.lha, v1.2)
  275.  
  276.    NewWinBox      Changes window dimension and position
  277.                   (Aminet: util/cli/NewWinBox.lha, v1.0)
  278.  
  279.    MCD_DirList    Generates file lists for MakeCD
  280.                   (Aminet: disk/cdrom/MCD_DirList.lha, v1.0)
  281.  
  282.  
  283.  
  284. CONTACT
  285.  
  286.    snail  Ralph Reuchlein
  287.    mail:  Eibseestr. 18c
  288.           86163 Augsburg
  289.           GERMANY
  290.    
  291.    eMail: amiga@rripley.de
  292.    WWW:   http://www.rripley.de
  293.    IRC:   RRipley on #germany
  294.  
  295.