<?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=92.62.53.27</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=92.62.53.27"/>
	<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Special:Contributions/92.62.53.27"/>
	<updated>2026-04-28T19:06:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Pre-emphasis&amp;diff=27690</id>
		<title>Pre-emphasis</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Pre-emphasis&amp;diff=27690"/>
		<updated>2018-06-19T16:34:40Z</updated>

		<summary type="html">&lt;p&gt;92.62.53.27: Changed &amp;quot;&amp;quot;audiophile quality filter&amp;quot; in cddemph description to &amp;quot;80-bit floating point for processing&amp;quot; for more specific info. Info about 80-bit floating point taken from https://rutracker.org/forum/viewtopic.php?t=4854775&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Pre-emphasis&#039;&#039;&#039; is the first part of a noise reduction technique in which a signal&#039;s weaker, higher frequencies are boosted before they are transmitted or recorded onto a storage medium. Upon playback, a &#039;&#039;&#039;de-emphasis&#039;&#039;&#039; filter is applied to reverse the process. The result is a higher signal-to-noise ratio (SNR); the original frequencies are restored, but noise that was introduced by the storage medium, transmission equipment, or analog/digital conversions is quieter than it would have been if no filtering had been done. Pre- and de-emphasis can be collectively referred to as just &#039;&#039;&#039;emphasis&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Emphasis was sometimes used in digital storage media in the late 1970s through early 1980s, including on a small percentage of [[Compact Disc Digital Audio|audio CD]]s. Emphasis is akin to Dolby noise reduction for tapes, or the RIAA equalization curve for vinyl records.&lt;br /&gt;
&lt;br /&gt;
==Pre-emphasis on audio CD==&lt;br /&gt;
Some early digital recording &amp;amp; playback equipment, including CD players, used 14-bit converters, even though they were dealing with 16-bit audio. Some also used noisy &amp;quot;brick wall&amp;quot; filters to remove frequencies higher than the Nyquist frequency (22050 Hz). The resulting noise introduced by these converters and filters could be made relatively quiet by using pre-emphasis: boosting the signal (especially the higher frequencies) in the recording before it was put onto CD, and embedding flags in the disc&#039;s subcode to tell a CD player to apply de-emphasis on playback. Some CD players even had a de-emphasis button that could be used to manually apply de-emphasis, but now it&#039;s just a built-in feature of the analog outputs of nearly all dedicated audio CD players. By the late 1980s, pre-emphasis stopped being used because reliable 16-bit DACs with oversampling and other technologies minimized the conversion &amp;amp; filtering noise without the need for pre-processing the recording.&lt;br /&gt;
&lt;br /&gt;
Most major-label CDs with pre-emphasis were manufactured in Japan in the early and mid-1980s. Relatively recent forum posts indicate that pre-emphasis is still used on newly manufactured CDs by some indie labels, mainly for classical titles.&lt;br /&gt;
&lt;br /&gt;
A pre-emphasis flag for each track is normally stored in the subcode along with the audio data. It&#039;s also supposed to be stored in the table of contents (TOC), but many CDs have TOCs that say there&#039;s no pre-emphasis when in fact the subcode says there is. There are also some CDs which people believe were mastered with pre-emphasis, but which have no pre-emphasis flags set at all.&lt;br /&gt;
&lt;br /&gt;
==Pre-emphasis on audio CD in computers==&lt;br /&gt;
CD drives in computers aren&#039;t exactly like regular CD players.&lt;br /&gt;
&lt;br /&gt;
Some drives, especially older internal drives on desktop/tower PCs, have analog audio outputs which connect directly to a soundcard via a special cable. In this situation, the drive&#039;s own DAC is converting the CD&#039;s audio data into analog signals, and the OS or soundcard provide a &amp;quot;CD&amp;quot; volume control specifically for this signal. When audio is being fed to the soundcard this way, or listened to through a headphone connector on the drive itself, then the drive is &#039;&#039;probably&#039;&#039; doing its own de-emphasis.&lt;br /&gt;
&lt;br /&gt;
Most OSes and drives nowadays, by default, instead use a digital interface to send the raw audio data straight from the disc, through the drive&#039;s regular connectors (IDE/ATAPI, SCSI, USB, whatever) and into the operating system, which passes it along to whatever program needs it. This is the only method used in DAE (digital audio extraction). During playback, the soundcard&#039;s DAC is converting the CD&#039;s audio data into analog signals, and the volume control for it is usually just the Wave volume control, as is used for most other sounds originating inside the computer. The soundcard usually has no ability to do de-emphasis, and even if it could, it has no access to info about the presence of pre-emphasis, because it&#039;s just being fed the waveform data, not the disc&#039;s subcode.&lt;br /&gt;
&lt;br /&gt;
In other words, even though a CD drive may be capable of detecting pre-emphasis flags in the disc&#039;s subcode and/or TOC, this information is usually completely ignored when sending audio data through the digital interface. So when you play a CD through your computer, or use CD ripping software to get the audio content, you&#039;re probably getting the pre-emphasized audio data. Since it has not been de-emphasized, it will probably sound too &amp;quot;bright&amp;quot; and/or hissy (although your audio equipment or your damaged ears may keep you from noticing). Therefore you may want to do de-emphasis processing yourself.&lt;br /&gt;
&lt;br /&gt;
===De-emphasis processing===&lt;br /&gt;
De-emphasis was designed to be performed in the analog domain by physical electrical components. However, digital audio data can be mathematically manipulated to simulate the effect of analog signal processing, sometimes with a greater degree of accuracy than is possible with physical components, depending on the method used.&lt;br /&gt;
&lt;br /&gt;
There are various methods for applying digital de-emphasis, each with pros &amp;amp; cons. They all basically amount to turning down the upper midrange &amp;amp; treble with a special EQ curve that bottoms out at about -10 dB @ 20+ kHz. This can be done during playback with a simple equalizer setting, or processing extracted audio data before or after it is written to files. The biggest problems with these methods (as with any digital signal processing) are precision, accuracy, and noise. Forum posts indicate EQs in media players tend to be very inaccurate and noisy; a filter designed specifically for de-emphasis is preferable.&lt;br /&gt;
&lt;br /&gt;
Some CD ripping software will detect pre-emphasis flags in the subcode (if the drive supports it) and can apply a digital de-emphasis filter:&lt;br /&gt;
* &#039;&#039;&#039;iTunes&#039;&#039;&#039; (Mac OS &amp;amp; Windows) - recent versions detect pre-emphasis in subcode and apply de-emphasis automatically for both playback and ripping.&lt;br /&gt;
* &#039;&#039;&#039;Windows Media Player&#039;&#039;&#039; (Windows) - recent versions detect pre-emphasis in subcode and apply de-emphasis automatically, but just for playback, not ripping.&lt;br /&gt;
* &#039;&#039;&#039;cdda2wav&#039;&#039;&#039; (multi-platform) - a command-line app (part of the cdrtools package) which can be invoked with a &amp;lt;code&amp;gt;-T&amp;lt;/code&amp;gt; parameter to apply de-emphasis as it rips; e.g. &amp;lt;code&amp;gt;cdda2wav -D 0,0,0 -B -T&amp;lt;/code&amp;gt; (first use &amp;lt;code&amp;gt;cdda2wav -scanbus&amp;lt;/code&amp;gt; to figure out the right device values for the &amp;lt;code&amp;gt;-D&amp;lt;/code&amp;gt; option).&lt;br /&gt;
&lt;br /&gt;
Some audio processing software can apply a de-emphasis filter to already-extracted audio (files on disk), producing new files:&lt;br /&gt;
* &#039;&#039;&#039;cddeemph&#039;&#039;&#039; (Windows) - processes multiple WAV files using 80-bit floating point for processing. http://rutracker.org/forum/viewtopic.php?t=4854775;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;WaveEmph&#039;&#039;&#039; (Windows) - processes one WAV file at a time, and can optionally apply a volume gain at the same time. Note: after unzipping, right-click on the .exe and set Win98 compatibility before running it for the first time.&lt;br /&gt;
* &#039;&#039;&#039;SoX&#039;&#039;&#039; (multi-platform) - a command-line app which can be invoked with a &amp;lt;code&amp;gt;deemph&amp;lt;/code&amp;gt; parameter to apply a de-emphasis filter; e.g. &amp;lt;code&amp;gt;sox input.wav output.wav deemph&amp;lt;/code&amp;gt;.&lt;br /&gt;
 &lt;br /&gt;
Some audio software can apply a de-emphasis filter during playback or conversion:&lt;br /&gt;
* &#039;&#039;&#039;foobar2000&#039;&#039;&#039; (Windows) - this media player can be configured to use any of the plug-ins below.&lt;br /&gt;
** [http://www.hydrogenaudio.org/forums/index.php?showtopic=99394 foo_dsp_deemph and foo_deemph] are two versions of the same filter. They will apply the SoX de-emphasis algorithm only during playback or conversion of specially tagged files. Use the DSP version if you want to process lossy files or you want to control where in the DSP chain the processing occurs. Otherwise, use the post-processing version, which will automatically apply during playback and ReplayGain-scanning of specially tagged, lossless, 44.1 KHz files. It will also apply during conversion of such files, if &amp;quot;Enable decode postprocessing&amp;quot; is checked in the converter setup.&lt;br /&gt;
** [http://www.foobar2000.org/components/view/foo_dsp_effect foo_dsp_effect] is a multi-effect DSP and postprocessor which can be configured to apply de-emphasis during playback and conversion of specially tagged files. It will also apply during conversion of such files if &amp;quot;Enable decode postprocessing&amp;quot; is checked in the converter setup. Only enable one option, though (the DSP or the postprocessing).&lt;br /&gt;
** [http://www.hydrogenaudio.org/forums/index.php?showtopic=85106 foo_dsp_convolver] is an unofficial &amp;quot;convolver&amp;quot; DSP which can transform audio based on &amp;quot;impulse&amp;quot; files. It&#039;s possible to configure it to do de-emphasis by using [http://www.hydrogenaudio.org/forums/index.php?showtopic=76191 a special impulse file] (or [http://www.hydrogenaudio.org/forums/index.php?showtopic=67376&amp;amp;view=findpost&amp;amp;p=620372 a simpler one]) and auto level adjust disabled. ([http://www.foobar2000.org/components/view/foo_convolve foo_convolve] is the official convolver component, but with these impulses isn&#039;t ideal because it outputs slightly more samples than were input.)&lt;br /&gt;
&lt;br /&gt;
WaveEmph, SoX, and all of the foobar2000 plug-ins have been tested and produce nearly identical output. The differences are minuscule and inaudible.&amp;lt;ref&amp;gt;http://www.hydrogenaudio.org/forums/index.php?showtopic=99394&amp;amp;view=findpost&amp;amp;p=824194&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;http://www.hydrogenaudio.org/forums/index.php?showtopic=99394&amp;amp;view=findpost&amp;amp;p=824806&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pre-emphasis in cue sheets==&lt;br /&gt;
Pre-emphasis can be specified in a [[cue sheet]] using &amp;lt;code&amp;gt;FLAGS PRE&amp;lt;/code&amp;gt;. This will tell the CD burning software to set the pre-emphasis flags in the subcode and TOC of a CD to be burned.&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
;The following threads &amp;amp; articles contain useful information:&lt;br /&gt;
* http://www.stevehoffman.tv/forums/showthread.php?t=88541&lt;br /&gt;
* http://web.archive.org/web/20090324083651/http://www.rogernichols.com/EQ/EQ-2003-07-08.htm&lt;br /&gt;
* http://www.digital-inn.de/exact-audio-copy-english/19034-pre-emphasis-use-eac.html&lt;br /&gt;
* http://www.dsprelated.com/showmessage/2587/1.php&lt;br /&gt;
* http://www.hydrogenaudio.org/forums/index.php?showtopic=38312&amp;amp;view=findpost&amp;amp;p=338577&lt;br /&gt;
* http://club.myce.com/f57/will-clarity-quality-copied-cds-remain-exactly-same-64708/#post400909&lt;br /&gt;
&lt;br /&gt;
== Software to made de-emphasis ==&lt;br /&gt;
cddeemph tool&lt;br /&gt;
* http://rutracker.org/forum/viewtopic.php?t=4854775&lt;br /&gt;
* http://letitbit.net/download/14992.1be051993ba100ce9cb7ae8d4e9c/cddeemph.rar.html&lt;br /&gt;
* http://vip-file.com/downloadlib/129389504892840400-14992.1be051993ba100ce9cb7ae8d4e9c/cddeemph.rar.html&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Signal Processing]]&lt;/div&gt;</summary>
		<author><name>92.62.53.27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components_0.9/FFmpeg_Decoder_Wrapper_(foo_input_ffmpeg)&amp;diff=27564</id>
		<title>Foobar2000:Components 0.9/FFmpeg Decoder Wrapper (foo input ffmpeg)</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components_0.9/FFmpeg_Decoder_Wrapper_(foo_input_ffmpeg)&amp;diff=27564"/>
		<updated>2017-11-03T17:11:32Z</updated>

		<summary type="html">&lt;p&gt;92.62.53.27: Added info about about &amp;quot;Additional arguments&amp;quot; field&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{fb2k}}&lt;br /&gt;
=Description=&lt;br /&gt;
&lt;br /&gt;
The FFmpeg Decoder Wrapper allows you to play any FFmpeg-supported audio format through foobar2000. You need standalone FFmpeg binaries (ffmpeg.exe, ffprobe.exe) on your system in order to use it.&lt;br /&gt;
&lt;br /&gt;
=Drawbacks=&lt;br /&gt;
&lt;br /&gt;
No embedded cuesheet support.&lt;br /&gt;
&lt;br /&gt;
Not sample accurate seeking and length reporting.&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
Before using, you must configure the component for use with specific decoders.&lt;br /&gt;
&lt;br /&gt;
The decoder list comes pre-populated with most common format configurations; however all of them are unchecked by default.&lt;br /&gt;
&lt;br /&gt;
The per-decoder configuration page consists of four fields:&lt;br /&gt;
===Format name===&lt;br /&gt;
The name you wish to refer to the format by - shown in open file dialog etc.&lt;br /&gt;
===File type mask===&lt;br /&gt;
A wildcard-pattern that defines what files should be fed to this decoder.&lt;br /&gt;
&lt;br /&gt;
Example: *.TAK for TAK files.&lt;br /&gt;
&lt;br /&gt;
Multiple patterns may be specified per one decoder, delimited by semicolon.&lt;br /&gt;
&lt;br /&gt;
This is intentionally kept separate from &amp;quot;format name&amp;quot; to allow alternate extensions and prefix extensions.&lt;br /&gt;
&lt;br /&gt;
You can also specify protocols, e.g. rtmp://* - or combine file types and protocols, e.g. http://*.m3u8&lt;br /&gt;
&lt;br /&gt;
===Additional arguments===&lt;br /&gt;
Additional command-line arguments for ffmpeg. The extra arguments are injected before -i %s. To inject arguments after -i %s, include -i %s in arguments, -i %s will not be inserted again.[https://hydrogenaud.io/index.php/topic,114855.msg946957.html#msg946957]&lt;br /&gt;
&lt;br /&gt;
===Write tag types===&lt;br /&gt;
Tag types to write to when the user attempts to edit tags on the file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USE WITH CAUTION&#039;&#039;&#039; - this feature may damage your files if used incorrectly; enable only after checking file format specifications for the file format you&#039;re dealing with!&lt;br /&gt;
&lt;br /&gt;
You do not need to enable this to read tags from your files, the component will attempt to read popular tag types (ID3v1/v2, APEv2) from your files regardless of this setting.&lt;br /&gt;
&lt;br /&gt;
Use the bottom editbox of the preferences page to specify folder containing your FFmpeg binaries - ffmpeg.exe and ffprobe.exe are required. If your FFmpeg binaries are present in %PATH%, there&#039;s no need to do so.&lt;br /&gt;
&lt;br /&gt;
=Link=&lt;br /&gt;
* [http://www.foobar2000.org/components/view/foo_input_ffmpeg Official Website]&lt;/div&gt;</summary>
		<author><name>92.62.53.27</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Title_Formatting_Reference&amp;diff=27298</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=27298"/>
		<updated>2017-07-07T22:20:26Z</updated>

		<summary type="html">&lt;p&gt;92.62.53.27: /* $strstr(str1,str2) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{fb2k}}&lt;br /&gt;
This article contains information about built-in title formatting functions and field references, plus additional documentation about fields and functions which can only be used in specific components or which are provided by specific components.&lt;br /&gt;
&lt;br /&gt;
Please see [[Foobar2000:Title Formatting Introduction|Title Formatting Introduction]] for a general overview of title format 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 the [[Foobar2000:Query_syntax|Query Syntax]] article.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
A title formatting script consists of any combination of literal text, field references, function calls, comments, and line break characters. The script always outputs a text string (which can be empty).&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;comment&#039;&#039;&#039; is a line starting with two slashes, e.g. &#039;&#039;// this is a comment&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;field reference&#039;&#039;&#039; is a field name enclosed in percent signs, for example &#039;&#039;%artist%&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;function call&#039;&#039;&#039; 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 commas, for example &#039;&#039;$abbr(%artist%)&#039;&#039;. A parameter can be literal text, a field reference, or another function call. 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;
Any other text is &#039;&#039;&#039;literal text&#039;&#039;&#039;. In literal text, the character &#039;&#039;%&#039;&#039;, &#039;&#039;$&#039;&#039;, &#039;&#039;[&#039;&#039;, &#039;&#039;]&#039;&#039;, or &#039;&#039;&amp;amp;apos;&#039;&#039; (apostrophe/single quote) must be escaped by enclosing it in &#039;&#039;&amp;amp;apos;&#039;&#039; (apostrophe/single quote) characters. For example, &#039;&#039;&amp;amp;apos;[&amp;amp;apos;&#039;&#039; (a left bracket in single quotes) results in a literal &#039;&#039;[&#039;&#039; (left bracket). As a special case, &#039;&#039;&amp;amp;apos;&amp;amp;apos;&#039;&#039; (two single quotes in a row) results in one single quote. In the playlist, &#039;&#039;&amp;amp;lt;&#039;&#039; and &#039;&#039;&amp;gt;&#039;&#039; are also special; see [[#Dimmed and highlighted text]].&lt;br /&gt;
&lt;br /&gt;
When the script is evaluated, the output string is assembled by evaluating the function parameters, function calls, and field references. Comments and line break characters (CR and LF/newline) are ignored; to output a line break, use &#039;&#039;$crlf()&#039;&#039;. Each field reference becomes the field&#039;s value, as a string. Each function becomes a string or number, and/or a truth value (not output) which can be used by another function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: the interface for entering custom columns and grouping schemes for the Default UI playlist does not support line breaks; scripts must be written all on one line, without comments.&#039;&#039;&#039;&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;
* &#039;&#039;c3po&#039;&#039; → 0&lt;br /&gt;
* &#039;&#039;4.8&#039;&#039; → 4&lt;br /&gt;
* &#039;&#039;-12&#039;&#039; → -12&lt;br /&gt;
* &#039;&#039;- 12&#039;&#039; → 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;
Foobar does not have a concept of TRUE and FALSE in a programming language sense where 0 or empty string are considered FALSE and other values TRUE. Therefore there is no difference between numeric 0 and string representation &#039;0&#039; which both are considered as values, and being attached a boolean value FALSE. Apostrophes are only required to escape certain syntax characters. Values are treated as numbers during arithmetic operations like&#039;&#039; $add()&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $and(expr, ...) ===&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 &#039;&#039;expr&#039;&#039; arguments evaluate to &#039;&#039;true&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $or(expr, ...) ===&lt;br /&gt;
&lt;br /&gt;
Logical Or of an arbitrary number of arguments. Returns &#039;&#039;true&#039;&#039;, if at least one expression evaluates to &#039;&#039;true&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $not(expr) ===&lt;br /&gt;
&lt;br /&gt;
Logical Not. Returns the logical opposite of EXPR: &#039;&#039;false&#039;&#039;, if &#039;&#039;expr&#039;&#039; is &#039;&#039;true&#039;&#039; and &#039;&#039;true&#039;&#039; if &#039;&#039;expr&#039;&#039; is false.&lt;br /&gt;
&lt;br /&gt;
=== $xor(expr,...) ===&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(expr1,expr2)&#039;&#039; returns &#039;&#039;true&#039;&#039;, if EXPR1 or EXPR2 is &#039;&#039;true&#039;&#039;. If both expressions are true, returns &#039;&#039;false&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Control flow functions ==&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;
Plain strings are FALSE. Field lookups and functions can introduce a boolean value of TRUE. Examples:&lt;br /&gt;
&lt;br /&gt;
False: $if(0,True,False)&lt;br /&gt;
False: $if(&#039;0&#039;,True,False)&lt;br /&gt;
True or False: [$add(%rating%,1)]&lt;br /&gt;
&lt;br /&gt;
The last one would display the value of %rating% plus one, if and only if %rating% is set for the track.&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(expr,else) ===&lt;br /&gt;
&lt;br /&gt;
Like &#039;&#039;$if(expr,expr,else)&#039;&#039; except that &#039;&#039;expr&#039;&#039; is only evaluated once. In other words, if expression &#039;&#039;expr&#039;&#039; is true, &#039;&#039;expr&#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(int1,int2,then,else) ===&lt;br /&gt;
&lt;br /&gt;
Compares the integer numbers &#039;&#039;int1&#039;&#039; and &#039;&#039;int2&#039;&#039;, if &#039;&#039;int1&#039;&#039; is equal to &#039;&#039;int2&#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(int1,int2,then,else) ===&lt;br /&gt;
&lt;br /&gt;
Compares the integer numbers &#039;&#039;int1&#039;&#039; and &#039;&#039;int2&#039;&#039;, if &#039;&#039;int1&#039;&#039; is greater than &#039;&#039;int2&#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(str,n,then,else) ===&lt;br /&gt;
&lt;br /&gt;
Compares the length of the string &#039;&#039;str&#039;&#039; to the number &#039;&#039;n&#039;&#039;, if &#039;&#039;str&#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;
== 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(str) ===&lt;br /&gt;
&lt;br /&gt;
Returns abbreviation of string &#039;&#039;str&#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(str,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns abbreviation of &#039;&#039;str&#039;&#039;, if &#039;&#039;str&#039;&#039; is longer than &#039;&#039;len&#039;&#039; characters, otherwise returns &#039;&#039;str&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $ansi(str) ===&lt;br /&gt;
&lt;br /&gt;
Converts string &#039;&#039;str&#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(str) ===&lt;br /&gt;
&lt;br /&gt;
Converts string &#039;&#039;str&#039;&#039; to ASCII. Any characters that are not present in ASCII will be removed / replaced.&lt;br /&gt;
&lt;br /&gt;
=== $caps(str) ===&lt;br /&gt;
&lt;br /&gt;
Converts first letter in every word of string &#039;&#039;str&#039;&#039; to uppercase, and all other letters to lowercase.&lt;br /&gt;
&lt;br /&gt;
=== $caps2(str) ===&lt;br /&gt;
&lt;br /&gt;
Converts first letter in every word of string &#039;&#039;str&#039;&#039; to uppercase, and leaves all other letters as they are.&lt;br /&gt;
&lt;br /&gt;
=== $char(nbr) ===&lt;br /&gt;
&lt;br /&gt;
Returns Unicode character of &#039;&#039;nbr&#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(str) ===&lt;br /&gt;
&lt;br /&gt;
Computes the CRC32 of the string &#039;&#039;str&#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(str,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of the string &#039;&#039;str&#039;&#039;. This function is the same as $left(a,len). Negative numbers produce the entire string. Examples:&lt;br /&gt;
* &#039;&#039;$cut(&#039;abc123&#039;,3)&#039;&#039; → abc&lt;br /&gt;
* &#039;&#039;$cut(&#039;abc123&#039;,0)&#039;&#039; → (nothing)&lt;br /&gt;
* &#039;&#039;$cut(&#039;abc123&#039;,-1)&#039;&#039; → abc123&lt;br /&gt;
&lt;br /&gt;
=== $directory(path) ===&lt;br /&gt;
&lt;br /&gt;
Extracts directory name from the file &#039;&#039;path&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $directory(path,n) ===&lt;br /&gt;
&lt;br /&gt;
Extracts directory name from the file &#039;&#039;path&#039;&#039;; goes up by &#039;&#039;n&#039;&#039; levels.&lt;br /&gt;
&lt;br /&gt;
=== $directory_path(path) ===&lt;br /&gt;
&lt;br /&gt;
Extracts directory path from the file &#039;&#039;path&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $ext(path) ===&lt;br /&gt;
&lt;br /&gt;
Extracts file extension from string &#039;&#039;path&#039;&#039;; a file name or full path.&lt;br /&gt;
&lt;br /&gt;
=== $filename(path) ===&lt;br /&gt;
&lt;br /&gt;
Extracts file name from full &#039;&#039;path&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $fix_eol(str) ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;str&#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;str&#039;&#039; is returned unaltered.&lt;br /&gt;
&lt;br /&gt;
=== $fix_eol(str,indicator) ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;str&#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;str&#039;&#039; is returned unaltered.&lt;br /&gt;
&lt;br /&gt;
=== $hex(int) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;int&#039;&#039; in hexadecimal notation.&lt;br /&gt;
&lt;br /&gt;
=== $hex(int,len) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;int&#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(str,insert,n) ===&lt;br /&gt;
&lt;br /&gt;
Inserts &#039;&#039;insert&#039;&#039; into &#039;&#039;str&#039;&#039; after &#039;&#039;n&#039;&#039; characters.&lt;br /&gt;
&lt;br /&gt;
=== $left(str,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of the string &#039;&#039;str&#039;&#039;. This function is the same as $cut(str,len). Negative numbers produce the entire string. Examples:&lt;br /&gt;
* &#039;&#039;$left(&#039;abc123&#039;,3)&#039;&#039; → abc&lt;br /&gt;
* &#039;&#039;$left(&#039;abc123&#039;,0)&#039;&#039; → (nothing)&lt;br /&gt;
* &#039;&#039;$left(&#039;abc123&#039;,-1)&#039;&#039; → abc123&lt;br /&gt;
&lt;br /&gt;
=== $len(str) ===&lt;br /&gt;
&lt;br /&gt;
Returns length of string &#039;&#039;str&#039;&#039; in characters.&lt;br /&gt;
&lt;br /&gt;
=== $len2(str) ===&lt;br /&gt;
&lt;br /&gt;
Returns length of string &#039;&#039;str&#039;&#039; in characters, respecting double-width character rules (double-width characters will be counted as two).&lt;br /&gt;
&lt;br /&gt;
=== $longer(str1,str2) ===&lt;br /&gt;
&lt;br /&gt;
Returns &#039;&#039;true&#039;&#039;, if string &#039;&#039;str1&#039;&#039; is longer than string &#039;&#039;str2&#039;&#039;, false otherwise.&lt;br /&gt;
&lt;br /&gt;
=== $lower(str) ===&lt;br /&gt;
&lt;br /&gt;
Converts string &#039;&#039;str&#039;&#039; to lowercase.&lt;br /&gt;
&lt;br /&gt;
=== $longest(arg,...) ===&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(nbr,len) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;nbr&#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;nbr&#039;&#039; is not numeric, it is treated as zero. Examples:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;$num(123,5)&#039;&#039; → 00123&lt;br /&gt;
* &#039;&#039;$num(-123,5)&#039;&#039; → -0123&lt;br /&gt;
* &#039;&#039;$num(4.8,5)&#039;&#039; → 00004&lt;br /&gt;
* &#039;&#039;$num(A1,5)&#039;&#039; → 00000&lt;br /&gt;
&lt;br /&gt;
=== $pad(str,len) ===&lt;br /&gt;
&lt;br /&gt;
Creates a left-aligned version of the string &#039;&#039;str&#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;str&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;str&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $pad_right(str,len) ===&lt;br /&gt;
&lt;br /&gt;
Creates a right-aligned version of the string &#039;&#039;str&#039;&#039;. If &#039;&#039;str&#039;&#039; is shorter than &#039;&#039;len&#039;&#039; characters, the function adds spaces to the left of &#039;&#039;str&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;str&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $pad(str,len,char) ===&lt;br /&gt;
&lt;br /&gt;
Creates a left-aligned version of the string &#039;&#039;str&#039;&#039;. If &#039;&#039;str&#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;str&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;str&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $pad_right(str,len,char) ===&lt;br /&gt;
&lt;br /&gt;
Creates a right-aligned version of the string &#039;&#039;str&#039;&#039;. If &#039;&#039;str&#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;str&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long. Otherwise the function returns &#039;&#039;str&#039;&#039; unchanged.&lt;br /&gt;
&lt;br /&gt;
=== $padcut(str,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of &#039;&#039;str&#039;&#039;, if &#039;&#039;str&#039;&#039; is longer than &#039;&#039;len&#039;&#039; characters. Otherwise adds spaces to the right of &#039;&#039;str&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long.&lt;br /&gt;
&lt;br /&gt;
=== $padcut_right(str,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns first &#039;&#039;len&#039;&#039; characters from the left of &#039;&#039;str&#039;&#039;, if &#039;&#039;str&#039;&#039; is longer than &#039;&#039;len&#039;&#039; characters. Otherwise adds spaces to the left of &#039;&#039;str&#039;&#039; to make the result &#039;&#039;len&#039;&#039; characters long.&lt;br /&gt;
&lt;br /&gt;
=== $progress(pos,range,len,char1,char2) ===&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;char1&#039;&#039; and &#039;&#039;char2&#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,char1,char2) ===&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;char1&#039;&#039; and &#039;&#039;char2&#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(expr,count) ===&lt;br /&gt;
&lt;br /&gt;
Returns &#039;&#039;count&#039;&#039; copies of &#039;&#039;expr&#039;&#039;. Note that &#039;&#039;expr&#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(str,search,replace) ===&lt;br /&gt;
&lt;br /&gt;
Replaces all occurrences of string &#039;&#039;search&#039;&#039; in string &#039;&#039;str&#039;&#039; with string &#039;&#039;replace&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Can also be used with an arbitrary number of arguments. Note that &#039;&#039;$replace(str,search1,replace1,search2,replace2)&#039;&#039; is generally not the same as &#039;&#039;$replace($replace(srt,search1,replace1),search2,replace2)&#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(str,len) ===&lt;br /&gt;
&lt;br /&gt;
Returns the first &#039;&#039;len&#039;&#039; characters from the right of string &#039;&#039;str&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $roman(int) ===&lt;br /&gt;
&lt;br /&gt;
Formats the integer number &#039;&#039;int&#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(str,...strN) ===&lt;br /&gt;
&lt;br /&gt;
Returns the first shortest element of its arguments. Can be used with an arbitrary number of strings.&lt;br /&gt;
&lt;br /&gt;
=== $strchr(str,char) ===&lt;br /&gt;
&lt;br /&gt;
Finds first occurrence of character &#039;&#039;char&#039;&#039; in string &#039;&#039;str&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$strchr(abca,a)&#039;&#039; → 1&lt;br /&gt;
&lt;br /&gt;
=== $strrchr(str,char) ===&lt;br /&gt;
&lt;br /&gt;
Finds last occurrence of character &#039;&#039;char&#039;&#039; in string &#039;&#039;str&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example: &#039;&#039;$strrchr(abca,a)&#039;&#039; → 4&lt;br /&gt;
&lt;br /&gt;
=== $strstr(str1,str2) ===&lt;br /&gt;
&lt;br /&gt;
Finds first occurrence of string &#039;&#039;str2&#039;&#039; in string &#039;&#039;str1&#039;&#039;. Function is case-sensitive.&lt;br /&gt;
&lt;br /&gt;
=== $strcmp(str1,str2) ===&lt;br /&gt;
&lt;br /&gt;
Performs a case-sensitive comparison of the strings &#039;&#039;str1&#039;&#039; and &#039;&#039;srt2&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $stricmp(str1,str2) ===&lt;br /&gt;
&lt;br /&gt;
Performs a case-insensitive comparison of the strings &#039;&#039;str1&#039;&#039; and &#039;&#039;str2&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== $stripprefix(str) ===&lt;br /&gt;
&lt;br /&gt;
Removes &#039;&#039;A&#039;&#039; and &#039;&#039;The&#039;&#039; prefixes from string &#039;&#039;str&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
=== $stripprefix(str,prefix1,prefix2,...) ===&lt;br /&gt;
&lt;br /&gt;
Removes the specified prefixes from string &#039;&#039;str&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
=== $substr(str,from,to) ===&lt;br /&gt;
&lt;br /&gt;
Returns substring of string &#039;&#039;str&#039;&#039;, starting from &#039;&#039;FROM&#039;&#039;-th character and ending at &#039;&#039;TO&#039;&#039;-th character.&lt;br /&gt;
&lt;br /&gt;
=== $swapprefix(str) ===&lt;br /&gt;
&lt;br /&gt;
Moves &#039;&#039;A&#039;&#039; and &#039;&#039;The&#039;&#039; prefixes to the end of string &#039;&#039;str&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
=== $swapprefix(str,prefix1,prefix2,...) ===&lt;br /&gt;
&lt;br /&gt;
Moves the specified prefixes to the end of string &#039;&#039;str&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
=== $trim(str) ===&lt;br /&gt;
&lt;br /&gt;
Removes leading and trailing spaces from string &#039;&#039;str&#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(count) ===&lt;br /&gt;
&lt;br /&gt;
Inserts &#039;&#039;count&#039;&#039; tabulator characters.&lt;br /&gt;
&lt;br /&gt;
=== $upper(str) ===&lt;br /&gt;
&lt;br /&gt;
Converts string &#039;&#039;str&#039;&#039; to uppercase.&lt;br /&gt;
&lt;br /&gt;
== Track info fields and functions ==&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 fields and functions ===&lt;br /&gt;
&lt;br /&gt;
Generally, metadata from the files (whether in tags or a cue sheet) is mapped directly to a field which can be referenced case-insensitively. For example, the first tag named &#039;&#039;URL&#039;&#039; can be referenced as &#039;&#039;%url%&#039;&#039;, and the first standard comment tag can be referenced as &#039;&#039;%comment%&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The following functions are also available for accessing 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;
=== Remapped metadata fields ===&lt;br /&gt;
&lt;br /&gt;
The following fields have special remapped values to make writing title format scripts more convenient:&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;
==== %totaldiscs% ====&lt;br /&gt;
Index of total discs specified tracks belong 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 fields ===&lt;br /&gt;
&lt;br /&gt;
==== %bitrate% ====&lt;br /&gt;
Bitrate of the track in kilobits per second. VBR files will show a dynamic display for currently played track (outside of the playlist).&lt;br /&gt;
&lt;br /&gt;
==== %channels% ====&lt;br /&gt;
Number of channels in the track, as text; either &amp;quot;mono&amp;quot;, &amp;quot;stereo&amp;quot; for 1 or 2 channels, respectively, otherwise a number followed by &amp;quot;ch&amp;quot;, e.g. &amp;quot;6ch&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== %codec% ====&lt;br /&gt;
Name of codec used to encode the track, e.g. PCM, FLAC, MP3, or AAC. If exact codec name is not available, file extension is used. The Default UI&#039;s standard Codec column displays the same info, but sometimes adds details, e.g. &amp;quot;MP3 / VBR V2&amp;quot; or &amp;quot;AAC / LC&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== %filesize% ====&lt;br /&gt;
The exact file size in bytes.&lt;br /&gt;
Old version: &amp;lt;code&amp;gt;%_filesize%&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== %filesize_natural% ====&lt;br /&gt;
The approximate file size, automatically formatted in appropriate units such as megabytes or kilobytes, e.g. &amp;quot;8.49 MB&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== %length% ====&lt;br /&gt;
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;
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;
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;
The length of the track in seconds as a floating point number.&lt;br /&gt;
&lt;br /&gt;
==== %length_samples% ====&lt;br /&gt;
The length of the track in samples.&lt;br /&gt;
&lt;br /&gt;
==== %samplerate% ====&lt;br /&gt;
Sample rate of the track, in Hz.&lt;br /&gt;
&lt;br /&gt;
=== Technical information functions ===&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 for gapless playback (&#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 for gapless playback (&#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;|MP3 duration (%length% etc.) takes into account LAME or iTunes gapless playback info (&#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;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size: 90%&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; &#039;&#039;MP3_ACCURATE_LENGTH won&#039;t exist if gapless playback info isn&#039;t present or the file is not an MP3. The info can be in a LAME tag in the VBR header, or in an iTunSMPB ID3v2 comment tag. Gapless playback info is taken into account in .m4a files, but there&#039;s no special field to say so.&#039;&#039;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== $channels() ====&lt;br /&gt;
The 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;
The ReplayGain album gain value.&lt;br /&gt;
&lt;br /&gt;
==== %replaygain_album_peak% ====&lt;br /&gt;
The ReplayGain album peak value.&lt;br /&gt;
&lt;br /&gt;
==== %replaygain_track_gain% ====&lt;br /&gt;
The ReplayGain track gain value.&lt;br /&gt;
&lt;br /&gt;
==== %replaygain_track_peak% ====&lt;br /&gt;
The ReplayGain track peak value.&lt;br /&gt;
&lt;br /&gt;
=== Special fields ===&lt;br /&gt;
&lt;br /&gt;
==== %filename% ====&lt;br /&gt;
The filename without directory and extension.&lt;br /&gt;
&lt;br /&gt;
==== %filename_ext% ====&lt;br /&gt;
The filename with extension, but without the directory.&lt;br /&gt;
&lt;br /&gt;
==== %directoryname% ====&lt;br /&gt;
The name of the parent directory only, not the complete path.&lt;br /&gt;
&lt;br /&gt;
==== %last_modified% ====&lt;br /&gt;
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;
The complete path, including the filename and extension.&lt;br /&gt;
&lt;br /&gt;
==== %_path_raw% ====&lt;br /&gt;
The path as URL including the protocol scheme.&lt;br /&gt;
&lt;br /&gt;
==== %subsong% ====&lt;br /&gt;
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;
A string representing the version of foobar2000.&lt;br /&gt;
&lt;br /&gt;
== Time and 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;
Retrieves the year part (formatted as four digits) from a time/date string.&lt;br /&gt;
&lt;br /&gt;
=== $month(time) ===&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;
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;
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;
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 numbers. 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;
&lt;br /&gt;
=== $get(name) ===&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 and is a non-empty string.&lt;br /&gt;
&lt;br /&gt;
=== $put(name,value) ===&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;
Stores &#039;&#039;value&#039;&#039; in the variable &#039;&#039;name&#039;&#039; and returns nothing.&lt;br /&gt;
&lt;br /&gt;
== Component-specific fields and functions ==&lt;br /&gt;
&lt;br /&gt;
This section lists fields and functions which are specific to certain components. Unless otherwise stated, the fields and functions are only usable in the context of those components.&lt;br /&gt;
&lt;br /&gt;
=== Now playing info ===&lt;br /&gt;
&lt;br /&gt;
The following fields related to the currently playing item are only usable in certain locations outside of the playlist, e.g. in the status bar, the main window title and the copy command script.&lt;br /&gt;
&lt;br /&gt;
==== %playback_time% ====&lt;br /&gt;
The elapsed time formatted as [HH:]MM:SS.&lt;br /&gt;
&lt;br /&gt;
==== %playback_time_seconds% ====&lt;br /&gt;
The 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;
The time remaining until the 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;
The time remaining until the track ends, 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;
=== Playlist-only fields ===&lt;br /&gt;
&lt;br /&gt;
The following fields are only usable in playlist display formatting (i.e., the column title formatting patterns).&lt;br /&gt;
&lt;br /&gt;
==== %isplaying% ====&lt;br /&gt;
&amp;quot;1&amp;quot; if file is currently playing, empty string otherwise.&lt;br /&gt;
&lt;br /&gt;
==== %ispaused% ====&lt;br /&gt;
&amp;quot;1&amp;quot; if playback is paused, empty string otherwise.&lt;br /&gt;
&lt;br /&gt;
==== %list_index% ====&lt;br /&gt;
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;
The number of items in the playlist.&lt;br /&gt;
&lt;br /&gt;
==== %queue_index% ====&lt;br /&gt;
Index of the specified item in the playback queue. 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;
List of indexes of the specified item in the playback queue. Same as %queue_index% unless the item has been queued more than once.&lt;br /&gt;
&lt;br /&gt;
==== %queue_total% ====&lt;br /&gt;
Total amount of tracks in playback queue. Available only for queued tracks, for technical reasons. &lt;br /&gt;
&lt;br /&gt;
=== Playlist text color ===&lt;br /&gt;
&lt;br /&gt;
==== Dimmed and highlighted text ====&lt;br /&gt;
&lt;br /&gt;
In the Default UI playlist, text color can be adjusted by enclosing it in angle-brackets. The only options are to make the text dimmer (mixing the default color with the background color) or brighter (mixing the default color with the highlight color):&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&amp;amp;lt;text&amp;gt;&#039;&#039; – dim &#039;&#039;text&#039;&#039;&lt;br /&gt;
* &#039;&#039;&amp;amp;lt;&amp;amp;lt;text&amp;gt;&amp;gt;&#039;&#039; – dimmer &#039;&#039;text&#039;&#039;&lt;br /&gt;
* &#039;&#039;&amp;amp;lt;&amp;amp;lt;&amp;amp;lt;text&amp;gt;&amp;gt;&amp;gt;&#039;&#039; – dimmest &#039;&#039;text&#039;&#039;&lt;br /&gt;
* &#039;&#039;&amp;gt;text&amp;amp;lt;&#039;&#039; – bright &#039;&#039;text&#039;&#039;&lt;br /&gt;
* &#039;&#039;&amp;gt;&amp;gt;text&amp;amp;lt;&amp;amp;lt;&#039;&#039; – brighter &#039;&#039;text&#039;&#039;&lt;br /&gt;
* &#039;&#039;&amp;gt;&amp;gt;&amp;gt;text&amp;amp;lt;&amp;amp;lt;&amp;amp;lt;&#039;&#039; – brightest &#039;&#039;text&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Historical and Columns UI color functions ====&lt;br /&gt;
&lt;br /&gt;
Prior to version 1.0, the default UI playlist supported the following color functions, which are still available in the Columns UI playlist:&lt;br /&gt;
&lt;br /&gt;
===== $blend(color1,color2,part,total) =====&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;
Resets the text color to the default color.&lt;br /&gt;
&lt;br /&gt;
===== $hsl(h,s,l) =====&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;
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;
Resets the text color to the default color.&lt;br /&gt;
&lt;br /&gt;
===== $rgb(r,g,b) =====&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;
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;
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;
=== Album List ===&lt;br /&gt;
&lt;br /&gt;
* [[Foobar2000:Titleformat_Album_List|Album List Title Formatting]]&lt;br /&gt;
* [[Foobar2000:Preferences:Album List|Preferences: Album List]]&lt;br /&gt;
&lt;br /&gt;
=== Playback Statistics ===&lt;br /&gt;
&lt;br /&gt;
The foo_playcount component adds a number of fields for playback statistics and ratings. The fields can be used anywhere track info can be displayed. See the documentation for details:&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;
=== Playlist Organizer ===&lt;br /&gt;
&lt;br /&gt;
This component adds a number of fields to control the display of a list of playlists. See the documentation for details:&lt;br /&gt;
* [[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;
This component replaces the Default UI framework, including the playlist. See the documentation for details:&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:Title Formatting Introduction|Introduction to titleformat scripts]]&lt;br /&gt;
* The file &#039;&#039;&#039;titleformat_help.html&#039;&#039;&#039; in your Foobar2000 directory, e.g. file:///C:/Program%20Files%20(x86)/foobar2000/titleformat_help.html&lt;br /&gt;
&lt;br /&gt;
[[Category:foobar2000 Guides|Titleformat Reference]]&lt;/div&gt;</summary>
		<author><name>92.62.53.27</name></author>
	</entry>
</feed>