blob: cf327c54a1dd1fe52782841db6ac68dcd12dbbf8 [file] [log] [blame]
Justin Heiner43e7cb82002-08-22 02:26:08 +00001Custom WPS Display
Justin Heiner52681472002-09-05 16:52:47 +00002File Format Specifications
Justin Heiner43e7cb82002-08-22 02:26:08 +00003
Justin Heinera7a46c72002-08-27 01:05:19 +00004Description / General Info
5--------------------------
Justin Heiner7189bf22002-08-29 05:58:23 +00006* The Custom WPS Display is used on both the Rockbox Player and Recorder,
7 as a means to customize the WPS to the user's likings.
Björn Stenberg3e92ef42002-09-06 23:25:24 +00008* After editing the .wps file, "play" it to make it take effect.
9* The file may be 2 lines long for the Player, and 10 lines for the Recorder.
Justin Heinera7a46c72002-08-27 01:05:19 +000010* All characters not preceded by % are displayed as typed.
Linus Nielsen Feltzingc6f234a2003-11-04 13:46:37 +000011* A line beginning with # is a comment
Justin Heinera7a46c72002-08-27 01:05:19 +000012
Justin Heiner43e7cb82002-08-22 02:26:08 +000013File Location
14-------------
Daniel Stenberg0cf21742002-10-10 14:44:39 +000015Custom WPS files may be located anywhere on the drive. The only restriction is
16that they must end in .wps. When you PLAY a .wps file, it'll be used for the
17future WPS screens. If the "played" wps file is located in the /.rockbox
Björn Stenberg80dbb872003-02-09 11:19:07 +000018folder, it'll be remembered and used for subsequent restarts. Filenames in the
19/.rockbox folder must be no more than 24 characters long.
Justin Heiner43e7cb82002-08-22 02:26:08 +000020
21Tags
22----
Justin Heinera7a46c72002-08-27 01:05:19 +000023ID3 Info Tags:
Justin Heinera7a46c72002-08-27 01:05:19 +000024 %ia : ID3 Artist
Björn Stenberg8498a482003-06-04 15:09:35 +000025 %ic : ID3 Composer
Björn Stenberg862813d2002-09-01 20:00:05 +000026 %id : ID3 Album Name
Björn Stenberga218ec02003-04-15 12:57:25 +000027 %ig : ID3 Genre Name
Daniel Stenberg938d3b42002-12-05 18:38:01 +000028 %in : ID3 Track Number
29 %it : ID3 Track Title
Björn Stenberg8498a482003-06-04 15:09:35 +000030 %iv : ID3 Version (1.0, 1.1, 2.2, 2.3, 2.4 or empty if no id3 tag)
Daniel Stenberg938d3b42002-12-05 18:38:01 +000031 %iy : ID3 Year
32
33
34Battery Info:
Björn Stenberga218ec02003-04-15 12:57:25 +000035 %bl : Show numeric battery level in percent
36 %bt : Show estimated battery time left
Björn Stenberg862813d2002-09-01 20:00:05 +000037
Justin Heinera7a46c72002-08-27 01:05:19 +000038File Info Tags:
Björn Stenberg862813d2002-09-01 20:00:05 +000039 %fb : File Bitrate (in kbps)
40 %ff : File Frequency (in Hz)
Mats Lidell09ae8cb2002-09-01 21:13:07 +000041 %fm : File Name
Daniel Stenberg938d3b42002-12-05 18:38:01 +000042 %fn : File Name (without extension)
43 %fp : File Path
Justin Heinera7a46c72002-08-27 01:05:19 +000044 %fs : File Size (In Kilobytes)
Björn Stenberg862813d2002-09-01 20:00:05 +000045 %fv : "(vbr)" if variable bit rate or "" if constant bit rate
46 %d1 : First directory from end of file path.
47 %d2 : Second directory from end of file path.
Björn Stenbergef413702002-09-06 23:57:09 +000048 %d3 : Third directory from end of file path.
Björn Stenberg862813d2002-09-01 20:00:05 +000049
50Example for the the %dN commands: If the path is "/Rock/Kent/Isola/11 -
51747.mp3", %d1 is "Isola", %d2 is "Kent"... You get the picture.
52
Justin Heinera7a46c72002-08-27 01:05:19 +000053Playlist/Song Info Tags:
Björn Stenberg3e92ef42002-09-06 23:25:24 +000054 %pb : Progress Bar
55 Player: This will display a 1 character "cup" that empties as the
56 progresses.
57 Recorder: This will replace the entire line with a progress bar.
Björn Stenberg42f261e2003-03-11 12:49:36 +000058 %pf : Player: Full-line progress bar + time display
Daniel Stenberg938d3b42002-12-05 18:38:01 +000059 %pc : Current Time In Song
60 %pe : Total Number of Playlist Entries
Linus Nielsen Feltzingbb572c42002-09-27 09:31:31 +000061 %pm : Peak Meter (Recorder only)
62 The entire line is used as volume peak meter.
Robert Hak52f1bca2002-10-15 11:52:50 +000063 %pn : Playlist Name (Without path or extension)
Justin Heinera7a46c72002-08-27 01:05:19 +000064 %pp : Playlist Position
Justin Heiner87f53242002-08-30 03:08:02 +000065 %pr : Remaining Time In Song
Daniel Stenberg938d3b42002-12-05 18:38:01 +000066 %ps : Shuffle. Shows 's' if shuffle mode is enabled.
Justin Heinera7a46c72002-08-27 01:05:19 +000067 %pt : Total Track Time
Björn Stenberg42f261e2003-03-11 12:49:36 +000068 %pv : Current volume
Björn Stenberg862813d2002-09-01 20:00:05 +000069
Miika Pekkarinen8f74e782008-03-08 08:19:42 +000070Database tags:
71 %rp : Playcount
72 %rr : Rating
73 %ra : Auto score
74
Miika Pekkarinend9874b22005-08-21 19:17:50 +000075Repeat mode tags:
76 %mf : repeat off, returns f
77 %ma : repeat all, returns a
78 %mo : repeat one, returns o
79 %ms : repeat shuffle, returns s
80
81Playback mode tags:
82 %mp : play, returns p
83 %mu : pause, returns u
84 %mw : fastforward, returns w
85 %mb : fastbackward, returns b
86
Björn Stenberg862813d2002-09-01 20:00:05 +000087Conditional Tags (If/Else block):
88 %?xx<|> : Conditional: if the tag specified by "xx" has a value, the
89 text between the "<" and the "|" is displayed, else the text
90 between the "|" and the ">" is displayed.
91 The else part is optional, so the "|" does not have to be
92 specified if no else part is desired. The conditionals nest,
93 so the text in the if and else part can contain all %
94 commands, including conditionals.
95
Miika Pekkarinenfe89d362005-08-21 20:18:24 +000096Alignment Tags:
97 %al : Text is left aligned
98 %ac : Text is center aligned
99 %ar : Text is right aligned
100
101All alignment tags may be present in on line, but the need to be in the order
102left - center - right. If the aligned texts overlap, they are merged.
103
Daniel Stenbergcaec53c2004-05-19 08:30:48 +0000104Next Song Info
105--------------
106You can display information about the next song - the song that is about to
107play after the one currently playing (unless you change the plan).
108
109If you use the uppercase versions of the three tags: F, I and D, they will
110instead refer to the next song instead of the current one. Example: %Ig is
111the genre name used in the next song and %Ff is the mp3 frequency.
112
113Take note that the next song information WILL NOT be available at all times,
114but will most likely be available at the end of a song. We suggest you use the
115conditional display tag a lot when displaying information about the next song!
116
Daniel Stenbergd2b625f2004-01-14 07:59:06 +0000117Alternating Sublines
118--------------------
119It is possible to group items on each line into 2 or more groups or "sublines".
120Each subline will be displayed in succession on the line for a specified time,
121alternating continuously through each defined subline.
122
123Items on a line are broken into sublines with the semicolon ';' character. The
124display time for each subline defaults to 2 seconds unless modified by using
125the '%t' tag to specify an alternate time (in seconds and optional tenths of a
126second) for the subline to be displayed.
127
128Subline related special characters and tags:
129 ; : Split items on a line into separate sublines
130 %t : Set the subline display time. The '%t' is followed by either integer
131 seconds (%t5), or seconds and tenths of a second (%t3.5).
132
133
134Each alternating subline can still be optionally scrolled while it is being
135displayed, and scrollable formats can be displayed on the same line with
136non-scrollable formats (such as track elapsed time) as long as they are
137separated into different sublines.
138
139 Example subline definition:
140
141 %s%t4%ia;%s%it;%t3%pc %pr : Display id3 artist for 4 seconds,
142 Display id3 title for 2 seconds,
143 Display current and remaining track time
144 for 3 seconds,
145 repeat...
146
147Conditionals can be used with sublines to display a different set and/or number
148of sublines on the line depending on the evaluation of the conditional.
149
150 Example subline with conditionals:
151
152 %?it<%t8%s%it|%s%fn>;%?ia<%t3%s%ia|%t0>
153
154 The format above will do two different things depending if ID3
155 tags are present. If the ID3 artist and title are present :
156
157 Display id3 title for 8 seconds,
158 Display id3 artist for 3 seconds,
159 repeat...
160
161 If the ID3 artist and title are not present :
162 Display the filename continuously.
163
164Note that by using a subline display time of 0 in one branch of a conditional,
165a subline can be skipped (not displayed) when that condition is met.
166
167-----------
168
Justin Heinera7a46c72002-08-27 01:05:19 +0000169Other Tags:
Björn Stenberg862813d2002-09-01 20:00:05 +0000170 %% : Display a '%'
171 %< : Display a '<'
172 %| : Display a '|'
173 %> : Display a '>'
Daniel Stenbergd2b625f2004-01-14 07:59:06 +0000174 %; : Display a ';'
Björn Stenberg862813d2002-09-01 20:00:05 +0000175 %s : Indicate that the line should scroll. Can occur anywhere in
Björn Stenberg954c0ce2002-12-20 12:18:16 +0000176 a line (given that the text is displayed; see conditionals
Björn Stenberga218ec02003-04-15 12:57:25 +0000177 above). You can specify up to 10 scrolling lines.
178 Scrolling lines can not contain dynamic content such as timers,
179 peak meters or progress bars.
Justin Heiner43e7cb82002-08-22 02:26:08 +0000180
Justin Heinereb94e0b2002-09-06 06:14:52 +0000181Example File
182------------
Björn Stenberg862813d2002-09-01 20:00:05 +0000183%s%?in<%in - >%?it<%it|%fn> %?ia<[%ia%?id<, %id>]>
184%pb%pc/%pt
Justin Heinera7a46c72002-08-27 01:05:19 +0000185
Björn Stenberg862813d2002-09-01 20:00:05 +0000186That is, "tracknum - title [artist, album]", where most fields are only
187displayed if available. Could also be rendered as "filename" or
188"tracknum - title [artist]".
Björn Stenberg2042c502002-09-23 05:19:11 +0000189
190Default
191-------
Daniel Stenberg0cf21742002-10-10 14:44:39 +0000192If you haven't selected a .wps file in the .rockbox directory, you get the
193hardcoded wps layout. The default WPS screen is for player:
Björn Stenberg2042c502002-09-23 05:19:11 +0000194
Linus Nielsen Feltzingc6f234a2003-11-04 13:46:37 +0000195# Default WPS for Player
Björn Stenberga218ec02003-04-15 12:57:25 +0000196%s%pp/%pe: %?it<%it|%fn> - %?ia<%ia|%d2> - %?id<%id|%d1>
197%pc%?ps<*|/>%pt
Björn Stenberg2042c502002-09-23 05:19:11 +0000198
199and for recorder:
200
Linus Nielsen Feltzingc6f234a2003-11-04 13:46:37 +0000201# Default WPS for Recorder
Björn Stenberga218ec02003-04-15 12:57:25 +0000202%s%?it<%?in<%in. |>%it|%fn>
203%s%?ia<%ia|%?d2<%d2|(root)>>
204%s%?id<%id|%?d1<%d1|(root)>> %?iy<(%iy)|>
205
206%pc/%pt [%pp:%pe]
207%fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)>
Björn Stenberg2042c502002-09-23 05:19:11 +0000208%pb
Björn Stenberg3a44d4d2002-10-11 12:15:49 +0000209%pm