Tagging

From tango.info wiki
Revision as of 2007-10-27T19:59:12 by Chrisjjj (talk | contribs) (Reworded in terms of padded barcode number, and made other clarifications.)
Jump to navigation Jump to search

Software

How to use http://tools.tango.info/tagging.php

These are instructions for ripping CDs to your hard drive and tagging the resulting track files (in format MP3, WMA, FLAC etc.) with tag info from tango.info.

Currently this procedure works only for

  • single-side albums e.g. single-CD albums. Support for multi-side albums is planned.
  • albums containing the original number of tracks - none missing, none added. Support for partial/extended albums is planned.

This procedure requires

  • Track filenames begin with a constnt-width track number, e.g. 01,02,...20, not 1,2,...20. Support for variable-width track numbers is planned.

The barcode number referred to below is the 12 or 13-digit number next to the barcode usually found on the back cover of the album's case. The padded barcode number referred to below is the barcode number with zeros added at the start to make 13 digits or if you prefer (for TIN-compatibility) 14 digits.

Step 1 - Rip CDs to your hard drive

Use a program such as CDex (http://cdexos.sourceforge.net).

Ensure the naming options are such that the track filename begins with the track number.

If you want to be able to tag multiple CDs in one operation, ensure each album's destination folder name contains the padded barcode number. One way to do this is to initially ensure the program's naming options are such that the folder name is the album title, and before starting each rip, when given the opportunity to enter/edit the album title, include in it (e.g. at the end) the padded barcode number. There must be only one folder contining each padded barcode number.

Step 2 - Retrieve tag info

You'll need the mp3tag program V2.39c or later, from http://www.mp3tag.de/en/ (English, free of charge).

Either

  1. For a single CD for which you have the barcode number:
    1. Go to http://tools.tango.info/tagging.php.
    2. Enter the bar code number into the (unlabelled) query window and click Submit Query.
  2. or, for a single CD for which you do not have the barcode number:
    1. Go to http://eng.tango.info, enter album's artist name and click search.
    2. In the search results, locate under CDs the title of your album, click on it, and then click on tools.tango.info/tagging.
  3. or, for multiple CDs for which you have barcode numbers:
    1. Ensure each CD is in a separate folder the name of which somewhere contains the padded barcode number, and that all these folders are in a single containing folder with no other audio files.
    2. Launch mp3tag.
    3. Click File | Change directory... and select the folder containing your CD files.
    4. Click File | Export | <starred page icon> and click OK.
    5. In the text editor window, replace the entire content with the following two lines (taking care to preserve the line break):
$filename(,ansi)$loop($regexp($regexp(:%_directory%,^.*?('[''[':digit:']'']'{13,14}).*$,\1),:.*,),1)$regexp($regexp(:%_directory%,^.*?('[''[':digit:']'']'{13,14}).*$,\1
),:.*,)$loopend()
    1. Save the file.
    2. In the mp3tag Options dialog box, click OK.
    3. When asked Display Export file now?, click Yes.
    4. In the text editor window that appears (showing a list of the padded barcode numbers of all albums), copy all lines to the clipboard.
    5. Go to http://tools.tango.info/tagging.php.
    6. Paste into the (unlabelled) query window and click Submit Query.

Step 3 - Save tag info

Step 2 produces a tag list. Each line of this list consists of a padded barcode number followed by as album title, song title, track number and year. The tag list is all lines between the last two horizontal rules, but excluding any final line(s) starting with not found:Array ( ). With your mouse, highlight all lines in the tag list, then right click and Copy it to the clipboard. Launch Notepad, press CTRL+V to Paste the clipboard, then press CTRL+S to save and enter as the Filename c:\temp.txt.

Step 4 - Put tag info into the track files

  1. Launch mp3tag.
  2. Click File | Change directory... and select the folder containing your ripped CD(s).
  3. If you are tagging a single CD:
    1. In the tracklist heading, click on Title then Filename - this will sort in ascending track order.
  4. If you are tagging multiple CDs:
    1. Right-click the tracklist heading, and click Customise columns....
    2. In the Columns dialog box that appears, click <starred page icon>.
    3. In Name enter "TINT".
    4. In Value and Sort by enter
      $regexp($regexp(:%_directory%,^.*?('[''[':digit:']'']'{13,14}).*$,\1),:.*,no TIN found in folder name)-1-$regexp($regexp(:%_filename%,^:('[''[':digit:']'']'+).*$,\1),:.*,no track number found at start of file name)
    5. Click OK.
    6. In the tracklist heading, click on Title then TINT - this will sort in ascending barcode number and track order.
  1. Click Edit | Select all files.
  2. Click Convert | Text file - tag.
  3. In Filename enter c:\temp.txt.
  4. In Format string enter
    %dummy%;%album%;%track%;%title%;%artist%;%genre%;%year%;%dummy%
  5. Click OK. The files will be tagged.

Notes

1 The 'disc_tin' field carries a TIN - see http://wiki.tango.info/mul/Tango_Information_Number .