Difference between revisions of "Foobar2000:Components/Masstagger (foo masstag)"

From Hydrogenaudio Knowledgebase
Jump to: navigation, search
(Updating for 1.7, work-in-progress.)
(Rewrite in progress.)
Line 13: Line 13:
 
| discussion_thread =  
 
| discussion_thread =  
 
}}
 
}}
'''Masstagger'''
+
= Masstagger =
 +
[[Image:Foobar2000-Masstagger.png]]
  
 
Masstagger is an advanced tool for editing the information of tags in multiple files.  
 
Masstagger is an advanced tool for editing the information of tags in multiple files.  
Line 19: Line 20:
  
 
Masstagger's main limitation is lack of WYSIWYG editing of tags, making it inefficient for typical tag editing scenarios. You should use the [[Foobar2000:Properties|Properties dialog]] instead unless you want to be able to quickly run predefined complex tagging tasks on your files.
 
Masstagger's main limitation is lack of WYSIWYG editing of tags, making it inefficient for typical tag editing scenarios. You should use the [[Foobar2000:Properties|Properties dialog]] instead unless you want to be able to quickly run predefined complex tagging tasks on your files.
 +
 +
== Basic usage ==
 +
[[Image:Foobar2000-Masstagger-howtoactivate.png|thumb|Accessing the main Masstagger dialog]]
 +
To open the main Masstagger dialog, select the tracks you want to work with and choose the "Manage Scripts" command from the context menu, under the "Tagging" submenu.
 +
 +
The left box displays a list of actions that are about to be performed on your tags. The actions are performed in descending order - actions placed lower on the list will operate on tags already altered by actions placed higher on the list.
 +
 +
The "scripts" box contains commands that allow you to save the current chain of actions or restore a chain of actions that was saved earlier.
 +
There are two ways to store Masstagger scripts:
 +
* In foobar2000 configuration - by using the "Save" / "Load" etc buttons - you can quickly load those scripts later, as well as access them directly from the "Tagging" / "Scripts" submenu of the context menu, as well as access them with [[Foobar2000:Preferences:General:Keyboard Shortcuts|keyboard shortcuts]].
 +
* In external files - by using the "Export to file..." and "Import from file..." buttons - such scripts can be easily interchanged between users or between different foobar2000 installations.
  
 
== Available actions ==
 
== Available actions ==
Line 70: Line 82:
  
 
'''Note''' that it is possible to perform several of these actions at once and in that case the order of those actions can be very important. So removing field A before copying it to field B is probably a bad Idea and should be performed the other way around, etc.
 
'''Note''' that it is possible to perform several of these actions at once and in that case the order of those actions can be very important. So removing field A before copying it to field B is probably a bad Idea and should be performed the other way around, etc.
 
== Writing format strings for the masstagger ==
 
 
 
'''Extracting Information from Relative File Paths:'''
 
 
As suggested I have included a small section on how to extract different values from their relative file paths. To do so I will use the following example path to extract information from
 
 
''...\Genre\Artist\Album[Date]\01_Title.mpc''
 
 
 
'''sets title:'''
 
 
%filename% returns title as 01_Title.mpc and
 
 
$puts(char,_)$puts(tag,%_filename%)
 
$puts(spacer,$strchr($get(tag),$get(char)))
 
$trim($right($get(tag),$sub($len($get(tag)),$get(spacer))))
 
returns title as Title.mpc
 
 
'''sets album:'''
 
 
$directory(%_path%,1) returns title as Album[Date]
 
 
$puts(char,'[')$puts(tag,$directory(%_path%,1))
 
$puts(spacer,$strchr($get(tag),$get(char)))
 
$trim($left($get(tag),$sub($get(spacer),1)))
 
returns album as Album
 
 
'''NOTE:''' that the [ is quotes as '[' , the reason for this is for it to be recognized as a character and not as a command syntax, you will probably have to ommit the quotation marks for most other characters.
 
 
 
'''sets artist:'''
 
 
$directory(%_path%,2) returns artist as Artist
 
 
 
'''sets genre:'''
 
 
$directory(%_path%,3) returns genre as Genre
 
 
'''
 
sets tracknumber:'''
 
 
$num($left(%_filename%,2),2) returns tracknumber as 01
 
 
 
 
Obviously a lot more is possible, but then this was just supposed to be a short introduction. I would say simply copy a few of your files, and play around with it.
 
 
 
 
== Links ==
 
 
This page is based on picmixer's [http://www.hydrogenaudio.org/forums/index.php?showtopic=12302 Unofficial masstagger guide] on the foobar2000 forum.
 

Revision as of 15:15, 3 November 2008

Foobar2000_Logo.png
foo_masstag

foobar2000 component
Developer(s) Official
Repository {{{repository}}}
Release information
Initial release {{{released}}}
Stable release 1.7
Preview release
foobar2000 compatibility
Architecture {{{foobar2000_architecture}}}
Minimum version 0.9.5.x
Maximum version {{{foobar2000_maximum}}}
UI module(s) N/A
Additional information
Use Tagging
License -
Discussion thread
View all components

Masstagger

Foobar2000-Masstagger.png

Masstagger is an advanced tool for editing the information of tags in multiple files. Note: It's not available as part of foobar2000 0.9.5 or newer installers. It is still however available from the official components page.

Masstagger's main limitation is lack of WYSIWYG editing of tags, making it inefficient for typical tag editing scenarios. You should use the Properties dialog instead unless you want to be able to quickly run predefined complex tagging tasks on your files.

Basic usage

Accessing the main Masstagger dialog

To open the main Masstagger dialog, select the tracks you want to work with and choose the "Manage Scripts" command from the context menu, under the "Tagging" submenu.

The left box displays a list of actions that are about to be performed on your tags. The actions are performed in descending order - actions placed lower on the list will operate on tags already altered by actions placed higher on the list.

The "scripts" box contains commands that allow you to save the current chain of actions or restore a chain of actions that was saved earlier. There are two ways to store Masstagger scripts:

  • In foobar2000 configuration - by using the "Save" / "Load" etc buttons - you can quickly load those scripts later, as well as access them directly from the "Tagging" / "Scripts" submenu of the context menu, as well as access them with keyboard shortcuts.
  • In external files - by using the "Export to file..." and "Import from file..." buttons - such scripts can be easily interchanged between users or between different foobar2000 installations.

Available actions

Add value

Adds desired tag field and sets it to whatever you enter in the masstagger input window.

Auto track number

This gives the track number according to the order of the files in the selection.

Copy value

Copies one tag field to another.

Format value from other fields

This is where it becomes interesting. This option lets you enter a specific title formatting pattern for any tag field you wish to edit or create.

Note that when using complex formatting patterns I would recommend to first format a temporary %temp% tag with the desired pattern and then copy that one into the value that you wish. Afterwards you can remove the temp value. When processing a large batch of files you could probably just do a test run on one of the files and then do the rest in one go. Think about what you are doing beforehand though. After all I don't want to be held responsible for messing up anyones music collection.

I will explain how to create formatting strings for different situations further down .

Guess values from filename

Guesses values from filename and lets you enter a certain formatting pattern for it. For example if your files are named artist - album_title.

Enter

%artist% - %album%_%title%

as formatting pattern.

Guess values from other fields

Guesses values from other tags and lets you enter a certain fromatting pattern for it. For example if your files are tagged artist / title in the title field.

Input data (one line per track)

Enter the data for each song with the pattern indicated, line by line, (one line per song as it is said). Don't worry about the length, the lines could be very long (only adds a vertical scroll bar if it is too long).

Remove all fields

Removes all tag fields (who would have guessed)

Remove all except for...

Does just as it says, removes all values and lets you specify wich ones not to remove in a second field in the following pattern ie.:

%artist%;%title%;etc

Remove field

Removes desired tag field.

Set value

Sets desired tag field (artist, album,custom,etc) to whatever you enter in the masstagger input window.

Split multiple artist field

Note that it is possible to perform several of these actions at once and in that case the order of those actions can be very important. So removing field A before copying it to field B is probably a bad Idea and should be performed the other way around, etc.