<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.hydrogenaudio.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Alwayswrming</id>
	<title>Hydrogenaudio Knowledgebase - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.hydrogenaudio.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Alwayswrming"/>
	<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Special:Contributions/Alwayswrming"/>
	<updated>2026-04-28T20:22:12Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Title_Formatting_Reference&amp;diff=25744</id>
		<title>Foobar2000:Title Formatting Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Title_Formatting_Reference&amp;diff=25744"/>
		<updated>2014-04-02T20:21:17Z</updated>

		<summary type="html">&lt;p&gt;Alwayswrming: /* $select(n,a1,...,aN) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{fb2k}}&lt;br /&gt;
This article contains information about built-in titleformatting functions and field references with special meaning. References to documentation about fields and function which can only be used in specific components or which are provided by specific components can be found at the end of this article.&lt;br /&gt;
&lt;br /&gt;
A field reference is a field name enclosed in percent signs, for example &#039;&#039;%artist%&#039;&#039;. A function call starts with a dollar sign, followed by the function name and the parameter list. A parameter list can either be empty - denoted as &#039;&#039;()&#039;&#039; - or contain one or more parameters separated by commata, for example &#039;&#039;$abbr(%artist%)&#039;&#039;. Note that there must be no whitespace between the dollar sign and the function name, or the function name and the opening parenthesis of the parameter list.&lt;br /&gt;
&lt;br /&gt;
Please see [[Foobar2000:Title Formatting Introduction|Title Formatting Introduction]] for a general overview of titleformat syntax and its basic rules. The article [[foobar2000:Titleformat Examples|Titleformat Examples]] offers user-submitted examples of code for specific purposes; feel free to add your own if you think it can be of use to others.&lt;br /&gt;
&lt;br /&gt;
For details of the query syntax, which uses some of these fields to find files for playlists, etc., see: [[Foobar2000:Query_syntax|Query Syntax]].&lt;br /&gt;
&lt;br /&gt;
= Field remappings =&lt;br /&gt;
&lt;br /&gt;
Some of the fields accessible through &#039;&#039;%name%&#039;&#039; are remapped to other values to make writing titleformat scripts more convenient.&lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
&lt;br /&gt;
=== %album artist% ===&lt;br /&gt;
Name of the artist of the album specified track belongs to. Checks following metadata fields, in this order: &amp;quot;album artist&amp;quot;, &amp;quot;artist&amp;quot;, &amp;quot;composer&amp;quot;, &amp;quot;performer&amp;quot;. The difference between this and &#039;&#039;%artist%&#039;&#039; is that &#039;&#039;%album artist%&#039;&#039; is intended for use where consistent value across entire album is needed even when per-track artists values vary.&lt;br /&gt;
&lt;br /&gt;
=== %album% ===&lt;br /&gt;
Name of the album specified track belongs to. Checks following metadata fields, in this order: &amp;quot;album&amp;quot;, &amp;quot;venue&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== %artist% ===&lt;br /&gt;
Name of the artist of the track. Checks following metadata fields, in this order: &amp;quot;artist&amp;quot;, &amp;quot;album artist&amp;quot;, &amp;quot;composer&amp;quot;, &amp;quot;performer&amp;quot;. For a SHOUTcast stream which contains metadata, it is the StreamTitle up to the first &amp;quot;-&amp;quot; character.&lt;br /&gt;
&lt;br /&gt;
=== %discnumber% ===&lt;br /&gt;
Index of disc specified track belongs to, within the album. Available only when &amp;quot;discnumber&amp;quot;/&amp;quot;disc&amp;quot; field is present in track’s metadata.&lt;br /&gt;
&lt;br /&gt;
=== %track artist% ===&lt;br /&gt;
Name of the artist of the track; present only if &#039;&#039;%album artist%&#039;&#039; is different than &#039;&#039;%artist%&#039;&#039; for specific track. Intended for use together with &#039;&#039;%album artist%&#039;&#039;, to indicate track-specific artist info, e.g. &amp;quot;%album artist% - %title%[ &#039;//&#039; %track artist%]&amp;quot;. In this case, the last part will be displayed only when track-specific artist info is present.&lt;br /&gt;
&lt;br /&gt;
=== %title% ===&lt;br /&gt;
Title of the track. If &amp;quot;title&amp;quot; metadata field is missing, file name is used instead. For a SHOUTcast stream which contains metadata, it is the StreamTitle after the first &amp;quot;-&amp;quot; character.&lt;br /&gt;
&lt;br /&gt;
=== %tracknumber% ===&lt;br /&gt;
Two-digit index of specified track within the album. Available only when &amp;quot;tracknumber&amp;quot; field is present in track’s metadata. An extra &#039;0&#039; is placed in front of single digit track numbers (5 becomes 05).&lt;br /&gt;
&lt;br /&gt;
=== %track number% ===&lt;br /&gt;
Similar to %tracknumber%, however single digit track numbers are not reformatted to have an extra 0.&lt;br /&gt;
&lt;br /&gt;
== Technical information ==&lt;br /&gt;
&lt;br /&gt;
=== %bitrate% ===&lt;br /&gt;
Bitrate of the track; includes dynamic VBR bitrate display for currently played track.&lt;br /&gt;
&lt;br /&gt;
=== %channels% ===&lt;br /&gt;
Number of channels in the track (mono/stereo/etc). Returns the number of channels in text form; returns &amp;quot;mono&amp;quot; and &amp;quot;stereo&amp;quot; instead of &amp;quot;1&amp;quot; and &amp;quot;2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== %filesize% ===&lt;br /&gt;
Defined as &#039;&#039;%_filesize%&#039;&#039;. Returns the filesize in bytes.&lt;br /&gt;
&lt;br /&gt;
=== %filesize_natural% ===&lt;br /&gt;
Size of the file, automatically formatted in appropriate units such as megabytes or kilobytes. &lt;br /&gt;
&lt;br /&gt;
=== %samplerate% ===&lt;br /&gt;
Sample rate of the track, in Hz.&lt;br /&gt;
&lt;br /&gt;
=== %codec% ===&lt;br /&gt;
Name of codec used to encode the track. If exact codec name is not available, file extension is used.&lt;br /&gt;
&lt;br /&gt;
== Special fields ==&lt;br /&gt;
&lt;br /&gt;
= Control flow =&lt;br /&gt;
&lt;br /&gt;
The functions in this section can be used to conditionally execute statements.&lt;br /&gt;
&lt;br /&gt;
=== [...] (conditional section) ===&lt;br /&gt;
&lt;br /&gt;
Evaluates the expression between &#039;&#039;[&#039;&#039; and &#039;&#039;]&#039;&#039;. If it has the truth value &#039;&#039;true&#039;&#039;, its string value and the truth value &#039;&#039;true&#039;&#039; are returned. Otherwise an empty string and &#039;&#039;false&#039;&#039; are returned.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;[%artist%]&#039;&#039; returns the value of the artist tag, if it exists. Otherwise it returns nothing, when &#039;&#039;artist&#039;&#039; would return &amp;quot;?&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== $if(cond,then) ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;cond&#039;&#039; evaluates to &#039;&#039;true&#039;&#039;, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise, &#039;&#039;false&#039;&#039; is returned.&lt;br /&gt;
&lt;br /&gt;
=== $if(cond,then,else) ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;cond&#039;&#039; evaluates to &#039;&#039;true&#039;&#039;, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise, the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $if2(a,else) ===&lt;br /&gt;
&lt;br /&gt;
Like &#039;&#039;$if(a,a,else)&#039;&#039; except that &#039;&#039;a&#039;&#039; is only evaluated once. In other words, if &#039;&#039;a&#039;&#039; is true, &#039;&#039;a&#039;&#039; is returned, otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $if3(a1,a2,...,aN,else) ===&lt;br /&gt;
&lt;br /&gt;
Evaluates arguments &#039;&#039;a1&#039;&#039; ... &#039;&#039;aN&#039;&#039;, until one is found that evaluates to &#039;&#039;true&#039;&#039;. If that happens, its value is returned. Otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $ifequal(n1,n2,then,else) ===&lt;br /&gt;
&lt;br /&gt;
Compares the integer numbers &#039;&#039;n1&#039;&#039; and &#039;&#039;n2&#039;&#039;, if &#039;&#039;n1&#039;&#039; is equal to &#039;&#039;n2&#039;&#039;, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $ifgreater(n1,n2,then,else) ===&lt;br /&gt;
&lt;br /&gt;
Compares the integer numbers &#039;&#039;n1&#039;&#039; and &#039;&#039;n2&#039;&#039;, if &#039;&#039;n1&#039;&#039; is greater than &#039;&#039;n2&#039;&#039;, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $iflonger(s,n,then,else) ===&lt;br /&gt;
&lt;br /&gt;
Compares the length of the string &#039;&#039;s&#039;&#039; to the number &#039;&#039;n&#039;&#039;, if &#039;&#039;s&#039;&#039; is longer than &#039;&#039;n&#039;&#039; characters, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $select(n,a1,...,aN) ===&lt;br /&gt;
&lt;br /&gt;
If the value of &#039;&#039;n&#039;&#039; is between 1 and N, &#039;&#039;an&#039;&#039; is evaluated and its value returned. Otherwise &#039;&#039;false&#039;&#039; is returned.&lt;br /&gt;
&lt;br /&gt;
= Arithmetic functions =&lt;br /&gt;
&lt;br /&gt;
The functions in this section can be used to perform arithmetic on integer numbers. A string will be automatically converted to a number and vice versa. The conversion to a number uses the longest prefix of the string that can be interpreted as number. Leading whitespace is ignored. Decimal points are not supported. Examples:&lt;br /&gt;
* &amp;quot;c3po&amp;quot; → 0&lt;br /&gt;
* &amp;quot;4.8&amp;quot; → 4&lt;br /&gt;
* &amp;quot;-12&amp;quot; → -12&lt;br /&gt;
* &amp;quot;- 12&amp;quot; → 0&lt;br /&gt;
&lt;br /&gt;
=== $add(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Adds &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$add(a,b,...)&#039;&#039; is the same as &#039;&#039;$add($add(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $div(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Divides &#039;&#039;a&#039;&#039; by &#039;&#039;b&#039;&#039; and rounds down to an integer. If &#039;&#039;b&#039;&#039; evaluates to zero, it returns &#039;&#039;a&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$div(a,b,...)&#039;&#039; is the same as &#039;&#039;$div($div(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $greater(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Returns true, if &#039;&#039;a&#039;&#039; is greater than &#039;&#039;b&#039;&#039;, otherwise false.&lt;br /&gt;
&lt;br /&gt;
=== $max(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Returns the maximum of &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$max(a,b,...)&#039;&#039; is the same as &#039;&#039;$max($max(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $min(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Returns the minimum of &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$min(a,b,...)&#039;&#039; is the same as &#039;&#039;$min($min(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $mod(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Computes the remainder of dividing &#039;&#039;a&#039;&#039; through &#039;&#039;b&#039;&#039;. The result has the same sign as &#039;&#039;a&#039;&#039;. If &#039;&#039;b&#039;&#039; evaluates to zero, the result is &#039;&#039;a&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$mod(a,b,...)&#039;&#039; is the same as &#039;&#039;$mod($mod(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $mul(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Multiplies &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$mul(a,b,...)&#039;&#039; is the same as &#039;&#039;$mul($mul(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $muldiv(a,b,c) ===&lt;br /&gt;
&lt;br /&gt;
Multiplies &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;, then divides by &#039;&#039;c&#039;&#039;. The result is rounded to the nearest integer.&lt;br /&gt;
&lt;br /&gt;
=== $rand() ===&lt;br /&gt;
&lt;br /&gt;
Generates a random number in the range from 0 to 2&amp;lt;sup&amp;gt;32&amp;lt;/sup&amp;gt;-1. Available only in sort-related contexts, such as the &#039;&#039;Edit → Sort → Sort by ...&#039;&#039; menu command.&lt;br /&gt;
&lt;br /&gt;
=== $sub(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Subtracts &#039;&#039;b&#039;&#039; from &#039;&#039;a&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$sub(a,b,...)&#039;&#039; is the same as &#039;&#039;$sub($sub(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Boolean functions =&lt;br /&gt;
&lt;br /&gt;
The functions in this section can be used to work with truth values (&#039;&#039;true&#039;&#039; and &#039;&#039;false&#039;&#039;), which have no explicit representation in titleformat scripts. They do not return a string or number value. You can use them for more complex conditions with &#039;&#039;$if&#039;&#039; and related functions.&lt;br /&gt;
&lt;br /&gt;
=== $and(...) ===&lt;br /&gt;
&lt;br /&gt;
Logical And of an arbitrary number of arguments. Returns &#039;&#039;true&#039;&#039;, if and only if all arguments evaluate to &#039;&#039;true&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Special case: &#039;&#039;$and(x,y)&#039;&#039; is &#039;&#039;true&#039;&#039;, if both &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; are &#039;&#039;true&#039;&#039;. Otherwise it is &#039;&#039;false&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $or(...) ===&lt;br /&gt;
&lt;br /&gt;
Logical Or of an arbitrary number of arguments. Returns &#039;&#039;true&#039;&#039;, if at least one argument evaluates to &#039;&#039;true&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Special case: &#039;&#039;$or(x,y)&#039;&#039; is &#039;&#039;true&#039;&#039;, if &#039;&#039;x&#039;&#039; or &#039;&#039;y&#039;&#039; is &#039;&#039;true&#039;&#039;, or if both are &#039;&#039;true&#039;&#039;. Otherwise it is &#039;&#039;false&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $not(x) ===&lt;br /&gt;
&lt;br /&gt;
Logical Not. Returns &#039;&#039;false&#039;&#039;, if &#039;&#039;x&#039;&#039; is &#039;&#039;true&#039;&#039;, otherwise it returns &#039;&#039;true&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $xor(...) ===&lt;br /&gt;
&lt;br /&gt;
Logical Exclusive-or of an arbitrary number of arguments. Returns &#039;&#039;true&#039;&#039;, if an odd number of arguments evaluate to &#039;&#039;true&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Special case: &#039;&#039;$xor(x,y)&#039;&#039; is &#039;&#039;true&#039;&#039;, if one of &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; is &#039;&#039;true&#039;&#039;, but not both. Otherwise it is &#039;&#039;false&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Color functions =&lt;br /&gt;
&lt;br /&gt;
==For the Default User Interface==&lt;br /&gt;
Starting in version 1.0, the Default UI playlist view doesn&#039;t support color functions. In that location, text color can only be adjusted via angle-bracket syntax: Use &amp;lt; and &amp;gt; characters to make specific text &amp;lt;dimmed&amp;gt; &#039;&#039;vs.&#039;&#039; the default color or &amp;gt;highlight&amp;gt;ed with the highlight color, with up to three levels in each case, &#039;&#039;e.g.&#039;&#039;: &amp;lt;dimmed&amp;gt;, &amp;gt;highlight&amp;lt;, &amp;gt;&amp;gt;more highlight&amp;lt;&amp;lt;, &amp;lt;&amp;lt;&amp;lt;very dim&amp;gt;&amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==For Columns UI==&lt;br /&gt;
&lt;br /&gt;
The playlist in the Columns UI still supports the following functions:&lt;br /&gt;
&lt;br /&gt;
=== $blend(color1,color2,part,total) ===&lt;br /&gt;
&lt;br /&gt;
Returns a color that is a blend between &#039;&#039;color1&#039;&#039; and &#039;&#039;color2&#039;&#039;. If &#039;&#039;part&#039;&#039; is smaller than or equal to zero, &#039;&#039;color1&#039;&#039; is returned. If &#039;&#039;part&#039;&#039; is greater than or equal to &#039;&#039;total&#039;&#039;, &#039;&#039;color2&#039;&#039; is returned. Otherwise a blended color is returned that is &#039;&#039;part&#039;&#039; parts &#039;&#039;color1&#039;&#039; and &#039;&#039;total&#039;&#039;-&#039;&#039;part&#039;&#039; parts &#039;&#039;color2&#039;&#039;. The blending is performed in the RGB color space.&lt;br /&gt;
&lt;br /&gt;
=== $hsl() ===&lt;br /&gt;
&lt;br /&gt;
Resets the text color to the default color.&lt;br /&gt;
&lt;br /&gt;
=== $hsl(h,s,l) ===&lt;br /&gt;
&lt;br /&gt;
Sets the color for text in the HSL color space. &#039;&#039;h&#039;&#039;, &#039;&#039;s&#039;&#039; and &#039;&#039;l&#039;&#039; are the hue, saturation, and lightness of the color for unselected text. The color for selected text is set to the inverse color.&lt;br /&gt;
The ranges of &#039;&#039;h&#039;&#039;, &#039;&#039;s&#039;&#039;, and &#039;&#039;l&#039;&#039; are from 0 to 240; the function is designed to interpret those values in the same way as the standard Windows color dialog.&lt;br /&gt;
&lt;br /&gt;
=== $hsl(h1,s1,l1,h2,s2,l2) ===&lt;br /&gt;
&lt;br /&gt;
Sets the color for text in the HSL color space. &#039;&#039;h1&#039;&#039;, &#039;&#039;s1&#039;&#039; and &#039;&#039;l1&#039;&#039; are the hue, saturation, and lightness of the color for unselected text. &#039;&#039;h2&#039;&#039;, &#039;&#039;s2&#039;&#039; and &#039;&#039;l2&#039;&#039; are the hue, saturation, and lightness of the color for selected text.&lt;br /&gt;
&lt;br /&gt;
=== $rgb() ===&lt;br /&gt;
&lt;br /&gt;
Resets the text color to the default color.&lt;br /&gt;
&lt;br /&gt;
=== $rgb(r,g,b) ===&lt;br /&gt;
&lt;br /&gt;
Sets the color for text. &#039;&#039;r&#039;&#039;, &#039;&#039;g&#039;&#039; and &#039;&#039;b&#039;&#039; are the red, green and blue component of the color for unselected text. The color for selected text is set to the inverse color.&lt;br /&gt;
&lt;br /&gt;
=== $rgb(r1,g1,b1,r2,g2,b2) ===&lt;br /&gt;
&lt;br /&gt;
Sets the color for text. &#039;&#039;r1&#039;&#039;, &#039;&#039;g1&#039;&#039; and &#039;&#039;b1&#039;&#039; are the red, green and blue component of the color for unselected text. &#039;&#039;r2&#039;&#039;, &#039;&#039;g2&#039;&#039; and &#039;&#039;b2&#039;&#039; are the red, green and blue component of the color for selected text.&lt;br /&gt;
&lt;br /&gt;
=== $transition(string,color1,color2) ===&lt;br /&gt;
&lt;br /&gt;
Inserts color codes into &#039;&#039;string&#039;&#039;, so that the first character has &#039;&#039;color1&#039;&#039;, the last character has &#039;&#039;color2&#039;&#039;, and intermediate characters have blended colors. The blending is performed in the RGB color space. Note that color codes are additional characters that will also be counted by string manipulation functions. For example, if you need to truncate a string, you should do this before applying &#039;&#039;$transition&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Now playing info =&lt;br /&gt;
The following functions and fields are usable for scripts used with the currently playing item, for example the status bar, the main window title and the copy command script.&lt;br /&gt;
&lt;br /&gt;
== Special fields ==&lt;br /&gt;
&lt;br /&gt;
=== %playback_time% ===&lt;br /&gt;
Returns the elapsed time formatted as [HH:]MM:SS.&lt;br /&gt;
&lt;br /&gt;
=== %playback_time_seconds% ===&lt;br /&gt;
Returns elapsed time in seconds.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_elapsed%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %playback_time_remaining% ===&lt;br /&gt;
Returns remaining time until track ends, formatted as [HH:]MM:SS.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_remaining%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %playback_time_remaining_seconds% ===&lt;br /&gt;
Returns remaining time in seconds.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_remaining_seconds%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %length% ===&lt;br /&gt;
Returns the length of the track formatted as hours, minutes, and seconds, rounded to the nearest second.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_total%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %length_ex% ===&lt;br /&gt;
Returns the length of the track formatted as hours, minutes, seconds, and milliseconds, rounded to the nearest millisecond.&lt;br /&gt;
&lt;br /&gt;
=== %length_seconds% ===&lt;br /&gt;
Returns the length of the track in seconds, rounded to the nearest second.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_total_seconds%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %length_seconds_fp% ===&lt;br /&gt;
Returns the length of the track in seconds as floating point number.&lt;br /&gt;
&lt;br /&gt;
=== %length_samples% ===&lt;br /&gt;
Returns the length of the track in samples.&lt;br /&gt;
&lt;br /&gt;
= Playlist info =&lt;br /&gt;
The following functions and fields are usable for playlist display formatting (eg. per-column title formatting patterns).&lt;br /&gt;
&lt;br /&gt;
== Special fields ==&lt;br /&gt;
&lt;br /&gt;
=== %isplaying% ===&lt;br /&gt;
&lt;br /&gt;
Returns &amp;quot;1&amp;quot; if file is currently playing and empty string otherwise.&lt;br /&gt;
&lt;br /&gt;
=== %ispaused% ===&lt;br /&gt;
&lt;br /&gt;
Returns &amp;quot;1&amp;quot; if playback is paused, empty string otherwise.&lt;br /&gt;
&lt;br /&gt;
=== %list_index% ===&lt;br /&gt;
&lt;br /&gt;
Returns a zero-padded playlist index of specified item. The first item is at index 1.&lt;br /&gt;
&lt;br /&gt;
=== %list_total% ===&lt;br /&gt;
&lt;br /&gt;
Returns number of items in the playlist.&lt;br /&gt;
&lt;br /&gt;
=== %queue_index% ===&lt;br /&gt;
&lt;br /&gt;
Index of the specified item in the playback queue; available in playlist only. If the item has been queued multiple times, %queue_index% evaluates to the first index.&lt;br /&gt;
&lt;br /&gt;
=== %queue_indexes% ===&lt;br /&gt;
&lt;br /&gt;
List of indexes of the specified item in the playback queue; available in playlist only. Same as %queue_index% unless the item has been queued more than once.&lt;br /&gt;
&lt;br /&gt;
=== %queue_total% ===&lt;br /&gt;
&lt;br /&gt;
Total amount of tracks in playback queue. Available only for queued tracks, for technical reasons. &lt;br /&gt;
&lt;br /&gt;
= String functions =&lt;br /&gt;
&lt;br /&gt;
The functions in this section can be used to manipulate character strings.&lt;br /&gt;
&lt;br /&gt;
=== $abbr(x) ===&lt;br /&gt;
&lt;br /&gt;
Returns abbreviation of &#039;&#039;x&#039;&#039;. Words which begin with an alphanumeric character are shortened to the first character. Spaces and parentheses are stripped. Example:&lt;br /&gt;
* $abbr(&#039;This is a Long Title (12-inch version) [needs tags]&#039;) → TiaLT1v[needst&lt;br /&gt;
&lt;br /&gt;
=== $abbr(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns abbreviation of &#039;&#039;x&#039;&#039;, if &#039;&#039;x&#039;&#039; is longer than &#039;&#039;len&#039;&#039; characters, otherwise returns &#039;&#039;x&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $ansi(x) ===&lt;br /&gt;
&lt;br /&gt;
Converts &#039;&#039;x&#039;&#039; to system codepage and back. Any characters that are not present in the system codepage will be removed / replaced. Useful for mass-renaming files to ensure compatibility with non-unicode-capable software.&lt;br /&gt;
&lt;br /&gt;
=== $ascii(x) ===&lt;br /&gt;
&lt;br /&gt;
Converts &#039;&#039;x&#039;&#039; to ASCII. Any characters that are not present in ASCII will be removed / replaced.&lt;br /&gt;
&lt;br /&gt;
=== $caps(x) ===&lt;br /&gt;
&lt;br /&gt;
Converts first letter in every word of x to uppercase, and all other letters to lowercase.&lt;br /&gt;
&lt;br /&gt;
=== $caps2(x) ===&lt;br /&gt;
&lt;br /&gt;
Converts first letter in every word of x to uppercase, and leaves all other letters as they are.&lt;br /&gt;
&lt;br /&gt;
=== $char(x) ===&lt;br /&gt;
&lt;br /&gt;
Inserts Unicode character with code &#039;&#039;x&#039;&#039;. You can search for characters and find the matching decimal number on this [http://www.fileformat.info/info/unicode/char/search.htm site].&lt;br /&gt;
&lt;br /&gt;
=== $crc32(a) ===&lt;br /&gt;
&lt;br /&gt;
Computes the CRC32 of the string &#039;&#039;a&#039;&#039; as a number. Intended for use in coloring scripts.&lt;br /&gt;
&lt;br /&gt;
Example: $rgb($mod($crc32(%album%),256),128,128)&lt;br /&gt;
&lt;br /&gt;
=== $crlf() ===&lt;br /&gt;
&lt;br /&gt;
Inserts end-of-line marker (carriage return, line feed). Can be used to generate multiple lines in the output, for example for the tooltip of the system  notification area (&amp;quot;systray&amp;quot;) icon.&lt;br /&gt;
&lt;br /&gt;
=== $cut(a,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of the string &#039;&#039;a&#039;&#039;. This function is the same as $left(a,len). Negative numbers produce the entire string. Examples:&lt;br /&gt;
* $cut(&#039;abc123&#039;,3) → abc&lt;br /&gt;
* $cut(&#039;abc123&#039;,0) → (nothing)&lt;br /&gt;
* $cut(&#039;abc123&#039;,-1) → abc123&lt;br /&gt;
&lt;br /&gt;
=== $directory(x) ===&lt;br /&gt;
&lt;br /&gt;
Extracts directory name from the file path &#039;&#039;x&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $directory(x,n) ===&lt;br /&gt;
&lt;br /&gt;
Extracts directory name from the file path &#039;&#039;x&#039;&#039;; goes up by &#039;&#039;n&#039;&#039; levels.&lt;br /&gt;
&lt;br /&gt;
=== $directory_path(x) ===&lt;br /&gt;
&lt;br /&gt;
Extracts directory path from the file path &#039;&#039;x&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $ext(x) ===&lt;br /&gt;
&lt;br /&gt;
Extracts file extension from &#039;&#039;x&#039;&#039; which must be a file name or path.&lt;br /&gt;
&lt;br /&gt;
=== $filename(x) ===&lt;br /&gt;
&lt;br /&gt;
Extracts file name from full path.&lt;br /&gt;
&lt;br /&gt;
=== $fix_eol(x) ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;x&#039;&#039; contains an end-of-line marker (CR-LF), the end-of-line marker and all text to the right of it is replaced by &amp;quot; (...)&amp;quot;. Otherwise &#039;&#039;x&#039;&#039; is returned unaltered.&lt;br /&gt;
&lt;br /&gt;
=== $fix_eol(x,indicator) ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;x&#039;&#039; contains an end-of-line marker (CR-LF), the end-of-line marker and all text to the right of it is replaced by &#039;&#039;indicator&#039;&#039;. Otherwise &#039;&#039;x&#039;&#039; is returned unaltered.&lt;br /&gt;
&lt;br /&gt;
=== $hex(n) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;n&#039;&#039; in hexadecimal notation.&lt;br /&gt;
&lt;br /&gt;
=== $hex(n,len) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;n&#039;&#039; in hexadecimal notation with &#039;&#039;len&#039;&#039; digits. Pads with zeros from the left if necessary.&lt;br /&gt;
&lt;br /&gt;
=== $insert(a,b,n) ===&lt;br /&gt;
&lt;br /&gt;
Inserts &#039;&#039;b&#039;&#039; into &#039;&#039;a&#039;&#039; after &#039;&#039;n&#039;&#039; characters.&lt;br /&gt;
&lt;br /&gt;
=== $left(a,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of the string &#039;&#039;a&#039;&#039;. This function is the same as $cut(a,len). Negative numbers produce the entire string. Examples:&lt;br /&gt;
* $left(&#039;abc123&#039;,3) → abc&lt;br /&gt;
* $left(&#039;abc123&#039;,0) → (nothing)&lt;br /&gt;
* $left(&#039;abc123&#039;,-1) → abc123&lt;br /&gt;
&lt;br /&gt;
=== $len(a) ===&lt;br /&gt;
&lt;br /&gt;
Returns length of string &#039;&#039;a&#039;&#039; in characters.&lt;br /&gt;
&lt;br /&gt;
=== $len2(a) ===&lt;br /&gt;
&lt;br /&gt;
Returns length of string x in characters, respecting double-width character rules (double-width characters will be counted as two).&lt;br /&gt;
&lt;br /&gt;
=== $longer(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Returns &#039;&#039;true&#039;&#039;, if string &#039;&#039;a&#039;&#039; is longer than string &#039;&#039;b&#039;&#039;, false otherwise.&lt;br /&gt;
&lt;br /&gt;
=== $lower(a) ===&lt;br /&gt;
&lt;br /&gt;
Converts &#039;&#039;a&#039;&#039; to lowercase.&lt;br /&gt;
&lt;br /&gt;
=== $longest(a,...) ===&lt;br /&gt;
&lt;br /&gt;
Returns the longest of its arguments. Can be used with an arbitrary number of strings.&lt;br /&gt;
&lt;br /&gt;
=== $num(n,len) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;n&#039;&#039; in decimal notation with &#039;&#039;len&#039;&#039; characters. Pads with zeros from the left if necessary. &#039;&#039;len&#039;&#039; includes the dash when the number is negative. If &#039;&#039;n&#039;&#039; is not numeric, it is treated as zero. Examples:&lt;br /&gt;
&lt;br /&gt;
* $num(123,5) → 00123&lt;br /&gt;
* $num(-123,5) → -0123&lt;br /&gt;
* $num(4.8,5) → 00004&lt;br /&gt;
* $num(A1,5) → 00000&lt;br /&gt;
&lt;br /&gt;
=== $pad(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Creates a left-aligned version of the string &#039;&#039;x&#039;&#039;. If &#039;&#039;x&#039;&#039; is shorter than &#039;&#039;len&#039;&#039; characters, the function adds spaces to the right of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;x&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $pad_right(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Creates a right-aligned version of the string &#039;&#039;x&#039;&#039;. If &#039;&#039;x&#039;&#039; is shorter than &#039;&#039;len&#039;&#039; characters, the function adds spaces to the left of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;x&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $pad(x,len,char) ===&lt;br /&gt;
&lt;br /&gt;
Creates a left-aligned version of the string &#039;&#039;x&#039;&#039;. If &#039;&#039;x&#039;&#039; is shorter than &#039;&#039;len&#039;&#039; characters, the function adds &#039;&#039;char&#039;&#039; to the right of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;x&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $pad_right(x,len,char) ===&lt;br /&gt;
&lt;br /&gt;
Creates a right-aligned version of the string &#039;&#039;x&#039;&#039;. If &#039;&#039;x&#039;&#039; is shorter than &#039;&#039;len&#039;&#039; characters, the function adds &#039;&#039;char&#039;&#039; to the left of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;x&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $padcut(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of &#039;&#039;x&#039;&#039;, if &#039;&#039;x&#039;&#039; is longer than &#039;&#039;len&#039;&#039; characters. Otherwise adds spaces to the right of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long.&lt;br /&gt;
&lt;br /&gt;
=== $padcut_right(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of &#039;&#039;x&#039;&#039;, if &#039;&#039;x&#039;&#039; is longer than &#039;&#039;len&#039;&#039; characters. Otherwise adds spaces to the left of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long.&lt;br /&gt;
&lt;br /&gt;
=== $progress(pos,range,len,a,b) ===&lt;br /&gt;
&lt;br /&gt;
Creates a progress bar: &#039;&#039;pos&#039;&#039; contains position, &#039;&#039;range&#039;&#039; contains range, &#039;&#039;len&#039;&#039; progress bar length in characters, &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039; are characters to build progress bar with.&lt;br /&gt;
&lt;br /&gt;
Example:&#039;&#039;$progress(%_time_elapsed_seconds%, %_time_total_seconds%, 20,&#039;#&#039;,&#039;=&#039;)&#039;&#039; produces &amp;quot;====#===============&amp;quot;, the # character is moving with playback position.&lt;br /&gt;
&lt;br /&gt;
=== $progress2(pos,range,len,a,b) ===&lt;br /&gt;
&lt;br /&gt;
Creates a progress bar: &#039;&#039;pos&#039;&#039; contains position, &#039;&#039;range&#039;&#039; contains range, &#039;&#039;len&#039;&#039; progress bar length in characters, &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039; are characters to build progress bar with. Produces different appearance than &#039;&#039;$progress&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $repeat(a,n) ===&lt;br /&gt;
&lt;br /&gt;
Returns &#039;&#039;n&#039;&#039; copies of &#039;&#039;a&#039;&#039;. Note that &#039;&#039;a&#039;&#039; is evaluated once before its value is used, so &#039;&#039;$repeat&#039;&#039; cannot be used for loops.&lt;br /&gt;
&lt;br /&gt;
=== $replace(a,b,c) ===&lt;br /&gt;
&lt;br /&gt;
Replaces all occurrences of string &#039;&#039;b&#039;&#039; in string &#039;&#039;a&#039;&#039; with string &#039;&#039;c&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can also be used with an arbitrary number of arguments. Note that &#039;&#039;$replace(a,b1,c1,b2,c2)&#039;&#039; is generally not the same as &#039;&#039;$replace($replace(a,b1,c1),b2,c2)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$replace(ab,a,b,b,c)&#039;&#039; → &amp;quot;bc&amp;quot;, &#039;&#039;$replace($replace(ab,a,b),b,c)&#039;&#039; → &amp;quot;cc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $right(a,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns the first &#039;&#039;len&#039;&#039; characters from the right of &#039;&#039;a&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $roman(n) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;n&#039;&#039; in roman notation.&lt;br /&gt;
&lt;br /&gt;
=== $rot13() ===&lt;br /&gt;
&lt;br /&gt;
Performs [http://en.wikipedia.org/wiki/ROT13 ROT13] transformation to given string.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$rot13(&#039;foobar2000&#039;)&#039;&#039; → &amp;quot;sbbone2000&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== $shortest ===&lt;br /&gt;
&lt;br /&gt;
Returns the shortest of its arguments. Can be used with an arbitrary number of strings.&lt;br /&gt;
&lt;br /&gt;
=== $strchr(s,c) ===&lt;br /&gt;
&lt;br /&gt;
Finds first occurence of character &#039;&#039;c&#039;&#039; in string &#039;&#039;s&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$strchr(abca,a)&#039;&#039; → 1&lt;br /&gt;
&lt;br /&gt;
=== $strrchr(s,c) ===&lt;br /&gt;
&lt;br /&gt;
Finds last occurence of character &#039;&#039;c&#039;&#039; in string &#039;&#039;s&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$strrchr(abca,a)&#039;&#039; → 4&lt;br /&gt;
&lt;br /&gt;
=== $strstr(s1,s2) ===&lt;br /&gt;
&lt;br /&gt;
Finds first occurence of string &#039;&#039;s2&#039;&#039; in string &#039;&#039;s1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $strcmp(s1,s2) ===&lt;br /&gt;
&lt;br /&gt;
Performs a case-sensitive comparison of the strings &#039;&#039;s1&#039;&#039; and &#039;&#039;s2&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $stricmp(s1,s2) ===&lt;br /&gt;
&lt;br /&gt;
Performs a case-insensitive comparison of the strings &#039;&#039;s1&#039;&#039; and &#039;&#039;s2&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $substr(s,m,n) ===&lt;br /&gt;
&lt;br /&gt;
Returns substring of string &#039;&#039;s&#039;&#039;, starting from &#039;&#039;m&#039;&#039;-th character and ending at &#039;&#039;n&#039;&#039;-th character.&lt;br /&gt;
&lt;br /&gt;
=== $stripprefix(x) ===&lt;br /&gt;
&lt;br /&gt;
Removes &#039;&#039;A&#039;&#039; and &#039;&#039;The&#039;&#039; prefixes from x. &lt;br /&gt;
&lt;br /&gt;
=== $stripprefix(x,prefix1,prefix2,...) ===&lt;br /&gt;
&lt;br /&gt;
Removes the specified prefixes from x. &lt;br /&gt;
&lt;br /&gt;
=== $swapprefix(x) ===&lt;br /&gt;
&lt;br /&gt;
Moves &#039;&#039;A&#039;&#039; and &#039;&#039;The&#039;&#039; prefixes to the end of x. &lt;br /&gt;
&lt;br /&gt;
=== $swapprefix(x,prefix1,prefix2,...) ===&lt;br /&gt;
&lt;br /&gt;
Moves the specified prefixes to the end of x. &lt;br /&gt;
&lt;br /&gt;
=== $trim(s) ===&lt;br /&gt;
&lt;br /&gt;
Removes leading and trailing spaces from string &#039;&#039;s&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $tab() ===&lt;br /&gt;
&lt;br /&gt;
Inserts one tabulator character.&lt;br /&gt;
&lt;br /&gt;
=== $tab(n) ===&lt;br /&gt;
&lt;br /&gt;
Inserts &#039;&#039;n&#039;&#039; tabulator characters.&lt;br /&gt;
&lt;br /&gt;
=== $upper(s) ===&lt;br /&gt;
&lt;br /&gt;
Converts string &#039;&#039;s&#039;&#039; to uppercase.&lt;br /&gt;
&lt;br /&gt;
= Track info =&lt;br /&gt;
&lt;br /&gt;
The functions and fields in this section can be used to access information about tracks.&lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
&lt;br /&gt;
=== $meta(name) ===&lt;br /&gt;
Returns value of tag called &#039;&#039;name&#039;&#039;. If multiple values of that tag exist, they are concatenated with &amp;quot;, &amp;quot; as separator.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta(artist)&#039;&#039; → &amp;quot;He, She, It&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $meta(name,n) ===&lt;br /&gt;
Returns value of &#039;&#039;n&#039;&#039;-th (0,1,2 and so on) tag called &#039;&#039;name&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta(artist,1)&#039;&#039; → &amp;quot;She&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $meta_sep(name,sep) ===&lt;br /&gt;
Returns value of tag called &#039;&#039;name&#039;&#039;. If multiple values of that tag exist, they are concatenated with &#039;&#039;sep&#039;&#039; as separator.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta_sep(artist,&#039; + &#039;)&#039;&#039; → &amp;quot;He + She + It&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $meta_sep(name,sep,lastsep) ===&lt;br /&gt;
Returns value of tag called &#039;&#039;name&#039;&#039;. If multiple values of that tag exist, they are concatenated with &#039;&#039;sep&#039;&#039; as separator between all but the last two values which are concatenated with &#039;&#039;lastsep&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta_sep(artist,&#039;, &#039;,&#039;, and &#039;)&#039;&#039; → &amp;quot;He, She, and It&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $meta_test(...) === &lt;br /&gt;
Returns &#039;&#039;1&#039;&#039;, if all given tags exist, &#039;&#039;undefined&#039;&#039; otherwise.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta_test(artist,title)&#039;&#039; → true&lt;br /&gt;
&lt;br /&gt;
=== $meta_num(name) ===&lt;br /&gt;
Returns the number of values for the tag called &#039;&#039;name&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta_num(artist)&#039;&#039; → 3&lt;br /&gt;
&lt;br /&gt;
== Technical information ==&lt;br /&gt;
&lt;br /&gt;
=== $info(name) ===&lt;br /&gt;
Returns value of technical information field called &#039;&#039;name&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For convenience, the &#039;&#039;&#039;%__name%&#039;&#039;&#039; alias is also available.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$info(channels)&#039;&#039; → 2&lt;br /&gt;
&lt;br /&gt;
Here is an &#039;&#039;&#039;informative&#039;&#039;&#039; list of recognized fields. Some of these depend on the media file type being queried.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
! field name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#CCF&amp;quot;|&#039;&#039;&#039;General&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|codec&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Codec&#039;&#039;&#039; (&#039;&#039;e.g.&#039;&#039; MP3)&lt;br /&gt;
|-&lt;br /&gt;
|codec_profile&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Codec Profile&#039;&#039;&#039; (&#039;&#039;e.g.&#039;&#039; CBR)&lt;br /&gt;
|-&lt;br /&gt;
|samplerate&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Sample Rate&#039;&#039;&#039;, in hertz (&#039;&#039;e.g.&#039;&#039; 44100)&lt;br /&gt;
|-&lt;br /&gt;
|bitrate&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Bitrate&#039;&#039;&#039;, in kilobits per second (&#039;&#039;e.g.&#039;&#039; 320)&lt;br /&gt;
|-&lt;br /&gt;
|tool&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Tool&#039;&#039;&#039; used to produce the file, possibly guessed (&#039;&#039;e.g.&#039;&#039; LAME3.97)&lt;br /&gt;
|-&lt;br /&gt;
|encoding&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Encoding&#039;&#039;&#039; lossiness (&#039;&#039;e.g.&#039;&#039; lossy)&lt;br /&gt;
|-&lt;br /&gt;
|channels&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Channels&#039;&#039;&#039; count (&#039;&#039;e.g.&#039;&#039; 2 &amp;lt;nowiki&amp;gt;[for stereo]&amp;lt;/nowiki&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|channel_mode&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Channel Mode&#039;&#039;&#039;, description of channels (&#039;&#039;e.g.&#039;&#039; 3 front, 2 rear surround channels + LFE)&lt;br /&gt;
|-&lt;br /&gt;
|bitspersample&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Bits Per Sample&#039;&#039;&#039; (&#039;&#039;e.g.&#039;&#039; 16)&lt;br /&gt;
|-&lt;br /&gt;
|tagtype&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Tag Type&#039;&#039;&#039;, comma-separated list of tag formats (&#039;&#039;e.g.&#039;&#039; id3v2|apev2)&lt;br /&gt;
|-&lt;br /&gt;
|cue_embedded&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Embedded Cuesheet&#039;&#039;&#039; presence (&#039;&#039;e.g.&#039;&#039; no &amp;lt;nowiki&amp;gt;[may be empty!]&amp;lt;/nowiki&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|md5&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Audio MD5&#039;&#039;&#039; hash, if container defines it (&#039;&#039;e.g.&#039;&#039; 1E24A910D91EF09A8CF403C9B6963961)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#CCF&amp;quot;|&#039;&#039;&#039;Other&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|ENC_DELAY&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|LAME proprietary MP3 &#039;&#039;&#039;enc_delay&#039;&#039;&#039; value (&#039;&#039;e.g.&#039;&#039; 576)&lt;br /&gt;
|-&lt;br /&gt;
|ENC_PADDING&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|LAME proprietary MP3 &#039;&#039;&#039;enc_padding&#039;&#039;&#039; value (&#039;&#039;e.g.&#039;&#039; 1536)&lt;br /&gt;
|-&lt;br /&gt;
|MP3_ACCURATE_LENGTH&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;mp3_accurate_length&#039;&#039;&#039; supported (LAME proprietary header)? (&#039;&#039;e.g.&#039;&#039; yes)&lt;br /&gt;
|-&lt;br /&gt;
|MP3_STEREO_MODE&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|Stereo mode used in MP3 file (&#039;&#039;e.g.&#039;&#039; mono, stereo, joint stereo, etc.)&lt;br /&gt;
|-&lt;br /&gt;
|VERSION&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Version&#039;&#039;&#039; of tool (&#039;&#039;e.g.&#039;&#039; 3.99)&lt;br /&gt;
|-&lt;br /&gt;
|FLAGS&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Flags&#039;&#039;&#039; of tool (&#039;&#039;e.g.&#039;&#039; 22)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== $channels() === &lt;br /&gt;
Returns number of channels in text format.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$channels()&#039;&#039; → &amp;quot;stereo&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== %replaygain_album_gain% ===&lt;br /&gt;
&lt;br /&gt;
Returns ReplayGain album gain value.&lt;br /&gt;
&lt;br /&gt;
=== %replaygain_album_peak% ===&lt;br /&gt;
&lt;br /&gt;
Returns ReplayGain album peak value.&lt;br /&gt;
&lt;br /&gt;
=== %replaygain_track_gain% ===&lt;br /&gt;
&lt;br /&gt;
Returns ReplayGain track gain value.&lt;br /&gt;
&lt;br /&gt;
=== %replaygain_track_peak% ===&lt;br /&gt;
&lt;br /&gt;
Returns ReplayGain track peak value.&lt;br /&gt;
&lt;br /&gt;
== Special fields ==&lt;br /&gt;
&lt;br /&gt;
==== %filename% ====&lt;br /&gt;
&lt;br /&gt;
Returns the filename without directory and extension.&lt;br /&gt;
&lt;br /&gt;
==== %filename_ext% ====&lt;br /&gt;
&lt;br /&gt;
Returns the filename with extension, but without the directory.&lt;br /&gt;
&lt;br /&gt;
==== %directoryname% ====&lt;br /&gt;
&lt;br /&gt;
Returns the name of the parent directory only, not the complete path.&lt;br /&gt;
&lt;br /&gt;
==== %last_modified% ====&lt;br /&gt;
&lt;br /&gt;
Returns the date and time the file was last modified. Eg: &#039;&#039;2005-12-22 00:04:10&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== %path% ====&lt;br /&gt;
&lt;br /&gt;
Returns the path.&lt;br /&gt;
&lt;br /&gt;
==== %_path_raw% ====&lt;br /&gt;
&lt;br /&gt;
Returns the path as URL including the protocol scheme.&lt;br /&gt;
&lt;br /&gt;
==== %subsong% ====&lt;br /&gt;
&lt;br /&gt;
Returns the subsong index. The subsong index is used to distuingish multiple tracks in a single file, for example for cue sheets, tracker modules and various container formats.&lt;br /&gt;
&lt;br /&gt;
==== %_foobar2000_version% ====&lt;br /&gt;
Returns a string representing the version of foobar2000.&lt;br /&gt;
&lt;br /&gt;
= Time/Date Functions =&lt;br /&gt;
&lt;br /&gt;
These functions are used to manipulate time/date strings, notably (but not limited to), [[Foobar2000:Titleformat_Playback_Statistics|those gathered]] by the [[Foobar2000:Components/Playback Statistics v3.x (foo playcount)|Playback Statistics component]].&lt;br /&gt;
&lt;br /&gt;
=== $year(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the year part (formatted as four digits) from a time/date string.&lt;br /&gt;
&lt;br /&gt;
=== $month(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the month part (formatted as two digits) from a time/date string.&lt;br /&gt;
&lt;br /&gt;
=== $day_of_month(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the day of month part (formatted as two digits) from a time/date string.&lt;br /&gt;
&lt;br /&gt;
=== $date(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the date part (formatted as YYYY-MM-DD) from a time/date string.&lt;br /&gt;
&lt;br /&gt;
=== $time(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the time part (formatted as HH:MM:SS or HH:MM) from a date/time string.&lt;br /&gt;
&lt;br /&gt;
= Variable operations =&lt;br /&gt;
&lt;br /&gt;
Variables can be used to store strings and number. They cannot store truth values. They are best used to store intermediate results that you need multiple times. Variable names are not case-sensitive.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
! code&lt;br /&gt;
! output&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;pre&amp;gt;$put(foo,bar)$char(10)&lt;br /&gt;
$get(foo)$char(10)&lt;br /&gt;
$get(Foo)$char(10)&lt;br /&gt;
$puts(foo,2000)$char(10)&lt;br /&gt;
$get(foo)$char(10)&amp;lt;/pre&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot; |&amp;lt;pre&amp;gt;bar&lt;br /&gt;
bar&lt;br /&gt;
bar&lt;br /&gt;
&lt;br /&gt;
2000&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
=== $get(name) ===&lt;br /&gt;
&lt;br /&gt;
Returns the value that was last stored in the variable &#039;&#039;name&#039;&#039;, if the variable was not defined (yet), it returns nothing. The truth value returned by &#039;&#039;$get&#039;&#039; indicates if the variable &#039;&#039;name&#039;&#039; was defined&lt;br /&gt;
&lt;br /&gt;
=== $put(name,value) ===&lt;br /&gt;
&lt;br /&gt;
Stores &#039;&#039;value&#039;&#039; in the variable &#039;&#039;name&#039;&#039; and returns &#039;&#039;value&#039;&#039; unaltered&lt;br /&gt;
&lt;br /&gt;
=== $puts(name,value) ===&lt;br /&gt;
&lt;br /&gt;
Stores &#039;&#039;value&#039;&#039; in the variable &#039;&#039;name&#039;&#039; and returns nothing&lt;br /&gt;
&lt;br /&gt;
= Component-provided fields and functions on tracks =&lt;br /&gt;
&lt;br /&gt;
This section lists components that provide additional fields and functions that are useable in the context of any track.&lt;br /&gt;
&lt;br /&gt;
== Playback statistics ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.foobar2000.org/components/view/foo_playcount Playback statistics homepage]&lt;br /&gt;
* [[Foobar2000:Titleformat Playback Statistics|Playback statistics titleformat reference]]&lt;br /&gt;
&lt;br /&gt;
= Component-specific fields and functions =&lt;br /&gt;
&lt;br /&gt;
This section lists components that provide additional fields and functions that are only usable in the context of the particular component.&lt;br /&gt;
&lt;br /&gt;
== Album list ==&lt;br /&gt;
* [[Foobar2000:Titleformat_Album_List|Album List Title Formatting]]&lt;br /&gt;
* [[Foobar2000:Preferences:Album List|Preferences: Album List]]&lt;br /&gt;
== Playlist Organizer ==&lt;br /&gt;
* [http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components/Playlist_Organizer_(foo_plorg)#Nodes Playlist Organizer: Nodes Title Formatting]&lt;br /&gt;
&lt;br /&gt;
== Columns UI ==&lt;br /&gt;
&lt;br /&gt;
* [http://yuo.be/columns.php Columns UI homepage]&lt;br /&gt;
* [http://yuo.be/wiki/columns_ui:config:global_variables Global variables reference]&lt;br /&gt;
* [http://yuo.be/wiki/columns_ui:config:colour_string Playlist colors reference]&lt;br /&gt;
* [http://yuo.be/wiki/columns_ui:config:playlist_switcher_titleformatting Playlist switcher reference]&lt;br /&gt;
&lt;br /&gt;
= Additional Reading =&lt;br /&gt;
&lt;br /&gt;
* [[Foobar2000:Titleformat_Introduction|Introduction to titleformat scripts]]&lt;br /&gt;
* &#039;&#039;&#039;titleformat_help.html&#039;&#039;&#039; in your Foobar2000 directory (ie C:\Program Files\foobar2000\titleformat_help.html) file:///C:/Program%20Files/foobar2000/titleformat_help.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:foobar2000 Guides|Titleformat Reference]]&lt;/div&gt;</summary>
		<author><name>Alwayswrming</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Title_Formatting_Reference&amp;diff=25743</id>
		<title>Foobar2000:Title Formatting Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Title_Formatting_Reference&amp;diff=25743"/>
		<updated>2014-04-02T20:20:49Z</updated>

		<summary type="html">&lt;p&gt;Alwayswrming: /* $select(n,a1,...,aN) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{fb2k}}&lt;br /&gt;
This article contains information about built-in titleformatting functions and field references with special meaning. References to documentation about fields and function which can only be used in specific components or which are provided by specific components can be found at the end of this article.&lt;br /&gt;
&lt;br /&gt;
A field reference is a field name enclosed in percent signs, for example &#039;&#039;%artist%&#039;&#039;. A function call starts with a dollar sign, followed by the function name and the parameter list. A parameter list can either be empty - denoted as &#039;&#039;()&#039;&#039; - or contain one or more parameters separated by commata, for example &#039;&#039;$abbr(%artist%)&#039;&#039;. Note that there must be no whitespace between the dollar sign and the function name, or the function name and the opening parenthesis of the parameter list.&lt;br /&gt;
&lt;br /&gt;
Please see [[Foobar2000:Title Formatting Introduction|Title Formatting Introduction]] for a general overview of titleformat syntax and its basic rules. The article [[foobar2000:Titleformat Examples|Titleformat Examples]] offers user-submitted examples of code for specific purposes; feel free to add your own if you think it can be of use to others.&lt;br /&gt;
&lt;br /&gt;
For details of the query syntax, which uses some of these fields to find files for playlists, etc., see: [[Foobar2000:Query_syntax|Query Syntax]].&lt;br /&gt;
&lt;br /&gt;
= Field remappings =&lt;br /&gt;
&lt;br /&gt;
Some of the fields accessible through &#039;&#039;%name%&#039;&#039; are remapped to other values to make writing titleformat scripts more convenient.&lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
&lt;br /&gt;
=== %album artist% ===&lt;br /&gt;
Name of the artist of the album specified track belongs to. Checks following metadata fields, in this order: &amp;quot;album artist&amp;quot;, &amp;quot;artist&amp;quot;, &amp;quot;composer&amp;quot;, &amp;quot;performer&amp;quot;. The difference between this and &#039;&#039;%artist%&#039;&#039; is that &#039;&#039;%album artist%&#039;&#039; is intended for use where consistent value across entire album is needed even when per-track artists values vary.&lt;br /&gt;
&lt;br /&gt;
=== %album% ===&lt;br /&gt;
Name of the album specified track belongs to. Checks following metadata fields, in this order: &amp;quot;album&amp;quot;, &amp;quot;venue&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== %artist% ===&lt;br /&gt;
Name of the artist of the track. Checks following metadata fields, in this order: &amp;quot;artist&amp;quot;, &amp;quot;album artist&amp;quot;, &amp;quot;composer&amp;quot;, &amp;quot;performer&amp;quot;. For a SHOUTcast stream which contains metadata, it is the StreamTitle up to the first &amp;quot;-&amp;quot; character.&lt;br /&gt;
&lt;br /&gt;
=== %discnumber% ===&lt;br /&gt;
Index of disc specified track belongs to, within the album. Available only when &amp;quot;discnumber&amp;quot;/&amp;quot;disc&amp;quot; field is present in track’s metadata.&lt;br /&gt;
&lt;br /&gt;
=== %track artist% ===&lt;br /&gt;
Name of the artist of the track; present only if &#039;&#039;%album artist%&#039;&#039; is different than &#039;&#039;%artist%&#039;&#039; for specific track. Intended for use together with &#039;&#039;%album artist%&#039;&#039;, to indicate track-specific artist info, e.g. &amp;quot;%album artist% - %title%[ &#039;//&#039; %track artist%]&amp;quot;. In this case, the last part will be displayed only when track-specific artist info is present.&lt;br /&gt;
&lt;br /&gt;
=== %title% ===&lt;br /&gt;
Title of the track. If &amp;quot;title&amp;quot; metadata field is missing, file name is used instead. For a SHOUTcast stream which contains metadata, it is the StreamTitle after the first &amp;quot;-&amp;quot; character.&lt;br /&gt;
&lt;br /&gt;
=== %tracknumber% ===&lt;br /&gt;
Two-digit index of specified track within the album. Available only when &amp;quot;tracknumber&amp;quot; field is present in track’s metadata. An extra &#039;0&#039; is placed in front of single digit track numbers (5 becomes 05).&lt;br /&gt;
&lt;br /&gt;
=== %track number% ===&lt;br /&gt;
Similar to %tracknumber%, however single digit track numbers are not reformatted to have an extra 0.&lt;br /&gt;
&lt;br /&gt;
== Technical information ==&lt;br /&gt;
&lt;br /&gt;
=== %bitrate% ===&lt;br /&gt;
Bitrate of the track; includes dynamic VBR bitrate display for currently played track.&lt;br /&gt;
&lt;br /&gt;
=== %channels% ===&lt;br /&gt;
Number of channels in the track (mono/stereo/etc). Returns the number of channels in text form; returns &amp;quot;mono&amp;quot; and &amp;quot;stereo&amp;quot; instead of &amp;quot;1&amp;quot; and &amp;quot;2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== %filesize% ===&lt;br /&gt;
Defined as &#039;&#039;%_filesize%&#039;&#039;. Returns the filesize in bytes.&lt;br /&gt;
&lt;br /&gt;
=== %filesize_natural% ===&lt;br /&gt;
Size of the file, automatically formatted in appropriate units such as megabytes or kilobytes. &lt;br /&gt;
&lt;br /&gt;
=== %samplerate% ===&lt;br /&gt;
Sample rate of the track, in Hz.&lt;br /&gt;
&lt;br /&gt;
=== %codec% ===&lt;br /&gt;
Name of codec used to encode the track. If exact codec name is not available, file extension is used.&lt;br /&gt;
&lt;br /&gt;
== Special fields ==&lt;br /&gt;
&lt;br /&gt;
= Control flow =&lt;br /&gt;
&lt;br /&gt;
The functions in this section can be used to conditionally execute statements.&lt;br /&gt;
&lt;br /&gt;
=== [...] (conditional section) ===&lt;br /&gt;
&lt;br /&gt;
Evaluates the expression between &#039;&#039;[&#039;&#039; and &#039;&#039;]&#039;&#039;. If it has the truth value &#039;&#039;true&#039;&#039;, its string value and the truth value &#039;&#039;true&#039;&#039; are returned. Otherwise an empty string and &#039;&#039;false&#039;&#039; are returned.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;[%artist%]&#039;&#039; returns the value of the artist tag, if it exists. Otherwise it returns nothing, when &#039;&#039;artist&#039;&#039; would return &amp;quot;?&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== $if(cond,then) ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;cond&#039;&#039; evaluates to &#039;&#039;true&#039;&#039;, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise, &#039;&#039;false&#039;&#039; is returned.&lt;br /&gt;
&lt;br /&gt;
=== $if(cond,then,else) ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;cond&#039;&#039; evaluates to &#039;&#039;true&#039;&#039;, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise, the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $if2(a,else) ===&lt;br /&gt;
&lt;br /&gt;
Like &#039;&#039;$if(a,a,else)&#039;&#039; except that &#039;&#039;a&#039;&#039; is only evaluated once. In other words, if &#039;&#039;a&#039;&#039; is true, &#039;&#039;a&#039;&#039; is returned, otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $if3(a1,a2,...,aN,else) ===&lt;br /&gt;
&lt;br /&gt;
Evaluates arguments &#039;&#039;a1&#039;&#039; ... &#039;&#039;aN&#039;&#039;, until one is found that evaluates to &#039;&#039;true&#039;&#039;. If that happens, its value is returned. Otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $ifequal(n1,n2,then,else) ===&lt;br /&gt;
&lt;br /&gt;
Compares the integer numbers &#039;&#039;n1&#039;&#039; and &#039;&#039;n2&#039;&#039;, if &#039;&#039;n1&#039;&#039; is equal to &#039;&#039;n2&#039;&#039;, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $ifgreater(n1,n2,then,else) ===&lt;br /&gt;
&lt;br /&gt;
Compares the integer numbers &#039;&#039;n1&#039;&#039; and &#039;&#039;n2&#039;&#039;, if &#039;&#039;n1&#039;&#039; is greater than &#039;&#039;n2&#039;&#039;, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $iflonger(s,n,then,else) ===&lt;br /&gt;
&lt;br /&gt;
Compares the length of the string &#039;&#039;s&#039;&#039; to the number &#039;&#039;n&#039;&#039;, if &#039;&#039;s&#039;&#039; is longer than &#039;&#039;n&#039;&#039; characters, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $select(n,a1,...,aN) ===&lt;br /&gt;
&lt;br /&gt;
If the value of &#039;&#039;n&#039;&#039; is between 1 and N, &#039;&#039;n&#039;&#039; is evaluated and its value returned. Otherwise &#039;&#039;false&#039;&#039; is returned.&lt;br /&gt;
&lt;br /&gt;
= Arithmetic functions =&lt;br /&gt;
&lt;br /&gt;
The functions in this section can be used to perform arithmetic on integer numbers. A string will be automatically converted to a number and vice versa. The conversion to a number uses the longest prefix of the string that can be interpreted as number. Leading whitespace is ignored. Decimal points are not supported. Examples:&lt;br /&gt;
* &amp;quot;c3po&amp;quot; → 0&lt;br /&gt;
* &amp;quot;4.8&amp;quot; → 4&lt;br /&gt;
* &amp;quot;-12&amp;quot; → -12&lt;br /&gt;
* &amp;quot;- 12&amp;quot; → 0&lt;br /&gt;
&lt;br /&gt;
=== $add(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Adds &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$add(a,b,...)&#039;&#039; is the same as &#039;&#039;$add($add(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $div(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Divides &#039;&#039;a&#039;&#039; by &#039;&#039;b&#039;&#039; and rounds down to an integer. If &#039;&#039;b&#039;&#039; evaluates to zero, it returns &#039;&#039;a&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$div(a,b,...)&#039;&#039; is the same as &#039;&#039;$div($div(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $greater(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Returns true, if &#039;&#039;a&#039;&#039; is greater than &#039;&#039;b&#039;&#039;, otherwise false.&lt;br /&gt;
&lt;br /&gt;
=== $max(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Returns the maximum of &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$max(a,b,...)&#039;&#039; is the same as &#039;&#039;$max($max(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $min(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Returns the minimum of &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$min(a,b,...)&#039;&#039; is the same as &#039;&#039;$min($min(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $mod(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Computes the remainder of dividing &#039;&#039;a&#039;&#039; through &#039;&#039;b&#039;&#039;. The result has the same sign as &#039;&#039;a&#039;&#039;. If &#039;&#039;b&#039;&#039; evaluates to zero, the result is &#039;&#039;a&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$mod(a,b,...)&#039;&#039; is the same as &#039;&#039;$mod($mod(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $mul(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Multiplies &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$mul(a,b,...)&#039;&#039; is the same as &#039;&#039;$mul($mul(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $muldiv(a,b,c) ===&lt;br /&gt;
&lt;br /&gt;
Multiplies &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;, then divides by &#039;&#039;c&#039;&#039;. The result is rounded to the nearest integer.&lt;br /&gt;
&lt;br /&gt;
=== $rand() ===&lt;br /&gt;
&lt;br /&gt;
Generates a random number in the range from 0 to 2&amp;lt;sup&amp;gt;32&amp;lt;/sup&amp;gt;-1. Available only in sort-related contexts, such as the &#039;&#039;Edit → Sort → Sort by ...&#039;&#039; menu command.&lt;br /&gt;
&lt;br /&gt;
=== $sub(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Subtracts &#039;&#039;b&#039;&#039; from &#039;&#039;a&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$sub(a,b,...)&#039;&#039; is the same as &#039;&#039;$sub($sub(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Boolean functions =&lt;br /&gt;
&lt;br /&gt;
The functions in this section can be used to work with truth values (&#039;&#039;true&#039;&#039; and &#039;&#039;false&#039;&#039;), which have no explicit representation in titleformat scripts. They do not return a string or number value. You can use them for more complex conditions with &#039;&#039;$if&#039;&#039; and related functions.&lt;br /&gt;
&lt;br /&gt;
=== $and(...) ===&lt;br /&gt;
&lt;br /&gt;
Logical And of an arbitrary number of arguments. Returns &#039;&#039;true&#039;&#039;, if and only if all arguments evaluate to &#039;&#039;true&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Special case: &#039;&#039;$and(x,y)&#039;&#039; is &#039;&#039;true&#039;&#039;, if both &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; are &#039;&#039;true&#039;&#039;. Otherwise it is &#039;&#039;false&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $or(...) ===&lt;br /&gt;
&lt;br /&gt;
Logical Or of an arbitrary number of arguments. Returns &#039;&#039;true&#039;&#039;, if at least one argument evaluates to &#039;&#039;true&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Special case: &#039;&#039;$or(x,y)&#039;&#039; is &#039;&#039;true&#039;&#039;, if &#039;&#039;x&#039;&#039; or &#039;&#039;y&#039;&#039; is &#039;&#039;true&#039;&#039;, or if both are &#039;&#039;true&#039;&#039;. Otherwise it is &#039;&#039;false&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $not(x) ===&lt;br /&gt;
&lt;br /&gt;
Logical Not. Returns &#039;&#039;false&#039;&#039;, if &#039;&#039;x&#039;&#039; is &#039;&#039;true&#039;&#039;, otherwise it returns &#039;&#039;true&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $xor(...) ===&lt;br /&gt;
&lt;br /&gt;
Logical Exclusive-or of an arbitrary number of arguments. Returns &#039;&#039;true&#039;&#039;, if an odd number of arguments evaluate to &#039;&#039;true&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Special case: &#039;&#039;$xor(x,y)&#039;&#039; is &#039;&#039;true&#039;&#039;, if one of &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; is &#039;&#039;true&#039;&#039;, but not both. Otherwise it is &#039;&#039;false&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Color functions =&lt;br /&gt;
&lt;br /&gt;
==For the Default User Interface==&lt;br /&gt;
Starting in version 1.0, the Default UI playlist view doesn&#039;t support color functions. In that location, text color can only be adjusted via angle-bracket syntax: Use &amp;lt; and &amp;gt; characters to make specific text &amp;lt;dimmed&amp;gt; &#039;&#039;vs.&#039;&#039; the default color or &amp;gt;highlight&amp;gt;ed with the highlight color, with up to three levels in each case, &#039;&#039;e.g.&#039;&#039;: &amp;lt;dimmed&amp;gt;, &amp;gt;highlight&amp;lt;, &amp;gt;&amp;gt;more highlight&amp;lt;&amp;lt;, &amp;lt;&amp;lt;&amp;lt;very dim&amp;gt;&amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==For Columns UI==&lt;br /&gt;
&lt;br /&gt;
The playlist in the Columns UI still supports the following functions:&lt;br /&gt;
&lt;br /&gt;
=== $blend(color1,color2,part,total) ===&lt;br /&gt;
&lt;br /&gt;
Returns a color that is a blend between &#039;&#039;color1&#039;&#039; and &#039;&#039;color2&#039;&#039;. If &#039;&#039;part&#039;&#039; is smaller than or equal to zero, &#039;&#039;color1&#039;&#039; is returned. If &#039;&#039;part&#039;&#039; is greater than or equal to &#039;&#039;total&#039;&#039;, &#039;&#039;color2&#039;&#039; is returned. Otherwise a blended color is returned that is &#039;&#039;part&#039;&#039; parts &#039;&#039;color1&#039;&#039; and &#039;&#039;total&#039;&#039;-&#039;&#039;part&#039;&#039; parts &#039;&#039;color2&#039;&#039;. The blending is performed in the RGB color space.&lt;br /&gt;
&lt;br /&gt;
=== $hsl() ===&lt;br /&gt;
&lt;br /&gt;
Resets the text color to the default color.&lt;br /&gt;
&lt;br /&gt;
=== $hsl(h,s,l) ===&lt;br /&gt;
&lt;br /&gt;
Sets the color for text in the HSL color space. &#039;&#039;h&#039;&#039;, &#039;&#039;s&#039;&#039; and &#039;&#039;l&#039;&#039; are the hue, saturation, and lightness of the color for unselected text. The color for selected text is set to the inverse color.&lt;br /&gt;
The ranges of &#039;&#039;h&#039;&#039;, &#039;&#039;s&#039;&#039;, and &#039;&#039;l&#039;&#039; are from 0 to 240; the function is designed to interpret those values in the same way as the standard Windows color dialog.&lt;br /&gt;
&lt;br /&gt;
=== $hsl(h1,s1,l1,h2,s2,l2) ===&lt;br /&gt;
&lt;br /&gt;
Sets the color for text in the HSL color space. &#039;&#039;h1&#039;&#039;, &#039;&#039;s1&#039;&#039; and &#039;&#039;l1&#039;&#039; are the hue, saturation, and lightness of the color for unselected text. &#039;&#039;h2&#039;&#039;, &#039;&#039;s2&#039;&#039; and &#039;&#039;l2&#039;&#039; are the hue, saturation, and lightness of the color for selected text.&lt;br /&gt;
&lt;br /&gt;
=== $rgb() ===&lt;br /&gt;
&lt;br /&gt;
Resets the text color to the default color.&lt;br /&gt;
&lt;br /&gt;
=== $rgb(r,g,b) ===&lt;br /&gt;
&lt;br /&gt;
Sets the color for text. &#039;&#039;r&#039;&#039;, &#039;&#039;g&#039;&#039; and &#039;&#039;b&#039;&#039; are the red, green and blue component of the color for unselected text. The color for selected text is set to the inverse color.&lt;br /&gt;
&lt;br /&gt;
=== $rgb(r1,g1,b1,r2,g2,b2) ===&lt;br /&gt;
&lt;br /&gt;
Sets the color for text. &#039;&#039;r1&#039;&#039;, &#039;&#039;g1&#039;&#039; and &#039;&#039;b1&#039;&#039; are the red, green and blue component of the color for unselected text. &#039;&#039;r2&#039;&#039;, &#039;&#039;g2&#039;&#039; and &#039;&#039;b2&#039;&#039; are the red, green and blue component of the color for selected text.&lt;br /&gt;
&lt;br /&gt;
=== $transition(string,color1,color2) ===&lt;br /&gt;
&lt;br /&gt;
Inserts color codes into &#039;&#039;string&#039;&#039;, so that the first character has &#039;&#039;color1&#039;&#039;, the last character has &#039;&#039;color2&#039;&#039;, and intermediate characters have blended colors. The blending is performed in the RGB color space. Note that color codes are additional characters that will also be counted by string manipulation functions. For example, if you need to truncate a string, you should do this before applying &#039;&#039;$transition&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Now playing info =&lt;br /&gt;
The following functions and fields are usable for scripts used with the currently playing item, for example the status bar, the main window title and the copy command script.&lt;br /&gt;
&lt;br /&gt;
== Special fields ==&lt;br /&gt;
&lt;br /&gt;
=== %playback_time% ===&lt;br /&gt;
Returns the elapsed time formatted as [HH:]MM:SS.&lt;br /&gt;
&lt;br /&gt;
=== %playback_time_seconds% ===&lt;br /&gt;
Returns elapsed time in seconds.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_elapsed%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %playback_time_remaining% ===&lt;br /&gt;
Returns remaining time until track ends, formatted as [HH:]MM:SS.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_remaining%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %playback_time_remaining_seconds% ===&lt;br /&gt;
Returns remaining time in seconds.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_remaining_seconds%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %length% ===&lt;br /&gt;
Returns the length of the track formatted as hours, minutes, and seconds, rounded to the nearest second.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_total%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %length_ex% ===&lt;br /&gt;
Returns the length of the track formatted as hours, minutes, seconds, and milliseconds, rounded to the nearest millisecond.&lt;br /&gt;
&lt;br /&gt;
=== %length_seconds% ===&lt;br /&gt;
Returns the length of the track in seconds, rounded to the nearest second.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_total_seconds%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %length_seconds_fp% ===&lt;br /&gt;
Returns the length of the track in seconds as floating point number.&lt;br /&gt;
&lt;br /&gt;
=== %length_samples% ===&lt;br /&gt;
Returns the length of the track in samples.&lt;br /&gt;
&lt;br /&gt;
= Playlist info =&lt;br /&gt;
The following functions and fields are usable for playlist display formatting (eg. per-column title formatting patterns).&lt;br /&gt;
&lt;br /&gt;
== Special fields ==&lt;br /&gt;
&lt;br /&gt;
=== %isplaying% ===&lt;br /&gt;
&lt;br /&gt;
Returns &amp;quot;1&amp;quot; if file is currently playing and empty string otherwise.&lt;br /&gt;
&lt;br /&gt;
=== %ispaused% ===&lt;br /&gt;
&lt;br /&gt;
Returns &amp;quot;1&amp;quot; if playback is paused, empty string otherwise.&lt;br /&gt;
&lt;br /&gt;
=== %list_index% ===&lt;br /&gt;
&lt;br /&gt;
Returns a zero-padded playlist index of specified item. The first item is at index 1.&lt;br /&gt;
&lt;br /&gt;
=== %list_total% ===&lt;br /&gt;
&lt;br /&gt;
Returns number of items in the playlist.&lt;br /&gt;
&lt;br /&gt;
=== %queue_index% ===&lt;br /&gt;
&lt;br /&gt;
Index of the specified item in the playback queue; available in playlist only. If the item has been queued multiple times, %queue_index% evaluates to the first index.&lt;br /&gt;
&lt;br /&gt;
=== %queue_indexes% ===&lt;br /&gt;
&lt;br /&gt;
List of indexes of the specified item in the playback queue; available in playlist only. Same as %queue_index% unless the item has been queued more than once.&lt;br /&gt;
&lt;br /&gt;
=== %queue_total% ===&lt;br /&gt;
&lt;br /&gt;
Total amount of tracks in playback queue. Available only for queued tracks, for technical reasons. &lt;br /&gt;
&lt;br /&gt;
= String functions =&lt;br /&gt;
&lt;br /&gt;
The functions in this section can be used to manipulate character strings.&lt;br /&gt;
&lt;br /&gt;
=== $abbr(x) ===&lt;br /&gt;
&lt;br /&gt;
Returns abbreviation of &#039;&#039;x&#039;&#039;. Words which begin with an alphanumeric character are shortened to the first character. Spaces and parentheses are stripped. Example:&lt;br /&gt;
* $abbr(&#039;This is a Long Title (12-inch version) [needs tags]&#039;) → TiaLT1v[needst&lt;br /&gt;
&lt;br /&gt;
=== $abbr(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns abbreviation of &#039;&#039;x&#039;&#039;, if &#039;&#039;x&#039;&#039; is longer than &#039;&#039;len&#039;&#039; characters, otherwise returns &#039;&#039;x&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $ansi(x) ===&lt;br /&gt;
&lt;br /&gt;
Converts &#039;&#039;x&#039;&#039; to system codepage and back. Any characters that are not present in the system codepage will be removed / replaced. Useful for mass-renaming files to ensure compatibility with non-unicode-capable software.&lt;br /&gt;
&lt;br /&gt;
=== $ascii(x) ===&lt;br /&gt;
&lt;br /&gt;
Converts &#039;&#039;x&#039;&#039; to ASCII. Any characters that are not present in ASCII will be removed / replaced.&lt;br /&gt;
&lt;br /&gt;
=== $caps(x) ===&lt;br /&gt;
&lt;br /&gt;
Converts first letter in every word of x to uppercase, and all other letters to lowercase.&lt;br /&gt;
&lt;br /&gt;
=== $caps2(x) ===&lt;br /&gt;
&lt;br /&gt;
Converts first letter in every word of x to uppercase, and leaves all other letters as they are.&lt;br /&gt;
&lt;br /&gt;
=== $char(x) ===&lt;br /&gt;
&lt;br /&gt;
Inserts Unicode character with code &#039;&#039;x&#039;&#039;. You can search for characters and find the matching decimal number on this [http://www.fileformat.info/info/unicode/char/search.htm site].&lt;br /&gt;
&lt;br /&gt;
=== $crc32(a) ===&lt;br /&gt;
&lt;br /&gt;
Computes the CRC32 of the string &#039;&#039;a&#039;&#039; as a number. Intended for use in coloring scripts.&lt;br /&gt;
&lt;br /&gt;
Example: $rgb($mod($crc32(%album%),256),128,128)&lt;br /&gt;
&lt;br /&gt;
=== $crlf() ===&lt;br /&gt;
&lt;br /&gt;
Inserts end-of-line marker (carriage return, line feed). Can be used to generate multiple lines in the output, for example for the tooltip of the system  notification area (&amp;quot;systray&amp;quot;) icon.&lt;br /&gt;
&lt;br /&gt;
=== $cut(a,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of the string &#039;&#039;a&#039;&#039;. This function is the same as $left(a,len). Negative numbers produce the entire string. Examples:&lt;br /&gt;
* $cut(&#039;abc123&#039;,3) → abc&lt;br /&gt;
* $cut(&#039;abc123&#039;,0) → (nothing)&lt;br /&gt;
* $cut(&#039;abc123&#039;,-1) → abc123&lt;br /&gt;
&lt;br /&gt;
=== $directory(x) ===&lt;br /&gt;
&lt;br /&gt;
Extracts directory name from the file path &#039;&#039;x&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $directory(x,n) ===&lt;br /&gt;
&lt;br /&gt;
Extracts directory name from the file path &#039;&#039;x&#039;&#039;; goes up by &#039;&#039;n&#039;&#039; levels.&lt;br /&gt;
&lt;br /&gt;
=== $directory_path(x) ===&lt;br /&gt;
&lt;br /&gt;
Extracts directory path from the file path &#039;&#039;x&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $ext(x) ===&lt;br /&gt;
&lt;br /&gt;
Extracts file extension from &#039;&#039;x&#039;&#039; which must be a file name or path.&lt;br /&gt;
&lt;br /&gt;
=== $filename(x) ===&lt;br /&gt;
&lt;br /&gt;
Extracts file name from full path.&lt;br /&gt;
&lt;br /&gt;
=== $fix_eol(x) ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;x&#039;&#039; contains an end-of-line marker (CR-LF), the end-of-line marker and all text to the right of it is replaced by &amp;quot; (...)&amp;quot;. Otherwise &#039;&#039;x&#039;&#039; is returned unaltered.&lt;br /&gt;
&lt;br /&gt;
=== $fix_eol(x,indicator) ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;x&#039;&#039; contains an end-of-line marker (CR-LF), the end-of-line marker and all text to the right of it is replaced by &#039;&#039;indicator&#039;&#039;. Otherwise &#039;&#039;x&#039;&#039; is returned unaltered.&lt;br /&gt;
&lt;br /&gt;
=== $hex(n) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;n&#039;&#039; in hexadecimal notation.&lt;br /&gt;
&lt;br /&gt;
=== $hex(n,len) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;n&#039;&#039; in hexadecimal notation with &#039;&#039;len&#039;&#039; digits. Pads with zeros from the left if necessary.&lt;br /&gt;
&lt;br /&gt;
=== $insert(a,b,n) ===&lt;br /&gt;
&lt;br /&gt;
Inserts &#039;&#039;b&#039;&#039; into &#039;&#039;a&#039;&#039; after &#039;&#039;n&#039;&#039; characters.&lt;br /&gt;
&lt;br /&gt;
=== $left(a,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of the string &#039;&#039;a&#039;&#039;. This function is the same as $cut(a,len). Negative numbers produce the entire string. Examples:&lt;br /&gt;
* $left(&#039;abc123&#039;,3) → abc&lt;br /&gt;
* $left(&#039;abc123&#039;,0) → (nothing)&lt;br /&gt;
* $left(&#039;abc123&#039;,-1) → abc123&lt;br /&gt;
&lt;br /&gt;
=== $len(a) ===&lt;br /&gt;
&lt;br /&gt;
Returns length of string &#039;&#039;a&#039;&#039; in characters.&lt;br /&gt;
&lt;br /&gt;
=== $len2(a) ===&lt;br /&gt;
&lt;br /&gt;
Returns length of string x in characters, respecting double-width character rules (double-width characters will be counted as two).&lt;br /&gt;
&lt;br /&gt;
=== $longer(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Returns &#039;&#039;true&#039;&#039;, if string &#039;&#039;a&#039;&#039; is longer than string &#039;&#039;b&#039;&#039;, false otherwise.&lt;br /&gt;
&lt;br /&gt;
=== $lower(a) ===&lt;br /&gt;
&lt;br /&gt;
Converts &#039;&#039;a&#039;&#039; to lowercase.&lt;br /&gt;
&lt;br /&gt;
=== $longest(a,...) ===&lt;br /&gt;
&lt;br /&gt;
Returns the longest of its arguments. Can be used with an arbitrary number of strings.&lt;br /&gt;
&lt;br /&gt;
=== $num(n,len) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;n&#039;&#039; in decimal notation with &#039;&#039;len&#039;&#039; characters. Pads with zeros from the left if necessary. &#039;&#039;len&#039;&#039; includes the dash when the number is negative. If &#039;&#039;n&#039;&#039; is not numeric, it is treated as zero. Examples:&lt;br /&gt;
&lt;br /&gt;
* $num(123,5) → 00123&lt;br /&gt;
* $num(-123,5) → -0123&lt;br /&gt;
* $num(4.8,5) → 00004&lt;br /&gt;
* $num(A1,5) → 00000&lt;br /&gt;
&lt;br /&gt;
=== $pad(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Creates a left-aligned version of the string &#039;&#039;x&#039;&#039;. If &#039;&#039;x&#039;&#039; is shorter than &#039;&#039;len&#039;&#039; characters, the function adds spaces to the right of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;x&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $pad_right(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Creates a right-aligned version of the string &#039;&#039;x&#039;&#039;. If &#039;&#039;x&#039;&#039; is shorter than &#039;&#039;len&#039;&#039; characters, the function adds spaces to the left of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;x&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $pad(x,len,char) ===&lt;br /&gt;
&lt;br /&gt;
Creates a left-aligned version of the string &#039;&#039;x&#039;&#039;. If &#039;&#039;x&#039;&#039; is shorter than &#039;&#039;len&#039;&#039; characters, the function adds &#039;&#039;char&#039;&#039; to the right of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;x&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $pad_right(x,len,char) ===&lt;br /&gt;
&lt;br /&gt;
Creates a right-aligned version of the string &#039;&#039;x&#039;&#039;. If &#039;&#039;x&#039;&#039; is shorter than &#039;&#039;len&#039;&#039; characters, the function adds &#039;&#039;char&#039;&#039; to the left of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;x&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $padcut(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of &#039;&#039;x&#039;&#039;, if &#039;&#039;x&#039;&#039; is longer than &#039;&#039;len&#039;&#039; characters. Otherwise adds spaces to the right of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long.&lt;br /&gt;
&lt;br /&gt;
=== $padcut_right(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of &#039;&#039;x&#039;&#039;, if &#039;&#039;x&#039;&#039; is longer than &#039;&#039;len&#039;&#039; characters. Otherwise adds spaces to the left of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long.&lt;br /&gt;
&lt;br /&gt;
=== $progress(pos,range,len,a,b) ===&lt;br /&gt;
&lt;br /&gt;
Creates a progress bar: &#039;&#039;pos&#039;&#039; contains position, &#039;&#039;range&#039;&#039; contains range, &#039;&#039;len&#039;&#039; progress bar length in characters, &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039; are characters to build progress bar with.&lt;br /&gt;
&lt;br /&gt;
Example:&#039;&#039;$progress(%_time_elapsed_seconds%, %_time_total_seconds%, 20,&#039;#&#039;,&#039;=&#039;)&#039;&#039; produces &amp;quot;====#===============&amp;quot;, the # character is moving with playback position.&lt;br /&gt;
&lt;br /&gt;
=== $progress2(pos,range,len,a,b) ===&lt;br /&gt;
&lt;br /&gt;
Creates a progress bar: &#039;&#039;pos&#039;&#039; contains position, &#039;&#039;range&#039;&#039; contains range, &#039;&#039;len&#039;&#039; progress bar length in characters, &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039; are characters to build progress bar with. Produces different appearance than &#039;&#039;$progress&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $repeat(a,n) ===&lt;br /&gt;
&lt;br /&gt;
Returns &#039;&#039;n&#039;&#039; copies of &#039;&#039;a&#039;&#039;. Note that &#039;&#039;a&#039;&#039; is evaluated once before its value is used, so &#039;&#039;$repeat&#039;&#039; cannot be used for loops.&lt;br /&gt;
&lt;br /&gt;
=== $replace(a,b,c) ===&lt;br /&gt;
&lt;br /&gt;
Replaces all occurrences of string &#039;&#039;b&#039;&#039; in string &#039;&#039;a&#039;&#039; with string &#039;&#039;c&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can also be used with an arbitrary number of arguments. Note that &#039;&#039;$replace(a,b1,c1,b2,c2)&#039;&#039; is generally not the same as &#039;&#039;$replace($replace(a,b1,c1),b2,c2)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$replace(ab,a,b,b,c)&#039;&#039; → &amp;quot;bc&amp;quot;, &#039;&#039;$replace($replace(ab,a,b),b,c)&#039;&#039; → &amp;quot;cc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $right(a,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns the first &#039;&#039;len&#039;&#039; characters from the right of &#039;&#039;a&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $roman(n) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;n&#039;&#039; in roman notation.&lt;br /&gt;
&lt;br /&gt;
=== $rot13() ===&lt;br /&gt;
&lt;br /&gt;
Performs [http://en.wikipedia.org/wiki/ROT13 ROT13] transformation to given string.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$rot13(&#039;foobar2000&#039;)&#039;&#039; → &amp;quot;sbbone2000&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== $shortest ===&lt;br /&gt;
&lt;br /&gt;
Returns the shortest of its arguments. Can be used with an arbitrary number of strings.&lt;br /&gt;
&lt;br /&gt;
=== $strchr(s,c) ===&lt;br /&gt;
&lt;br /&gt;
Finds first occurence of character &#039;&#039;c&#039;&#039; in string &#039;&#039;s&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$strchr(abca,a)&#039;&#039; → 1&lt;br /&gt;
&lt;br /&gt;
=== $strrchr(s,c) ===&lt;br /&gt;
&lt;br /&gt;
Finds last occurence of character &#039;&#039;c&#039;&#039; in string &#039;&#039;s&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$strrchr(abca,a)&#039;&#039; → 4&lt;br /&gt;
&lt;br /&gt;
=== $strstr(s1,s2) ===&lt;br /&gt;
&lt;br /&gt;
Finds first occurence of string &#039;&#039;s2&#039;&#039; in string &#039;&#039;s1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $strcmp(s1,s2) ===&lt;br /&gt;
&lt;br /&gt;
Performs a case-sensitive comparison of the strings &#039;&#039;s1&#039;&#039; and &#039;&#039;s2&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $stricmp(s1,s2) ===&lt;br /&gt;
&lt;br /&gt;
Performs a case-insensitive comparison of the strings &#039;&#039;s1&#039;&#039; and &#039;&#039;s2&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $substr(s,m,n) ===&lt;br /&gt;
&lt;br /&gt;
Returns substring of string &#039;&#039;s&#039;&#039;, starting from &#039;&#039;m&#039;&#039;-th character and ending at &#039;&#039;n&#039;&#039;-th character.&lt;br /&gt;
&lt;br /&gt;
=== $stripprefix(x) ===&lt;br /&gt;
&lt;br /&gt;
Removes &#039;&#039;A&#039;&#039; and &#039;&#039;The&#039;&#039; prefixes from x. &lt;br /&gt;
&lt;br /&gt;
=== $stripprefix(x,prefix1,prefix2,...) ===&lt;br /&gt;
&lt;br /&gt;
Removes the specified prefixes from x. &lt;br /&gt;
&lt;br /&gt;
=== $swapprefix(x) ===&lt;br /&gt;
&lt;br /&gt;
Moves &#039;&#039;A&#039;&#039; and &#039;&#039;The&#039;&#039; prefixes to the end of x. &lt;br /&gt;
&lt;br /&gt;
=== $swapprefix(x,prefix1,prefix2,...) ===&lt;br /&gt;
&lt;br /&gt;
Moves the specified prefixes to the end of x. &lt;br /&gt;
&lt;br /&gt;
=== $trim(s) ===&lt;br /&gt;
&lt;br /&gt;
Removes leading and trailing spaces from string &#039;&#039;s&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $tab() ===&lt;br /&gt;
&lt;br /&gt;
Inserts one tabulator character.&lt;br /&gt;
&lt;br /&gt;
=== $tab(n) ===&lt;br /&gt;
&lt;br /&gt;
Inserts &#039;&#039;n&#039;&#039; tabulator characters.&lt;br /&gt;
&lt;br /&gt;
=== $upper(s) ===&lt;br /&gt;
&lt;br /&gt;
Converts string &#039;&#039;s&#039;&#039; to uppercase.&lt;br /&gt;
&lt;br /&gt;
= Track info =&lt;br /&gt;
&lt;br /&gt;
The functions and fields in this section can be used to access information about tracks.&lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
&lt;br /&gt;
=== $meta(name) ===&lt;br /&gt;
Returns value of tag called &#039;&#039;name&#039;&#039;. If multiple values of that tag exist, they are concatenated with &amp;quot;, &amp;quot; as separator.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta(artist)&#039;&#039; → &amp;quot;He, She, It&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $meta(name,n) ===&lt;br /&gt;
Returns value of &#039;&#039;n&#039;&#039;-th (0,1,2 and so on) tag called &#039;&#039;name&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta(artist,1)&#039;&#039; → &amp;quot;She&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $meta_sep(name,sep) ===&lt;br /&gt;
Returns value of tag called &#039;&#039;name&#039;&#039;. If multiple values of that tag exist, they are concatenated with &#039;&#039;sep&#039;&#039; as separator.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta_sep(artist,&#039; + &#039;)&#039;&#039; → &amp;quot;He + She + It&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $meta_sep(name,sep,lastsep) ===&lt;br /&gt;
Returns value of tag called &#039;&#039;name&#039;&#039;. If multiple values of that tag exist, they are concatenated with &#039;&#039;sep&#039;&#039; as separator between all but the last two values which are concatenated with &#039;&#039;lastsep&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta_sep(artist,&#039;, &#039;,&#039;, and &#039;)&#039;&#039; → &amp;quot;He, She, and It&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $meta_test(...) === &lt;br /&gt;
Returns &#039;&#039;1&#039;&#039;, if all given tags exist, &#039;&#039;undefined&#039;&#039; otherwise.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta_test(artist,title)&#039;&#039; → true&lt;br /&gt;
&lt;br /&gt;
=== $meta_num(name) ===&lt;br /&gt;
Returns the number of values for the tag called &#039;&#039;name&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta_num(artist)&#039;&#039; → 3&lt;br /&gt;
&lt;br /&gt;
== Technical information ==&lt;br /&gt;
&lt;br /&gt;
=== $info(name) ===&lt;br /&gt;
Returns value of technical information field called &#039;&#039;name&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For convenience, the &#039;&#039;&#039;%__name%&#039;&#039;&#039; alias is also available.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$info(channels)&#039;&#039; → 2&lt;br /&gt;
&lt;br /&gt;
Here is an &#039;&#039;&#039;informative&#039;&#039;&#039; list of recognized fields. Some of these depend on the media file type being queried.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
! field name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#CCF&amp;quot;|&#039;&#039;&#039;General&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|codec&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Codec&#039;&#039;&#039; (&#039;&#039;e.g.&#039;&#039; MP3)&lt;br /&gt;
|-&lt;br /&gt;
|codec_profile&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Codec Profile&#039;&#039;&#039; (&#039;&#039;e.g.&#039;&#039; CBR)&lt;br /&gt;
|-&lt;br /&gt;
|samplerate&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Sample Rate&#039;&#039;&#039;, in hertz (&#039;&#039;e.g.&#039;&#039; 44100)&lt;br /&gt;
|-&lt;br /&gt;
|bitrate&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Bitrate&#039;&#039;&#039;, in kilobits per second (&#039;&#039;e.g.&#039;&#039; 320)&lt;br /&gt;
|-&lt;br /&gt;
|tool&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Tool&#039;&#039;&#039; used to produce the file, possibly guessed (&#039;&#039;e.g.&#039;&#039; LAME3.97)&lt;br /&gt;
|-&lt;br /&gt;
|encoding&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Encoding&#039;&#039;&#039; lossiness (&#039;&#039;e.g.&#039;&#039; lossy)&lt;br /&gt;
|-&lt;br /&gt;
|channels&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Channels&#039;&#039;&#039; count (&#039;&#039;e.g.&#039;&#039; 2 &amp;lt;nowiki&amp;gt;[for stereo]&amp;lt;/nowiki&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|channel_mode&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Channel Mode&#039;&#039;&#039;, description of channels (&#039;&#039;e.g.&#039;&#039; 3 front, 2 rear surround channels + LFE)&lt;br /&gt;
|-&lt;br /&gt;
|bitspersample&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Bits Per Sample&#039;&#039;&#039; (&#039;&#039;e.g.&#039;&#039; 16)&lt;br /&gt;
|-&lt;br /&gt;
|tagtype&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Tag Type&#039;&#039;&#039;, comma-separated list of tag formats (&#039;&#039;e.g.&#039;&#039; id3v2|apev2)&lt;br /&gt;
|-&lt;br /&gt;
|cue_embedded&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Embedded Cuesheet&#039;&#039;&#039; presence (&#039;&#039;e.g.&#039;&#039; no &amp;lt;nowiki&amp;gt;[may be empty!]&amp;lt;/nowiki&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|md5&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Audio MD5&#039;&#039;&#039; hash, if container defines it (&#039;&#039;e.g.&#039;&#039; 1E24A910D91EF09A8CF403C9B6963961)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#CCF&amp;quot;|&#039;&#039;&#039;Other&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|ENC_DELAY&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|LAME proprietary MP3 &#039;&#039;&#039;enc_delay&#039;&#039;&#039; value (&#039;&#039;e.g.&#039;&#039; 576)&lt;br /&gt;
|-&lt;br /&gt;
|ENC_PADDING&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|LAME proprietary MP3 &#039;&#039;&#039;enc_padding&#039;&#039;&#039; value (&#039;&#039;e.g.&#039;&#039; 1536)&lt;br /&gt;
|-&lt;br /&gt;
|MP3_ACCURATE_LENGTH&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;mp3_accurate_length&#039;&#039;&#039; supported (LAME proprietary header)? (&#039;&#039;e.g.&#039;&#039; yes)&lt;br /&gt;
|-&lt;br /&gt;
|MP3_STEREO_MODE&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|Stereo mode used in MP3 file (&#039;&#039;e.g.&#039;&#039; mono, stereo, joint stereo, etc.)&lt;br /&gt;
|-&lt;br /&gt;
|VERSION&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Version&#039;&#039;&#039; of tool (&#039;&#039;e.g.&#039;&#039; 3.99)&lt;br /&gt;
|-&lt;br /&gt;
|FLAGS&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Flags&#039;&#039;&#039; of tool (&#039;&#039;e.g.&#039;&#039; 22)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== $channels() === &lt;br /&gt;
Returns number of channels in text format.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$channels()&#039;&#039; → &amp;quot;stereo&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== %replaygain_album_gain% ===&lt;br /&gt;
&lt;br /&gt;
Returns ReplayGain album gain value.&lt;br /&gt;
&lt;br /&gt;
=== %replaygain_album_peak% ===&lt;br /&gt;
&lt;br /&gt;
Returns ReplayGain album peak value.&lt;br /&gt;
&lt;br /&gt;
=== %replaygain_track_gain% ===&lt;br /&gt;
&lt;br /&gt;
Returns ReplayGain track gain value.&lt;br /&gt;
&lt;br /&gt;
=== %replaygain_track_peak% ===&lt;br /&gt;
&lt;br /&gt;
Returns ReplayGain track peak value.&lt;br /&gt;
&lt;br /&gt;
== Special fields ==&lt;br /&gt;
&lt;br /&gt;
==== %filename% ====&lt;br /&gt;
&lt;br /&gt;
Returns the filename without directory and extension.&lt;br /&gt;
&lt;br /&gt;
==== %filename_ext% ====&lt;br /&gt;
&lt;br /&gt;
Returns the filename with extension, but without the directory.&lt;br /&gt;
&lt;br /&gt;
==== %directoryname% ====&lt;br /&gt;
&lt;br /&gt;
Returns the name of the parent directory only, not the complete path.&lt;br /&gt;
&lt;br /&gt;
==== %last_modified% ====&lt;br /&gt;
&lt;br /&gt;
Returns the date and time the file was last modified. Eg: &#039;&#039;2005-12-22 00:04:10&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== %path% ====&lt;br /&gt;
&lt;br /&gt;
Returns the path.&lt;br /&gt;
&lt;br /&gt;
==== %_path_raw% ====&lt;br /&gt;
&lt;br /&gt;
Returns the path as URL including the protocol scheme.&lt;br /&gt;
&lt;br /&gt;
==== %subsong% ====&lt;br /&gt;
&lt;br /&gt;
Returns the subsong index. The subsong index is used to distuingish multiple tracks in a single file, for example for cue sheets, tracker modules and various container formats.&lt;br /&gt;
&lt;br /&gt;
==== %_foobar2000_version% ====&lt;br /&gt;
Returns a string representing the version of foobar2000.&lt;br /&gt;
&lt;br /&gt;
= Time/Date Functions =&lt;br /&gt;
&lt;br /&gt;
These functions are used to manipulate time/date strings, notably (but not limited to), [[Foobar2000:Titleformat_Playback_Statistics|those gathered]] by the [[Foobar2000:Components/Playback Statistics v3.x (foo playcount)|Playback Statistics component]].&lt;br /&gt;
&lt;br /&gt;
=== $year(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the year part (formatted as four digits) from a time/date string.&lt;br /&gt;
&lt;br /&gt;
=== $month(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the month part (formatted as two digits) from a time/date string.&lt;br /&gt;
&lt;br /&gt;
=== $day_of_month(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the day of month part (formatted as two digits) from a time/date string.&lt;br /&gt;
&lt;br /&gt;
=== $date(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the date part (formatted as YYYY-MM-DD) from a time/date string.&lt;br /&gt;
&lt;br /&gt;
=== $time(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the time part (formatted as HH:MM:SS or HH:MM) from a date/time string.&lt;br /&gt;
&lt;br /&gt;
= Variable operations =&lt;br /&gt;
&lt;br /&gt;
Variables can be used to store strings and number. They cannot store truth values. They are best used to store intermediate results that you need multiple times. Variable names are not case-sensitive.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
! code&lt;br /&gt;
! output&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;pre&amp;gt;$put(foo,bar)$char(10)&lt;br /&gt;
$get(foo)$char(10)&lt;br /&gt;
$get(Foo)$char(10)&lt;br /&gt;
$puts(foo,2000)$char(10)&lt;br /&gt;
$get(foo)$char(10)&amp;lt;/pre&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot; |&amp;lt;pre&amp;gt;bar&lt;br /&gt;
bar&lt;br /&gt;
bar&lt;br /&gt;
&lt;br /&gt;
2000&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
=== $get(name) ===&lt;br /&gt;
&lt;br /&gt;
Returns the value that was last stored in the variable &#039;&#039;name&#039;&#039;, if the variable was not defined (yet), it returns nothing. The truth value returned by &#039;&#039;$get&#039;&#039; indicates if the variable &#039;&#039;name&#039;&#039; was defined&lt;br /&gt;
&lt;br /&gt;
=== $put(name,value) ===&lt;br /&gt;
&lt;br /&gt;
Stores &#039;&#039;value&#039;&#039; in the variable &#039;&#039;name&#039;&#039; and returns &#039;&#039;value&#039;&#039; unaltered&lt;br /&gt;
&lt;br /&gt;
=== $puts(name,value) ===&lt;br /&gt;
&lt;br /&gt;
Stores &#039;&#039;value&#039;&#039; in the variable &#039;&#039;name&#039;&#039; and returns nothing&lt;br /&gt;
&lt;br /&gt;
= Component-provided fields and functions on tracks =&lt;br /&gt;
&lt;br /&gt;
This section lists components that provide additional fields and functions that are useable in the context of any track.&lt;br /&gt;
&lt;br /&gt;
== Playback statistics ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.foobar2000.org/components/view/foo_playcount Playback statistics homepage]&lt;br /&gt;
* [[Foobar2000:Titleformat Playback Statistics|Playback statistics titleformat reference]]&lt;br /&gt;
&lt;br /&gt;
= Component-specific fields and functions =&lt;br /&gt;
&lt;br /&gt;
This section lists components that provide additional fields and functions that are only usable in the context of the particular component.&lt;br /&gt;
&lt;br /&gt;
== Album list ==&lt;br /&gt;
* [[Foobar2000:Titleformat_Album_List|Album List Title Formatting]]&lt;br /&gt;
* [[Foobar2000:Preferences:Album List|Preferences: Album List]]&lt;br /&gt;
== Playlist Organizer ==&lt;br /&gt;
* [http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components/Playlist_Organizer_(foo_plorg)#Nodes Playlist Organizer: Nodes Title Formatting]&lt;br /&gt;
&lt;br /&gt;
== Columns UI ==&lt;br /&gt;
&lt;br /&gt;
* [http://yuo.be/columns.php Columns UI homepage]&lt;br /&gt;
* [http://yuo.be/wiki/columns_ui:config:global_variables Global variables reference]&lt;br /&gt;
* [http://yuo.be/wiki/columns_ui:config:colour_string Playlist colors reference]&lt;br /&gt;
* [http://yuo.be/wiki/columns_ui:config:playlist_switcher_titleformatting Playlist switcher reference]&lt;br /&gt;
&lt;br /&gt;
= Additional Reading =&lt;br /&gt;
&lt;br /&gt;
* [[Foobar2000:Titleformat_Introduction|Introduction to titleformat scripts]]&lt;br /&gt;
* &#039;&#039;&#039;titleformat_help.html&#039;&#039;&#039; in your Foobar2000 directory (ie C:\Program Files\foobar2000\titleformat_help.html) file:///C:/Program%20Files/foobar2000/titleformat_help.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:foobar2000 Guides|Titleformat Reference]]&lt;/div&gt;</summary>
		<author><name>Alwayswrming</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Title_Formatting_Reference&amp;diff=25741</id>
		<title>Foobar2000:Title Formatting Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Title_Formatting_Reference&amp;diff=25741"/>
		<updated>2014-04-02T20:01:52Z</updated>

		<summary type="html">&lt;p&gt;Alwayswrming: /* $if2(a,else) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{fb2k}}&lt;br /&gt;
This article contains information about built-in titleformatting functions and field references with special meaning. References to documentation about fields and function which can only be used in specific components or which are provided by specific components can be found at the end of this article.&lt;br /&gt;
&lt;br /&gt;
A field reference is a field name enclosed in percent signs, for example &#039;&#039;%artist%&#039;&#039;. A function call starts with a dollar sign, followed by the function name and the parameter list. A parameter list can either be empty - denoted as &#039;&#039;()&#039;&#039; - or contain one or more parameters separated by commata, for example &#039;&#039;$abbr(%artist%)&#039;&#039;. Note that there must be no whitespace between the dollar sign and the function name, or the function name and the opening parenthesis of the parameter list.&lt;br /&gt;
&lt;br /&gt;
Please see [[Foobar2000:Title Formatting Introduction|Title Formatting Introduction]] for a general overview of titleformat syntax and its basic rules. The article [[foobar2000:Titleformat Examples|Titleformat Examples]] offers user-submitted examples of code for specific purposes; feel free to add your own if you think it can be of use to others.&lt;br /&gt;
&lt;br /&gt;
For details of the query syntax, which uses some of these fields to find files for playlists, etc., see: [[Foobar2000:Query_syntax|Query Syntax]].&lt;br /&gt;
&lt;br /&gt;
= Field remappings =&lt;br /&gt;
&lt;br /&gt;
Some of the fields accessible through &#039;&#039;%name%&#039;&#039; are remapped to other values to make writing titleformat scripts more convenient.&lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
&lt;br /&gt;
=== %album artist% ===&lt;br /&gt;
Name of the artist of the album specified track belongs to. Checks following metadata fields, in this order: &amp;quot;album artist&amp;quot;, &amp;quot;artist&amp;quot;, &amp;quot;composer&amp;quot;, &amp;quot;performer&amp;quot;. The difference between this and &#039;&#039;%artist%&#039;&#039; is that &#039;&#039;%album artist%&#039;&#039; is intended for use where consistent value across entire album is needed even when per-track artists values vary.&lt;br /&gt;
&lt;br /&gt;
=== %album% ===&lt;br /&gt;
Name of the album specified track belongs to. Checks following metadata fields, in this order: &amp;quot;album&amp;quot;, &amp;quot;venue&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== %artist% ===&lt;br /&gt;
Name of the artist of the track. Checks following metadata fields, in this order: &amp;quot;artist&amp;quot;, &amp;quot;album artist&amp;quot;, &amp;quot;composer&amp;quot;, &amp;quot;performer&amp;quot;. For a SHOUTcast stream which contains metadata, it is the StreamTitle up to the first &amp;quot;-&amp;quot; character.&lt;br /&gt;
&lt;br /&gt;
=== %discnumber% ===&lt;br /&gt;
Index of disc specified track belongs to, within the album. Available only when &amp;quot;discnumber&amp;quot;/&amp;quot;disc&amp;quot; field is present in track’s metadata.&lt;br /&gt;
&lt;br /&gt;
=== %track artist% ===&lt;br /&gt;
Name of the artist of the track; present only if &#039;&#039;%album artist%&#039;&#039; is different than &#039;&#039;%artist%&#039;&#039; for specific track. Intended for use together with &#039;&#039;%album artist%&#039;&#039;, to indicate track-specific artist info, e.g. &amp;quot;%album artist% - %title%[ &#039;//&#039; %track artist%]&amp;quot;. In this case, the last part will be displayed only when track-specific artist info is present.&lt;br /&gt;
&lt;br /&gt;
=== %title% ===&lt;br /&gt;
Title of the track. If &amp;quot;title&amp;quot; metadata field is missing, file name is used instead. For a SHOUTcast stream which contains metadata, it is the StreamTitle after the first &amp;quot;-&amp;quot; character.&lt;br /&gt;
&lt;br /&gt;
=== %tracknumber% ===&lt;br /&gt;
Two-digit index of specified track within the album. Available only when &amp;quot;tracknumber&amp;quot; field is present in track’s metadata. An extra &#039;0&#039; is placed in front of single digit track numbers (5 becomes 05).&lt;br /&gt;
&lt;br /&gt;
=== %track number% ===&lt;br /&gt;
Similar to %tracknumber%, however single digit track numbers are not reformatted to have an extra 0.&lt;br /&gt;
&lt;br /&gt;
== Technical information ==&lt;br /&gt;
&lt;br /&gt;
=== %bitrate% ===&lt;br /&gt;
Bitrate of the track; includes dynamic VBR bitrate display for currently played track.&lt;br /&gt;
&lt;br /&gt;
=== %channels% ===&lt;br /&gt;
Number of channels in the track (mono/stereo/etc). Returns the number of channels in text form; returns &amp;quot;mono&amp;quot; and &amp;quot;stereo&amp;quot; instead of &amp;quot;1&amp;quot; and &amp;quot;2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== %filesize% ===&lt;br /&gt;
Defined as &#039;&#039;%_filesize%&#039;&#039;. Returns the filesize in bytes.&lt;br /&gt;
&lt;br /&gt;
=== %filesize_natural% ===&lt;br /&gt;
Size of the file, automatically formatted in appropriate units such as megabytes or kilobytes. &lt;br /&gt;
&lt;br /&gt;
=== %samplerate% ===&lt;br /&gt;
Sample rate of the track, in Hz.&lt;br /&gt;
&lt;br /&gt;
=== %codec% ===&lt;br /&gt;
Name of codec used to encode the track. If exact codec name is not available, file extension is used.&lt;br /&gt;
&lt;br /&gt;
== Special fields ==&lt;br /&gt;
&lt;br /&gt;
= Control flow =&lt;br /&gt;
&lt;br /&gt;
The functions in this section can be used to conditionally execute statements.&lt;br /&gt;
&lt;br /&gt;
=== [...] (conditional section) ===&lt;br /&gt;
&lt;br /&gt;
Evaluates the expression between &#039;&#039;[&#039;&#039; and &#039;&#039;]&#039;&#039;. If it has the truth value &#039;&#039;true&#039;&#039;, its string value and the truth value &#039;&#039;true&#039;&#039; are returned. Otherwise an empty string and &#039;&#039;false&#039;&#039; are returned.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;[%artist%]&#039;&#039; returns the value of the artist tag, if it exists. Otherwise it returns nothing, when &#039;&#039;artist&#039;&#039; would return &amp;quot;?&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== $if(cond,then) ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;cond&#039;&#039; evaluates to &#039;&#039;true&#039;&#039;, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise, &#039;&#039;false&#039;&#039; is returned.&lt;br /&gt;
&lt;br /&gt;
=== $if(cond,then,else) ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;cond&#039;&#039; evaluates to &#039;&#039;true&#039;&#039;, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise, the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $if2(a,else) ===&lt;br /&gt;
&lt;br /&gt;
Like &#039;&#039;$if(a,a,else)&#039;&#039; except that &#039;&#039;a&#039;&#039; is only evaluated once. In other words, if &#039;&#039;a&#039;&#039; is true, &#039;&#039;a&#039;&#039; is returned, otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $if3(a1,a2,...,aN,else) ===&lt;br /&gt;
&lt;br /&gt;
Evaluates arguments &#039;&#039;a1&#039;&#039; ... &#039;&#039;aN&#039;&#039;, until one is found that evaluates to &#039;&#039;true&#039;&#039;. If that happens, its value is returned. Otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $ifequal(n1,n2,then,else) ===&lt;br /&gt;
&lt;br /&gt;
Compares the integer numbers &#039;&#039;n1&#039;&#039; and &#039;&#039;n2&#039;&#039;, if &#039;&#039;n1&#039;&#039; is equal to &#039;&#039;n2&#039;&#039;, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $ifgreater(n1,n2,then,else) ===&lt;br /&gt;
&lt;br /&gt;
Compares the integer numbers &#039;&#039;n1&#039;&#039; and &#039;&#039;n2&#039;&#039;, if &#039;&#039;n1&#039;&#039; is greater than &#039;&#039;n2&#039;&#039;, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $iflonger(s,n,then,else) ===&lt;br /&gt;
&lt;br /&gt;
Compares the length of the string &#039;&#039;s&#039;&#039; to the number &#039;&#039;n&#039;&#039;, if &#039;&#039;s&#039;&#039; is longer than &#039;&#039;n&#039;&#039; characters, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $select(n,a1,...,aN) ===&lt;br /&gt;
&lt;br /&gt;
If the value of &#039;&#039;n&#039;&#039; is between 1 and N, &#039;&#039;an&#039;&#039; is evaluated and its value returned. Otherwise &#039;&#039;false&#039;&#039; is returned.&lt;br /&gt;
&lt;br /&gt;
= Arithmetic functions =&lt;br /&gt;
&lt;br /&gt;
The functions in this section can be used to perform arithmetic on integer numbers. A string will be automatically converted to a number and vice versa. The conversion to a number uses the longest prefix of the string that can be interpreted as number. Leading whitespace is ignored. Decimal points are not supported. Examples:&lt;br /&gt;
* &amp;quot;c3po&amp;quot; → 0&lt;br /&gt;
* &amp;quot;4.8&amp;quot; → 4&lt;br /&gt;
* &amp;quot;-12&amp;quot; → -12&lt;br /&gt;
* &amp;quot;- 12&amp;quot; → 0&lt;br /&gt;
&lt;br /&gt;
=== $add(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Adds &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$add(a,b,...)&#039;&#039; is the same as &#039;&#039;$add($add(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $div(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Divides &#039;&#039;a&#039;&#039; by &#039;&#039;b&#039;&#039; and rounds down to an integer. If &#039;&#039;b&#039;&#039; evaluates to zero, it returns &#039;&#039;a&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$div(a,b,...)&#039;&#039; is the same as &#039;&#039;$div($div(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $greater(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Returns true, if &#039;&#039;a&#039;&#039; is greater than &#039;&#039;b&#039;&#039;, otherwise false.&lt;br /&gt;
&lt;br /&gt;
=== $max(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Returns the maximum of &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$max(a,b,...)&#039;&#039; is the same as &#039;&#039;$max($max(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $min(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Returns the minimum of &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$min(a,b,...)&#039;&#039; is the same as &#039;&#039;$min($min(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $mod(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Computes the remainder of dividing &#039;&#039;a&#039;&#039; through &#039;&#039;b&#039;&#039;. The result has the same sign as &#039;&#039;a&#039;&#039;. If &#039;&#039;b&#039;&#039; evaluates to zero, the result is &#039;&#039;a&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$mod(a,b,...)&#039;&#039; is the same as &#039;&#039;$mod($mod(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $mul(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Multiplies &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$mul(a,b,...)&#039;&#039; is the same as &#039;&#039;$mul($mul(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $muldiv(a,b,c) ===&lt;br /&gt;
&lt;br /&gt;
Multiplies &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;, then divides by &#039;&#039;c&#039;&#039;. The result is rounded to the nearest integer.&lt;br /&gt;
&lt;br /&gt;
=== $rand() ===&lt;br /&gt;
&lt;br /&gt;
Generates a random number in the range from 0 to 2&amp;lt;sup&amp;gt;32&amp;lt;/sup&amp;gt;-1. Available only in sort-related contexts, such as the &#039;&#039;Edit → Sort → Sort by ...&#039;&#039; menu command.&lt;br /&gt;
&lt;br /&gt;
=== $sub(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Subtracts &#039;&#039;b&#039;&#039; from &#039;&#039;a&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$sub(a,b,...)&#039;&#039; is the same as &#039;&#039;$sub($sub(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Boolean functions =&lt;br /&gt;
&lt;br /&gt;
The functions in this section can be used to work with truth values (&#039;&#039;true&#039;&#039; and &#039;&#039;false&#039;&#039;), which have no explicit representation in titleformat scripts. They do not return a string or number value. You can use them for more complex conditions with &#039;&#039;$if&#039;&#039; and related functions.&lt;br /&gt;
&lt;br /&gt;
=== $and(...) ===&lt;br /&gt;
&lt;br /&gt;
Logical And of an arbitrary number of arguments. Returns &#039;&#039;true&#039;&#039;, if and only if all arguments evaluate to &#039;&#039;true&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Special case: &#039;&#039;$and(x,y)&#039;&#039; is &#039;&#039;true&#039;&#039;, if both &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; are &#039;&#039;true&#039;&#039;. Otherwise it is &#039;&#039;false&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $or(...) ===&lt;br /&gt;
&lt;br /&gt;
Logical Or of an arbitrary number of arguments. Returns &#039;&#039;true&#039;&#039;, if at least one argument evaluates to &#039;&#039;true&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Special case: &#039;&#039;$or(x,y)&#039;&#039; is &#039;&#039;true&#039;&#039;, if &#039;&#039;x&#039;&#039; or &#039;&#039;y&#039;&#039; is &#039;&#039;true&#039;&#039;, or if both are &#039;&#039;true&#039;&#039;. Otherwise it is &#039;&#039;false&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $not(x) ===&lt;br /&gt;
&lt;br /&gt;
Logical Not. Returns &#039;&#039;false&#039;&#039;, if &#039;&#039;x&#039;&#039; is &#039;&#039;true&#039;&#039;, otherwise it returns &#039;&#039;true&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $xor(...) ===&lt;br /&gt;
&lt;br /&gt;
Logical Exclusive-or of an arbitrary number of arguments. Returns &#039;&#039;true&#039;&#039;, if an odd number of arguments evaluate to &#039;&#039;true&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Special case: &#039;&#039;$xor(x,y)&#039;&#039; is &#039;&#039;true&#039;&#039;, if one of &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; is &#039;&#039;true&#039;&#039;, but not both. Otherwise it is &#039;&#039;false&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Color functions =&lt;br /&gt;
&lt;br /&gt;
==For the Default User Interface==&lt;br /&gt;
Starting in version 1.0, the Default UI playlist view doesn&#039;t support color functions. In that location, text color can only be adjusted via angle-bracket syntax: Use &amp;lt; and &amp;gt; characters to make specific text &amp;lt;dimmed&amp;gt; &#039;&#039;vs.&#039;&#039; the default color or &amp;gt;highlight&amp;gt;ed with the highlight color, with up to three levels in each case, &#039;&#039;e.g.&#039;&#039;: &amp;lt;dimmed&amp;gt;, &amp;gt;highlight&amp;lt;, &amp;gt;&amp;gt;more highlight&amp;lt;&amp;lt;, &amp;lt;&amp;lt;&amp;lt;very dim&amp;gt;&amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==For Columns UI==&lt;br /&gt;
&lt;br /&gt;
The playlist in the Columns UI still supports the following functions:&lt;br /&gt;
&lt;br /&gt;
=== $blend(color1,color2,part,total) ===&lt;br /&gt;
&lt;br /&gt;
Returns a color that is a blend between &#039;&#039;color1&#039;&#039; and &#039;&#039;color2&#039;&#039;. If &#039;&#039;part&#039;&#039; is smaller than or equal to zero, &#039;&#039;color1&#039;&#039; is returned. If &#039;&#039;part&#039;&#039; is greater than or equal to &#039;&#039;total&#039;&#039;, &#039;&#039;color2&#039;&#039; is returned. Otherwise a blended color is returned that is &#039;&#039;part&#039;&#039; parts &#039;&#039;color1&#039;&#039; and &#039;&#039;total&#039;&#039;-&#039;&#039;part&#039;&#039; parts &#039;&#039;color2&#039;&#039;. The blending is performed in the RGB color space.&lt;br /&gt;
&lt;br /&gt;
=== $hsl() ===&lt;br /&gt;
&lt;br /&gt;
Resets the text color to the default color.&lt;br /&gt;
&lt;br /&gt;
=== $hsl(h,s,l) ===&lt;br /&gt;
&lt;br /&gt;
Sets the color for text in the HSL color space. &#039;&#039;h&#039;&#039;, &#039;&#039;s&#039;&#039; and &#039;&#039;l&#039;&#039; are the hue, saturation, and lightness of the color for unselected text. The color for selected text is set to the inverse color.&lt;br /&gt;
The ranges of &#039;&#039;h&#039;&#039;, &#039;&#039;s&#039;&#039;, and &#039;&#039;l&#039;&#039; are from 0 to 240; the function is designed to interpret those values in the same way as the standard Windows color dialog.&lt;br /&gt;
&lt;br /&gt;
=== $hsl(h1,s1,l1,h2,s2,l2) ===&lt;br /&gt;
&lt;br /&gt;
Sets the color for text in the HSL color space. &#039;&#039;h1&#039;&#039;, &#039;&#039;s1&#039;&#039; and &#039;&#039;l1&#039;&#039; are the hue, saturation, and lightness of the color for unselected text. &#039;&#039;h2&#039;&#039;, &#039;&#039;s2&#039;&#039; and &#039;&#039;l2&#039;&#039; are the hue, saturation, and lightness of the color for selected text.&lt;br /&gt;
&lt;br /&gt;
=== $rgb() ===&lt;br /&gt;
&lt;br /&gt;
Resets the text color to the default color.&lt;br /&gt;
&lt;br /&gt;
=== $rgb(r,g,b) ===&lt;br /&gt;
&lt;br /&gt;
Sets the color for text. &#039;&#039;r&#039;&#039;, &#039;&#039;g&#039;&#039; and &#039;&#039;b&#039;&#039; are the red, green and blue component of the color for unselected text. The color for selected text is set to the inverse color.&lt;br /&gt;
&lt;br /&gt;
=== $rgb(r1,g1,b1,r2,g2,b2) ===&lt;br /&gt;
&lt;br /&gt;
Sets the color for text. &#039;&#039;r1&#039;&#039;, &#039;&#039;g1&#039;&#039; and &#039;&#039;b1&#039;&#039; are the red, green and blue component of the color for unselected text. &#039;&#039;r2&#039;&#039;, &#039;&#039;g2&#039;&#039; and &#039;&#039;b2&#039;&#039; are the red, green and blue component of the color for selected text.&lt;br /&gt;
&lt;br /&gt;
=== $transition(string,color1,color2) ===&lt;br /&gt;
&lt;br /&gt;
Inserts color codes into &#039;&#039;string&#039;&#039;, so that the first character has &#039;&#039;color1&#039;&#039;, the last character has &#039;&#039;color2&#039;&#039;, and intermediate characters have blended colors. The blending is performed in the RGB color space. Note that color codes are additional characters that will also be counted by string manipulation functions. For example, if you need to truncate a string, you should do this before applying &#039;&#039;$transition&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Now playing info =&lt;br /&gt;
The following functions and fields are usable for scripts used with the currently playing item, for example the status bar, the main window title and the copy command script.&lt;br /&gt;
&lt;br /&gt;
== Special fields ==&lt;br /&gt;
&lt;br /&gt;
=== %playback_time% ===&lt;br /&gt;
Returns the elapsed time formatted as [HH:]MM:SS.&lt;br /&gt;
&lt;br /&gt;
=== %playback_time_seconds% ===&lt;br /&gt;
Returns elapsed time in seconds.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_elapsed%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %playback_time_remaining% ===&lt;br /&gt;
Returns remaining time until track ends, formatted as [HH:]MM:SS.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_remaining%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %playback_time_remaining_seconds% ===&lt;br /&gt;
Returns remaining time in seconds.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_remaining_seconds%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %length% ===&lt;br /&gt;
Returns the length of the track formatted as hours, minutes, and seconds, rounded to the nearest second.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_total%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %length_ex% ===&lt;br /&gt;
Returns the length of the track formatted as hours, minutes, seconds, and milliseconds, rounded to the nearest millisecond.&lt;br /&gt;
&lt;br /&gt;
=== %length_seconds% ===&lt;br /&gt;
Returns the length of the track in seconds, rounded to the nearest second.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_total_seconds%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %length_seconds_fp% ===&lt;br /&gt;
Returns the length of the track in seconds as floating point number.&lt;br /&gt;
&lt;br /&gt;
=== %length_samples% ===&lt;br /&gt;
Returns the length of the track in samples.&lt;br /&gt;
&lt;br /&gt;
= Playlist info =&lt;br /&gt;
The following functions and fields are usable for playlist display formatting (eg. per-column title formatting patterns).&lt;br /&gt;
&lt;br /&gt;
== Special fields ==&lt;br /&gt;
&lt;br /&gt;
=== %isplaying% ===&lt;br /&gt;
&lt;br /&gt;
Returns &amp;quot;1&amp;quot; if file is currently playing and empty string otherwise.&lt;br /&gt;
&lt;br /&gt;
=== %ispaused% ===&lt;br /&gt;
&lt;br /&gt;
Returns &amp;quot;1&amp;quot; if playback is paused, empty string otherwise.&lt;br /&gt;
&lt;br /&gt;
=== %list_index% ===&lt;br /&gt;
&lt;br /&gt;
Returns a zero-padded playlist index of specified item. The first item is at index 1.&lt;br /&gt;
&lt;br /&gt;
=== %list_total% ===&lt;br /&gt;
&lt;br /&gt;
Returns number of items in the playlist.&lt;br /&gt;
&lt;br /&gt;
=== %queue_index% ===&lt;br /&gt;
&lt;br /&gt;
Index of the specified item in the playback queue; available in playlist only. If the item has been queued multiple times, %queue_index% evaluates to the first index.&lt;br /&gt;
&lt;br /&gt;
=== %queue_indexes% ===&lt;br /&gt;
&lt;br /&gt;
List of indexes of the specified item in the playback queue; available in playlist only. Same as %queue_index% unless the item has been queued more than once.&lt;br /&gt;
&lt;br /&gt;
=== %queue_total% ===&lt;br /&gt;
&lt;br /&gt;
Total amount of tracks in playback queue. Available only for queued tracks, for technical reasons. &lt;br /&gt;
&lt;br /&gt;
= String functions =&lt;br /&gt;
&lt;br /&gt;
The functions in this section can be used to manipulate character strings.&lt;br /&gt;
&lt;br /&gt;
=== $abbr(x) ===&lt;br /&gt;
&lt;br /&gt;
Returns abbreviation of &#039;&#039;x&#039;&#039;. Words which begin with an alphanumeric character are shortened to the first character. Spaces and parentheses are stripped. Example:&lt;br /&gt;
* $abbr(&#039;This is a Long Title (12-inch version) [needs tags]&#039;) → TiaLT1v[needst&lt;br /&gt;
&lt;br /&gt;
=== $abbr(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns abbreviation of &#039;&#039;x&#039;&#039;, if &#039;&#039;x&#039;&#039; is longer than &#039;&#039;len&#039;&#039; characters, otherwise returns &#039;&#039;x&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $ansi(x) ===&lt;br /&gt;
&lt;br /&gt;
Converts &#039;&#039;x&#039;&#039; to system codepage and back. Any characters that are not present in the system codepage will be removed / replaced. Useful for mass-renaming files to ensure compatibility with non-unicode-capable software.&lt;br /&gt;
&lt;br /&gt;
=== $ascii(x) ===&lt;br /&gt;
&lt;br /&gt;
Converts &#039;&#039;x&#039;&#039; to ASCII. Any characters that are not present in ASCII will be removed / replaced.&lt;br /&gt;
&lt;br /&gt;
=== $caps(x) ===&lt;br /&gt;
&lt;br /&gt;
Converts first letter in every word of x to uppercase, and all other letters to lowercase.&lt;br /&gt;
&lt;br /&gt;
=== $caps2(x) ===&lt;br /&gt;
&lt;br /&gt;
Converts first letter in every word of x to uppercase, and leaves all other letters as they are.&lt;br /&gt;
&lt;br /&gt;
=== $char(x) ===&lt;br /&gt;
&lt;br /&gt;
Inserts Unicode character with code &#039;&#039;x&#039;&#039;. You can search for characters and find the matching decimal number on this [http://www.fileformat.info/info/unicode/char/search.htm site].&lt;br /&gt;
&lt;br /&gt;
=== $crc32(a) ===&lt;br /&gt;
&lt;br /&gt;
Computes the CRC32 of the string &#039;&#039;a&#039;&#039; as a number. Intended for use in coloring scripts.&lt;br /&gt;
&lt;br /&gt;
Example: $rgb($mod($crc32(%album%),256),128,128)&lt;br /&gt;
&lt;br /&gt;
=== $crlf() ===&lt;br /&gt;
&lt;br /&gt;
Inserts end-of-line marker (carriage return, line feed). Can be used to generate multiple lines in the output, for example for the tooltip of the system  notification area (&amp;quot;systray&amp;quot;) icon.&lt;br /&gt;
&lt;br /&gt;
=== $cut(a,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of the string &#039;&#039;a&#039;&#039;. This function is the same as $left(a,len). Negative numbers produce the entire string. Examples:&lt;br /&gt;
* $cut(&#039;abc123&#039;,3) → abc&lt;br /&gt;
* $cut(&#039;abc123&#039;,0) → (nothing)&lt;br /&gt;
* $cut(&#039;abc123&#039;,-1) → abc123&lt;br /&gt;
&lt;br /&gt;
=== $directory(x) ===&lt;br /&gt;
&lt;br /&gt;
Extracts directory name from the file path &#039;&#039;x&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $directory(x,n) ===&lt;br /&gt;
&lt;br /&gt;
Extracts directory name from the file path &#039;&#039;x&#039;&#039;; goes up by &#039;&#039;n&#039;&#039; levels.&lt;br /&gt;
&lt;br /&gt;
=== $directory_path(x) ===&lt;br /&gt;
&lt;br /&gt;
Extracts directory path from the file path &#039;&#039;x&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $ext(x) ===&lt;br /&gt;
&lt;br /&gt;
Extracts file extension from &#039;&#039;x&#039;&#039; which must be a file name or path.&lt;br /&gt;
&lt;br /&gt;
=== $filename(x) ===&lt;br /&gt;
&lt;br /&gt;
Extracts file name from full path.&lt;br /&gt;
&lt;br /&gt;
=== $fix_eol(x) ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;x&#039;&#039; contains an end-of-line marker (CR-LF), the end-of-line marker and all text to the right of it is replaced by &amp;quot; (...)&amp;quot;. Otherwise &#039;&#039;x&#039;&#039; is returned unaltered.&lt;br /&gt;
&lt;br /&gt;
=== $fix_eol(x,indicator) ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;x&#039;&#039; contains an end-of-line marker (CR-LF), the end-of-line marker and all text to the right of it is replaced by &#039;&#039;indicator&#039;&#039;. Otherwise &#039;&#039;x&#039;&#039; is returned unaltered.&lt;br /&gt;
&lt;br /&gt;
=== $hex(n) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;n&#039;&#039; in hexadecimal notation.&lt;br /&gt;
&lt;br /&gt;
=== $hex(n,len) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;n&#039;&#039; in hexadecimal notation with &#039;&#039;len&#039;&#039; digits. Pads with zeros from the left if necessary.&lt;br /&gt;
&lt;br /&gt;
=== $insert(a,b,n) ===&lt;br /&gt;
&lt;br /&gt;
Inserts &#039;&#039;b&#039;&#039; into &#039;&#039;a&#039;&#039; after &#039;&#039;n&#039;&#039; characters.&lt;br /&gt;
&lt;br /&gt;
=== $left(a,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of the string &#039;&#039;a&#039;&#039;. This function is the same as $cut(a,len). Negative numbers produce the entire string. Examples:&lt;br /&gt;
* $left(&#039;abc123&#039;,3) → abc&lt;br /&gt;
* $left(&#039;abc123&#039;,0) → (nothing)&lt;br /&gt;
* $left(&#039;abc123&#039;,-1) → abc123&lt;br /&gt;
&lt;br /&gt;
=== $len(a) ===&lt;br /&gt;
&lt;br /&gt;
Returns length of string &#039;&#039;a&#039;&#039; in characters.&lt;br /&gt;
&lt;br /&gt;
=== $len2(a) ===&lt;br /&gt;
&lt;br /&gt;
Returns length of string x in characters, respecting double-width character rules (double-width characters will be counted as two).&lt;br /&gt;
&lt;br /&gt;
=== $longer(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Returns &#039;&#039;true&#039;&#039;, if string &#039;&#039;a&#039;&#039; is longer than string &#039;&#039;b&#039;&#039;, false otherwise.&lt;br /&gt;
&lt;br /&gt;
=== $lower(a) ===&lt;br /&gt;
&lt;br /&gt;
Converts &#039;&#039;a&#039;&#039; to lowercase.&lt;br /&gt;
&lt;br /&gt;
=== $longest(a,...) ===&lt;br /&gt;
&lt;br /&gt;
Returns the longest of its arguments. Can be used with an arbitrary number of strings.&lt;br /&gt;
&lt;br /&gt;
=== $num(n,len) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;n&#039;&#039; in decimal notation with &#039;&#039;len&#039;&#039; characters. Pads with zeros from the left if necessary. &#039;&#039;len&#039;&#039; includes the dash when the number is negative. If &#039;&#039;n&#039;&#039; is not numeric, it is treated as zero. Examples:&lt;br /&gt;
&lt;br /&gt;
* $num(123,5) → 00123&lt;br /&gt;
* $num(-123,5) → -0123&lt;br /&gt;
* $num(4.8,5) → 00004&lt;br /&gt;
* $num(A1,5) → 00000&lt;br /&gt;
&lt;br /&gt;
=== $pad(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Creates a left-aligned version of the string &#039;&#039;x&#039;&#039;. If &#039;&#039;x&#039;&#039; is shorter than &#039;&#039;len&#039;&#039; characters, the function adds spaces to the right of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;x&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $pad_right(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Creates a right-aligned version of the string &#039;&#039;x&#039;&#039;. If &#039;&#039;x&#039;&#039; is shorter than &#039;&#039;len&#039;&#039; characters, the function adds spaces to the left of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;x&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $pad(x,len,char) ===&lt;br /&gt;
&lt;br /&gt;
Creates a left-aligned version of the string &#039;&#039;x&#039;&#039;. If &#039;&#039;x&#039;&#039; is shorter than &#039;&#039;len&#039;&#039; characters, the function adds &#039;&#039;char&#039;&#039; to the right of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;x&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $pad_right(x,len,char) ===&lt;br /&gt;
&lt;br /&gt;
Creates a right-aligned version of the string &#039;&#039;x&#039;&#039;. If &#039;&#039;x&#039;&#039; is shorter than &#039;&#039;len&#039;&#039; characters, the function adds &#039;&#039;char&#039;&#039; to the left of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;x&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $padcut(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of &#039;&#039;x&#039;&#039;, if &#039;&#039;x&#039;&#039; is longer than &#039;&#039;len&#039;&#039; characters. Otherwise adds spaces to the right of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long.&lt;br /&gt;
&lt;br /&gt;
=== $padcut_right(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of &#039;&#039;x&#039;&#039;, if &#039;&#039;x&#039;&#039; is longer than &#039;&#039;len&#039;&#039; characters. Otherwise adds spaces to the left of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long.&lt;br /&gt;
&lt;br /&gt;
=== $progress(pos,range,len,a,b) ===&lt;br /&gt;
&lt;br /&gt;
Creates a progress bar: &#039;&#039;pos&#039;&#039; contains position, &#039;&#039;range&#039;&#039; contains range, &#039;&#039;len&#039;&#039; progress bar length in characters, &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039; are characters to build progress bar with.&lt;br /&gt;
&lt;br /&gt;
Example:&#039;&#039;$progress(%_time_elapsed_seconds%, %_time_total_seconds%, 20,&#039;#&#039;,&#039;=&#039;)&#039;&#039; produces &amp;quot;====#===============&amp;quot;, the # character is moving with playback position.&lt;br /&gt;
&lt;br /&gt;
=== $progress2(pos,range,len,a,b) ===&lt;br /&gt;
&lt;br /&gt;
Creates a progress bar: &#039;&#039;pos&#039;&#039; contains position, &#039;&#039;range&#039;&#039; contains range, &#039;&#039;len&#039;&#039; progress bar length in characters, &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039; are characters to build progress bar with. Produces different appearance than &#039;&#039;$progress&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $repeat(a,n) ===&lt;br /&gt;
&lt;br /&gt;
Returns &#039;&#039;n&#039;&#039; copies of &#039;&#039;a&#039;&#039;. Note that &#039;&#039;a&#039;&#039; is evaluated once before its value is used, so &#039;&#039;$repeat&#039;&#039; cannot be used for loops.&lt;br /&gt;
&lt;br /&gt;
=== $replace(a,b,c) ===&lt;br /&gt;
&lt;br /&gt;
Replaces all occurrences of string &#039;&#039;b&#039;&#039; in string &#039;&#039;a&#039;&#039; with string &#039;&#039;c&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can also be used with an arbitrary number of arguments. Note that &#039;&#039;$replace(a,b1,c1,b2,c2)&#039;&#039; is generally not the same as &#039;&#039;$replace($replace(a,b1,c1),b2,c2)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$replace(ab,a,b,b,c)&#039;&#039; → &amp;quot;bc&amp;quot;, &#039;&#039;$replace($replace(ab,a,b),b,c)&#039;&#039; → &amp;quot;cc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $right(a,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns the first &#039;&#039;len&#039;&#039; characters from the right of &#039;&#039;a&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $roman(n) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;n&#039;&#039; in roman notation.&lt;br /&gt;
&lt;br /&gt;
=== $rot13() ===&lt;br /&gt;
&lt;br /&gt;
Performs [http://en.wikipedia.org/wiki/ROT13 ROT13] transformation to given string.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$rot13(&#039;foobar2000&#039;)&#039;&#039; → &amp;quot;sbbone2000&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== $shortest ===&lt;br /&gt;
&lt;br /&gt;
Returns the shortest of its arguments. Can be used with an arbitrary number of strings.&lt;br /&gt;
&lt;br /&gt;
=== $strchr(s,c) ===&lt;br /&gt;
&lt;br /&gt;
Finds first occurence of character &#039;&#039;c&#039;&#039; in string &#039;&#039;s&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$strchr(abca,a)&#039;&#039; → 1&lt;br /&gt;
&lt;br /&gt;
=== $strrchr(s,c) ===&lt;br /&gt;
&lt;br /&gt;
Finds last occurence of character &#039;&#039;c&#039;&#039; in string &#039;&#039;s&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$strrchr(abca,a)&#039;&#039; → 4&lt;br /&gt;
&lt;br /&gt;
=== $strstr(s1,s2) ===&lt;br /&gt;
&lt;br /&gt;
Finds first occurence of string &#039;&#039;s2&#039;&#039; in string &#039;&#039;s1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $strcmp(s1,s2) ===&lt;br /&gt;
&lt;br /&gt;
Performs a case-sensitive comparison of the strings &#039;&#039;s1&#039;&#039; and &#039;&#039;s2&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $stricmp(s1,s2) ===&lt;br /&gt;
&lt;br /&gt;
Performs a case-insensitive comparison of the strings &#039;&#039;s1&#039;&#039; and &#039;&#039;s2&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $substr(s,m,n) ===&lt;br /&gt;
&lt;br /&gt;
Returns substring of string &#039;&#039;s&#039;&#039;, starting from &#039;&#039;m&#039;&#039;-th character and ending at &#039;&#039;n&#039;&#039;-th character.&lt;br /&gt;
&lt;br /&gt;
=== $stripprefix(x) ===&lt;br /&gt;
&lt;br /&gt;
Removes &#039;&#039;A&#039;&#039; and &#039;&#039;The&#039;&#039; prefixes from x. &lt;br /&gt;
&lt;br /&gt;
=== $stripprefix(x,prefix1,prefix2,...) ===&lt;br /&gt;
&lt;br /&gt;
Removes the specified prefixes from x. &lt;br /&gt;
&lt;br /&gt;
=== $swapprefix(x) ===&lt;br /&gt;
&lt;br /&gt;
Moves &#039;&#039;A&#039;&#039; and &#039;&#039;The&#039;&#039; prefixes to the end of x. &lt;br /&gt;
&lt;br /&gt;
=== $swapprefix(x,prefix1,prefix2,...) ===&lt;br /&gt;
&lt;br /&gt;
Moves the specified prefixes to the end of x. &lt;br /&gt;
&lt;br /&gt;
=== $trim(s) ===&lt;br /&gt;
&lt;br /&gt;
Removes leading and trailing spaces from string &#039;&#039;s&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $tab() ===&lt;br /&gt;
&lt;br /&gt;
Inserts one tabulator character.&lt;br /&gt;
&lt;br /&gt;
=== $tab(n) ===&lt;br /&gt;
&lt;br /&gt;
Inserts &#039;&#039;n&#039;&#039; tabulator characters.&lt;br /&gt;
&lt;br /&gt;
=== $upper(s) ===&lt;br /&gt;
&lt;br /&gt;
Converts string &#039;&#039;s&#039;&#039; to uppercase.&lt;br /&gt;
&lt;br /&gt;
= Track info =&lt;br /&gt;
&lt;br /&gt;
The functions and fields in this section can be used to access information about tracks.&lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
&lt;br /&gt;
=== $meta(name) ===&lt;br /&gt;
Returns value of tag called &#039;&#039;name&#039;&#039;. If multiple values of that tag exist, they are concatenated with &amp;quot;, &amp;quot; as separator.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta(artist)&#039;&#039; → &amp;quot;He, She, It&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $meta(name,n) ===&lt;br /&gt;
Returns value of &#039;&#039;n&#039;&#039;-th (0,1,2 and so on) tag called &#039;&#039;name&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta(artist,1)&#039;&#039; → &amp;quot;She&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $meta_sep(name,sep) ===&lt;br /&gt;
Returns value of tag called &#039;&#039;name&#039;&#039;. If multiple values of that tag exist, they are concatenated with &#039;&#039;sep&#039;&#039; as separator.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta_sep(artist,&#039; + &#039;)&#039;&#039; → &amp;quot;He + She + It&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $meta_sep(name,sep,lastsep) ===&lt;br /&gt;
Returns value of tag called &#039;&#039;name&#039;&#039;. If multiple values of that tag exist, they are concatenated with &#039;&#039;sep&#039;&#039; as separator between all but the last two values which are concatenated with &#039;&#039;lastsep&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta_sep(artist,&#039;, &#039;,&#039;, and &#039;)&#039;&#039; → &amp;quot;He, She, and It&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $meta_test(...) === &lt;br /&gt;
Returns &#039;&#039;1&#039;&#039;, if all given tags exist, &#039;&#039;undefined&#039;&#039; otherwise.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta_test(artist,title)&#039;&#039; → true&lt;br /&gt;
&lt;br /&gt;
=== $meta_num(name) ===&lt;br /&gt;
Returns the number of values for the tag called &#039;&#039;name&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta_num(artist)&#039;&#039; → 3&lt;br /&gt;
&lt;br /&gt;
== Technical information ==&lt;br /&gt;
&lt;br /&gt;
=== $info(name) ===&lt;br /&gt;
Returns value of technical information field called &#039;&#039;name&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For convenience, the &#039;&#039;&#039;%__name%&#039;&#039;&#039; alias is also available.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$info(channels)&#039;&#039; → 2&lt;br /&gt;
&lt;br /&gt;
Here is an &#039;&#039;&#039;informative&#039;&#039;&#039; list of recognized fields. Some of these depend on the media file type being queried.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
! field name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#CCF&amp;quot;|&#039;&#039;&#039;General&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|codec&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Codec&#039;&#039;&#039; (&#039;&#039;e.g.&#039;&#039; MP3)&lt;br /&gt;
|-&lt;br /&gt;
|codec_profile&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Codec Profile&#039;&#039;&#039; (&#039;&#039;e.g.&#039;&#039; CBR)&lt;br /&gt;
|-&lt;br /&gt;
|samplerate&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Sample Rate&#039;&#039;&#039;, in hertz (&#039;&#039;e.g.&#039;&#039; 44100)&lt;br /&gt;
|-&lt;br /&gt;
|bitrate&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Bitrate&#039;&#039;&#039;, in kilobits per second (&#039;&#039;e.g.&#039;&#039; 320)&lt;br /&gt;
|-&lt;br /&gt;
|tool&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Tool&#039;&#039;&#039; used to produce the file, possibly guessed (&#039;&#039;e.g.&#039;&#039; LAME3.97)&lt;br /&gt;
|-&lt;br /&gt;
|encoding&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Encoding&#039;&#039;&#039; lossiness (&#039;&#039;e.g.&#039;&#039; lossy)&lt;br /&gt;
|-&lt;br /&gt;
|channels&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Channels&#039;&#039;&#039; count (&#039;&#039;e.g.&#039;&#039; 2 &amp;lt;nowiki&amp;gt;[for stereo]&amp;lt;/nowiki&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|channel_mode&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Channel Mode&#039;&#039;&#039;, description of channels (&#039;&#039;e.g.&#039;&#039; 3 front, 2 rear surround channels + LFE)&lt;br /&gt;
|-&lt;br /&gt;
|bitspersample&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Bits Per Sample&#039;&#039;&#039; (&#039;&#039;e.g.&#039;&#039; 16)&lt;br /&gt;
|-&lt;br /&gt;
|tagtype&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Tag Type&#039;&#039;&#039;, comma-separated list of tag formats (&#039;&#039;e.g.&#039;&#039; id3v2|apev2)&lt;br /&gt;
|-&lt;br /&gt;
|cue_embedded&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Embedded Cuesheet&#039;&#039;&#039; presence (&#039;&#039;e.g.&#039;&#039; no &amp;lt;nowiki&amp;gt;[may be empty!]&amp;lt;/nowiki&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|md5&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Audio MD5&#039;&#039;&#039; hash, if container defines it (&#039;&#039;e.g.&#039;&#039; 1E24A910D91EF09A8CF403C9B6963961)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#CCF&amp;quot;|&#039;&#039;&#039;Other&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|ENC_DELAY&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|LAME proprietary MP3 &#039;&#039;&#039;enc_delay&#039;&#039;&#039; value (&#039;&#039;e.g.&#039;&#039; 576)&lt;br /&gt;
|-&lt;br /&gt;
|ENC_PADDING&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|LAME proprietary MP3 &#039;&#039;&#039;enc_padding&#039;&#039;&#039; value (&#039;&#039;e.g.&#039;&#039; 1536)&lt;br /&gt;
|-&lt;br /&gt;
|MP3_ACCURATE_LENGTH&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;mp3_accurate_length&#039;&#039;&#039; supported (LAME proprietary header)? (&#039;&#039;e.g.&#039;&#039; yes)&lt;br /&gt;
|-&lt;br /&gt;
|MP3_STEREO_MODE&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|Stereo mode used in MP3 file (&#039;&#039;e.g.&#039;&#039; mono, stereo, joint stereo, etc.)&lt;br /&gt;
|-&lt;br /&gt;
|VERSION&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Version&#039;&#039;&#039; of tool (&#039;&#039;e.g.&#039;&#039; 3.99)&lt;br /&gt;
|-&lt;br /&gt;
|FLAGS&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Flags&#039;&#039;&#039; of tool (&#039;&#039;e.g.&#039;&#039; 22)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== $channels() === &lt;br /&gt;
Returns number of channels in text format.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$channels()&#039;&#039; → &amp;quot;stereo&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== %replaygain_album_gain% ===&lt;br /&gt;
&lt;br /&gt;
Returns ReplayGain album gain value.&lt;br /&gt;
&lt;br /&gt;
=== %replaygain_album_peak% ===&lt;br /&gt;
&lt;br /&gt;
Returns ReplayGain album peak value.&lt;br /&gt;
&lt;br /&gt;
=== %replaygain_track_gain% ===&lt;br /&gt;
&lt;br /&gt;
Returns ReplayGain track gain value.&lt;br /&gt;
&lt;br /&gt;
=== %replaygain_track_peak% ===&lt;br /&gt;
&lt;br /&gt;
Returns ReplayGain track peak value.&lt;br /&gt;
&lt;br /&gt;
== Special fields ==&lt;br /&gt;
&lt;br /&gt;
==== %filename% ====&lt;br /&gt;
&lt;br /&gt;
Returns the filename without directory and extension.&lt;br /&gt;
&lt;br /&gt;
==== %filename_ext% ====&lt;br /&gt;
&lt;br /&gt;
Returns the filename with extension, but without the directory.&lt;br /&gt;
&lt;br /&gt;
==== %directoryname% ====&lt;br /&gt;
&lt;br /&gt;
Returns the name of the parent directory only, not the complete path.&lt;br /&gt;
&lt;br /&gt;
==== %last_modified% ====&lt;br /&gt;
&lt;br /&gt;
Returns the date and time the file was last modified. Eg: &#039;&#039;2005-12-22 00:04:10&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== %path% ====&lt;br /&gt;
&lt;br /&gt;
Returns the path.&lt;br /&gt;
&lt;br /&gt;
==== %_path_raw% ====&lt;br /&gt;
&lt;br /&gt;
Returns the path as URL including the protocol scheme.&lt;br /&gt;
&lt;br /&gt;
==== %subsong% ====&lt;br /&gt;
&lt;br /&gt;
Returns the subsong index. The subsong index is used to distuingish multiple tracks in a single file, for example for cue sheets, tracker modules and various container formats.&lt;br /&gt;
&lt;br /&gt;
==== %_foobar2000_version% ====&lt;br /&gt;
Returns a string representing the version of foobar2000.&lt;br /&gt;
&lt;br /&gt;
= Time/Date Functions =&lt;br /&gt;
&lt;br /&gt;
These functions are used to manipulate time/date strings, notably (but not limited to), [[Foobar2000:Titleformat_Playback_Statistics|those gathered]] by the [[Foobar2000:Components/Playback Statistics v3.x (foo playcount)|Playback Statistics component]].&lt;br /&gt;
&lt;br /&gt;
=== $year(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the year part (formatted as four digits) from a time/date string.&lt;br /&gt;
&lt;br /&gt;
=== $month(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the month part (formatted as two digits) from a time/date string.&lt;br /&gt;
&lt;br /&gt;
=== $day_of_month(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the day of month part (formatted as two digits) from a time/date string.&lt;br /&gt;
&lt;br /&gt;
=== $date(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the date part (formatted as YYYY-MM-DD) from a time/date string.&lt;br /&gt;
&lt;br /&gt;
=== $time(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the time part (formatted as HH:MM:SS or HH:MM) from a date/time string.&lt;br /&gt;
&lt;br /&gt;
= Variable operations =&lt;br /&gt;
&lt;br /&gt;
Variables can be used to store strings and number. They cannot store truth values. They are best used to store intermediate results that you need multiple times. Variable names are not case-sensitive.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
! code&lt;br /&gt;
! output&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;pre&amp;gt;$put(foo,bar)$char(10)&lt;br /&gt;
$get(foo)$char(10)&lt;br /&gt;
$get(Foo)$char(10)&lt;br /&gt;
$puts(foo,2000)$char(10)&lt;br /&gt;
$get(foo)$char(10)&amp;lt;/pre&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot; |&amp;lt;pre&amp;gt;bar&lt;br /&gt;
bar&lt;br /&gt;
bar&lt;br /&gt;
&lt;br /&gt;
2000&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
=== $get(name) ===&lt;br /&gt;
&lt;br /&gt;
Returns the value that was last stored in the variable &#039;&#039;name&#039;&#039;, if the variable was not defined (yet), it returns nothing. The truth value returned by &#039;&#039;$get&#039;&#039; indicates if the variable &#039;&#039;name&#039;&#039; was defined&lt;br /&gt;
&lt;br /&gt;
=== $put(name,value) ===&lt;br /&gt;
&lt;br /&gt;
Stores &#039;&#039;value&#039;&#039; in the variable &#039;&#039;name&#039;&#039; and returns &#039;&#039;value&#039;&#039; unaltered&lt;br /&gt;
&lt;br /&gt;
=== $puts(name,value) ===&lt;br /&gt;
&lt;br /&gt;
Stores &#039;&#039;value&#039;&#039; in the variable &#039;&#039;name&#039;&#039; and returns nothing&lt;br /&gt;
&lt;br /&gt;
= Component-provided fields and functions on tracks =&lt;br /&gt;
&lt;br /&gt;
This section lists components that provide additional fields and functions that are useable in the context of any track.&lt;br /&gt;
&lt;br /&gt;
== Playback statistics ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.foobar2000.org/components/view/foo_playcount Playback statistics homepage]&lt;br /&gt;
* [[Foobar2000:Titleformat Playback Statistics|Playback statistics titleformat reference]]&lt;br /&gt;
&lt;br /&gt;
= Component-specific fields and functions =&lt;br /&gt;
&lt;br /&gt;
This section lists components that provide additional fields and functions that are only usable in the context of the particular component.&lt;br /&gt;
&lt;br /&gt;
== Album list ==&lt;br /&gt;
* [[Foobar2000:Titleformat_Album_List|Album List Title Formatting]]&lt;br /&gt;
* [[Foobar2000:Preferences:Album List|Preferences: Album List]]&lt;br /&gt;
== Playlist Organizer ==&lt;br /&gt;
* [http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components/Playlist_Organizer_(foo_plorg)#Nodes Playlist Organizer: Nodes Title Formatting]&lt;br /&gt;
&lt;br /&gt;
== Columns UI ==&lt;br /&gt;
&lt;br /&gt;
* [http://yuo.be/columns.php Columns UI homepage]&lt;br /&gt;
* [http://yuo.be/wiki/columns_ui:config:global_variables Global variables reference]&lt;br /&gt;
* [http://yuo.be/wiki/columns_ui:config:colour_string Playlist colors reference]&lt;br /&gt;
* [http://yuo.be/wiki/columns_ui:config:playlist_switcher_titleformatting Playlist switcher reference]&lt;br /&gt;
&lt;br /&gt;
= Additional Reading =&lt;br /&gt;
&lt;br /&gt;
* [[Foobar2000:Titleformat_Introduction|Introduction to titleformat scripts]]&lt;br /&gt;
* &#039;&#039;&#039;titleformat_help.html&#039;&#039;&#039; in your Foobar2000 directory (ie C:\Program Files\foobar2000\titleformat_help.html) file:///C:/Program%20Files/foobar2000/titleformat_help.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:foobar2000 Guides|Titleformat Reference]]&lt;/div&gt;</summary>
		<author><name>Alwayswrming</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Title_Formatting_Reference&amp;diff=25740</id>
		<title>Foobar2000:Title Formatting Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Title_Formatting_Reference&amp;diff=25740"/>
		<updated>2014-04-02T20:00:52Z</updated>

		<summary type="html">&lt;p&gt;Alwayswrming: /* $if2(a,else) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{fb2k}}&lt;br /&gt;
This article contains information about built-in titleformatting functions and field references with special meaning. References to documentation about fields and function which can only be used in specific components or which are provided by specific components can be found at the end of this article.&lt;br /&gt;
&lt;br /&gt;
A field reference is a field name enclosed in percent signs, for example &#039;&#039;%artist%&#039;&#039;. A function call starts with a dollar sign, followed by the function name and the parameter list. A parameter list can either be empty - denoted as &#039;&#039;()&#039;&#039; - or contain one or more parameters separated by commata, for example &#039;&#039;$abbr(%artist%)&#039;&#039;. Note that there must be no whitespace between the dollar sign and the function name, or the function name and the opening parenthesis of the parameter list.&lt;br /&gt;
&lt;br /&gt;
Please see [[Foobar2000:Title Formatting Introduction|Title Formatting Introduction]] for a general overview of titleformat syntax and its basic rules. The article [[foobar2000:Titleformat Examples|Titleformat Examples]] offers user-submitted examples of code for specific purposes; feel free to add your own if you think it can be of use to others.&lt;br /&gt;
&lt;br /&gt;
For details of the query syntax, which uses some of these fields to find files for playlists, etc., see: [[Foobar2000:Query_syntax|Query Syntax]].&lt;br /&gt;
&lt;br /&gt;
= Field remappings =&lt;br /&gt;
&lt;br /&gt;
Some of the fields accessible through &#039;&#039;%name%&#039;&#039; are remapped to other values to make writing titleformat scripts more convenient.&lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
&lt;br /&gt;
=== %album artist% ===&lt;br /&gt;
Name of the artist of the album specified track belongs to. Checks following metadata fields, in this order: &amp;quot;album artist&amp;quot;, &amp;quot;artist&amp;quot;, &amp;quot;composer&amp;quot;, &amp;quot;performer&amp;quot;. The difference between this and &#039;&#039;%artist%&#039;&#039; is that &#039;&#039;%album artist%&#039;&#039; is intended for use where consistent value across entire album is needed even when per-track artists values vary.&lt;br /&gt;
&lt;br /&gt;
=== %album% ===&lt;br /&gt;
Name of the album specified track belongs to. Checks following metadata fields, in this order: &amp;quot;album&amp;quot;, &amp;quot;venue&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== %artist% ===&lt;br /&gt;
Name of the artist of the track. Checks following metadata fields, in this order: &amp;quot;artist&amp;quot;, &amp;quot;album artist&amp;quot;, &amp;quot;composer&amp;quot;, &amp;quot;performer&amp;quot;. For a SHOUTcast stream which contains metadata, it is the StreamTitle up to the first &amp;quot;-&amp;quot; character.&lt;br /&gt;
&lt;br /&gt;
=== %discnumber% ===&lt;br /&gt;
Index of disc specified track belongs to, within the album. Available only when &amp;quot;discnumber&amp;quot;/&amp;quot;disc&amp;quot; field is present in track’s metadata.&lt;br /&gt;
&lt;br /&gt;
=== %track artist% ===&lt;br /&gt;
Name of the artist of the track; present only if &#039;&#039;%album artist%&#039;&#039; is different than &#039;&#039;%artist%&#039;&#039; for specific track. Intended for use together with &#039;&#039;%album artist%&#039;&#039;, to indicate track-specific artist info, e.g. &amp;quot;%album artist% - %title%[ &#039;//&#039; %track artist%]&amp;quot;. In this case, the last part will be displayed only when track-specific artist info is present.&lt;br /&gt;
&lt;br /&gt;
=== %title% ===&lt;br /&gt;
Title of the track. If &amp;quot;title&amp;quot; metadata field is missing, file name is used instead. For a SHOUTcast stream which contains metadata, it is the StreamTitle after the first &amp;quot;-&amp;quot; character.&lt;br /&gt;
&lt;br /&gt;
=== %tracknumber% ===&lt;br /&gt;
Two-digit index of specified track within the album. Available only when &amp;quot;tracknumber&amp;quot; field is present in track’s metadata. An extra &#039;0&#039; is placed in front of single digit track numbers (5 becomes 05).&lt;br /&gt;
&lt;br /&gt;
=== %track number% ===&lt;br /&gt;
Similar to %tracknumber%, however single digit track numbers are not reformatted to have an extra 0.&lt;br /&gt;
&lt;br /&gt;
== Technical information ==&lt;br /&gt;
&lt;br /&gt;
=== %bitrate% ===&lt;br /&gt;
Bitrate of the track; includes dynamic VBR bitrate display for currently played track.&lt;br /&gt;
&lt;br /&gt;
=== %channels% ===&lt;br /&gt;
Number of channels in the track (mono/stereo/etc). Returns the number of channels in text form; returns &amp;quot;mono&amp;quot; and &amp;quot;stereo&amp;quot; instead of &amp;quot;1&amp;quot; and &amp;quot;2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== %filesize% ===&lt;br /&gt;
Defined as &#039;&#039;%_filesize%&#039;&#039;. Returns the filesize in bytes.&lt;br /&gt;
&lt;br /&gt;
=== %filesize_natural% ===&lt;br /&gt;
Size of the file, automatically formatted in appropriate units such as megabytes or kilobytes. &lt;br /&gt;
&lt;br /&gt;
=== %samplerate% ===&lt;br /&gt;
Sample rate of the track, in Hz.&lt;br /&gt;
&lt;br /&gt;
=== %codec% ===&lt;br /&gt;
Name of codec used to encode the track. If exact codec name is not available, file extension is used.&lt;br /&gt;
&lt;br /&gt;
== Special fields ==&lt;br /&gt;
&lt;br /&gt;
= Control flow =&lt;br /&gt;
&lt;br /&gt;
The functions in this section can be used to conditionally execute statements.&lt;br /&gt;
&lt;br /&gt;
=== [...] (conditional section) ===&lt;br /&gt;
&lt;br /&gt;
Evaluates the expression between &#039;&#039;[&#039;&#039; and &#039;&#039;]&#039;&#039;. If it has the truth value &#039;&#039;true&#039;&#039;, its string value and the truth value &#039;&#039;true&#039;&#039; are returned. Otherwise an empty string and &#039;&#039;false&#039;&#039; are returned.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;[%artist%]&#039;&#039; returns the value of the artist tag, if it exists. Otherwise it returns nothing, when &#039;&#039;artist&#039;&#039; would return &amp;quot;?&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== $if(cond,then) ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;cond&#039;&#039; evaluates to &#039;&#039;true&#039;&#039;, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise, &#039;&#039;false&#039;&#039; is returned.&lt;br /&gt;
&lt;br /&gt;
=== $if(cond,then,else) ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;cond&#039;&#039; evaluates to &#039;&#039;true&#039;&#039;, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise, the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $if2(a,else) ===&lt;br /&gt;
&lt;br /&gt;
Like &#039;&#039;$if(a,a,else)&#039;&#039; except that &#039;&#039;a&#039;&#039; is only evaluated once. In other words, if &#039;&#039;a&#039;&#039; is true, &#039;&#039;a&#039;&#039; is returned, otherwise &#039;&#039;else&#039;&#039; is returned.&lt;br /&gt;
&lt;br /&gt;
=== $if3(a1,a2,...,aN,else) ===&lt;br /&gt;
&lt;br /&gt;
Evaluates arguments &#039;&#039;a1&#039;&#039; ... &#039;&#039;aN&#039;&#039;, until one is found that evaluates to &#039;&#039;true&#039;&#039;. If that happens, its value is returned. Otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $ifequal(n1,n2,then,else) ===&lt;br /&gt;
&lt;br /&gt;
Compares the integer numbers &#039;&#039;n1&#039;&#039; and &#039;&#039;n2&#039;&#039;, if &#039;&#039;n1&#039;&#039; is equal to &#039;&#039;n2&#039;&#039;, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $ifgreater(n1,n2,then,else) ===&lt;br /&gt;
&lt;br /&gt;
Compares the integer numbers &#039;&#039;n1&#039;&#039; and &#039;&#039;n2&#039;&#039;, if &#039;&#039;n1&#039;&#039; is greater than &#039;&#039;n2&#039;&#039;, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $iflonger(s,n,then,else) ===&lt;br /&gt;
&lt;br /&gt;
Compares the length of the string &#039;&#039;s&#039;&#039; to the number &#039;&#039;n&#039;&#039;, if &#039;&#039;s&#039;&#039; is longer than &#039;&#039;n&#039;&#039; characters, the &#039;&#039;then&#039;&#039; part is evaluated and its value returned. Otherwise the &#039;&#039;else&#039;&#039; part is evaluated and its value returned.&lt;br /&gt;
&lt;br /&gt;
=== $select(n,a1,...,aN) ===&lt;br /&gt;
&lt;br /&gt;
If the value of &#039;&#039;n&#039;&#039; is between 1 and N, &#039;&#039;an&#039;&#039; is evaluated and its value returned. Otherwise &#039;&#039;false&#039;&#039; is returned.&lt;br /&gt;
&lt;br /&gt;
= Arithmetic functions =&lt;br /&gt;
&lt;br /&gt;
The functions in this section can be used to perform arithmetic on integer numbers. A string will be automatically converted to a number and vice versa. The conversion to a number uses the longest prefix of the string that can be interpreted as number. Leading whitespace is ignored. Decimal points are not supported. Examples:&lt;br /&gt;
* &amp;quot;c3po&amp;quot; → 0&lt;br /&gt;
* &amp;quot;4.8&amp;quot; → 4&lt;br /&gt;
* &amp;quot;-12&amp;quot; → -12&lt;br /&gt;
* &amp;quot;- 12&amp;quot; → 0&lt;br /&gt;
&lt;br /&gt;
=== $add(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Adds &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$add(a,b,...)&#039;&#039; is the same as &#039;&#039;$add($add(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $div(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Divides &#039;&#039;a&#039;&#039; by &#039;&#039;b&#039;&#039; and rounds down to an integer. If &#039;&#039;b&#039;&#039; evaluates to zero, it returns &#039;&#039;a&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$div(a,b,...)&#039;&#039; is the same as &#039;&#039;$div($div(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $greater(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Returns true, if &#039;&#039;a&#039;&#039; is greater than &#039;&#039;b&#039;&#039;, otherwise false.&lt;br /&gt;
&lt;br /&gt;
=== $max(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Returns the maximum of &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$max(a,b,...)&#039;&#039; is the same as &#039;&#039;$max($max(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $min(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Returns the minimum of &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$min(a,b,...)&#039;&#039; is the same as &#039;&#039;$min($min(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $mod(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Computes the remainder of dividing &#039;&#039;a&#039;&#039; through &#039;&#039;b&#039;&#039;. The result has the same sign as &#039;&#039;a&#039;&#039;. If &#039;&#039;b&#039;&#039; evaluates to zero, the result is &#039;&#039;a&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$mod(a,b,...)&#039;&#039; is the same as &#039;&#039;$mod($mod(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $mul(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Multiplies &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$mul(a,b,...)&#039;&#039; is the same as &#039;&#039;$mul($mul(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $muldiv(a,b,c) ===&lt;br /&gt;
&lt;br /&gt;
Multiplies &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039;, then divides by &#039;&#039;c&#039;&#039;. The result is rounded to the nearest integer.&lt;br /&gt;
&lt;br /&gt;
=== $rand() ===&lt;br /&gt;
&lt;br /&gt;
Generates a random number in the range from 0 to 2&amp;lt;sup&amp;gt;32&amp;lt;/sup&amp;gt;-1. Available only in sort-related contexts, such as the &#039;&#039;Edit → Sort → Sort by ...&#039;&#039; menu command.&lt;br /&gt;
&lt;br /&gt;
=== $sub(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Subtracts &#039;&#039;b&#039;&#039; from &#039;&#039;a&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can be used with an arbitrary number of arguments. &#039;&#039;$sub(a,b,...)&#039;&#039; is the same as &#039;&#039;$sub($sub(a,b),...)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Boolean functions =&lt;br /&gt;
&lt;br /&gt;
The functions in this section can be used to work with truth values (&#039;&#039;true&#039;&#039; and &#039;&#039;false&#039;&#039;), which have no explicit representation in titleformat scripts. They do not return a string or number value. You can use them for more complex conditions with &#039;&#039;$if&#039;&#039; and related functions.&lt;br /&gt;
&lt;br /&gt;
=== $and(...) ===&lt;br /&gt;
&lt;br /&gt;
Logical And of an arbitrary number of arguments. Returns &#039;&#039;true&#039;&#039;, if and only if all arguments evaluate to &#039;&#039;true&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Special case: &#039;&#039;$and(x,y)&#039;&#039; is &#039;&#039;true&#039;&#039;, if both &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; are &#039;&#039;true&#039;&#039;. Otherwise it is &#039;&#039;false&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $or(...) ===&lt;br /&gt;
&lt;br /&gt;
Logical Or of an arbitrary number of arguments. Returns &#039;&#039;true&#039;&#039;, if at least one argument evaluates to &#039;&#039;true&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Special case: &#039;&#039;$or(x,y)&#039;&#039; is &#039;&#039;true&#039;&#039;, if &#039;&#039;x&#039;&#039; or &#039;&#039;y&#039;&#039; is &#039;&#039;true&#039;&#039;, or if both are &#039;&#039;true&#039;&#039;. Otherwise it is &#039;&#039;false&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $not(x) ===&lt;br /&gt;
&lt;br /&gt;
Logical Not. Returns &#039;&#039;false&#039;&#039;, if &#039;&#039;x&#039;&#039; is &#039;&#039;true&#039;&#039;, otherwise it returns &#039;&#039;true&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $xor(...) ===&lt;br /&gt;
&lt;br /&gt;
Logical Exclusive-or of an arbitrary number of arguments. Returns &#039;&#039;true&#039;&#039;, if an odd number of arguments evaluate to &#039;&#039;true&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Special case: &#039;&#039;$xor(x,y)&#039;&#039; is &#039;&#039;true&#039;&#039;, if one of &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039; is &#039;&#039;true&#039;&#039;, but not both. Otherwise it is &#039;&#039;false&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Color functions =&lt;br /&gt;
&lt;br /&gt;
==For the Default User Interface==&lt;br /&gt;
Starting in version 1.0, the Default UI playlist view doesn&#039;t support color functions. In that location, text color can only be adjusted via angle-bracket syntax: Use &amp;lt; and &amp;gt; characters to make specific text &amp;lt;dimmed&amp;gt; &#039;&#039;vs.&#039;&#039; the default color or &amp;gt;highlight&amp;gt;ed with the highlight color, with up to three levels in each case, &#039;&#039;e.g.&#039;&#039;: &amp;lt;dimmed&amp;gt;, &amp;gt;highlight&amp;lt;, &amp;gt;&amp;gt;more highlight&amp;lt;&amp;lt;, &amp;lt;&amp;lt;&amp;lt;very dim&amp;gt;&amp;gt;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==For Columns UI==&lt;br /&gt;
&lt;br /&gt;
The playlist in the Columns UI still supports the following functions:&lt;br /&gt;
&lt;br /&gt;
=== $blend(color1,color2,part,total) ===&lt;br /&gt;
&lt;br /&gt;
Returns a color that is a blend between &#039;&#039;color1&#039;&#039; and &#039;&#039;color2&#039;&#039;. If &#039;&#039;part&#039;&#039; is smaller than or equal to zero, &#039;&#039;color1&#039;&#039; is returned. If &#039;&#039;part&#039;&#039; is greater than or equal to &#039;&#039;total&#039;&#039;, &#039;&#039;color2&#039;&#039; is returned. Otherwise a blended color is returned that is &#039;&#039;part&#039;&#039; parts &#039;&#039;color1&#039;&#039; and &#039;&#039;total&#039;&#039;-&#039;&#039;part&#039;&#039; parts &#039;&#039;color2&#039;&#039;. The blending is performed in the RGB color space.&lt;br /&gt;
&lt;br /&gt;
=== $hsl() ===&lt;br /&gt;
&lt;br /&gt;
Resets the text color to the default color.&lt;br /&gt;
&lt;br /&gt;
=== $hsl(h,s,l) ===&lt;br /&gt;
&lt;br /&gt;
Sets the color for text in the HSL color space. &#039;&#039;h&#039;&#039;, &#039;&#039;s&#039;&#039; and &#039;&#039;l&#039;&#039; are the hue, saturation, and lightness of the color for unselected text. The color for selected text is set to the inverse color.&lt;br /&gt;
The ranges of &#039;&#039;h&#039;&#039;, &#039;&#039;s&#039;&#039;, and &#039;&#039;l&#039;&#039; are from 0 to 240; the function is designed to interpret those values in the same way as the standard Windows color dialog.&lt;br /&gt;
&lt;br /&gt;
=== $hsl(h1,s1,l1,h2,s2,l2) ===&lt;br /&gt;
&lt;br /&gt;
Sets the color for text in the HSL color space. &#039;&#039;h1&#039;&#039;, &#039;&#039;s1&#039;&#039; and &#039;&#039;l1&#039;&#039; are the hue, saturation, and lightness of the color for unselected text. &#039;&#039;h2&#039;&#039;, &#039;&#039;s2&#039;&#039; and &#039;&#039;l2&#039;&#039; are the hue, saturation, and lightness of the color for selected text.&lt;br /&gt;
&lt;br /&gt;
=== $rgb() ===&lt;br /&gt;
&lt;br /&gt;
Resets the text color to the default color.&lt;br /&gt;
&lt;br /&gt;
=== $rgb(r,g,b) ===&lt;br /&gt;
&lt;br /&gt;
Sets the color for text. &#039;&#039;r&#039;&#039;, &#039;&#039;g&#039;&#039; and &#039;&#039;b&#039;&#039; are the red, green and blue component of the color for unselected text. The color for selected text is set to the inverse color.&lt;br /&gt;
&lt;br /&gt;
=== $rgb(r1,g1,b1,r2,g2,b2) ===&lt;br /&gt;
&lt;br /&gt;
Sets the color for text. &#039;&#039;r1&#039;&#039;, &#039;&#039;g1&#039;&#039; and &#039;&#039;b1&#039;&#039; are the red, green and blue component of the color for unselected text. &#039;&#039;r2&#039;&#039;, &#039;&#039;g2&#039;&#039; and &#039;&#039;b2&#039;&#039; are the red, green and blue component of the color for selected text.&lt;br /&gt;
&lt;br /&gt;
=== $transition(string,color1,color2) ===&lt;br /&gt;
&lt;br /&gt;
Inserts color codes into &#039;&#039;string&#039;&#039;, so that the first character has &#039;&#039;color1&#039;&#039;, the last character has &#039;&#039;color2&#039;&#039;, and intermediate characters have blended colors. The blending is performed in the RGB color space. Note that color codes are additional characters that will also be counted by string manipulation functions. For example, if you need to truncate a string, you should do this before applying &#039;&#039;$transition&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Now playing info =&lt;br /&gt;
The following functions and fields are usable for scripts used with the currently playing item, for example the status bar, the main window title and the copy command script.&lt;br /&gt;
&lt;br /&gt;
== Special fields ==&lt;br /&gt;
&lt;br /&gt;
=== %playback_time% ===&lt;br /&gt;
Returns the elapsed time formatted as [HH:]MM:SS.&lt;br /&gt;
&lt;br /&gt;
=== %playback_time_seconds% ===&lt;br /&gt;
Returns elapsed time in seconds.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_elapsed%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %playback_time_remaining% ===&lt;br /&gt;
Returns remaining time until track ends, formatted as [HH:]MM:SS.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_remaining%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %playback_time_remaining_seconds% ===&lt;br /&gt;
Returns remaining time in seconds.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_remaining_seconds%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %length% ===&lt;br /&gt;
Returns the length of the track formatted as hours, minutes, and seconds, rounded to the nearest second.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_total%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %length_ex% ===&lt;br /&gt;
Returns the length of the track formatted as hours, minutes, seconds, and milliseconds, rounded to the nearest millisecond.&lt;br /&gt;
&lt;br /&gt;
=== %length_seconds% ===&lt;br /&gt;
Returns the length of the track in seconds, rounded to the nearest second.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_time_total_seconds%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== %length_seconds_fp% ===&lt;br /&gt;
Returns the length of the track in seconds as floating point number.&lt;br /&gt;
&lt;br /&gt;
=== %length_samples% ===&lt;br /&gt;
Returns the length of the track in samples.&lt;br /&gt;
&lt;br /&gt;
= Playlist info =&lt;br /&gt;
The following functions and fields are usable for playlist display formatting (eg. per-column title formatting patterns).&lt;br /&gt;
&lt;br /&gt;
== Special fields ==&lt;br /&gt;
&lt;br /&gt;
=== %isplaying% ===&lt;br /&gt;
&lt;br /&gt;
Returns &amp;quot;1&amp;quot; if file is currently playing and empty string otherwise.&lt;br /&gt;
&lt;br /&gt;
=== %ispaused% ===&lt;br /&gt;
&lt;br /&gt;
Returns &amp;quot;1&amp;quot; if playback is paused, empty string otherwise.&lt;br /&gt;
&lt;br /&gt;
=== %list_index% ===&lt;br /&gt;
&lt;br /&gt;
Returns a zero-padded playlist index of specified item. The first item is at index 1.&lt;br /&gt;
&lt;br /&gt;
=== %list_total% ===&lt;br /&gt;
&lt;br /&gt;
Returns number of items in the playlist.&lt;br /&gt;
&lt;br /&gt;
=== %queue_index% ===&lt;br /&gt;
&lt;br /&gt;
Index of the specified item in the playback queue; available in playlist only. If the item has been queued multiple times, %queue_index% evaluates to the first index.&lt;br /&gt;
&lt;br /&gt;
=== %queue_indexes% ===&lt;br /&gt;
&lt;br /&gt;
List of indexes of the specified item in the playback queue; available in playlist only. Same as %queue_index% unless the item has been queued more than once.&lt;br /&gt;
&lt;br /&gt;
=== %queue_total% ===&lt;br /&gt;
&lt;br /&gt;
Total amount of tracks in playback queue. Available only for queued tracks, for technical reasons. &lt;br /&gt;
&lt;br /&gt;
= String functions =&lt;br /&gt;
&lt;br /&gt;
The functions in this section can be used to manipulate character strings.&lt;br /&gt;
&lt;br /&gt;
=== $abbr(x) ===&lt;br /&gt;
&lt;br /&gt;
Returns abbreviation of &#039;&#039;x&#039;&#039;. Words which begin with an alphanumeric character are shortened to the first character. Spaces and parentheses are stripped. Example:&lt;br /&gt;
* $abbr(&#039;This is a Long Title (12-inch version) [needs tags]&#039;) → TiaLT1v[needst&lt;br /&gt;
&lt;br /&gt;
=== $abbr(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns abbreviation of &#039;&#039;x&#039;&#039;, if &#039;&#039;x&#039;&#039; is longer than &#039;&#039;len&#039;&#039; characters, otherwise returns &#039;&#039;x&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $ansi(x) ===&lt;br /&gt;
&lt;br /&gt;
Converts &#039;&#039;x&#039;&#039; to system codepage and back. Any characters that are not present in the system codepage will be removed / replaced. Useful for mass-renaming files to ensure compatibility with non-unicode-capable software.&lt;br /&gt;
&lt;br /&gt;
=== $ascii(x) ===&lt;br /&gt;
&lt;br /&gt;
Converts &#039;&#039;x&#039;&#039; to ASCII. Any characters that are not present in ASCII will be removed / replaced.&lt;br /&gt;
&lt;br /&gt;
=== $caps(x) ===&lt;br /&gt;
&lt;br /&gt;
Converts first letter in every word of x to uppercase, and all other letters to lowercase.&lt;br /&gt;
&lt;br /&gt;
=== $caps2(x) ===&lt;br /&gt;
&lt;br /&gt;
Converts first letter in every word of x to uppercase, and leaves all other letters as they are.&lt;br /&gt;
&lt;br /&gt;
=== $char(x) ===&lt;br /&gt;
&lt;br /&gt;
Inserts Unicode character with code &#039;&#039;x&#039;&#039;. You can search for characters and find the matching decimal number on this [http://www.fileformat.info/info/unicode/char/search.htm site].&lt;br /&gt;
&lt;br /&gt;
=== $crc32(a) ===&lt;br /&gt;
&lt;br /&gt;
Computes the CRC32 of the string &#039;&#039;a&#039;&#039; as a number. Intended for use in coloring scripts.&lt;br /&gt;
&lt;br /&gt;
Example: $rgb($mod($crc32(%album%),256),128,128)&lt;br /&gt;
&lt;br /&gt;
=== $crlf() ===&lt;br /&gt;
&lt;br /&gt;
Inserts end-of-line marker (carriage return, line feed). Can be used to generate multiple lines in the output, for example for the tooltip of the system  notification area (&amp;quot;systray&amp;quot;) icon.&lt;br /&gt;
&lt;br /&gt;
=== $cut(a,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of the string &#039;&#039;a&#039;&#039;. This function is the same as $left(a,len). Negative numbers produce the entire string. Examples:&lt;br /&gt;
* $cut(&#039;abc123&#039;,3) → abc&lt;br /&gt;
* $cut(&#039;abc123&#039;,0) → (nothing)&lt;br /&gt;
* $cut(&#039;abc123&#039;,-1) → abc123&lt;br /&gt;
&lt;br /&gt;
=== $directory(x) ===&lt;br /&gt;
&lt;br /&gt;
Extracts directory name from the file path &#039;&#039;x&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $directory(x,n) ===&lt;br /&gt;
&lt;br /&gt;
Extracts directory name from the file path &#039;&#039;x&#039;&#039;; goes up by &#039;&#039;n&#039;&#039; levels.&lt;br /&gt;
&lt;br /&gt;
=== $directory_path(x) ===&lt;br /&gt;
&lt;br /&gt;
Extracts directory path from the file path &#039;&#039;x&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $ext(x) ===&lt;br /&gt;
&lt;br /&gt;
Extracts file extension from &#039;&#039;x&#039;&#039; which must be a file name or path.&lt;br /&gt;
&lt;br /&gt;
=== $filename(x) ===&lt;br /&gt;
&lt;br /&gt;
Extracts file name from full path.&lt;br /&gt;
&lt;br /&gt;
=== $fix_eol(x) ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;x&#039;&#039; contains an end-of-line marker (CR-LF), the end-of-line marker and all text to the right of it is replaced by &amp;quot; (...)&amp;quot;. Otherwise &#039;&#039;x&#039;&#039; is returned unaltered.&lt;br /&gt;
&lt;br /&gt;
=== $fix_eol(x,indicator) ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;x&#039;&#039; contains an end-of-line marker (CR-LF), the end-of-line marker and all text to the right of it is replaced by &#039;&#039;indicator&#039;&#039;. Otherwise &#039;&#039;x&#039;&#039; is returned unaltered.&lt;br /&gt;
&lt;br /&gt;
=== $hex(n) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;n&#039;&#039; in hexadecimal notation.&lt;br /&gt;
&lt;br /&gt;
=== $hex(n,len) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;n&#039;&#039; in hexadecimal notation with &#039;&#039;len&#039;&#039; digits. Pads with zeros from the left if necessary.&lt;br /&gt;
&lt;br /&gt;
=== $insert(a,b,n) ===&lt;br /&gt;
&lt;br /&gt;
Inserts &#039;&#039;b&#039;&#039; into &#039;&#039;a&#039;&#039; after &#039;&#039;n&#039;&#039; characters.&lt;br /&gt;
&lt;br /&gt;
=== $left(a,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of the string &#039;&#039;a&#039;&#039;. This function is the same as $cut(a,len). Negative numbers produce the entire string. Examples:&lt;br /&gt;
* $left(&#039;abc123&#039;,3) → abc&lt;br /&gt;
* $left(&#039;abc123&#039;,0) → (nothing)&lt;br /&gt;
* $left(&#039;abc123&#039;,-1) → abc123&lt;br /&gt;
&lt;br /&gt;
=== $len(a) ===&lt;br /&gt;
&lt;br /&gt;
Returns length of string &#039;&#039;a&#039;&#039; in characters.&lt;br /&gt;
&lt;br /&gt;
=== $len2(a) ===&lt;br /&gt;
&lt;br /&gt;
Returns length of string x in characters, respecting double-width character rules (double-width characters will be counted as two).&lt;br /&gt;
&lt;br /&gt;
=== $longer(a,b) ===&lt;br /&gt;
&lt;br /&gt;
Returns &#039;&#039;true&#039;&#039;, if string &#039;&#039;a&#039;&#039; is longer than string &#039;&#039;b&#039;&#039;, false otherwise.&lt;br /&gt;
&lt;br /&gt;
=== $lower(a) ===&lt;br /&gt;
&lt;br /&gt;
Converts &#039;&#039;a&#039;&#039; to lowercase.&lt;br /&gt;
&lt;br /&gt;
=== $longest(a,...) ===&lt;br /&gt;
&lt;br /&gt;
Returns the longest of its arguments. Can be used with an arbitrary number of strings.&lt;br /&gt;
&lt;br /&gt;
=== $num(n,len) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;n&#039;&#039; in decimal notation with &#039;&#039;len&#039;&#039; characters. Pads with zeros from the left if necessary. &#039;&#039;len&#039;&#039; includes the dash when the number is negative. If &#039;&#039;n&#039;&#039; is not numeric, it is treated as zero. Examples:&lt;br /&gt;
&lt;br /&gt;
* $num(123,5) → 00123&lt;br /&gt;
* $num(-123,5) → -0123&lt;br /&gt;
* $num(4.8,5) → 00004&lt;br /&gt;
* $num(A1,5) → 00000&lt;br /&gt;
&lt;br /&gt;
=== $pad(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Creates a left-aligned version of the string &#039;&#039;x&#039;&#039;. If &#039;&#039;x&#039;&#039; is shorter than &#039;&#039;len&#039;&#039; characters, the function adds spaces to the right of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;x&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $pad_right(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Creates a right-aligned version of the string &#039;&#039;x&#039;&#039;. If &#039;&#039;x&#039;&#039; is shorter than &#039;&#039;len&#039;&#039; characters, the function adds spaces to the left of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;x&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $pad(x,len,char) ===&lt;br /&gt;
&lt;br /&gt;
Creates a left-aligned version of the string &#039;&#039;x&#039;&#039;. If &#039;&#039;x&#039;&#039; is shorter than &#039;&#039;len&#039;&#039; characters, the function adds &#039;&#039;char&#039;&#039; to the right of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;x&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $pad_right(x,len,char) ===&lt;br /&gt;
&lt;br /&gt;
Creates a right-aligned version of the string &#039;&#039;x&#039;&#039;. If &#039;&#039;x&#039;&#039; is shorter than &#039;&#039;len&#039;&#039; characters, the function adds &#039;&#039;char&#039;&#039; to the left of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;x&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $padcut(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of &#039;&#039;x&#039;&#039;, if &#039;&#039;x&#039;&#039; is longer than &#039;&#039;len&#039;&#039; characters. Otherwise adds spaces to the right of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long.&lt;br /&gt;
&lt;br /&gt;
=== $padcut_right(x,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of &#039;&#039;x&#039;&#039;, if &#039;&#039;x&#039;&#039; is longer than &#039;&#039;len&#039;&#039; characters. Otherwise adds spaces to the left of &#039;&#039;x&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long.&lt;br /&gt;
&lt;br /&gt;
=== $progress(pos,range,len,a,b) ===&lt;br /&gt;
&lt;br /&gt;
Creates a progress bar: &#039;&#039;pos&#039;&#039; contains position, &#039;&#039;range&#039;&#039; contains range, &#039;&#039;len&#039;&#039; progress bar length in characters, &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039; are characters to build progress bar with.&lt;br /&gt;
&lt;br /&gt;
Example:&#039;&#039;$progress(%_time_elapsed_seconds%, %_time_total_seconds%, 20,&#039;#&#039;,&#039;=&#039;)&#039;&#039; produces &amp;quot;====#===============&amp;quot;, the # character is moving with playback position.&lt;br /&gt;
&lt;br /&gt;
=== $progress2(pos,range,len,a,b) ===&lt;br /&gt;
&lt;br /&gt;
Creates a progress bar: &#039;&#039;pos&#039;&#039; contains position, &#039;&#039;range&#039;&#039; contains range, &#039;&#039;len&#039;&#039; progress bar length in characters, &#039;&#039;a&#039;&#039; and &#039;&#039;b&#039;&#039; are characters to build progress bar with. Produces different appearance than &#039;&#039;$progress&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $repeat(a,n) ===&lt;br /&gt;
&lt;br /&gt;
Returns &#039;&#039;n&#039;&#039; copies of &#039;&#039;a&#039;&#039;. Note that &#039;&#039;a&#039;&#039; is evaluated once before its value is used, so &#039;&#039;$repeat&#039;&#039; cannot be used for loops.&lt;br /&gt;
&lt;br /&gt;
=== $replace(a,b,c) ===&lt;br /&gt;
&lt;br /&gt;
Replaces all occurrences of string &#039;&#039;b&#039;&#039; in string &#039;&#039;a&#039;&#039; with string &#039;&#039;c&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can also be used with an arbitrary number of arguments. Note that &#039;&#039;$replace(a,b1,c1,b2,c2)&#039;&#039; is generally not the same as &#039;&#039;$replace($replace(a,b1,c1),b2,c2)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$replace(ab,a,b,b,c)&#039;&#039; → &amp;quot;bc&amp;quot;, &#039;&#039;$replace($replace(ab,a,b),b,c)&#039;&#039; → &amp;quot;cc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $right(a,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns the first &#039;&#039;len&#039;&#039; characters from the right of &#039;&#039;a&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $roman(n) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;n&#039;&#039; in roman notation.&lt;br /&gt;
&lt;br /&gt;
=== $rot13() ===&lt;br /&gt;
&lt;br /&gt;
Performs [http://en.wikipedia.org/wiki/ROT13 ROT13] transformation to given string.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$rot13(&#039;foobar2000&#039;)&#039;&#039; → &amp;quot;sbbone2000&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== $shortest ===&lt;br /&gt;
&lt;br /&gt;
Returns the shortest of its arguments. Can be used with an arbitrary number of strings.&lt;br /&gt;
&lt;br /&gt;
=== $strchr(s,c) ===&lt;br /&gt;
&lt;br /&gt;
Finds first occurence of character &#039;&#039;c&#039;&#039; in string &#039;&#039;s&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$strchr(abca,a)&#039;&#039; → 1&lt;br /&gt;
&lt;br /&gt;
=== $strrchr(s,c) ===&lt;br /&gt;
&lt;br /&gt;
Finds last occurence of character &#039;&#039;c&#039;&#039; in string &#039;&#039;s&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$strrchr(abca,a)&#039;&#039; → 4&lt;br /&gt;
&lt;br /&gt;
=== $strstr(s1,s2) ===&lt;br /&gt;
&lt;br /&gt;
Finds first occurence of string &#039;&#039;s2&#039;&#039; in string &#039;&#039;s1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $strcmp(s1,s2) ===&lt;br /&gt;
&lt;br /&gt;
Performs a case-sensitive comparison of the strings &#039;&#039;s1&#039;&#039; and &#039;&#039;s2&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $stricmp(s1,s2) ===&lt;br /&gt;
&lt;br /&gt;
Performs a case-insensitive comparison of the strings &#039;&#039;s1&#039;&#039; and &#039;&#039;s2&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $substr(s,m,n) ===&lt;br /&gt;
&lt;br /&gt;
Returns substring of string &#039;&#039;s&#039;&#039;, starting from &#039;&#039;m&#039;&#039;-th character and ending at &#039;&#039;n&#039;&#039;-th character.&lt;br /&gt;
&lt;br /&gt;
=== $stripprefix(x) ===&lt;br /&gt;
&lt;br /&gt;
Removes &#039;&#039;A&#039;&#039; and &#039;&#039;The&#039;&#039; prefixes from x. &lt;br /&gt;
&lt;br /&gt;
=== $stripprefix(x,prefix1,prefix2,...) ===&lt;br /&gt;
&lt;br /&gt;
Removes the specified prefixes from x. &lt;br /&gt;
&lt;br /&gt;
=== $swapprefix(x) ===&lt;br /&gt;
&lt;br /&gt;
Moves &#039;&#039;A&#039;&#039; and &#039;&#039;The&#039;&#039; prefixes to the end of x. &lt;br /&gt;
&lt;br /&gt;
=== $swapprefix(x,prefix1,prefix2,...) ===&lt;br /&gt;
&lt;br /&gt;
Moves the specified prefixes to the end of x. &lt;br /&gt;
&lt;br /&gt;
=== $trim(s) ===&lt;br /&gt;
&lt;br /&gt;
Removes leading and trailing spaces from string &#039;&#039;s&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $tab() ===&lt;br /&gt;
&lt;br /&gt;
Inserts one tabulator character.&lt;br /&gt;
&lt;br /&gt;
=== $tab(n) ===&lt;br /&gt;
&lt;br /&gt;
Inserts &#039;&#039;n&#039;&#039; tabulator characters.&lt;br /&gt;
&lt;br /&gt;
=== $upper(s) ===&lt;br /&gt;
&lt;br /&gt;
Converts string &#039;&#039;s&#039;&#039; to uppercase.&lt;br /&gt;
&lt;br /&gt;
= Track info =&lt;br /&gt;
&lt;br /&gt;
The functions and fields in this section can be used to access information about tracks.&lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
&lt;br /&gt;
=== $meta(name) ===&lt;br /&gt;
Returns value of tag called &#039;&#039;name&#039;&#039;. If multiple values of that tag exist, they are concatenated with &amp;quot;, &amp;quot; as separator.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta(artist)&#039;&#039; → &amp;quot;He, She, It&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $meta(name,n) ===&lt;br /&gt;
Returns value of &#039;&#039;n&#039;&#039;-th (0,1,2 and so on) tag called &#039;&#039;name&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta(artist,1)&#039;&#039; → &amp;quot;She&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $meta_sep(name,sep) ===&lt;br /&gt;
Returns value of tag called &#039;&#039;name&#039;&#039;. If multiple values of that tag exist, they are concatenated with &#039;&#039;sep&#039;&#039; as separator.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta_sep(artist,&#039; + &#039;)&#039;&#039; → &amp;quot;He + She + It&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $meta_sep(name,sep,lastsep) ===&lt;br /&gt;
Returns value of tag called &#039;&#039;name&#039;&#039;. If multiple values of that tag exist, they are concatenated with &#039;&#039;sep&#039;&#039; as separator between all but the last two values which are concatenated with &#039;&#039;lastsep&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta_sep(artist,&#039;, &#039;,&#039;, and &#039;)&#039;&#039; → &amp;quot;He, She, and It&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== $meta_test(...) === &lt;br /&gt;
Returns &#039;&#039;1&#039;&#039;, if all given tags exist, &#039;&#039;undefined&#039;&#039; otherwise.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta_test(artist,title)&#039;&#039; → true&lt;br /&gt;
&lt;br /&gt;
=== $meta_num(name) ===&lt;br /&gt;
Returns the number of values for the tag called &#039;&#039;name&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$meta_num(artist)&#039;&#039; → 3&lt;br /&gt;
&lt;br /&gt;
== Technical information ==&lt;br /&gt;
&lt;br /&gt;
=== $info(name) ===&lt;br /&gt;
Returns value of technical information field called &#039;&#039;name&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For convenience, the &#039;&#039;&#039;%__name%&#039;&#039;&#039; alias is also available.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$info(channels)&#039;&#039; → 2&lt;br /&gt;
&lt;br /&gt;
Here is an &#039;&#039;&#039;informative&#039;&#039;&#039; list of recognized fields. Some of these depend on the media file type being queried.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
! field name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#CCF&amp;quot;|&#039;&#039;&#039;General&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|codec&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Codec&#039;&#039;&#039; (&#039;&#039;e.g.&#039;&#039; MP3)&lt;br /&gt;
|-&lt;br /&gt;
|codec_profile&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Codec Profile&#039;&#039;&#039; (&#039;&#039;e.g.&#039;&#039; CBR)&lt;br /&gt;
|-&lt;br /&gt;
|samplerate&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Sample Rate&#039;&#039;&#039;, in hertz (&#039;&#039;e.g.&#039;&#039; 44100)&lt;br /&gt;
|-&lt;br /&gt;
|bitrate&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Bitrate&#039;&#039;&#039;, in kilobits per second (&#039;&#039;e.g.&#039;&#039; 320)&lt;br /&gt;
|-&lt;br /&gt;
|tool&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Tool&#039;&#039;&#039; used to produce the file, possibly guessed (&#039;&#039;e.g.&#039;&#039; LAME3.97)&lt;br /&gt;
|-&lt;br /&gt;
|encoding&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Encoding&#039;&#039;&#039; lossiness (&#039;&#039;e.g.&#039;&#039; lossy)&lt;br /&gt;
|-&lt;br /&gt;
|channels&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Channels&#039;&#039;&#039; count (&#039;&#039;e.g.&#039;&#039; 2 &amp;lt;nowiki&amp;gt;[for stereo]&amp;lt;/nowiki&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|channel_mode&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Channel Mode&#039;&#039;&#039;, description of channels (&#039;&#039;e.g.&#039;&#039; 3 front, 2 rear surround channels + LFE)&lt;br /&gt;
|-&lt;br /&gt;
|bitspersample&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Bits Per Sample&#039;&#039;&#039; (&#039;&#039;e.g.&#039;&#039; 16)&lt;br /&gt;
|-&lt;br /&gt;
|tagtype&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Tag Type&#039;&#039;&#039;, comma-separated list of tag formats (&#039;&#039;e.g.&#039;&#039; id3v2|apev2)&lt;br /&gt;
|-&lt;br /&gt;
|cue_embedded&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Embedded Cuesheet&#039;&#039;&#039; presence (&#039;&#039;e.g.&#039;&#039; no &amp;lt;nowiki&amp;gt;[may be empty!]&amp;lt;/nowiki&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|md5&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Audio MD5&#039;&#039;&#039; hash, if container defines it (&#039;&#039;e.g.&#039;&#039; 1E24A910D91EF09A8CF403C9B6963961)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; style=&amp;quot;background-color:#CCF&amp;quot;|&#039;&#039;&#039;Other&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|ENC_DELAY&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|LAME proprietary MP3 &#039;&#039;&#039;enc_delay&#039;&#039;&#039; value (&#039;&#039;e.g.&#039;&#039; 576)&lt;br /&gt;
|-&lt;br /&gt;
|ENC_PADDING&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|LAME proprietary MP3 &#039;&#039;&#039;enc_padding&#039;&#039;&#039; value (&#039;&#039;e.g.&#039;&#039; 1536)&lt;br /&gt;
|-&lt;br /&gt;
|MP3_ACCURATE_LENGTH&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;mp3_accurate_length&#039;&#039;&#039; supported (LAME proprietary header)? (&#039;&#039;e.g.&#039;&#039; yes)&lt;br /&gt;
|-&lt;br /&gt;
|MP3_STEREO_MODE&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|Stereo mode used in MP3 file (&#039;&#039;e.g.&#039;&#039; mono, stereo, joint stereo, etc.)&lt;br /&gt;
|-&lt;br /&gt;
|VERSION&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Version&#039;&#039;&#039; of tool (&#039;&#039;e.g.&#039;&#039; 3.99)&lt;br /&gt;
|-&lt;br /&gt;
|FLAGS&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot;|&#039;&#039;&#039;Flags&#039;&#039;&#039; of tool (&#039;&#039;e.g.&#039;&#039; 22)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== $channels() === &lt;br /&gt;
Returns number of channels in text format.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$channels()&#039;&#039; → &amp;quot;stereo&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== %replaygain_album_gain% ===&lt;br /&gt;
&lt;br /&gt;
Returns ReplayGain album gain value.&lt;br /&gt;
&lt;br /&gt;
=== %replaygain_album_peak% ===&lt;br /&gt;
&lt;br /&gt;
Returns ReplayGain album peak value.&lt;br /&gt;
&lt;br /&gt;
=== %replaygain_track_gain% ===&lt;br /&gt;
&lt;br /&gt;
Returns ReplayGain track gain value.&lt;br /&gt;
&lt;br /&gt;
=== %replaygain_track_peak% ===&lt;br /&gt;
&lt;br /&gt;
Returns ReplayGain track peak value.&lt;br /&gt;
&lt;br /&gt;
== Special fields ==&lt;br /&gt;
&lt;br /&gt;
==== %filename% ====&lt;br /&gt;
&lt;br /&gt;
Returns the filename without directory and extension.&lt;br /&gt;
&lt;br /&gt;
==== %filename_ext% ====&lt;br /&gt;
&lt;br /&gt;
Returns the filename with extension, but without the directory.&lt;br /&gt;
&lt;br /&gt;
==== %directoryname% ====&lt;br /&gt;
&lt;br /&gt;
Returns the name of the parent directory only, not the complete path.&lt;br /&gt;
&lt;br /&gt;
==== %last_modified% ====&lt;br /&gt;
&lt;br /&gt;
Returns the date and time the file was last modified. Eg: &#039;&#039;2005-12-22 00:04:10&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== %path% ====&lt;br /&gt;
&lt;br /&gt;
Returns the path.&lt;br /&gt;
&lt;br /&gt;
==== %_path_raw% ====&lt;br /&gt;
&lt;br /&gt;
Returns the path as URL including the protocol scheme.&lt;br /&gt;
&lt;br /&gt;
==== %subsong% ====&lt;br /&gt;
&lt;br /&gt;
Returns the subsong index. The subsong index is used to distuingish multiple tracks in a single file, for example for cue sheets, tracker modules and various container formats.&lt;br /&gt;
&lt;br /&gt;
==== %_foobar2000_version% ====&lt;br /&gt;
Returns a string representing the version of foobar2000.&lt;br /&gt;
&lt;br /&gt;
= Time/Date Functions =&lt;br /&gt;
&lt;br /&gt;
These functions are used to manipulate time/date strings, notably (but not limited to), [[Foobar2000:Titleformat_Playback_Statistics|those gathered]] by the [[Foobar2000:Components/Playback Statistics v3.x (foo playcount)|Playback Statistics component]].&lt;br /&gt;
&lt;br /&gt;
=== $year(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the year part (formatted as four digits) from a time/date string.&lt;br /&gt;
&lt;br /&gt;
=== $month(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the month part (formatted as two digits) from a time/date string.&lt;br /&gt;
&lt;br /&gt;
=== $day_of_month(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the day of month part (formatted as two digits) from a time/date string.&lt;br /&gt;
&lt;br /&gt;
=== $date(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the date part (formatted as YYYY-MM-DD) from a time/date string.&lt;br /&gt;
&lt;br /&gt;
=== $time(time) ===&lt;br /&gt;
&lt;br /&gt;
Retrieves the time part (formatted as HH:MM:SS or HH:MM) from a date/time string.&lt;br /&gt;
&lt;br /&gt;
= Variable operations =&lt;br /&gt;
&lt;br /&gt;
Variables can be used to store strings and number. They cannot store truth values. They are best used to store intermediate results that you need multiple times. Variable names are not case-sensitive.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
! code&lt;br /&gt;
! output&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;pre&amp;gt;$put(foo,bar)$char(10)&lt;br /&gt;
$get(foo)$char(10)&lt;br /&gt;
$get(Foo)$char(10)&lt;br /&gt;
$puts(foo,2000)$char(10)&lt;br /&gt;
$get(foo)$char(10)&amp;lt;/pre&amp;gt;&lt;br /&gt;
| style=&amp;quot;background-color:#EEF&amp;quot; |&amp;lt;pre&amp;gt;bar&lt;br /&gt;
bar&lt;br /&gt;
bar&lt;br /&gt;
&lt;br /&gt;
2000&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
=== $get(name) ===&lt;br /&gt;
&lt;br /&gt;
Returns the value that was last stored in the variable &#039;&#039;name&#039;&#039;, if the variable was not defined (yet), it returns nothing. The truth value returned by &#039;&#039;$get&#039;&#039; indicates if the variable &#039;&#039;name&#039;&#039; was defined&lt;br /&gt;
&lt;br /&gt;
=== $put(name,value) ===&lt;br /&gt;
&lt;br /&gt;
Stores &#039;&#039;value&#039;&#039; in the variable &#039;&#039;name&#039;&#039; and returns &#039;&#039;value&#039;&#039; unaltered&lt;br /&gt;
&lt;br /&gt;
=== $puts(name,value) ===&lt;br /&gt;
&lt;br /&gt;
Stores &#039;&#039;value&#039;&#039; in the variable &#039;&#039;name&#039;&#039; and returns nothing&lt;br /&gt;
&lt;br /&gt;
= Component-provided fields and functions on tracks =&lt;br /&gt;
&lt;br /&gt;
This section lists components that provide additional fields and functions that are useable in the context of any track.&lt;br /&gt;
&lt;br /&gt;
== Playback statistics ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.foobar2000.org/components/view/foo_playcount Playback statistics homepage]&lt;br /&gt;
* [[Foobar2000:Titleformat Playback Statistics|Playback statistics titleformat reference]]&lt;br /&gt;
&lt;br /&gt;
= Component-specific fields and functions =&lt;br /&gt;
&lt;br /&gt;
This section lists components that provide additional fields and functions that are only usable in the context of the particular component.&lt;br /&gt;
&lt;br /&gt;
== Album list ==&lt;br /&gt;
* [[Foobar2000:Titleformat_Album_List|Album List Title Formatting]]&lt;br /&gt;
* [[Foobar2000:Preferences:Album List|Preferences: Album List]]&lt;br /&gt;
== Playlist Organizer ==&lt;br /&gt;
* [http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components/Playlist_Organizer_(foo_plorg)#Nodes Playlist Organizer: Nodes Title Formatting]&lt;br /&gt;
&lt;br /&gt;
== Columns UI ==&lt;br /&gt;
&lt;br /&gt;
* [http://yuo.be/columns.php Columns UI homepage]&lt;br /&gt;
* [http://yuo.be/wiki/columns_ui:config:global_variables Global variables reference]&lt;br /&gt;
* [http://yuo.be/wiki/columns_ui:config:colour_string Playlist colors reference]&lt;br /&gt;
* [http://yuo.be/wiki/columns_ui:config:playlist_switcher_titleformatting Playlist switcher reference]&lt;br /&gt;
&lt;br /&gt;
= Additional Reading =&lt;br /&gt;
&lt;br /&gt;
* [[Foobar2000:Titleformat_Introduction|Introduction to titleformat scripts]]&lt;br /&gt;
* &#039;&#039;&#039;titleformat_help.html&#039;&#039;&#039; in your Foobar2000 directory (ie C:\Program Files\foobar2000\titleformat_help.html) file:///C:/Program%20Files/foobar2000/titleformat_help.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:foobar2000 Guides|Titleformat Reference]]&lt;/div&gt;</summary>
		<author><name>Alwayswrming</name></author>
	</entry>
</feed>