WPS tags: The player doesn't have peak meters. Fix a glitch in \nopt which introduced...
[Rockbox.git] / manual / appendix / wps_tags.tex
blob2a0145c3716544d4b90a435026d17e9fd872bcc7
1 % $Id$ %
2 \chapter{\label{ref:wps_tags}WPS Tags}
3 \section{Status Bar}
4 \begin{table}
5 \begin{tagmap}{}{}
6 \config{\%we} & Status Bar Enabled\\
7 \config{\%wd} & Status Bar Disabled\\
8 \end{tagmap}
9 \end{table}
10 These tags override the player setting for the display of the status bar.
11 They must be noted on their own line.
13 \section{ID3 Info}
14 \begin{table}
15 \begin{tagmap}{}{}
16 \config{\%ia} & ID3 Artist\\
17 \config{\%ic} & ID3 Composer\\
18 \config{\%id} & ID3 Album Name\\
19 \config{\%ig} & ID3 Genre Name\\
20 \config{\%in} & ID3 Track Number\\
21 \config{\%it} & ID3 Track Title\\
22 \config{\%iv} & ID3 Version (1.0, 1.1, 2.2, 2.3, 2.4 or empty if no id3 tag)\\
23 \config{\%iy} & ID3 Year\\
24 \end{tagmap}
25 \end{table}
26 Remember that this information is not always available, so use the
27 conditionals to show alternate information in preference to assuming.
29 \section{Power Related Information}
30 \begin{table}
31 \begin{tagmap}{}{}
32 \config{\%bl} & Show numeric battery level in percent.\\
33 & Can also be used in a conditional:
34 \config{\%?bl{\textless}-1{\textbar}0{\textbar}1{\textbar}%
35 2{\textbar}\ldots{\textbar}N{\textgreater}}\\
36 & Where the -1 value is used when the battery level isn't
37 known (it usually is).\\
38 \config{\%bv} & Show the battery level in volts\\
39 \config{\%bt} & Show estimated battery time left\\
40 \config{\%bp} & ``p'' if the charger is connected \\
41 & (only on targets that can charge batteries)\\
42 \config{\%bc} & ``c'' if the unit is currently charging the battery\\
43 & (only on targets that have software charge control or monitoring)\\
44 \config{\%bs} & Sleep timer. Shows the remaining time if the sleeptimer is set\\
45 \end{tagmap}
46 \end{table}
48 \section{File Info}
49 \begin{table}
50 \begin{tagmap}{}{}
51 \config{\%fb} & File Bitrate (in kbps)\\
52 \config{\%fc} & File Codec (e.g. ``MP3'' or ``FLAC''). %
53 This tag can also be used in a conditional tag, %
54 \config{\%?fc{\textless}mp1\-{\textbar}mp2\-{\textbar}mp3\-%
55 {\textbar}aiff\-{\textbar}wav\-{\textbar}vorbis\-{\textbar}flac\-%
56 {\textbar}mpc\-{\textbar}a52\-{\textbar}wavpack\-{\textbar}alac\-%
57 {\textbar}aac\-{\textbar}shn\-{\textbar}sid\-{\textbar}adx\-%
58 {\textbar}unknown{\textgreater}}.\\
59 & The codec order is as follows: MP1, MP2, MP3, AIFF, WAV,%
60 Ogg Vorbis (OGG), FLAC, MPC, AC3, WavPack (WV), ALAC, AAC,%
61 Shorten (SHN), SID, ADX.\\
62 \config{\%ff} & File Frequency (in Hz)\\
63 \config{\%fm} & File Name\\
64 \config{\%fn} & File Name (without extension)\\
65 \config{\%fp} & File Path\\
66 \config{\%fs} & File Size (In Kilobytes)\\
67 \config{\%fv} & ``(avg)'' if variable bit rate or ``'' if constant bit rate\\
68 \config{\%d1} & First directory from end of file path.\\
69 \config{\%d2} & Second directory from end of file path.\\
70 \config{\%d3} & Third directory from end of file path.\\
71 \end{tagmap}
72 \end{table}
73 Example for the \config{\%dN} commands: If the path is
74 ``/Rock/Kent/Isola/11 - 747.mp3'', \config{\%d1} is ``Isola'',
75 \config{\%d2} is ``Kent'' \dots{} You get the picture.
77 \section{Playlist/Song Info}
78 \begin{table}
79 \begin{tagmap}{}{}
80 \config{\%pb} & Progress Bar\\
81 \opt{player}{
82 & This will display a 1 character ``cup'' %
83 that empties as the time progresses.}
84 \opt{HAVE_LCD_BITMAP}{
85 & This will replace the entire line with a progress bar. \\
86 & You can set the height, position and width of the progressbar %
87 (in pixels): \config{\%pb{\textbar}height{\textbar}leftpos%
88 {\textbar}rightpos{\textbar}}} \\
89 \opt{player}{%
90 \config{\%pf} & Full-line progress bar \& time display\\
92 \config{\%pc} & Current Time In Song\\
93 \config{\%pe} & Total Number of Playlist Entries\\
94 \nopt{player}{%
95 \config{\%pm} & Peak Meter. The entire line is used as %
96 volume peak meter.\\%
98 \config{\%pn} & Playlist Name (Without path or extension)\\
99 \config{\%pp} & Playlist Position\\
100 \config{\%pr} & Remaining Time In Song\\
101 \config{\%ps} & Shuffle. Shows 's' if shuffle mode is enabled.\\
102 \config{\%pt} & Total Track Time\\
103 \config{\%pv} & Current volume (x dB). Can also be used in a conditional: \\
104 & \config{\%?pv{\textless}0{\textbar}1{\textbar}2{\textbar}\ldots%
105 {\textbar}N{\textgreater}}\\
106 \end{tagmap}
107 \end{table}
109 \section{Runtime Database}
110 \begin{table}
111 \begin{tagmap}{}{}
112 \config{\%rp} & Song playcount\\
113 \config{\%rr} & Song rating (0-10). This tag can also be used in a conditional tag, %
114 \config{\%?rr{\textless}0{\textbar}1{\textbar}2{\textbar}3{\textbar}%
115 4{\textbar}5{\textbar}6{\textbar}7{\textbar}8{\textbar}9{\textbar}%
116 10{\textgreater}}\\
117 \end{tagmap}
118 \end{table}
120 \opt{SWCODEC}{
121 \section{Sound (DSP) settings}
122 \begin{table}
123 \begin{tagmap}{}{}
124 \config{\%sp} & Display current playback pitch \\
125 \opt{SWCODEC}{
126 \config{\%xf} & Crossfade setting, in the order: Off, Shuffle, Skip, Always\\
127 \config{\%rg} & ReplayGain value in use (x.y dB). If used as a conditional,
128 Replaygain type in use: \config{\%?rg{\textless}Off{\textbar}Track%
129 {\textbar}Album{\textbar}TrackShuffle{\textbar}AlbumShuffle%
130 {\textbar}No tag{\textgreater}}\\
131 \config{\%xd} & Crossfeed setting\\
133 \end{tagmap}
134 \end{table}
136 \opt{h1xx,h300}{
137 \section{Hold Switches}
138 \begin{table}
139 \begin{tagmap}{}{}
140 \config{\%mh} & ``h'' if the main unit hold switch is on\\
141 \config{\%mr} & ``r'' if the remote hold switch is on\\
142 \end{tagmap}
143 \end{table}
146 \section{Virtual LED}
147 \begin{table}
148 \begin{tagmap}{}{}
149 \config{\%lh} & ``h'' if there is hard disk activity\\
150 \end{tagmap}
151 \end{table}
153 \section{Repeat Mode}
154 \begin{table}
155 \begin{tagmap}{}{}
156 \config{\%mm} & Repeat mode, 0-4, in the order: Off, All, One, Shuffle
157 \opt{player,recorder,recorderv2fm}{, A-B}\\
158 \end{tagmap}
159 \end{table}
160 Example: \config{\%?mm{\textless}Off{\textbar}All{\textbar}One{\textbar}Shuffle%
161 {\textbar}A-B{\textgreater}}
163 \section{Playback Mode Tags}
164 \begin{table}
165 \begin{tagmap}{}{}
166 \config{\%mp} & Play status, 0-4, in the order: Stop, Play, Pause,
167 Fast forward, Rewind\\
168 \end{tagmap}
169 \end{table}
170 Example: \config{\%?mp{\textless}Stop{\textbar}Play{\textbar}Pause{\textbar}%
171 Ffwd{\textbar}Rew{\textgreater}}
173 \section{Images}
174 \begin{table}
175 \begin{tagmap}{}{}
176 \nopt{archos}{%
177 \config{\%X{\textbar}filename.bmp{\textbar}}
178 & Load and set a backdrop image for the WPS. %
179 This image must be exactly the same size as your LCD.\\
181 \config{\%P{\textbar}filename.bmp{\textbar}}
182 & Load a Progress bar image for the WPS. Use \config{\%pb} tag to show the
183 progress bar\\
184 \config{\%x{\textbar}n{\textbar}filename{\textbar}x{\textbar}y{\textbar}}
185 & Load and display an image\\
186 & \config{n}: image ID (a-z and A-Z)\\
187 & \config{filename}: filename relative to \fname{/.rockbox/} and including .bmp\\
188 & \config{x}: x coordinate\\
189 & \config{y}: y coordinate.\\
190 \config{\%xl{\textbar}n{\textbar}filename{\textbar}x{\textbar}y{\textbar}}
191 & Preload an image for later display\\
192 & \config{n}: image ID (a-z and A-Z)\\
193 & \config{filename}: filename relative to \fname{/.rockbox/} and including .bmp\\
194 & \config{x}: x coordinate\\
195 & \config{y}: y coordinate.\\
196 \config{\%xdn} & Display a preloaded image\\
197 & \config{n}: image ID (a-z and A-Z)\\
198 \end{tagmap}
199 \end{table}
201 Example: image \fname{/.rockbox/bg.bmp} with ID ``a'' at 37, 109 would be:\\
202 \config{\%x{\textbar}a{\textbar}bg.bmp{\textbar}37{\textbar}109{\textbar}}
204 \note{
205 \begin{itemize}
206 \item The images must be in a rockbox compatible format (1 bit per pixel BMP)
207 \item The image tag must be on its own line
208 \item The ID is case sensitive, giving 52 different ID's
209 \item The size of the LCD screen for each player varies. See table below
210 for appropriate sizes of each device. The x and y coordinates must
211 repect each of the players' limits.
212 \end{itemize}
215 \section{Alignment}
216 \begin{table}
217 \begin{tagmap}{}{}
218 \config{\%al} & Text is left aligned\\
219 \config{\%ac} & Text is center aligned\\
220 \config{\%ar} & Text is right aligned\\
221 \end{tagmap}
222 \end{table}
223 All alignment tags may be present in one line, but they need to be in the
224 order left -- center -- right. If the aligned texts overlap, they are merged.
226 \section{Conditional Tags}
228 \begin{table}
229 \begin{tagmap}{}{}
230 \config{\%?xx{\textless}true{\textbar}false{\textgreater}}
231 & If / Else: Evaluate for true or false case \\
232 \config{\%?xx{\textless}alt1{\textbar}alt2{\textbar}alt3{\textbar}\dots{\textbar}else{\textgreater}}
233 & Enumerations: Evaluate for first / second / third / \dots / last condition \\
234 \end{tagmap}
235 \end{table}
237 \section{Other Tags}
238 \begin{table}
239 \begin{tagmap}{}{}
240 \config{\%\%} & Display a `\%'\\
241 \config{\%{\textless}} & Display a `{\textless}'\\
242 \config{\%{\textbar}} & Display a `{\textbar}'\\
243 \config{\%{\textgreater}} & Display a `{\textgreater}'\\
244 \config{\%;} & Display a `;'\\
245 \config{\%s} & Indicate that the line should scroll. Can occur
246 anywhere in a line (given that the text is
247 displayed; see conditionals above). You can specify
248 up to 10 scrolling lines. Scrolling lines can not
249 contain dynamic content such as timers, peak meters
250 or progress bars.\\
251 \end{tagmap}
252 \end{table}