Tagging: Difference between revisions

From tango.info wiki
Jump to navigation Jump to search
(Stated preexisting requirement for constant-length padded barcode numbers)
(Update for solo tagging (using tagging.php) and mass tagging (using tagging3.php))
Line 5: Line 5:


==How to tag your music files from tango.info data==
==How to tag your music files from tango.info data==
These are instructions for tagging music files (in format MP3, WMA, FLAC etc.) with tag data from tango.info. Either you bought the tracks in an online store, ripped a CD or copied the tracks from someone else. For CD ripping see: [[rip a CD]].
This is a procedure for filling the tags of your music file library with metadata (track name, artist etc.) from tango.info. (To copy your CDs to such music files, see [[rip a CD]].)


The barcode number referred to below is the 12 or 13-digit number (without spaces or dashes) shown under the barcode 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.
Terminology


Currently this procedure fills the following tags for each track of a recognised album:
* ''barcode number'' - the 12, 13 or 14-digit number (without spaces or dashes) shown under the barcode on the back cover of the album's case, or on the album's tango.info page e.g. '''8427328130431'''.
* Album (title)
* ''solo tagging'' - does one album at a time
* (track) Title, Track (number), Artist, Genre, Year
* ''mass tagging'' - does multiple albums (e.g. your whole library) in one go.  
Note: Album Artist is not included.
Note: ''Artist'' is a comma-separated list of artist names: first primary artist (e.g. orchestra leader), and then secondary artist(s) in alphabetic order of string value.


Currently this procedure works only for
Results
* 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 that
The tags filled are:
* when tagging multiple albums, all padded barcodes have the same number of digits - 13 or 14 digits. Support for mixed-length padded barcodes is planned.
* '''Album''' (title), mass tagging only: '''Side''' (a.k.a. Disc Number, Set) (Note: '''Album Artist''' not included)
* all track filenames begin with a track number and these have the same number of digits e.g. 01,02,...20 (not 1,2,...20). Support for mixed-length track numbers is planned.
* (of track:) '''Title''', '''Track''' (number), '''Artist''', '''Genre''', '''Year'''
Note: The '''Artist''' value is a comma-separated list of first primary artist name(s) (e.g. orchestra leader), and then secondary artist name(s) in alphabetic order of (full) name.


===Step 1 - Retrieve tag data===
==Solo tagging==
You'll need the mp3tag program V2.39c or later, from http://www.mp3tag.de/en/ (English, free of charge).
Limitations
* Solo tagging works only for single-CD albums - for multi-CD albums, instead use mass tagging.


Either
Requirements


* For a single CD for which you have the barcode number:
* Your album's track files are in one folder containing no additional audio files.
# Go to http://tools.tango.info/tagging2.php.
* Track filenames begin with the track number and these numbers are the same length e.g. '''01''','''02''',...'''10''' (not '''1''','''2''',...'''10''').
# Enter the bar code number into the (unlabelled) text input box and click '''Submit Query'''.
* or, for a single CD for which you do not have the barcode number:
# Go to http://eng.tango.info, enter album's artist name and click '''search'''.
# In the search results, locate under ''CDs'' the title of your album, click on it, and then click on '''tools.tango.info/tagging'''.
* or, for multiple CDs for which you have barcode numbers:
<ol><li> 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.</li>
<li>Launch '''mp3tag'''.</li>
<li>Click '''File | Change directory...''' and select the folder containing your CD files.</li>
<li>Click '''File | Export | <starred page icon>''', type '''TIN''' and click '''OK'''.</li>
<li>In the text editor window, replace the entire content with the following two lines (taking care to preserve the line break):<br>
<pre>$filename(,ansi)$loop($regexp($regexp(:%_directory%,^.*?('[''[':digit:']'']'{13,14}).*$,\1),:.*,),1)$regexp($regexp(:%_directory%,^.*?('[''[':digit:']'']'{13,14}).*$,\1
),:.*,)$loopend()</pre></li>
<li>Save the file.</li>
<li>In the mp3tag '''Options''' dialog box, select '''TIN''' and click '''OK'''.</li>
<li>When asked '''Display Export file now?''', click '''Yes'''.</li>
<li>In the text editor window that appears (showing a list of the padded barcode numbers of all albums), copy all lines to the clipboard.</li>
<li>Go to http://tools.tango.info/tagging2.php (not the similarly named http://tools.tango.info/tagging.php).</li>
<li>Paste into the (unlabelled) text input box and click '''Submit Query'''.</li></ol>


===Step 2 - Save tag info===
===Step 1 - set up Mp3tag===
Step 2 produces a tag list. Each line of this list contains the tag values for one track.
If you haven't already done so
#Download the (free of charge) Mp3tag program V2.39c or later [http://www.mp3tag.de/en/download.html here], and install.


'''IMPORTANT''': If you're tagging multiple albums, check that the tag list contains lines for every album in your set. If an album is missing, this means that tango.info does not have the tagging information for this album - do not use this tag list (it would probably cause mistagging of subsequent albums) but instead edit the barcode list in the text input box to remove the barcode of each missing album, and click '''Submit Query''' again.
===Step 2 - Retrieve tag data===
*If you have the album's barcode number:
#Go to http://tools.tango.info/tagging.php.
#Enter the barcode number into the (unlabelled) text input box and click '''Submit'''.
*Else (you do not have the barcode number):
#Go to http://eng.tango.info, enter album's title or artist name and click '''search''' (you'll get a list of matching albums listed under '''CDs''').
#Identify your album, checking title and artist name, and click on it (you'll get the tango.info album page).
#Check that album page's track quantity agrees with your album's files. If it doesn't, you probably mis-identified the album.
#Click on the link in the top left of that page labelled '''tools.tango.info/tagging'''.


The tag list is all lines between the last two horizontal rules, but excluding any final line(s) starting with '''not found:Array ( )''' (these do nt indicate a failure and can be safely ignored). Select all lines in the tag list, then right click and Copy 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'''.
You've retrieved the tag lines for your tracks.


===Step 3 - Put tag info into the track files===
===Step 3 - Save the tag data===
# Launch '''mp3tag'''.
#Identify the tag list - from the previous step it is all lines between (not including) the last two horizontal rules, but excluding any final line(s) starting with '''not found:Array ( )''' (these can be safely ignored)
# Click ''' File | Change directory...''' and select the folder containing your ripped CD(s).
#Select all lines in the tag list, then right click and Copy to the clipboard.
#If you are tagging
#Launch Notepad and into it Paste the clipboard.
#*a single CD:
#Save under the filename '''c:\temp.txt'''.
#*# In the tracklist heading, click on '''Title''' then '''Filename''' - this will sort in ascending track order.
 
#*multiple CDs:
You've saved the tag lines for your tracks.
#*# Right-click the tracklist heading, and click '''Customise columns...'''.
 
#*# In the '''Columns''' dialog box that appears, click '''<starred page icon>'''.
===Step 4 - Put the tag data into your track files===
#*# In '''Name''' enter<pre>TINT</pre>
#Launch '''mp3tag'''.
#*# In '''Value''' and '''Sort by''' enter<br><pre>$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)</pre>
#Click ''' File | Change directory...''' and select your album folder.
#*#Click '''OK'''.
#In the tracklist heading, click on '''Title''' then '''Filename''' (you'll get the track list ordered by ascending track number).
#*#In the tracklist heading, click on '''Title''' then '''TINT''' - this will sort in ascending barcode number and track order.
# Click '''Edit | Select all files'''.
# Click '''Edit | Select all files'''.
# Click '''Convert | Text file - tag'''.
# Click '''Convert | Text file - Tag''' (you'll get the '''Text file - Tag''' dialog box).
# In '''Filename:''' enter '''c:\temp.txt'''.
# In '''Format string''' enter<pre>%dummy%;%album%;%track%;%title%;%artist%;%genre%;%year%;%dummy%</pre>
# Click '''OK'''.
 
You've put the tag data into your track files. Mp3tag shows you the result.
 
==Mass tagging==
Limitations
* Mass tagging works only if each library album contain the original number of CDs and each CD contains the original number of tracks - none missing, none extra. Improvement is planned.
 
Requirements
* Each CD's track files are stored in one folder, containing no other audio files.
* Each track filename begin with the track number.
* Each CD folder name somewhere contains:
** the barcode number e.g. '''El Rey Del Compas [8427328130431]'''
** for multi-CD albums, the CD number in a regular form such that the folder names fall in ascending CD number order e.g. <br>'''40 Grandes Exitos [CD1] [08427328020473]''' and<br>'''40 Grandes Exitos [CD2] [08427328020473]'''.
 
=== Step 1 - set up Mp3tag===
If you haven't already done so
<ol><li>Download the (free of charge) Mp3tag program V2.39c or later [http://www.mp3tag.de/en/download.html here], and install.</li>
<li>Launch '''Mp3tag'''.</li>
<li>Right-click the tracklist heading, and click '''Customize columns...''' (you'll get the '''Columns''' dialog box).</li>
<li>Click the '''starred page icon''' (you'll get an entry for a new column).</li>
<li>In '''Name''' type<pre>ti3</pre></li>
<li>Copy the following line (taking care to include the entire length - it ends with <tt>''')'''</tt> ):<br><pre>$regexp($regexp(:%_directory%,^.*?('[''[':digit:']'']'{12,14}).*$,\1),:.*,no barcode number found in folder name)-:%_directory%:-$regexp($num($regexp(%_filename%:,^('[''[':digit:']'']'+).*$,\1),4),^0000$,no track number found at start of file name)</pre>and Paste into both '''Value''' and '''Sort by'''.</li>
<li>Click '''OK''' (you'll get a '''ti3''' column appear in the track list).</li>
<li>Click '''File | Export''' (you'll get the '''Export''' dialog box).</li>
<li>Click the '''starred page icon''', type<pre>ti3</pre> and click '''OK''' (you'll get the new export config file '''ti3.mte''' open in (by default) Notepad).</li>
<li>Delete all lines, Copy the following lines (taking care to include the full length of the first - it ends with '''<tt>1</tt>''' - and to preserve the line break):<br><pre>$filename(,ansi)$loop($regexp($regexp(:%_directory%,^.*?('[''[':digit:']'']'{12,14}).*$,\1),:.*,),1)$regexp($regexp(:%_directory%,^.*?('[''[':digit:']'']'{12,14}).*$,\1
),:.*,)$loopend()</pre>and Paste them into Notepad.
<li>Save the file.</li></ol>
 
===Step 2 - Retrieve tag data===
#Launch '''mp3tag'''.
#Click '''File | Change directory...''' and select the folder containing your albums. You may then add further albums using '''File | Add directory...'''
#Click '''File | Export''' (you'll get an '''Export''' dialog box).
#Select '''ti3'''.
#In '''Export file name''' enter '''c:\temp.txt''' and click '''OK''' (you'll get a '''Display Export file now?''' dialog box).
#Click '''Yes''' (you'll get (by default) a Notepad window listing your albums' barcode numbers).
#Copy all lines to the clipboard.
#Go to http://tools.tango.info/tagging3.php.
#Paste into the (unlabelled) text input box and click '''Submit'''
 
You've retrieved the list of tag lines for your tracks.
 
===Step 3 - Save the tag data===
#Identify the tag list - from the previous step it is all lines between (not including) the last two horizontal rules, but excluding any final line(s) starting with '''not found:Array ( )''' (these can be safely ignored)
#Select all lines in the tag list, then Copy to the clipboard.
#Return to the still open Notepad window, delete all contents, then Paste from the clipboard.
#'''IMPORTANT''': check that the tag list contains lines for every album in your set. If it does not, tango.info didn't have tag data for this album - do not use this tag list (it risks mistagging of subsequent albums) but instead return to the browser and in the text input box's barcode number list remove the barcode number of every missing album, and then click '''Submit Query''' again and repeat this Step 2. (Improvement is planned.)
#Save (under the existing filename '''c:\temp.txt''').
 
You've saved the tag lines for your tracks.
 
===Step 4 - Put the tag data into your track files===
# Return to '''mp3tag'''.
#In the tracklist heading, click on '''Title''' then '''ti3''' (you'll get the tracks sorted by ascending barcode number, CD number and track number).
# Click '''Edit | Select all files'''.
# Click '''Convert | Text file - Tag'''.
# In '''Filename''' enter '''c:\temp.txt'''.
# In '''Filename''' enter '''c:\temp.txt'''.
# In '''Format string''' enter<pre>%dummy%;%album%;%track%;%title%;%artist%;%genre%;%year%;%dummy%</pre>
# In '''Format string''' enter<pre>%dummy%;%album%;%discnumber%;%track%;%title%;%artist%;%genre%;%year%;%dummy%</pre>
# Click '''OK'''. The files will be tagged.
# Click '''OK'''. The files will be tagged.


=== Notes ===
You've put the tag data into your track files. Mp3tag shows you the result.
 
1 The 'disc_tin' field carries a TIN - see http://wiki.tango.info/mul/Tango_Information_Number .

Revision as of 2007-11-05T03:49:07

Software

How to tag your music files from tango.info data

This is a procedure for filling the tags of your music file library with metadata (track name, artist etc.) from tango.info. (To copy your CDs to such music files, see rip a CD.)

Terminology

  • barcode number - the 12, 13 or 14-digit number (without spaces or dashes) shown under the barcode on the back cover of the album's case, or on the album's tango.info page e.g. 8427328130431.
  • solo tagging - does one album at a time
  • mass tagging - does multiple albums (e.g. your whole library) in one go.

Results

The tags filled are:

  • Album (title), mass tagging only: Side (a.k.a. Disc Number, Set) (Note: Album Artist not included)
  • (of track:) Title, Track (number), Artist, Genre, Year

Note: The Artist value is a comma-separated list of first primary artist name(s) (e.g. orchestra leader), and then secondary artist name(s) in alphabetic order of (full) name.

Solo tagging

Limitations

  • Solo tagging works only for single-CD albums - for multi-CD albums, instead use mass tagging.

Requirements

  • Your album's track files are in one folder containing no additional audio files.
  • Track filenames begin with the track number and these numbers are the same length e.g. 01,02,...10 (not 1,2,...10).

Step 1 - set up Mp3tag

If you haven't already done so

  1. Download the (free of charge) Mp3tag program V2.39c or later here, and install.

Step 2 - Retrieve tag data

  • If you have the album's barcode number:
  1. Go to http://tools.tango.info/tagging.php.
  2. Enter the barcode number into the (unlabelled) text input box and click Submit.
  • Else (you do not have the barcode number):
  1. Go to http://eng.tango.info, enter album's title or artist name and click search (you'll get a list of matching albums listed under CDs).
  2. Identify your album, checking title and artist name, and click on it (you'll get the tango.info album page).
  3. Check that album page's track quantity agrees with your album's files. If it doesn't, you probably mis-identified the album.
  4. Click on the link in the top left of that page labelled tools.tango.info/tagging.

You've retrieved the tag lines for your tracks.

Step 3 - Save the tag data

  1. Identify the tag list - from the previous step it is all lines between (not including) the last two horizontal rules, but excluding any final line(s) starting with not found:Array ( ) (these can be safely ignored)
  2. Select all lines in the tag list, then right click and Copy to the clipboard.
  3. Launch Notepad and into it Paste the clipboard.
  4. Save under the filename c:\temp.txt.

You've saved the tag lines for your tracks.

Step 4 - Put the tag data into your track files

  1. Launch mp3tag.
  2. Click File | Change directory... and select your album folder.
  3. In the tracklist heading, click on Title then Filename (you'll get the track list ordered by ascending track number).
  4. Click Edit | Select all files.
  5. Click Convert | Text file - Tag (you'll get the Text file - Tag dialog box).
  6. In Filename: enter c:\temp.txt.
  7. In Format string enter
    %dummy%;%album%;%track%;%title%;%artist%;%genre%;%year%;%dummy%
  8. Click OK.

You've put the tag data into your track files. Mp3tag shows you the result.

Mass tagging

Limitations

  • Mass tagging works only if each library album contain the original number of CDs and each CD contains the original number of tracks - none missing, none extra. Improvement is planned.

Requirements

  • Each CD's track files are stored in one folder, containing no other audio files.
  • Each track filename begin with the track number.
  • Each CD folder name somewhere contains:
    • the barcode number e.g. El Rey Del Compas [8427328130431]
    • for multi-CD albums, the CD number in a regular form such that the folder names fall in ascending CD number order e.g.
      40 Grandes Exitos [CD1] [08427328020473] and
      40 Grandes Exitos [CD2] [08427328020473].

Step 1 - set up Mp3tag

If you haven't already done so

  1. Download the (free of charge) Mp3tag program V2.39c or later here, and install.
  2. Launch Mp3tag.
  3. Right-click the tracklist heading, and click Customize columns... (you'll get the Columns dialog box).
  4. Click the starred page icon (you'll get an entry for a new column).
  5. In Name type
    ti3
  6. Copy the following line (taking care to include the entire length - it ends with ) ):
    $regexp($regexp(:%_directory%,^.*?('[''[':digit:']'']'{12,14}).*$,\1),:.*,no barcode number found in folder name)-:%_directory%:-$regexp($num($regexp(%_filename%:,^('[''[':digit:']'']'+).*$,\1),4),^0000$,no track number found at start of file name)
    and Paste into both Value and Sort by.
  7. Click OK (you'll get a ti3 column appear in the track list).
  8. Click File | Export (you'll get the Export dialog box).
  9. Click the starred page icon, type
    ti3
    and click OK (you'll get the new export config file ti3.mte open in (by default) Notepad).
  10. Delete all lines, Copy the following lines (taking care to include the full length of the first - it ends with 1 - and to preserve the line break):
    $filename(,ansi)$loop($regexp($regexp(:%_directory%,^.*?('[''[':digit:']'']'{12,14}).*$,\1),:.*,),1)$regexp($regexp(:%_directory%,^.*?('[''[':digit:']'']'{12,14}).*$,\1
    ),:.*,)$loopend()
    and Paste them into Notepad.
  11. Save the file.

Step 2 - Retrieve tag data

  1. Launch mp3tag.
  2. Click File | Change directory... and select the folder containing your albums. You may then add further albums using File | Add directory...
  3. Click File | Export (you'll get an Export dialog box).
  4. Select ti3.
  5. In Export file name enter c:\temp.txt and click OK (you'll get a Display Export file now? dialog box).
  6. Click Yes (you'll get (by default) a Notepad window listing your albums' barcode numbers).
  7. Copy all lines to the clipboard.
  8. Go to http://tools.tango.info/tagging3.php.
  9. Paste into the (unlabelled) text input box and click Submit

You've retrieved the list of tag lines for your tracks.

Step 3 - Save the tag data

  1. Identify the tag list - from the previous step it is all lines between (not including) the last two horizontal rules, but excluding any final line(s) starting with not found:Array ( ) (these can be safely ignored)
  2. Select all lines in the tag list, then Copy to the clipboard.
  3. Return to the still open Notepad window, delete all contents, then Paste from the clipboard.
  4. IMPORTANT: check that the tag list contains lines for every album in your set. If it does not, tango.info didn't have tag data for this album - do not use this tag list (it risks mistagging of subsequent albums) but instead return to the browser and in the text input box's barcode number list remove the barcode number of every missing album, and then click Submit Query again and repeat this Step 2. (Improvement is planned.)
  5. Save (under the existing filename c:\temp.txt).

You've saved the tag lines for your tracks.

Step 4 - Put the tag data into your track files

  1. Return to mp3tag.
  2. In the tracklist heading, click on Title then ti3 (you'll get the tracks sorted by ascending barcode number, CD number and track number).
  3. Click Edit | Select all files.
  4. Click Convert | Text file - Tag.
  5. In Filename enter c:\temp.txt.
  6. In Format string enter
    %dummy%;%album%;%discnumber%;%track%;%title%;%artist%;%genre%;%year%;%dummy%
  7. Click OK. The files will be tagged.

You've put the tag data into your track files. Mp3tag shows you the result.