atf.htm 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>Winamp - Advanced Title Formatting (ATF) Documentation</title>
  7. <meta name="generator" content="Notepad++" />
  8. <meta name="date" content="2007-04-27" />
  9. <meta name="keywords" content="Advanced Title Formatting, Winamp, ATF" />
  10. <style type="text/css">
  11. <!--
  12. DIV.clearer {CLEAR: both; LINE-HEIGHT: 0; HEIGHT: 0px}
  13. DIV.no {PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px}
  14. EM.u {FONT-STYLE: normal; TEXT-DECORATION: underline}
  15. p.atf {TEXT-ALIGN: left; padding: 0em; FONT-SIZE: 100%; FONT-WEIGHT: normal; FONT-STYLE: normal; WHITE-SPACE: nowrap }
  16. DIV.atf .header {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; MARGIN-TOP: 10px; MARGIN-BOTTOM: 0px;}
  17. DIV.atf .pagename {FONT-WEIGHT: bolder; FONT-SIZE: 200%; FLOAT: left; VERTICAL-ALIGN: middle; COLOR: #dee7ec; TEXT-ALIGN: left; border: solid 2px #dee7ec; PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 4px; PADDING-TOP: 1px; MARGIN-LEFT: 10px; MARGIN-TOP: 0px; MARGIN-RIGHT: 0px; MARGIN-BOTTOM: 0px;}
  18. DIV.atf .pagename A {COLOR: #436976! important; TEXT-DECORATION: none! important}
  19. DIV.atf .logo {FONT-WEIGHT: normal; FONT-SIZE: 50%; FLOAT: right; VERTICAL-ALIGN: middle; TEXT-ALIGN: right; MARGIN-RIGHT: 15px;}
  20. DIV.atf .logo A {COLOR: #dee7ec; LETTER-SPACING: 0pt; TEXT-DECORATION: none}
  21. DIV.atf .bar {CLEAR: both; PADDING-RIGHT: 10px; BORDER-TOP: #8cacbb 1px solid; PADDING-LEFT: 1px; BACKGROUND: #dee7ec; PADDING-BOTTOM: 2px; PADDING-TOP: 1px; BORDER-BOTTOM: #8cacbb 1px solid; HEIGHT: 25px; MARGIN-TOP: 6px; MARGIN-BOTTOM: 5px;}
  22. DIV.atf .bar-left {FLOAT: left; HEIGHT: 25px;}
  23. DIV.atf .bar-right {FLOAT: right; TEXT-ALIGN: right; HEIGHT: 25px;}
  24. DIV.atf #bar__bottom {MARGIN-BOTTOM: 2px}
  25. DIV.atf DIV.meta {CLEAR: both; MARGIN-TOP: 1em; FONT-SIZE: 70%; COLOR: #638c9c}
  26. DIV.atf DIV.meta DIV.user {FLOAT: left}
  27. DIV.atf DIV.meta DIV.doc {TEXT-ALIGN: right}
  28. * {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px}
  29. BODY {FONT: 80% "Lucida Grande",Verdana,Lucida,Helvetica,Arial,sans-serif; COLOR: #000; BACKGROUND-COLOR: #fff}
  30. .indent {MARGIN-LEFT: 62px; WHITE-SPACE: nowrap}
  31. .indent2 {MARGIN-LEFT: 67px; WHITE-SPACE: nowrap}
  32. .smaller {FONT-SIZE: 6px}
  33. .smallest {FONT-SIZE: 2px}
  34. DIV.atf DIV.page {MARGIN: 4px 2em 0px 1em; TEXT-ALIGN: left}
  35. DIV.atf IMG {BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px}
  36. DIV.atf P {MARGIN: 0px 0px 1em}
  37. DIV.atf HR {BORDER-TOP: #8cacbb 1px solid; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; HEIGHT: 0px; TEXT-ALIGN: center; BORDER-RIGHT-WIDTH: 0px}
  38. DIV.atf FORM {BORDER-STYLE: none; PADDING: 0px;}
  39. DIV.atf DIV.toolbar {MARGIN: 2px 0px; TEXT-ALIGN: left}
  40. DIV.atf .nowrap {WHITE-SPACE: nowrap}
  41. .nowrap {WHITE-SPACE: nowrap}
  42. DIV.atf INPUT.button {HEIGHT: 23px; VERTICAL-ALIGN: middle; TEXT-ALIGN: center; BORDER: #8cacbb 1px solid; PADDING-RIGHT: 4px; PADDING-LEFT: 4px; FONT-SIZE: 100%; BACKGROUND-COLOR: #fff; PADDING-BOTTOM: 2px; MARGIN-LEFT: 1px; MARGIN-TOP: 1px; MARGIN-BOTTOM: 0px; MARGIN-RIGHT: 25px; CURSOR: pointer; COLOR: #000; PADDING-TOP: 1px; TEXT-DECORATION: none;}
  43. DIV.atf A:link {COLOR: #436976; TEXT-DECORATION: none}
  44. DIV.atf A:visited {COLOR: #436976; TEXT-DECORATION: none}
  45. DIV.atf A:hover {COLOR: #000; TEXT-DECORATION: underline}
  46. DIV.atf A:active {COLOR: #000; TEXT-DECORATION: underline}
  47. DIV.atf H1 A {COLOR: #000! important; TEXT-DECORATION: none! important}
  48. DIV.atf H2 A {COLOR: #000! important; TEXT-DECORATION: none! important}
  49. DIV.atf H3 A {COLOR: #000! important; TEXT-DECORATION: none! important}
  50. DIV.atf H4 A {COLOR: #000! important; TEXT-DECORATION: none! important}
  51. DIV.atf H5 A {COLOR: #000! important; TEXT-DECORATION: none! important}
  52. DIV.atf A.nolink {COLOR: #000; TEXT-DECORATION: none}
  53. DIV.atf A.urlextern:link {COLOR: #436976! important}
  54. DIV.atf A.urlextern:visited {COLOR: #436976! important}
  55. DIV.atf A.link1 {COLOR: #090! important}
  56. DIV.atf A.link2 {COLOR: #f30! important}
  57. DIV.atf SPAN.user {FONT-SIZE: 90%; COLOR: #ccc}
  58. DIV.atf LI.minor {COLOR: #666; FONT-STYLE: italic}
  59. DIV.atf ACRONYM {CURSOR: help; BORDER-BOTTOM: #000 1px dotted}
  60. DIV.atf H1 {CLEAR: left; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px 0px 1em; COLOR: #000; PADDING-TOP: 10px; BORDER-BOTTOM: #8cacbb 1px solid}
  61. DIV.atf H2 {CLEAR: left; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; PADDING-BOTTOM: 0px; MARGIN: 0px 0px 1em; COLOR: #000; PADDING-TOP: 5px; BORDER-BOTTOM: #8cacbb 1px solid}
  62. DIV.atf H3 {CLEAR: left; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px 0px 1em; COLOR: #000; PADDING-TOP: 5px; BORDER-BOTTOM: #8cacbb 1px solid}
  63. DIV.atf H4 {CLEAR: left; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px 0px 1em; COLOR: #000; PADDING-TOP: 5px; BORDER-BOTTOM: #8cacbb 1px solid}
  64. DIV.atf H5 {CLEAR: left; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px 0px 1em; COLOR: #000; PADDING-TOP: 5px; BORDER-BOTTOM: #8cacbb 1px solid}
  65. DIV.atf H6 {FONT-WEIGHT: bold; FONT-SIZE: 120%; MARGIN-LEFT: 40px; BORDER-BOTTOM-STYLE: none; CLEAR: left; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; FONT-SIZE: 120%; PADDING-BOTTOM: 0px; MARGIN: 0px 0px 1em; COLOR: #000; PADDING-TOP: 0.5em}
  66. DIV.atf H1 {FONT-WEIGHT: bold; FONT-SIZE: 160%; MARGIN-LEFT: 0px}
  67. DIV.atf H2 {FONT-SIZE: 150%; MARGIN-LEFT: 20px}
  68. DIV.atf H3 {FONT-WEIGHT: bold; FONT-SIZE: 140%; MARGIN-LEFT: 40px; BORDER-BOTTOM-STYLE: none}
  69. DIV.atf H4 {FONT-WEIGHT: bold; FONT-SIZE: 120%; MARGIN-LEFT: 60px; BORDER-BOTTOM-STYLE: none}
  70. DIV.atf H5 {FONT-WEIGHT: bold; FONT-SIZE: 100%; MARGIN-LEFT: 80px; BORDER-BOTTOM-STYLE: none}
  71. DIV.atf DIV.level1 {MARGIN-LEFT: 3px}
  72. DIV.atf DIV.level2 {MARGIN-LEFT: 23px}
  73. DIV.atf DIV.level3 {MARGIN-LEFT: 43px}
  74. DIV.atf DIV.level4 {MARGIN-LEFT: 63px}
  75. DIV.atf DIV.level5 {MARGIN-LEFT: 83px}
  76. DIV.atf UL {LIST-STYLE-IMAGE: none; MARGIN: 0px 0px 0.5em 1.5em; COLOR: #638c9c; LINE-HEIGHT: 1.5em; LIST-STYLE-TYPE: square}
  77. DIV.atf OL {FONT-WEIGHT: bold; LIST-STYLE-IMAGE: none; MARGIN: 0px 0px 0.5em 1.5em; COLOR: #638c9c; LINE-HEIGHT: 1.5em}
  78. DIV.atf .li {FONT-WEIGHT: normal; COLOR: #000}
  79. DIV.atf OL {LIST-STYLE-TYPE: decimal}
  80. DIV.atf OL OL {LIST-STYLE-TYPE: upper-roman}
  81. DIV.atf OL OL OL {LIST-STYLE-TYPE: lower-alpha}
  82. DIV.atf DIV.toc {CLEAR: both; FONT-SIZE: 80%; FLOAT: right; MARGIN: 1.2em 0px 0px 1.7em; WIDTH: 205px}
  83. DIV.atf DIV.tocheader {BORDER: #8cacbb 1px solid; PADDING: 3px; FONT-WEIGHT: bold; MARGIN-BOTTOM: 2px; BACKGROUND-COLOR: #dee7ec; TEXT-ALIGN: left}
  84. DIV.atf DIV.tocheader IMG {FLOAT: right; MARGIN: 0.3em 3px 0px 0px; WIDTH: 0.8em; CURSOR: pointer; HEIGHT: 0.8em}
  85. DIV.atf #toc__inside {BORDER: #8cacbb 1px solid; PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0.7em; PADDING-TOP: 0.5em; BACKGROUND-COLOR: #fff; TEXT-ALIGN: left}
  86. DIV.atf UL.toc {PADDING-LEFT: 0.3em; LIST-STYLE-IMAGE: none; MARGIN: 0px; LINE-HEIGHT: 1.2em; LIST-STYLE-TYPE: none}
  87. DIV.atf UL.toc LI {PADDING-LEFT: 0.3em; BACKGROUND: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAFElEQVQI12OwCYpxSSph0HHzAbIAGeoDrdYV6fMAAAAASUVORK5CYII=) no-repeat 0px 0.6em}
  88. DIV.atf UL.toc LI.clear {PADDING-LEFT: 0.4em; BACKGROUND-IMAGE: none}
  89. DIV.atf A.toc:link {COLOR: #436976}
  90. DIV.atf A.toc:visited {COLOR: #436976}
  91. DIV.atf A.toc:hover {COLOR: #000}
  92. DIV.atf A.toc:active {COLOR: #000}
  93. -->
  94. </style>
  95. <!-- originally saved from http://www.myplugins.info/winamp-wiki/doku.php/advanced_title_formatting -->
  96. <!-- original credits to Shane Hird and Ben Allison - this document modified and edited for Winamp by DJ Egg -->
  97. </head>
  98. <body>
  99. <div class="atf">
  100. <a href="top" name="top"></a>
  101. <div class="stylehead">
  102. <div class="header">
  103. <div class="pagename"><a href="javascript: window.location.reload()">Advanced&nbsp;Title&nbsp;Formatting</a></div>
  104. <div class="clearer"></div>
  105. </div>
  106. <div class="bar" id="bar__top">
  107. <div class="bar-left" id="bar__topleft"></div>
  108. <!--<div class="langform" id="langselect">
  109. <form name="lang" action="" method="post">
  110. <select name="xfer" size="1" onmouseup= "location = '' + this.options[this.selectedIndex ].value;">
  111. <option value="atf.htm" selected="selected">English</option>
  112. <option value="atf-nl.htm">Dutch</option>
  113. <option value="atf-fr.htm">French</option>
  114. <option value="atf-de.htm">German</option>
  115. <option value="atf-it.htm">Italian</option>
  116. <option value="atf-jp.htm">Japanese</option>
  117. <option value="atf-pl.htm">Polish</option>
  118. <option value="atf-pt.htm">Portuguese</option>
  119. <option value="atf-ro.htm">Romanian</option>
  120. <option value="atf-ru.htm">Russian</option>
  121. <option value="atf-es.htm">Spanish</option>
  122. <option value="atf-se.htm">Swedish</option>
  123. <option value="atf-tr.htm">Turkish</option>
  124. </select>
  125. </form>
  126. </div>-->
  127. <div class="bar-right" id="bar__topright"></div>
  128. </div>
  129. </div>
  130. <div class="page">
  131. <div class="toc">
  132. <div class="tocheader" id="toc__header">Table of Contents</div>
  133. <div id="toc__inside">
  134. <ul class="toc">
  135. <li class="clear">
  136. <ul class="toc">
  137. <li class="level2"><div class="li"><span class="li"><a href="#winamp_atf_reference" class="toc">Winamp ATF Reference</a></span></div>
  138. <ul class="toc">
  139. <li class="level3"><div class="li"><span class="li"><a href="#atf_usage" class="toc">ATF Usage</a></span></div></li>
  140. <li class="level3"><div class="li"><span class="li"><a href="#fields" class="toc">Fields</a></span></div>
  141. <ul class="toc">
  142. <li class="level4"><div class="li"><span class="li"><a href="#provided_by_winamp" class="toc">Provided by Winamp</a></span></div>
  143. <ul class="toc">
  144. <li class="level5"><div class="li"><span class="li"><a href="#filename" class="toc">%filename%</a></span></div></li>
  145. <li class="level5"><div class="li"><span class="li"><a href="#folder" class="toc">%folder%</a></span></div></li>
  146. </ul>
  147. </li>
  148. <li class="level4"><div class="li"><span class="li"><a href="#provided_by_ml" class="toc">Provided by ML</a></span></div>
  149. <ul class="toc">
  150. <li class="level5"><div class="li"><span class="li"><a href="#rating" class="toc">%rating%</a></span></div></li>
  151. <li class="level5"><div class="li"><span class="li"><a href="#playcount" class="toc">%playcount%</a></span></div></li>
  152. </ul>
  153. </li>
  154. <li class="level4"><div class="li"><span class="li"><a href="#provided_by_ml_or_input_plugin" class="toc">Provided by ML or input plugin</a></span></div>
  155. <ul class="toc">
  156. <li class="level5"><div class="li"><span class="li"><a href="#artist" class="toc">%artist%</a></span></div></li>
  157. <li class="level5"><div class="li"><span class="li"><a href="#title" class="toc">%title%</a></span></div></li>
  158. <li class="level5"><div class="li"><span class="li"><a href="#album" class="toc">%album%</a></span></div></li>
  159. <li class="level5"><div class="li"><span class="li"><a href="#year" class="toc">%year%</a></span></div></li>
  160. <li class="level5"><div class="li"><span class="li"><a href="#genre" class="toc">%genre%</a></span></div></li>
  161. <li class="level5"><div class="li"><span class="li"><a href="#comment" class="toc">%comment%</a></span></div></li>
  162. <li class="level5"><div class="li"><span class="li"><a href="#tracknumber" class="toc">%tracknumber%</a></span></div></li>
  163. <li class="level5"><div class="li"><span class="li"><a href="#bitrate" class="toc">%bitrate%</a></span></div></li>
  164. <li class="level5"><div class="li"><span class="li"><a href="#type" class="toc">%type%</a></span></div></li>
  165. <li class="level5"><div class="li"><span class="li"><a href="#vbr" class="toc">%vbr%</a></span></div></li>
  166. <li class="level5"><div class="li"><span class="li"><a href="#category" class="toc">%category%</a></span></div></li>
  167. <li class="level5"><div class="li"><span class="li"><a href="#producer" class="toc">%producer%</a></span></div></li>
  168. <li class="level5"><div class="li"><span class="li"><a href="#director" class="toc">%director%</a></span></div></li>
  169. </ul>
  170. </li>
  171. <li class="level4"><div class="li"><span class="li"><a href="#provided_by_input_plugin" class="toc">Provided by input plugin</a></span></div>
  172. <ul class="toc">
  173. <li class="level5"><div class="li"><span class="li"><a href="#length" class="toc">%length%</a></span></div></li>
  174. <li class="level5"><div class="li"><span class="li"><a href="#disc" class="toc">%disc%</a></span></div></li>
  175. <li class="level5"><div class="li"><span class="li"><a href="#track" class="toc">%track%</a></span></div></li>
  176. <li class="level5"><div class="li"><span class="li"><a href="#composer" class="toc">%composer%</a></span></div></li>
  177. <li class="level5"><div class="li"><span class="li"><a href="#streamtitle" class="toc">%streamtitle%</a></span></div></li>
  178. <li class="level5"><div class="li"><span class="li"><a href="#albumartist" class="toc">%albumartist%</a></span></div></li>
  179. <li class="level5"><div class="li"><span class="li"><a href="#mood" class="toc">%mood%</a></span></div></li>
  180. <li class="level5"><div class="li"><span class="li"><a href="#bpm" class="toc">%bpm%</a></span></div></li>
  181. <li class="level5"><div class="li"><span class="li"><a href="#key" class="toc">%key%</a></span></div></li>
  182. <li class="level5"><div class="li"><span class="li"><a href="#publisher" class="toc">%publisher%</a></span></div></li>
  183. <li class="level5"><div class="li"><span class="li"><a href="#lyricist" class="toc">%lyricist%</a></span></div></li>
  184. <li class="level5"><div class="li"><span class="li"><a href="#conductor" class="toc">%conductor%</a></span></div></li>
  185. <li class="level5"><div class="li"><span class="li"><a href="#tool" class="toc">%tool%</a></span></div></li>
  186. <li class="level5"><div class="li"><span class="li"><a href="#family" class="toc">%family%</a></span></div></li>
  187. <li class="level5"><div class="li"><span class="li"><a href="#encoder" class="toc">%encoder%</a></span></div></li>
  188. <li class="level5"><div class="li"><span class="li"><a href="#isrc" class="toc">%ISRC%</a></span></div></li>
  189. <li class="level5"><div class="li"><span class="li"><a href="#replaygain_track_gain" class="toc">%replaygain_track_gain%</a></span></div></li>
  190. <li class="level5"><div class="li"><span class="li"><a href="#replaygain_album_gain" class="toc">%replaygain_album_gain%</a></span></div></li>
  191. <li class="level5"><div class="li"><span class="li"><a href="#replaygain_track_peak" class="toc">%replaygain_track_peak%</a></span></div></li>
  192. <li class="level5"><div class="li"><span class="li"><a href="#replaygain_album_peak" class="toc">%replaygain_album_peak%</a></span></div></li>
  193. <li class="level5"><div class="li"><span class="li"><a href="#gain" class="toc">%gain%</a></span></div></li>
  194. </ul>
  195. </li>
  196. </ul>
  197. </li>
  198. <li class="level3"><div class="li"><span class="li"><a href="#functions" class="toc">Functions</a></span></div>
  199. <ul class="toc">
  200. <li class="level4"><div class="li"><span class="li"><a href="#control_flow" class="toc">Control Flow</a></span></div>
  201. <ul class="toc">
  202. <li class="level5"><div class="li"><span class="li"><a href="#conditional_section" class="toc">[...] Conditional section</a></span></div></li>
  203. <li class="level5"><div class="li"><span class="li"><a href="#if" class="toc">$if</a></span></div></li>
  204. <li class="level5"><div class="li"><span class="li"><a href="#if2" class="toc">$if2</a></span></div></li>
  205. <li class="level5"><div class="li"><span class="li"><a href="#if3" class="toc">$if3</a></span></div></li>
  206. <li class="level5"><div class="li"><span class="li"><a href="#decode" class="toc">$decode</a></span></div></li>
  207. <li class="level5"><div class="li"><span class="li"><a href="#ifgreater" class="toc">$ifgreater</a></span></div></li>
  208. <li class="level5"><div class="li"><span class="li"><a href="#iflonger" class="toc">$iflonger</a></span></div></li>
  209. <li class="level5"><div class="li"><span class="li"><a href="#ifstrequal2" class="toc">$IfStrEqual2</a></span></div></li>
  210. <li class="level5"><div class="li"><span class="li"><a href="#ifstrequal" class="toc">$IfStrEqual</a></span></div></li>
  211. </ul>
  212. </li>
  213. <li class="level4"><div class="li"><span class="li"><a href="#logic_operations" class="toc">Logic Operations</a></span></div>
  214. <ul class="toc">
  215. <li class="level5"><div class="li"><span class="li"><a href="#and" class="toc">$and</a></span></div></li>
  216. </ul>
  217. </li>
  218. <li class="level4"><div class="li"><span class="li"><a href="#arithmetic_operations" class="toc">Arithmetic Operations</a></span></div>
  219. <ul class="toc">
  220. <li class="level5"><div class="li"><span class="li"><a href="#mod" class="toc">$mod</a></span></div></li>
  221. <li class="level5"><div class="li"><span class="li"><a href="#div" class="toc">$div</a></span></div></li>
  222. <li class="level5"><div class="li"><span class="li"><a href="#mul" class="toc">$mul</a></span></div></li>
  223. <li class="level5"><div class="li"><span class="li"><a href="#muldiv" class="toc">$muldiv</a></span></div></li>
  224. <li class="level5"><div class="li"><span class="li"><a href="#sub" class="toc">$sub</a></span></div></li>
  225. <li class="level5"><div class="li"><span class="li"><a href="#add" class="toc">$add</a></span></div></li>
  226. <li class="level5"><div class="li"><span class="li"><a href="#greater" class="toc">$greater</a></span></div></li>
  227. <li class="level5"><div class="li"><span class="li"><a href="#max" class="toc">$max</a></span></div></li>
  228. <li class="level5"><div class="li"><span class="li"><a href="#min" class="toc">$min</a></span></div></li>
  229. </ul>
  230. </li>
  231. <li class="level4"><div class="li"><span class="li"><a href="#string_operations" class="toc">String Operations</a></span></div>
  232. <ul class="toc">
  233. <li class="level5"><div class="li"><span class="li"><a href="#lower" class="toc">$lower</a></span></div></li>
  234. <li class="level5"><div class="li"><span class="li"><a href="#upper" class="toc">$upper</a></span></div></li>
  235. <li class="level5"><div class="li"><span class="li"><a href="#replace" class="toc">$replace</a></span></div></li>
  236. <li class="level5"><div class="li"><span class="li"><a href="#left" class="toc">$left</a></span></div></li>
  237. <li class="level5"><div class="li"><span class="li"><a href="#right" class="toc">$right</a></span></div></li>
  238. <li class="level5"><div class="li"><span class="li"><a href="#len" class="toc">$len</a></span></div></li>
  239. <li class="level5"><div class="li"><span class="li"><a href="#substr" class="toc">$substr</a></span></div></li>
  240. <li class="level5"><div class="li"><span class="li"><a href="#strstr" class="toc">$strstr</a></span></div></li>
  241. <li class="level5"><div class="li"><span class="li"><a href="#strrchr" class="toc">$strrchr</a></span></div></li>
  242. <li class="level5"><div class="li"><span class="li"><a href="#strlchr" class="toc">$strlchr</a></span></div></li>
  243. <li class="level5"><div class="li"><span class="li"><a href="#strchr" class="toc">$strchr</a></span></div></li>
  244. <li class="level5"><div class="li"><span class="li"><a href="#shortest" class="toc">$shortest</a></span></div></li>
  245. <li class="level5"><div class="li"><span class="li"><a href="#longest" class="toc">$longest</a></span></div></li>
  246. <li class="level5"><div class="li"><span class="li"><a href="#abbr" class="toc">$abbr</a></span></div></li>
  247. <li class="level5"><div class="li"><span class="li"><a href="#padcut" class="toc">$padcut</a></span></div></li>
  248. <li class="level5"><div class="li"><span class="li"><a href="#cut" class="toc">$cut</a></span></div></li>
  249. <li class="level5"><div class="li"><span class="li"><a href="#pad" class="toc">$pad</a></span></div></li>
  250. <li class="level5"><div class="li"><span class="li"><a href="#lpad" class="toc">$lpad</a></span></div></li>
  251. <li class="level5"><div class="li"><span class="li"><a href="#trim" class="toc">$trim</a></span></div></li>
  252. <li class="level5"><div class="li"><span class="li"><a href="#repeat" class="toc">$repeat</a></span></div></li>
  253. <li class="level5"><div class="li"><span class="li"><a href="#caps" class="toc">$caps</a></span></div></li>
  254. <li class="level5"><div class="li"><span class="li"><a href="#caps2" class="toc">$caps2</a></span></div></li>
  255. <li class="level5"><div class="li"><span class="li"><a href="#fileext" class="toc">$fileext</a></span></div></li>
  256. <li class="level5"><div class="li"><span class="li"><a href="#filepart" class="toc">$filepart</a></span></div></li>
  257. <li class="level5"><div class="li"><span class="li"><a href="#filename1" class="toc">$filename</a></span></div></li>
  258. <li class="level5"><div class="li"><span class="li"><a href="#directory" class="toc">$directory</a></span></div></li>
  259. <li class="level5"><div class="li"><span class="li"><a href="#split" class="toc">$split</a></span></div></li>
  260. <li class="level5"><div class="li"><span class="li"><a href="#ext" class="toc">$ext</a></span></div></li>
  261. <li class="level5"><div class="li"><span class="li"><a href="#hex" class="toc">$hex</a></span></div></li>
  262. <li class="level5"><div class="li"><span class="li"><a href="#dec" class="toc">$dec</a></span></div></li>
  263. <li class="level5"><div class="li"><span class="li"><a href="#num" class="toc">$num</a></span></div></li>
  264. <li class="level5"><div class="li"><span class="li"><a href="#null" class="toc">$null</a></span></div></li>
  265. <li class="level5"><div class="li"><span class="li"><a href="#pathlpart" class="toc">$PathLPart</a></span></div></li>
  266. <li class="level5"><div class="li"><span class="li"><a href="#pathrpart" class="toc">$PathRPart</a></span></div></li>
  267. <li class="level5"><div class="li"><span class="li"><a href="#pathltrim" class="toc">$PathLTrim</a></span></div></li>
  268. <li class="level5"><div class="li"><span class="li"><a href="#pathrtrim" class="toc">$PathRTrim</a></span></div></li>
  269. </ul>
  270. </li>
  271. <li class="level4"><div class="li"><span class="li"><a href="#variables" class="toc">Variables</a></span></div>
  272. <ul class="toc">
  273. <li class="level5"><div class="li"><span class="li"><a href="#puts" class="toc">$puts</a></span></div></li>
  274. <li class="level5"><div class="li"><span class="li"><a href="#put" class="toc">$put</a></span></div></li>
  275. <li class="level5"><div class="li"><span class="li"><a href="#get" class="toc">$get</a></span></div></li>
  276. </ul>
  277. </li>
  278. <li class="level4"><div class="li"><span class="li"><a href="#system_info" class="toc">System Info</a></span></div>
  279. <ul class="toc">
  280. <li class="level5"><div class="li"><span class="li"><a href="#systime_second" class="toc">$systime_second</a></span></div></li>
  281. <li class="level5"><div class="li"><span class="li"><a href="#systime_minute" class="toc">$systime_minute</a></span></div></li>
  282. <li class="level5"><div class="li"><span class="li"><a href="#systime_hour" class="toc">$systime_hour</a></span></div></li>
  283. <li class="level5"><div class="li"><span class="li"><a href="#systime_day" class="toc">$systime_day</a></span></div></li>
  284. <li class="level5"><div class="li"><span class="li"><a href="#systime_month" class="toc">$systime_month</a></span></div></li>
  285. <li class="level5"><div class="li"><span class="li"><a href="#systime_year" class="toc">$systime_year</a></span></div></li>
  286. </ul>
  287. </li>
  288. <li class="level4"><div class="li"><span class="li"><a href="#others._todo" class="toc">Others. (TODO)</a></span></div></li></ul>
  289. </li>
  290. <li class="level3"><div class="li"><span class="li"><a href="#examples" class="toc">Examples</a></span></div>
  291. <ul class="toc">
  292. <li class="level4"><div class="li"><span class="li"><a href="#standard_atf" class="toc">Standard ATF syntax</a></span></div></li>
  293. <li class="level4"><div class="li"><span class="li"><a href="#advanced_atf" class="toc">Advanced ATF syntax</a></span></div></li>
  294. </ul>
  295. </li>
  296. </ul>
  297. </li>
  298. </ul>
  299. </li></ul>
  300. </div>
  301. </div>
  302. <h1><a id="winamp_atf_reference" name="winamp_atf_reference">Winamp ATF Reference</a></h1>
  303. <div class="level1">
  304. <p>Below is an extract of the Winamp supported ATF functionality.<br/>
  305. ATF determines how Winamp should display metadata in the Playlist window and Main window songticker.
  306. The global ATF string can be manually edited via the 'Titles' page in the Winamp Preferences.
  307. <span class="smallest"><br/><br/><br/></span>
  308. The default ATF string in Winamp is:<br/><i>[%artist% - ]$if2(%title%,$filepart(%filename%)</i>
  309. <span class="smallest"><br/><br/><br/></span>
  310. This will be displayed as: '<i>Artist&nbsp;-&nbsp;Title</i>'
  311. if the Artist and Title metadata fields are populated in the file tags,
  312. otherwise it will just display the <i>filename</i> instead.</p>
  313. </div>
  314. <h2><a id="atf_usage" name="atf_usage">ATF Usage</a></h2>
  315. <div class="level2">
  316. <p>%blah% denotes a metadata field.<br/><br/>
  317. $blah() denotes a function call.<br/><br/>
  318. [] means &quot;don't display unless metadata was found&quot;.</p>
  319. <p>&#8216;&nbsp;&#8217; (single quotation marks) outputs raw text without parsing. eg.
  320. &#8216;blah$blah%blah[]&#8217; which will output all the string and ignore the special
  321. characters ($,%,[,]). </p></div>
  322. <h2><a id="fields" name="fields">Fields</a></h2>
  323. <div class="level2">
  324. <p>Note: Fields are defined by various components within Winamp. Some are
  325. specific to the Media Library (%rating%, %playcount%), some are provided by
  326. Winamp (%filename%, %folder%). In most cases, however, the input plugin provides
  327. the fields. Some input plugins provide a greater variety of fields than others.
  328. For example, the Windows Media plugin (in_wm, Winamp 5.12+), will provide values
  329. for ANY field in the form %WM/*% (see the extended attributes section of
  330. <i>View File Info</i> on any wma/wmv/asf file for examples).<br/></p></div>
  331. <h3><a id="provided_by_winamp" name="provided_by_winamp">Provided by Winamp</a></h3>
  332. <div class="level3"></div>
  333. <h4><a id="filename" name="filename">%filename%</a></h4>
  334. <div class="level4">
  335. <p>Returns the full path of the file. To display the filename only, use the
  336. <a class="link1" title="$filepart" href="#filepart">$filepart</a> function.</p></div>
  337. <h4><a id="folder" name="folder">%folder%</a></h4>
  338. <div class="level4">
  339. <p>Returns the containing folder.<br/>Winamp 5.2+ Only.</p></div>
  340. <h3><a id="provided_by_ml" name="provided_by_ml">Provided by ML</a></h3>
  341. <div class="level3"></div>
  342. <h4><a id="rating" name="rating">%rating%</a></h4>
  343. <div class="level4">
  344. <p>Returns the track rating as an integer from 1 to 5, if set. To display as stars or another character,
  345. use the <a class="link1" title="$repeat" href="#repeat">$repeat</a> function.</p>
  346. <p>Winamp 5.2+ Only.</p></div>
  347. <h4><a id="playcount" name="playcount">%playcount%</a></h4>
  348. <div class="level4">
  349. <p>Returns the playcount (number of times track has been played), if the file is stored in the Media Library database.</p>
  350. <p>Winamp 5.2+ Only.</p></div>
  351. <h3><a id="provided_by_ml_or_input_plugin"
  352. name="provided_by_ml_or_input_plugin">Provided by ML or input plugin</a></h3>
  353. <div class="level3">
  354. <p>For the fields listed below, info is taken from ML only if the file is
  355. present in the ML database and if the following option is checkmarked:<br/>
  356. Prefs
  357. (Ctrl+P) &gt; Media Library &gt; Local Media &gt; &#8216;Use Library title information
  358. for Playlist Item Formatting&#8217;</p>
  359. <p>In all other cases, the info is provided by the input plugin (if the
  360. respective input plugin supports the field). </p>
  361. <p>Most of these are straightforward and are taken from the standard file tags,
  362. and therefore don't require any additional explanatory notes.</p></div>
  363. <h4><a id="artist" name="artist">%artist%</a></h4>
  364. <div class="level4"><p>Returns the Artist field.</p></div>
  365. <h4><a id="title" name="title">%title%</a></h4>
  366. <div class="level4"><p>Returns the Title field.</p></div>
  367. <h4><a id="album" name="album">%album%</a></h4>
  368. <div class="level4"><p>Returns the Album field.</p></div>
  369. <h4><a id="year" name="year">%year%</a></h4>
  370. <div class="level4"><p>Returns the Year field.</p></div>
  371. <h4><a id="genre" name="genre">%genre%</a></h4>
  372. <div class="level4"><p>Returns the Genre field.</p></div>
  373. <h4><a id="comment" name="comment">%comment%</a></h4>
  374. <div class="level4"><p>Returns the Comment field.</p></div>
  375. <h4><a id="tracknumber" name="tracknumber">%tracknumber%</a></h4>
  376. <div class="level4"><p>Returns the TrackNumber with no padding, eg. Track 1 will be displayed as 1.<br/>
  377. To pad with zeros, eg. 01, 02...10, 11, use the <a class="link1" title="$num" href="#num">$num</a> or <a class="link1" title="$lpad" href="#lpad">$lpad</a> function.</p></div>
  378. <h4><a id="track" name="track">%track%</a></h4>
  379. <div class="level4"><p>Same as %tracknumber%</p></div>
  380. <h4><a id="albumartist" name="albumartist">%albumartist%</a></h4>
  381. <div class="level4">
  382. <p>Returns the Album Artist field.<br/>
  383. Winamp 5.3+ Only.</p></div>
  384. <h4><a id="disc" name="disc">%disc%</a></h4>
  385. <div class="level4">
  386. <p>Returns the Disc No. tag, if available, eg. 1/2 (Disc #1 of a 2CD set).</p></div>
  387. <h4><a id="composer" name="composer">%composer%</a></h4>
  388. <div class="level4"><p>Returns the Composer field.</p></div>
  389. <h4><a id="publisher" name="publisher">%publisher%</a></h4>
  390. <div class="level4"><p>Returns the Publisher (Record Label) field.<br/>Winamp 5.3+ Only.</p></div>
  391. <h4><a id="streamtitle" name="streamtitle">%streamtitle%</a></h4>
  392. <div class="level4"><p>Returns the Streaming Title for streams, if one exists.</p></div>
  393. <h4><a id="bitrate" name="bitrate">%bitrate%</a></h4>
  394. <div class="level4"><p>Returns the Bitrate (will use average bitrate for vbr).</p></div>
  395. <h4><a id="length" name="length">%length%</a></h4>
  396. <div class="level4">
  397. <p>Returns length of the track in miliseconds. For a formatted track length,
  398. use<br/><i>$div(%length%,60000):$num($div($mod(%length%,60000),1000),2)</i>
  399. </p></div>
  400. <h4><a id="type" name="type">%type%</a></h4>
  401. <div class="level4">
  402. <p>Returns 1 for video, 0 for audio.<br/>Winamp 5.2+ Only.</p></div>
  403. <h4><a id="vbr" name="vbr">%vbr%</a></h4>
  404. <div class="level4">
  405. <p>Returns 1 for VBR(Variable Bitrate) audio, 0 for CBR(Constant Bitrate)
  406. audio.</p></div>
  407. <h4><a id="category" name="category">%category%</a></h4>
  408. <div class="level4"><p>Returns the Category field.<br/>Winamp 5.55+ Only.<br/></p></div>
  409. <h4><a id="producer" name="producer">%producer%</a></h4>
  410. <div class="level4"><p>Returns the (record or film) Producer field.<br/>Winamp 5.57+ Only.<br/></p></div>
  411. <h4><a id="director" name="director">%director%</a></h4>
  412. <div class="level4"><p>Returns the (film) Director field, mainly used for videos.<br/>Winamp 5.57+ Only.<br/></p></div>
  413. <h3><a id="provided_by_input_plugin" name="provided_by_input_plugin">Provided by
  414. input plugin</a></h3>
  415. <div class="level3">
  416. <p>The fields listed below may not work for all file formats.</p></div>
  417. <h4><a id="trackartist" name="trackartist">%trackartist%</a></h4>
  418. <div class="level4"><p>Returns the Track Artist field (equivalent to Artist), if different to Album Artist.<br/>
  419. Winamp 5.3+ Only.</p></div>
  420. <h4><a id="mood" name="mood">%mood%</a></h4>
  421. <div class="level4"><p>Returns the Mood field.<br/>Winamp 5.3+ Only.</p></div>
  422. <h4><a id="bpm" name="bpm">%bpm%</a></h4>
  423. <div class="level4"><p>Returns the BPM (Beats Per Minute), if data&#47;field exists.<br/>Winamp 5.3+ Only.</p></div>
  424. <h4><a id="key" name="key">%key%</a></h4>
  425. <div class="level4"><p>Returns the Key field (eg. E Minor), if it exists.<br/>Winamp 5.3+ Only.</p></div>
  426. <h4><a id="lyricist" name="lyricist">%lyricist%</a></h4>
  427. <div class="level4"><p>Returns the Lyricist field.<br/>Winamp 5.3+ Only.</p></div>
  428. <h4><a id="conductor" name="conductor">%conductor%</a></h4>
  429. <div class="level4"><p>Returns the Conductor field.<br/>Winamp 5.3+ Only.</p></div>
  430. <h4><a id="tool" name="tool">%tool%</a></h4>
  431. <div class="level4"><p>Returns the Encoded&#47;Tool (software used to rip&#47;encode track) field, eg. Winamp 5.34.<br/>
  432. Winamp 5.3+ Only.</p></div>
  433. <h4><a id="family" name="family">%family%</a></h4>
  434. <div class="level4"><p>Returns the filetype's Family, eg. M4A returns: MPEG-4 Audio File Format<br/>Winamp 5.5+ Only.</p></div>
  435. <h4><a id="encoder" name="encoder">%encoder%</a></h4>
  436. <div class="level4"><p>Returns the Encoder, eg. LAME 3.97<br/>Winamp 5.3+ Only.</p></div>
  437. <h4><a id="isrc" name="isrc">%ISRC%</a></h4>
  438. <div class="level4">
  439. <p>International Standard Recording Code, or ISO 3901 (<a class="urlextern" title="http://www.id3.org/isrc.html"
  440. href="http://www.id3.org/isrc.html" rel="nofollow" target="_blank">Info</a>)<br/>Winamp 5.3+ Only.
  441. </p></div>
  442. <h4><a id="replaygain_track_gain" name="replaygain_track_gain">%replaygain_track_gain%</a></h4>
  443. <div class="level4"><p>Returns the ReplayGain Track Gain value (eg. -3.16 dB), if it exists.<br/>
  444. Winamp 5.3+ Only.</p></div>
  445. <h4><a id="replaygain_album_gain" name="replaygain_album_gain">%replaygain_album_gain%</a></h4>
  446. <div class="level4"><p>Returns the ReplayGain Album Gain value, if it exists.<br/>
  447. Winamp 5.3+ Only.</p></div>
  448. <h4><a id="replaygain_track_peak" name="replaygain_track_peak">%replaygain_track_peak%</a></h4>
  449. <div class="level4"><p>Returns the ReplayGain Track Peak value, if it exists.<br/>
  450. Winamp 5.3+ Only.</p></div>
  451. <h4><a id="replaygain_album_peak" name="replaygain_album_peak">%replaygain_album_peak%</a></h4>
  452. <div class="level4"><p>Returns the ReplayGain Album Peak value, if it exists.<br/>
  453. Winamp 5.3+ Only.</p></div>
  454. <h4><a id="gain" name="gain">%gain%</a></h4>
  455. <div class="level4"><p>Returns the Gain value, if it exists.<br/>Winamp 5.3+ Only.</p></div>
  456. <h2><a id="functions" name="functions">Functions</a></h2>
  457. <div class="level2">
  458. <p>Notes: Be careful about spaces after commas. <i>$if(%title%, Has A Title,
  459. Has No Title)</i> will display<br/>&#8220;&nbsp;Has A Title&#8221; (note leading
  460. space)<br/><b>not</b> &#8220;Has A Title&#8221;.<br/>The proper form should be
  461. <i>$if(%title%,Has A Title,Has No Title)</i>.<br/></p></div>
  462. <h3><a id="control_flow" name="control_flow">Control Flow</a></h3>
  463. <div class="level3"></div>
  464. <h4><a id="conditional_section" name="conditional_section">[...] Conditional
  465. section</a></h4>
  466. <div class="level4"></div>
  467. <h4><a id="if" name="if">$if</a></h4>
  468. <div class="level4">
  469. <p><b>Parameters:</b> <i>(a, then,
  470. else)</i><br/><b>Returns:</b> If <i>a</i> contains at least one
  471. valid, non-empty field, <i>then</i> is evaluated and returned, otherwise the
  472. <i>else</i> parameter is. Note that $if(A,A,B) is equivalent to
  473. $if2(A,B)<br/><b>Example:</b> <i>$if(%artist%,Has an artist tag,Has no
  474. artist tag)</i></p></div>
  475. <h4><a id="if2" name="if2">$if2</a></h4>
  476. <div class="level4">
  477. <p><b>Parameters:</b> <i>(a, else)</i><br/><b>Returns:</b>
  478. If <i>a</i> contains a valid, non-empty field, <i>a</i> is evaluated and
  479. returned, otherwise the <i>else</i> parameter is.<br/><b>Example:</b>
  480. <i>$if2(%album%,no-album)</i> </p></div>
  481. <h4><a id="if3" name="if3">$if3</a></h4>
  482. <div class="level4">
  483. <p><b>Parameters:</b> <i>(a1, ..., aN,
  484. else)</i><br/><b>Returns:</b> If one of <i>a1</i>... <i>aN</i>
  485. contains a valid, non-empty field, the value is evaluated and returned,
  486. otherwise the <i>else</i> parameter is used.<br/><b>Example:</b>
  487. <i>$if3(%artist%,%filename%,%album%,no field)</i></p></div>
  488. <h4><a id="decode" name="decode">$decode</a></h4>
  489. <div class="level4">
  490. <p><b>Parameters:</b> <i>(a, b1, c1, ..., bN, cN,
  491. else)</i><br/><b>Returns:</b> <i>cN</i> or <i>else</i>. A
  492. switch/case function, which determines which <i>bN</i> parameter is equal to
  493. <i>a</i> and returns the corresponding <i>cN</i> parameter. If none are
  494. matched, it returns the final parameter
  495. <i>else</i>.<br/><b>Example:</b>
  496. <i>$decode($fileext(%filename%),MP3,MPEG-1 Layer 3,MP4,MPEG-4 Container,Other)</i></p>
  497. <p>Winamp 5.2+ Only.</p></div>
  498. <h4><a id="ifgreater" name="ifgreater">$ifgreater</a></h4>
  499. <div class="level4">
  500. <p><b>Parameters:</b> <i>(x1, x2, then,
  501. else)</i><br/><b>Returns:</b> Compares the integer numbers x1 and x2,
  502. if x1 is greater than x2, <i>then</i> is evaluated and its value returned.
  503. Otherwise the <i>else</i> part is evaluated and its value
  504. returned.<br/><b>Example:</b> <i>$ifgreater(%rating%,2,Highly rated
  505. song,Not highly rated song)</i></p>
  506. <p>Winamp 5.2+ Only.</p></div>
  507. <h4><a id="iflonger" name="iflonger">$iflonger</a></h4>
  508. <div class="level4">
  509. <p><b>Parameters:</b> <i>(a1, x1, then,
  510. else)</i><br/><b>Returns:</b> Compares whether the length of string a1
  511. is longer than x1 characters, if a1 is longer, the <i>then</i> part is evaluated and its value returned. Otherwise the <i>else</i> part is evaluated and its value
  512. returned.<br/><b>Example:</b> <i>$iflonger(%title%,15,A long title,A
  513. short title)</i></p>
  514. <p>Winamp 5.2+ Only.</p></div>
  515. <h4><a id="ifstrequal2" name="ifstrequal2">$IfStrEqual2</a></h4>
  516. <div class="level4">
  517. <p><b>Parameters:</b> <i>(A, B, then,
  518. else)</i><br/><b>Returns:</b> If <i>A = B</i> do <i>then</i> else
  519. do <i>else</i><br/>
  520. <b>Example:</b> <i>$IfStrEqual2(%year%,2007,New!:,Old:)</i><br/>
  521. <b>Example:</b> <i>$IfStrEqual2(%type%,1,'(Video)','(Audio)')</i></p>
  522. <p>Winamp 5.2+ Only.</p></div>
  523. <h4><a id="ifstrequal" name="ifstrequal">$IfStrEqual</a></h4>
  524. <div class="level4">
  525. <p><b>Parameters:</b> <i>(A, B,
  526. then)</i><br/><b>Returns:</b> If <i>A = B</i> do <i>then</i> else
  527. nothing<br/><b>Example:</b> <i>$IfStrEqual(%year%,2007,New!:)</i>
  528. will print &#8220;New!&#8221; if the media was published in 2007.</p>
  529. <p>Winamp 5.2+ Only.</p></div>
  530. <h3><a id="logic_operations" name="logic_operations">Logic Operations</a></h3>
  531. <div class="level3"></div>
  532. <h4><a id="and" name="and">$and</a></h4>
  533. <div class="level4">
  534. <p>&#8211; Removed &#8211;<br/><b>Parameters:</b> <i>(%a%, %b%)</i> &#8211; The fields
  535. to check if populated.<br/><b>Returns:</b> 1 if the fields %a% and %b%
  536. are populated. An empty string if not. (?????)<br/><b>Example:</b>
  537. <i>$if($and(%artist%,%title%),Has both artist and title,One field is
  538. missing)</i></p>
  539. <p>Winamp 5.2+ Only.</p></div>
  540. <h3><a id="arithmetic_operations" name="arithmetic_operations">Arithmetic
  541. Operations</a></h3>
  542. <div class="level3"></div>
  543. <h4><a id="mod" name="mod">$mod</a></h4>
  544. <div class="level4">
  545. <p><b>Parameters:</b> <i>(x1, x2)</i><br/><b>Returns:</b>
  546. remainder of a division of <i>x1</i> by
  547. <i>x2</i><br/><b>Example:</b> <i>$mod(21,8)</i> returns &#8220;5&#8221;. </p>
  548. <p>Winamp 5.2+ Only.</p></div>
  549. <h4><a id="div" name="div">$div</a></h4>
  550. <div class="level4">
  551. <p><b>Parameters:</b> <i>(x1, x2)</i><br/><b>Returns:</b>
  552. x1 / x2. Result of a division of <i>x1</i> by
  553. <i>x2</i><br/><b>Example:</b> <i>$div(60,10)</i> </p>
  554. <p>Winamp 5.2+ Only.</p></div>
  555. <h4><a id="mul" name="mul">$mul</a></h4>
  556. <div class="level4">
  557. <p><b>Parameters:</b> <i>(x1,x2,...,xn)</i> - List of numbers to
  558. multiply<br/><b>Returns:</b> x1 * x2 * ... * xn. The supplied numbers
  559. multiplied<br/><b>Example:</b> <i>$mul(7,8,3,4)</i> </p>
  560. <p>Winamp 5.2+ Only.</p></div>
  561. <h4><a id="muldiv" name="muldiv">$muldiv</a></h4>
  562. <div class="level4">
  563. <p><b>Parameters:</b> <i>(x1, x2,
  564. x3)</i><br/><b>Returns:</b> x1 * x2 / 3. <i>x1</i> multiplied by
  565. <i>x2</i>, divided by <i>x3</i>. Result is rounded to nearest
  566. integer.<br/><b>Example:</b> <i>$muldiv(10,6,3)</i> returns &#8220;20&#8221;.
  567. </p>
  568. <p>Winamp 5.2+ Only.</p></div>
  569. <h4><a id="sub" name="sub">$sub</a></h4>
  570. <div class="level4">
  571. <p><b>Parameters:</b> <i>(x1,x2,...,xn)</i> - List of numbers to
  572. subtract<br/><b>Returns:</b> x1 - x2 - ... - xn. The result of x2...xn
  573. subtracted from x1.<br/><b>Example:</b> <i>$sub(25,1,3,2,3)</i> </p>
  574. <p>Winamp 5.2+ Only.</p></div>
  575. <h4><a id="add" name="add">$add</a></h4>
  576. <div class="level4">
  577. <p><b>Parameters:</b> <i>(x1,x2,...,xn)</i> - List of numbers to
  578. add<br/><b>Returns:</b> x1 + x2 +...+ xn. The addition of all the
  579. numbers supplied<br/><b>Example:</b>
  580. <i>$add(2,3,%playcount%,%rating%)</i> </p>
  581. <p>Winamp 5.2+ Only.</p></div>
  582. <h4><a id="greater" name="greater">$greater</a></h4>
  583. <div class="level4">
  584. <p><b>Parameters:</b> <i>(x1, x2)</i> - Two numbers to
  585. compare<br/><b>Returns:</b> 1 if <i>x1</i> is greater than
  586. <i>x2</i>, otherwise nothing. Similar in use to
  587. $ifgreater()<br/><b>Example:</b> <i>$greater(3,2)</i> &#8211; note does not
  588. appear to work within a $if() function. </p>
  589. <p>Winamp 5.2+ Only.</p></div>
  590. <h4><a id="max" name="max">$max</a></h4>
  591. <div class="level4">
  592. <p><b>Parameters:</b> <i>(x1,...,xn)</i> - List of numbers to
  593. compare<br/><b>Returns:</b> The largest number in the arguments
  594. supplied<br/><b>Example:</b> <i>$max(7,8,3,4)</i> </p>
  595. <p>Winamp 5.2+ Only.</p></div>
  596. <h4><a id="min" name="min">$min</a></h4>
  597. <div class="level4">
  598. <p><b>Parameters:</b> <i>(x1,...,xn)</i> - List of numbers to
  599. compare<br/><b>Returns:</b> The smallest number in the arguments
  600. supplied<br/><b>Example:</b> <i>$min(7,8,3,4)</i> </p>
  601. <p>Winamp 5.2+ Only.</p></div>
  602. <h3><a id="string_operations" name="string_operations">String Operations</a></h3>
  603. <div class="level3"></div>
  604. <h4><a id="lower" name="lower">$lower</a></h4>
  605. <div class="level4">
  606. <p><b>Parameters:</b> <i>(a1)</i><br/><b>Returns:</b> lower
  607. case of <i>a1</i><br/><b>Example:</b> <i>$lower(%title%)</i>
  608. </p></div>
  609. <h4><a id="upper" name="upper">$upper</a></h4>
  610. <div class="level4">
  611. <p><b>Parameters:</b> <i>(a1)</i><br/><b>Returns:</b> upper
  612. case of <i>a1</i><br/><b>Example:</b> <i>$upper(%title%)</i>
  613. </p></div>
  614. <h4><a id="replace" name="replace">$replace</a></h4>
  615. <div class="level4">
  616. <p><b>Parameters:</b> <i>(a1, a2,
  617. a3)</i><br/><b>Returns:</b> <i>a1</i> with all occurences of
  618. <i>a2</i> replaced by <i>a3</i><br/><b>Example:</b>
  619. <i>$replace(dum,u,o)</i> writes &#8220;dom&#8221;. </p>
  620. <p>Winamp 5.2+ Only.</p></div>
  621. <h4><a id="left" name="left">$left</a></h4>
  622. <div class="level4">
  623. <p><b>Parameters:</b> <i>(a1, x1)</i><br/><b>Returns:</b>
  624. the first <i>x1</i> characters of <i>a1</i><br/><b>Example:</b>
  625. <i>$left(%title%)</i> </p>
  626. <p>Winamp 5.2+ Only.</p></div>
  627. <h4><a id="right" name="right">$right</a></h4>
  628. <div class="level4">
  629. <p><b>Parameters:</b> <i>(a1, x1)</i><br/><b>Returns:</b>
  630. the last <i>x1</i> characters of <i>a1</i><br/><b>Example:</b>
  631. <i>$right(%title%)</i> </p>
  632. <p>Winamp 5.2+ Only.</p></div>
  633. <h4><a id="len" name="len">$len</a></h4>
  634. <div class="level4">
  635. <p><b>Parameters:</b> <i>(a1)</i><br/><b>Returns:</b> the
  636. number of characters of <i>a1</i><br/><b>Example:</b>
  637. <i>$len(%artist%)</i> </p>
  638. <p>Winamp 5.2+ Only.</p></div>
  639. <h4><a id="substr" name="substr">$substr</a></h4>
  640. <div class="level4">
  641. <p><b>Parameters:</b> TODO: <i>(a1,
  642. a2)</i><br/><b>Returns:</b> TODO:
  643. <i>a1</i><br/><b>Example:</b> TODO: <i>$substr()</i> </p>
  644. <p>Winamp 5.2+ Only.</p></div>
  645. <h4><a id="strstr" name="strstr">$strstr</a></h4>
  646. <div class="level4">
  647. <p><b>Parameters:</b> <i>(a1, a2)</i><br/><b>Returns:</b>
  648. index of first occurence of string <i>a2</i> in
  649. <i>a1</i><br/><b>Example:</b> <i>$strstr(aacbbabb,ab)</i> returns
  650. &#8220;6&#8221;. </p>
  651. <p>Winamp 5.2+ Only.</p></div>
  652. <h4><a id="strrchr" name="strrchr">$strrchr</a></h4>
  653. <div class="level4">
  654. <p><b>Parameters:</b> <i>(a1, a2)</i><br/><b>Returns:</b>
  655. index of last occurence of character <i>a2</i> in
  656. <i>a1</i><br/><b>Example:</b> <i>$strrchr(aacbbabb,a)</i> returns
  657. &#8220;6&#8221;. </p>
  658. <p>Winamp 5.2+ Only.</p></div>
  659. <h4><a id="strlchr" name="strlchr">$strlchr</a></h4>
  660. <div class="level4">
  661. <p><b>Parameters:</b> <i>(a1, a2)</i><br/><b>Returns:</b>
  662. index of first occurence of character <i>a2</i> in
  663. <i>a1</i><br/><b>Example:</b> <i>$strlchr(aacbbabb,a)</i> returns
  664. &#8220;1&#8221;. </p>
  665. <p>Winamp 5.2+ Only.</p></div>
  666. <h4><a id="strchr" name="strchr">$strchr</a></h4>
  667. <div class="level4">
  668. <p><b>Parameters:</b> <i>(a1, a2)</i><br/><b>Returns:</b>
  669. index of first occurence of character <i>a2</i> in
  670. <i>a1</i><br/><b>Example:</b> <i>$strchr(aacbbabb,a)</i> returns
  671. &#8220;1&#8221; (same as <i>$strlchr()</i> ??). </p>
  672. <p>Winamp 5.2+ Only.</p></div>
  673. <h4><a id="shortest" name="shortest">$shortest</a></h4>
  674. <div class="level4">
  675. <p><b>Parameters:</b> <i>(a1, a2)</i><br/><b>Returns:</b>
  676. <i>a1</i> or <i>a2</i> based on which has the shorter
  677. length.<br/><b>Example:</b> <i>$shortest(%album%,%folder%)</i>
  678. </p></div>
  679. <h4><a id="longest" name="longest">$longest</a></h4>
  680. <div class="level4">
  681. <p><b>Parameters:</b> <i>(a1, a2)</i><br/><b>Returns:</b>
  682. <i>a1</i> or <i>a2</i> based on which has the greater
  683. length.<br/><b>Example:</b> <i>$longest(%album%,%folder%)</i>
  684. </p></div>
  685. <h4><a id="abbr" name="abbr">$abbr</a></h4>
  686. <div class="level4">
  687. <p><b>Parameters:</b> <i>(a1, x1)</i><br/>
  688. <b>Returns:</b> <i>a1</i> abbreviated.<br/>
  689. <b>Examples:</b> <i>$abbr(%album%)</i> converts Album name of eg. &#8220;Final Fantasy VI&#8221; to &#8220;FFVI&#8221;.<br/>
  690. <i>$abbr(Advanced Title Formatting,10)</i> writes &#8220;ATF&#8221;.<br/>
  691. <i>$abbr(%album%,10)</i> writes abbreviated Album name, only if longer than 10 char's.<br/>
  692. <i>x1</i> is optional. If defined,
  693. <i>a1</i> will only be abbreviated when its length exceeds <i>x1</i> char's.</p></div>
  694. <h4><a id="padcut" name="padcut">$padcut</a></h4>
  695. <div class="level4">
  696. <p><b>Parameters:</b> <i>(a1, x2)</i><br/><b>Returns:</b>
  697. <i>a1</i> padded with spaces or cut off, resulting in a string of <i>x2</i>
  698. characters<br/><b>Example:</b> <i>$padcut(%artist%,15)</i> </p></div>
  699. <h4><a id="cut" name="cut">$cut</a></h4>
  700. <div class="level4">
  701. <p><b>Parameters:</b> <i>(a1, x2)</i><br/><b>Returns:</b>
  702. <i>a1</i>, cut off after the <i>x2</i>th
  703. character<br/><b>Example:</b> <i>$cut(%comment%,15)</i> writes the first 15 characters of the Comment field.</p></div>
  704. <h4><a id="pad" name="pad">$pad</a></h4>
  705. <div class="level4">
  706. <p><b>Parameters:</b> <i>(string, num,
  707. padstr)</i><br/><b>Returns:</b> <i>string</i> padded to at least
  708. <i>num</i> chars, with spaces by default, or specify a character (or repeating
  709. string) as <i>padstr</i>.<br/><b>Example:</b>
  710. <i>$pad(%artist%,40)</i>, or <i>$pad(%artist%,40,.)</i> to pad with periods.
  711. </p></div>
  712. <h4><a id="lpad" name="lpad">$lpad</a></h4>
  713. <div class="level4">
  714. <p><b>Parameters:</b> <i>(string, num,
  715. padstr)</i><br/><b>Returns:</b> <i>string</i> padded to at least
  716. <i>num</i> chars on the left, with spaces by default, or specify a character
  717. (or repeating string) as <i>padstr</i>.<br/><b>Example:</b>
  718. <i>$lpad(%tracknumber%,3)</i>, or <i>$lpad(%tracknumber%,3,0)</i> to pad
  719. zeros in front. </p>
  720. <p>Winamp 5.2+ Only.</p></div>
  721. <h4><a id="trim" name="trim">$trim</a></h4>
  722. <div class="level4">
  723. <p><b>Parameters:</b> <i>(a1)</i><br/><b>Returns:</b>
  724. <i>a1</i> without any leading or trailing spaces<br/><b>Example:</b>
  725. <i>$trim(%artist%)</i> </p>
  726. <p>Winamp 5.2+ Only.</p></div>
  727. <h4><a id="repeat" name="repeat">$repeat</a></h4>
  728. <div class="level4">
  729. <p><b>Parameters:</b> <i>(a1, x1)</i><br/><b>Returns:</b>
  730. <i>a1</i> repeated <i>x1</i> times.<br/><b>Example:</b>
  731. <i>$repeat(*,%rating%)</i> </p>
  732. <p>($fill() performed this function in Winamp 5.2 and was removed after 5.21.)
  733. </p></div>
  734. <h4><a id="caps" name="caps">$caps</a></h4>
  735. <div class="level4">
  736. <p><b>Parameters:</b> <i>(a1)</i><br/><b>Returns:</b> lower
  737. case of <i>a1</i>, with first letter of each word in upper
  738. case<br/><b>Example:</b> <i>$caps(%artist%)</i> </p></div>
  739. <h4><a id="caps2" name="caps2">$caps2</a></h4>
  740. <div class="level4">
  741. <p><b>Parameters:</b> <i>(a1)</i><br/><b>Returns:</b>
  742. <i>a1</i>, with first letter of each word in upper
  743. case<br/><b>Example:</b> <i>$caps2(%artist%)</i> </p></div>
  744. <h4><a id="fileext" name="fileext">$fileext</a></h4>
  745. <div class="level4">
  746. <p><b>Parameters:</b> <i>(a1)</i><br/><b>Returns:</b> file
  747. extension of <i>a1</i><br/><b>Example:</b>
  748. <i>$fileext(%filename%)</i> </p></div>
  749. <h4><a id="filepart" name="filepart">$filepart</a></h4>
  750. <div class="level4">
  751. <p><b>Parameters:</b> <i>(a1)</i><br/><b>Returns:</b>
  752. filename of <i>a1</i> (i.e. without the leading
  753. path)<br/><b>Example:</b> <i>$filepart(%filename%)</i> </p></div>
  754. <h4><a id="filename1" name="filename1">$filename</a></h4>
  755. <div class="level4">
  756. <p><b>Parameters:</b> <i>(a1)</i><br/><b>Returns:</b>
  757. filename of <i>a1</i> (i.e. without the leading
  758. path)<br/><b>Example:</b> <i>$filename(%filename%)</i> </p></div>
  759. <h4><a id="directory" name="directory">$directory</a></h4>
  760. <div class="level4">
  761. <p><b>Parameters:</b> <i>(a1, x1)</i><br/><b>Returns:</b>
  762. directory name of <i>a1</i>, after going up by <i>x1</i>
  763. levels<br/><b>Example:</b> <i>$directory(%filename%,2)</i><br/>The
  764. above example will output &#8220;Music&#8221; if the full path of the file is
  765. &#8220;C:\Music\Artist - Album\Song.mp3&#8221;. <i>x1</i> is optional, default is 1. </p>
  766. <p>Winamp 5.2+ Only. </p></div>
  767. <h4><a id="split" name="split">$split</a></h4>
  768. <div class="level4">
  769. <p><b>Parameters:</b> <i>(a, token, which)</i><br/><b>Returns:</b> Splitting of disc and&#47;or track strings, eg. to show &quot;1&quot; instead of &quot;1&#47;11&quot;
  770. <br/><b>Example:</b> <i>[$num(%track%,2)$IfStrNotEqual($split(%track%,/,1),,/$num($split(%track%,/,1),2))]</i>
  771. </p>
  772. <p>Winamp 5.5+ Only.</p></div>
  773. <h4><a id="ext" name="ext">$ext</a></h4>
  774. <div class="level4">
  775. <p><b>Parameters:</b> <i>(a1)</i><br/><b>Returns:</b> file
  776. extension of <i>a1</i><br/><b>Example:</b> <i>$ext(%filename%)</i>
  777. </p>
  778. <p>Winamp 5.2+ Only.</p></div>
  779. <h4><a id="hex" name="hex">$hex</a></h4>
  780. <div class="level4">
  781. <p><b>Parameters:</b> <i>(x1, x2)</i><br/><b>Returns:</b>
  782. <i>x1</i> formatted as hexidecimal to <i>x2</i> number of digits, padded to
  783. the left with zeros.<br/><b>Example:</b> <i>$hex(%tracknumber%,4)</i>
  784. </p>
  785. <p>Winamp 5.2+ Only.</p></div>
  786. <h4><a id="dec" name="dec">$dec</a></h4>
  787. <div class="level4">
  788. <p><b>Parameters:</b> <i>(x1, x2)</i><br/><b>Returns:</b>
  789. <i>x1</i> zero padded to the left to form a <i>x2</i> digit
  790. number.<br/><b>Example:</b> <i>$dec(%tracknumber%,5)</i> </p>
  791. <p>Winamp 5.2+ Only.</p></div>
  792. <h4><a id="num" name="num">$num</a></h4>
  793. <div class="level4">
  794. <p><b>Parameters:</b> <i>(x1, x2)</i><br/><b>Returns:</b>
  795. <i>x1</i> zero padded to the left to form a <i>x2</i> digit
  796. number.<br/><b>Example:</b> <i>$num(%tracknumber%,5)</i><br/></p>
  797. <p>Winamp 5.2+ Only.</p></div>
  798. <h4><a id="null" name="null">$null</a></h4>
  799. <div class="level4">
  800. <p><b>Parameters:</b> Any number of
  801. parameters<br/><b>Returns:</b> Nothing<br/><b>Example:</b>
  802. <i>$null()</i><br/>Does absolutely nothing. It is useful mainly in places where
  803. a parameter is required, but you want an empty string. </p>
  804. <p>Winamp 5.2+ Only.</p></div>
  805. <h4><a id="pathlpart" name="pathlpart">$PathLPart</a></h4>
  806. <div class="level4">
  807. <p><b>Parameters:</b> <i>(a1, x1)</i><br/><b>Returns:</b>
  808. The first <i>x1</i> levels of <i>a1</i><br/><b>Example:</b>
  809. <i>$PathLPart(%filename%,2)</i><br/>The above example will output &#8220;C:\Music&#8221; if
  810. the full path of the file is &#8220;C:\Music\Sonic Youth - Daydream Nation\01 - Teen
  811. Age Riot.mp3&#8221;.<br/></p>
  812. <p>Winamp 5.3+ Only.</p></div>
  813. <h4><a id="pathrpart" name="pathrpart">$PathRPart</a></h4>
  814. <div class="level4">
  815. <p><b>Parameters:</b> <i>(a1, x1)</i><br/><b>Returns:</b>
  816. The last <i>x1</i> levels of <i>a1</i><br/><b>Example:</b>
  817. <i>$PathRPart(%filename%,2)</i><br/>The above example will output &#8220;Sonic Youth
  818. - Daydream Nation\01 - Teen Age Riot.mp3&#8221; if the full path of the file is
  819. &#8220;C:\Music\Sonic Youth - Daydream Nation\01 - Teen Age Riot.mp3&#8221;.<br/></p>
  820. <p>Winamp 5.3+ Only.</p></div>
  821. <h4><a id="pathltrim" name="pathltrim">$PathLTrim</a></h4>
  822. <div class="level4">
  823. <p><b>Parameters:</b> <i>(a1, x1)</i><br/><b>Returns:</b>
  824. <i>a1</i> minus the first <i>x1</i> levels of
  825. <i>a1</i><br/><b>Example:</b>
  826. <i>$PathLTrim(%filename%,1)</i><br/>The above example will output &#8220;Music\Sonic
  827. Youth - Daydream Nation\01 - Teen Age Riot.mp3&#8221; if the full path of the file is
  828. &#8220;C:\Music\Sonic Youth - Daydream Nation\01 - Teen Age Riot.mp3&#8221;.<br/></p>
  829. <p>Winamp 5.3+ Only.</p></div>
  830. <h4><a id="pathrtrim" name="pathrtrim">$PathRTrim</a></h4>
  831. <div class="level4">
  832. <p><b>Parameters:</b> <i>(a1, x1)</i><br/><b>Returns:</b>
  833. <i>a1</i> minus the last <i>x1</i> levels of
  834. <i>a1</i><br/><b>Example:</b>
  835. <i>$PathRTrim(%filename%,1)</i><br/>The above example will output
  836. &#8220;C:\Music\Sonic Youth - Daydream Nation&#8221; if the full path of the file is
  837. &#8220;C:\Music\Sonic Youth - Daydream Nation\01 - Teen Age Riot.mp3&#8221;.<br/></p>
  838. <p>Winamp 5.3+ Only.</p></div>
  839. <h3><a id="variables" name="variables">Variables</a></h3>
  840. <div class="level3"></div>
  841. <h4><a id="puts" name="puts">$puts</a></h4>
  842. <div class="level4">
  843. <p><b>Parameters:</b> <i>(name,
  844. value)</i><br/><b>Returns:</b> Stores <i>value</i> to the named
  845. variable <i>name</i>. It may be later retrieved using $get(<i>name</i>). Use
  846. $put() to store a value and also return the value with the one
  847. function.<br/><b>Example:</b> <i>$puts(artist_title,%artist% -
  848. %title%)</i> </p>
  849. <p>Winamp 5.2+ Only.</p></div>
  850. <h4><a id="put" name="put">$put</a></h4>
  851. <div class="level4">
  852. <p><b>Parameters:</b> <i>(name,
  853. value)</i><br/><b>Returns:</b> <i>value</i>. Stores <i>value</i>
  854. to the named variable <i>name</i>. It may be later retrieved using
  855. $get(<i>name</i>). Use $puts() to store a value without returning
  856. it.<br/><b>Example:</b> <i>$put(artist_title,%artist% - %title%)</i>
  857. </p>
  858. <p>Winamp 5.2+ Only.</p></div>
  859. <h4><a id="get" name="get">$get</a></h4>
  860. <div class="level4">
  861. <p><b>Parameters:</b> <i>(name)</i><br/><b>Returns:</b>
  862. <i>value</i> of <i>name</i> variable previously set by a $put() or $puts()
  863. function<br/><b>Example:</b> <i>$get(artist_title)</i> </p>
  864. <p>Winamp 5.2+ Only.</p></div>
  865. <h3><a id="system_info" name="system_info">System Info</a></h3>
  866. <div class="level3"></div>
  867. <h4><a id="systime_second" name="systime_second">$systime_second</a></h4>
  868. <div class="level4">
  869. <p><b>Parameters:</b> TODO: <i>(a1,
  870. a2)</i><br/><b>Returns:</b> TODO:
  871. <i>a1</i><br/><b>Example:</b> TODO: <i>$systime_second()</i> </p>
  872. <p>Winamp 5.2+ Only.</p></div>
  873. <h4><a id="systime_minute" name="systime_minute">$systime_minute</a></h4>
  874. <div class="level4">
  875. <p><b>Parameters:</b> TODO: <i>(a1,
  876. a2)</i><br/><b>Returns:</b> TODO:
  877. <i>a1</i><br/><b>Example:</b> TODO: <i>$systime_minute()</i> </p>
  878. <p>Winamp 5.2+ Only.</p></div>
  879. <h4><a id="systime_hour" name="systime_hour">$systime_hour</a></h4>
  880. <div class="level4">
  881. <p><b>Parameters:</b> TODO: <i>(a1,
  882. a2)</i><br/><b>Returns:</b> TODO:
  883. <i>a1</i><br/><b>Example:</b> TODO: <i>$systime_hour()</i> </p>
  884. <p>Winamp 5.2+ Only.</p></div>
  885. <h4><a id="systime_day" name="systime_day">$systime_day</a></h4>
  886. <div class="level4">
  887. <p><b>Parameters:</b> TODO: <i>(a1,
  888. a2)</i><br/><b>Returns:</b> TODO:
  889. <i>a1</i><br/><b>Example:</b> TODO: <i>$systime_day()</i> </p>
  890. <p>Winamp 5.2+ Only.</p></div>
  891. <h4><a id="systime_month" name="systime_month">$systime_month</a></h4>
  892. <div class="level4">
  893. <p><b>Parameters:</b> TODO: <i>(a1,
  894. a2)</i><br/><b>Returns:</b> TODO:
  895. <i>a1</i><br/><b>Example:</b> TODO: <i>$systime_month()</i> </p>
  896. <p>Winamp 5.2+ Only.</p></div>
  897. <h4><a id="systime_year" name="systime_year">$systime_year</a></h4>
  898. <div class="level4">
  899. <p><b>Parameters:</b> TODO: <i>(a1,
  900. a2)</i><br/><b>Returns:</b> TODO:
  901. <i>a1</i><br/><b>Example:</b> TODO: <i>$systime_year()</i> </p>
  902. <p>Winamp 5.2+ Only.</p></div>
  903. <h3><a id="others._todo" name="others._todo">Others. (TODO)</a></h3>
  904. <div class="level4">
  905. <h6><b>$select</b><br/><br/><b>$tab</b><br/><br/><b>$crlf</b><br/><br/><b>$char</b></h6></div>
  906. <h2><a id="examples" name="examples">Examples</a></h2>
  907. <div class="level2">
  908. <p>[ .... ] - displays contents of brackets only if at least one of the fields referenced inside has been found, eg.
  909. <i>[%artist% - ]</i> will show:&nbsp; &quot;Artist - &quot; &nbsp;only if the %artist% tag is populated,
  910. otherwise it will not show anything at all (including the hyphen and spaces).</p></div>
  911. <h3><a id="standard_atf" name="standard_atf">Standard ATF syntax</a></h3>
  912. <div class="level3"><p><b>Syntax:</b>&nbsp;[%artist%&nbsp;-&nbsp;][%album%&nbsp;-&nbsp;][$num(%track%,2)&nbsp;-&nbsp;]$if2(%title%,$filepart(%filename%))<br/>
  913. <b>Example:</b> Pink Floyd - Animals - 02 - Dogs</p></div>
  914. <div class="level3"><p></p></div>
  915. <div class="level4">
  916. <p></p></div>
  917. <h3><a id="advanced_atf" name="advanced_atf">Advanced ATF syntax</a></h3>
  918. <div class="level3"><p class="atf"><b>Syntax:</b>&nbsp;[$if2(%albumartist%,%artist%)&nbsp;-&nbsp;][%album%&nbsp;-&nbsp;][$num(%track%,2)&nbsp;-&nbsp;]<br/>
  919. <span class="indent">$IfStrNotEqual(%artist%,$if2(%albumartist%,%artist%),[%artist%&nbsp;-&nbsp;])</span><br/>
  920. <span class="indent">[$if2(%title%,$filepart(%filename%))][$if($fileext(%filename%),'&nbsp;&nbsp;&nbsp;[&nbsp;&nbsp;',)]</span><br/>
  921. <span class="indent">[%year%&nbsp;&nbsp;|&nbsp;&nbsp;][$fileext(%filename%)&nbsp;][$if(%bitrate%,&nbsp;'|'&nbsp;&nbsp;,)][%bitrate%&nbsp;'kbps'&nbsp;]</span><br/>
  922. <span class="indent">[$if($fileext(%filename%),']',)][&nbsp;&nbsp;&nbsp;$repeat(*,%rating%)&nbsp;]</span><br/>
  923. <b>Returns:</b>&nbsp;AlbumArtist&nbsp;-&nbsp;Album&nbsp;-&nbsp;##&nbsp;-&nbsp;Artist&nbsp;-&nbsp;Title&nbsp;&nbsp;[&nbsp;Year&nbsp;|&nbsp;Ext&nbsp;|&nbsp;Bitrate&nbsp;]&nbsp;&nbsp;StarRating<br/>
  924. <span class="indent2">if AlbumArtist is different to TrackArtist, otherwise shows Standard format.</span><br/>
  925. <b>Example:</b>&nbsp;Various&nbsp;-&nbsp;Arcana&nbsp;-&nbsp;01&nbsp;-&nbsp;Tripswitch&nbsp;-&nbsp;Calabi&nbsp;Yau&nbsp;&nbsp;&nbsp;[&nbsp;2006&nbsp;&nbsp;|&nbsp;&nbsp;mp3&nbsp;&nbsp;|&nbsp;&nbsp;205&nbsp;kbps&nbsp;]&nbsp;&nbsp;*****</p></div>
  926. <div class="level3"><p></p></div>
  927. <div class="level4">
  928. <p></p></div>
  929. </div>
  930. <div class="clearer"></div>
  931. <div class="stylefoot"><br/>
  932. <div class="meta">
  933. <div class="user"></div>
  934. <div class="doc"><!--advanced_title_formatting.htm - Last modified: 2007/04/27 by DJ Egg --></div>
  935. </div>
  936. <div class="bar" id="bar__bottom">
  937. <div class="bar-left" id="bar__bottomleft"></div>
  938. <div class="bar-right" id="bar__bottomright">
  939. <form action="" method="get">
  940. <a class="nolink" href="#top"><input class="button" title="Back to top" onclick="window.scrollTo(0, 0)" type="button" value="Back to top" /></a>
  941. </form>
  942. </div>
  943. <div class="clearer"></div>
  944. </div>
  945. </div>
  946. </div>
  947. <div class="no"><br/></div>
  948. </body>
  949. </html>