Justin Heiner | 43e7cb8 | 2002-08-22 02:26:08 +0000 | [diff] [blame] | 1 | Custom WPS Display |
Justin Heiner | 5268147 | 2002-09-05 16:52:47 +0000 | [diff] [blame] | 2 | File Format Specifications |
Justin Heiner | 43e7cb8 | 2002-08-22 02:26:08 +0000 | [diff] [blame] | 3 | |
Justin Heiner | a7a46c7 | 2002-08-27 01:05:19 +0000 | [diff] [blame] | 4 | Description / General Info |
| 5 | -------------------------- |
Justin Heiner | 7189bf2 | 2002-08-29 05:58:23 +0000 | [diff] [blame] | 6 | * 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 Stenberg | 3e92ef4 | 2002-09-06 23:25:24 +0000 | [diff] [blame] | 8 | * 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 Heiner | a7a46c7 | 2002-08-27 01:05:19 +0000 | [diff] [blame] | 10 | * All characters not preceded by % are displayed as typed. |
Linus Nielsen Feltzing | c6f234a | 2003-11-04 13:46:37 +0000 | [diff] [blame] | 11 | * A line beginning with # is a comment |
Justin Heiner | a7a46c7 | 2002-08-27 01:05:19 +0000 | [diff] [blame] | 12 | |
Justin Heiner | 43e7cb8 | 2002-08-22 02:26:08 +0000 | [diff] [blame] | 13 | File Location |
| 14 | ------------- |
Daniel Stenberg | 0cf2174 | 2002-10-10 14:44:39 +0000 | [diff] [blame] | 15 | Custom WPS files may be located anywhere on the drive. The only restriction is |
| 16 | that they must end in .wps. When you PLAY a .wps file, it'll be used for the |
| 17 | future WPS screens. If the "played" wps file is located in the /.rockbox |
Björn Stenberg | 80dbb87 | 2003-02-09 11:19:07 +0000 | [diff] [blame] | 18 | folder, it'll be remembered and used for subsequent restarts. Filenames in the |
| 19 | /.rockbox folder must be no more than 24 characters long. |
Justin Heiner | 43e7cb8 | 2002-08-22 02:26:08 +0000 | [diff] [blame] | 20 | |
| 21 | Tags |
| 22 | ---- |
Justin Heiner | a7a46c7 | 2002-08-27 01:05:19 +0000 | [diff] [blame] | 23 | ID3 Info Tags: |
Justin Heiner | a7a46c7 | 2002-08-27 01:05:19 +0000 | [diff] [blame] | 24 | %ia : ID3 Artist |
Björn Stenberg | 8498a48 | 2003-06-04 15:09:35 +0000 | [diff] [blame] | 25 | %ic : ID3 Composer |
Björn Stenberg | 862813d | 2002-09-01 20:00:05 +0000 | [diff] [blame] | 26 | %id : ID3 Album Name |
Björn Stenberg | a218ec0 | 2003-04-15 12:57:25 +0000 | [diff] [blame] | 27 | %ig : ID3 Genre Name |
Daniel Stenberg | 938d3b4 | 2002-12-05 18:38:01 +0000 | [diff] [blame] | 28 | %in : ID3 Track Number |
| 29 | %it : ID3 Track Title |
Björn Stenberg | 8498a48 | 2003-06-04 15:09:35 +0000 | [diff] [blame] | 30 | %iv : ID3 Version (1.0, 1.1, 2.2, 2.3, 2.4 or empty if no id3 tag) |
Daniel Stenberg | 938d3b4 | 2002-12-05 18:38:01 +0000 | [diff] [blame] | 31 | %iy : ID3 Year |
| 32 | |
| 33 | |
| 34 | Battery Info: |
Björn Stenberg | a218ec0 | 2003-04-15 12:57:25 +0000 | [diff] [blame] | 35 | %bl : Show numeric battery level in percent |
| 36 | %bt : Show estimated battery time left |
Björn Stenberg | 862813d | 2002-09-01 20:00:05 +0000 | [diff] [blame] | 37 | |
Justin Heiner | a7a46c7 | 2002-08-27 01:05:19 +0000 | [diff] [blame] | 38 | File Info Tags: |
Björn Stenberg | 862813d | 2002-09-01 20:00:05 +0000 | [diff] [blame] | 39 | %fb : File Bitrate (in kbps) |
| 40 | %ff : File Frequency (in Hz) |
Mats Lidell | 09ae8cb | 2002-09-01 21:13:07 +0000 | [diff] [blame] | 41 | %fm : File Name |
Daniel Stenberg | 938d3b4 | 2002-12-05 18:38:01 +0000 | [diff] [blame] | 42 | %fn : File Name (without extension) |
| 43 | %fp : File Path |
Justin Heiner | a7a46c7 | 2002-08-27 01:05:19 +0000 | [diff] [blame] | 44 | %fs : File Size (In Kilobytes) |
Björn Stenberg | 862813d | 2002-09-01 20:00:05 +0000 | [diff] [blame] | 45 | %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 Stenberg | ef41370 | 2002-09-06 23:57:09 +0000 | [diff] [blame] | 48 | %d3 : Third directory from end of file path. |
Björn Stenberg | 862813d | 2002-09-01 20:00:05 +0000 | [diff] [blame] | 49 | |
| 50 | Example for the the %dN commands: If the path is "/Rock/Kent/Isola/11 - |
| 51 | 747.mp3", %d1 is "Isola", %d2 is "Kent"... You get the picture. |
| 52 | |
Justin Heiner | a7a46c7 | 2002-08-27 01:05:19 +0000 | [diff] [blame] | 53 | Playlist/Song Info Tags: |
Björn Stenberg | 3e92ef4 | 2002-09-06 23:25:24 +0000 | [diff] [blame] | 54 | %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 Stenberg | 42f261e | 2003-03-11 12:49:36 +0000 | [diff] [blame] | 58 | %pf : Player: Full-line progress bar + time display |
Daniel Stenberg | 938d3b4 | 2002-12-05 18:38:01 +0000 | [diff] [blame] | 59 | %pc : Current Time In Song |
| 60 | %pe : Total Number of Playlist Entries |
Linus Nielsen Feltzing | bb572c4 | 2002-09-27 09:31:31 +0000 | [diff] [blame] | 61 | %pm : Peak Meter (Recorder only) |
| 62 | The entire line is used as volume peak meter. |
Robert Hak | 52f1bca | 2002-10-15 11:52:50 +0000 | [diff] [blame] | 63 | %pn : Playlist Name (Without path or extension) |
Justin Heiner | a7a46c7 | 2002-08-27 01:05:19 +0000 | [diff] [blame] | 64 | %pp : Playlist Position |
Justin Heiner | 87f5324 | 2002-08-30 03:08:02 +0000 | [diff] [blame] | 65 | %pr : Remaining Time In Song |
Daniel Stenberg | 938d3b4 | 2002-12-05 18:38:01 +0000 | [diff] [blame] | 66 | %ps : Shuffle. Shows 's' if shuffle mode is enabled. |
Justin Heiner | a7a46c7 | 2002-08-27 01:05:19 +0000 | [diff] [blame] | 67 | %pt : Total Track Time |
Björn Stenberg | 42f261e | 2003-03-11 12:49:36 +0000 | [diff] [blame] | 68 | %pv : Current volume |
Björn Stenberg | 862813d | 2002-09-01 20:00:05 +0000 | [diff] [blame] | 69 | |
Miika Pekkarinen | d9874b2 | 2005-08-21 19:17:50 +0000 | [diff] [blame] | 70 | Repeat mode tags: |
| 71 | %mf : repeat off, returns f |
| 72 | %ma : repeat all, returns a |
| 73 | %mo : repeat one, returns o |
| 74 | %ms : repeat shuffle, returns s |
| 75 | |
| 76 | Playback mode tags: |
| 77 | %mp : play, returns p |
| 78 | %mu : pause, returns u |
| 79 | %mw : fastforward, returns w |
| 80 | %mb : fastbackward, returns b |
| 81 | |
Björn Stenberg | 862813d | 2002-09-01 20:00:05 +0000 | [diff] [blame] | 82 | Conditional Tags (If/Else block): |
| 83 | %?xx<|> : Conditional: if the tag specified by "xx" has a value, the |
| 84 | text between the "<" and the "|" is displayed, else the text |
| 85 | between the "|" and the ">" is displayed. |
| 86 | The else part is optional, so the "|" does not have to be |
| 87 | specified if no else part is desired. The conditionals nest, |
| 88 | so the text in the if and else part can contain all % |
| 89 | commands, including conditionals. |
| 90 | |
Miika Pekkarinen | fe89d36 | 2005-08-21 20:18:24 +0000 | [diff] [blame] | 91 | Alignment Tags: |
| 92 | %al : Text is left aligned |
| 93 | %ac : Text is center aligned |
| 94 | %ar : Text is right aligned |
| 95 | |
| 96 | All alignment tags may be present in on line, but the need to be in the order |
| 97 | left - center - right. If the aligned texts overlap, they are merged. |
| 98 | |
Daniel Stenberg | caec53c | 2004-05-19 08:30:48 +0000 | [diff] [blame] | 99 | Next Song Info |
| 100 | -------------- |
| 101 | You can display information about the next song - the song that is about to |
| 102 | play after the one currently playing (unless you change the plan). |
| 103 | |
| 104 | If you use the uppercase versions of the three tags: F, I and D, they will |
| 105 | instead refer to the next song instead of the current one. Example: %Ig is |
| 106 | the genre name used in the next song and %Ff is the mp3 frequency. |
| 107 | |
| 108 | Take note that the next song information WILL NOT be available at all times, |
| 109 | but will most likely be available at the end of a song. We suggest you use the |
| 110 | conditional display tag a lot when displaying information about the next song! |
| 111 | |
Daniel Stenberg | d2b625f | 2004-01-14 07:59:06 +0000 | [diff] [blame] | 112 | Alternating Sublines |
| 113 | -------------------- |
| 114 | It is possible to group items on each line into 2 or more groups or "sublines". |
| 115 | Each subline will be displayed in succession on the line for a specified time, |
| 116 | alternating continuously through each defined subline. |
| 117 | |
| 118 | Items on a line are broken into sublines with the semicolon ';' character. The |
| 119 | display time for each subline defaults to 2 seconds unless modified by using |
| 120 | the '%t' tag to specify an alternate time (in seconds and optional tenths of a |
| 121 | second) for the subline to be displayed. |
| 122 | |
| 123 | Subline related special characters and tags: |
| 124 | ; : Split items on a line into separate sublines |
| 125 | %t : Set the subline display time. The '%t' is followed by either integer |
| 126 | seconds (%t5), or seconds and tenths of a second (%t3.5). |
| 127 | |
| 128 | |
| 129 | Each alternating subline can still be optionally scrolled while it is being |
| 130 | displayed, and scrollable formats can be displayed on the same line with |
| 131 | non-scrollable formats (such as track elapsed time) as long as they are |
| 132 | separated into different sublines. |
| 133 | |
| 134 | Example subline definition: |
| 135 | |
| 136 | %s%t4%ia;%s%it;%t3%pc %pr : Display id3 artist for 4 seconds, |
| 137 | Display id3 title for 2 seconds, |
| 138 | Display current and remaining track time |
| 139 | for 3 seconds, |
| 140 | repeat... |
| 141 | |
| 142 | Conditionals can be used with sublines to display a different set and/or number |
| 143 | of sublines on the line depending on the evaluation of the conditional. |
| 144 | |
| 145 | Example subline with conditionals: |
| 146 | |
| 147 | %?it<%t8%s%it|%s%fn>;%?ia<%t3%s%ia|%t0> |
| 148 | |
| 149 | The format above will do two different things depending if ID3 |
| 150 | tags are present. If the ID3 artist and title are present : |
| 151 | |
| 152 | Display id3 title for 8 seconds, |
| 153 | Display id3 artist for 3 seconds, |
| 154 | repeat... |
| 155 | |
| 156 | If the ID3 artist and title are not present : |
| 157 | Display the filename continuously. |
| 158 | |
| 159 | Note that by using a subline display time of 0 in one branch of a conditional, |
| 160 | a subline can be skipped (not displayed) when that condition is met. |
| 161 | |
| 162 | ----------- |
| 163 | |
Justin Heiner | a7a46c7 | 2002-08-27 01:05:19 +0000 | [diff] [blame] | 164 | Other Tags: |
Björn Stenberg | 862813d | 2002-09-01 20:00:05 +0000 | [diff] [blame] | 165 | %% : Display a '%' |
| 166 | %< : Display a '<' |
| 167 | %| : Display a '|' |
| 168 | %> : Display a '>' |
Daniel Stenberg | d2b625f | 2004-01-14 07:59:06 +0000 | [diff] [blame] | 169 | %; : Display a ';' |
Björn Stenberg | 862813d | 2002-09-01 20:00:05 +0000 | [diff] [blame] | 170 | %s : Indicate that the line should scroll. Can occur anywhere in |
Björn Stenberg | 954c0ce | 2002-12-20 12:18:16 +0000 | [diff] [blame] | 171 | a line (given that the text is displayed; see conditionals |
Björn Stenberg | a218ec0 | 2003-04-15 12:57:25 +0000 | [diff] [blame] | 172 | above). You can specify up to 10 scrolling lines. |
| 173 | Scrolling lines can not contain dynamic content such as timers, |
| 174 | peak meters or progress bars. |
Justin Heiner | 43e7cb8 | 2002-08-22 02:26:08 +0000 | [diff] [blame] | 175 | |
Justin Heiner | eb94e0b | 2002-09-06 06:14:52 +0000 | [diff] [blame] | 176 | Example File |
| 177 | ------------ |
Björn Stenberg | 862813d | 2002-09-01 20:00:05 +0000 | [diff] [blame] | 178 | %s%?in<%in - >%?it<%it|%fn> %?ia<[%ia%?id<, %id>]> |
| 179 | %pb%pc/%pt |
Justin Heiner | a7a46c7 | 2002-08-27 01:05:19 +0000 | [diff] [blame] | 180 | |
Björn Stenberg | 862813d | 2002-09-01 20:00:05 +0000 | [diff] [blame] | 181 | That is, "tracknum - title [artist, album]", where most fields are only |
| 182 | displayed if available. Could also be rendered as "filename" or |
| 183 | "tracknum - title [artist]". |
Björn Stenberg | 2042c50 | 2002-09-23 05:19:11 +0000 | [diff] [blame] | 184 | |
| 185 | Default |
| 186 | ------- |
Daniel Stenberg | 0cf2174 | 2002-10-10 14:44:39 +0000 | [diff] [blame] | 187 | If you haven't selected a .wps file in the .rockbox directory, you get the |
| 188 | hardcoded wps layout. The default WPS screen is for player: |
Björn Stenberg | 2042c50 | 2002-09-23 05:19:11 +0000 | [diff] [blame] | 189 | |
Linus Nielsen Feltzing | c6f234a | 2003-11-04 13:46:37 +0000 | [diff] [blame] | 190 | # Default WPS for Player |
Björn Stenberg | a218ec0 | 2003-04-15 12:57:25 +0000 | [diff] [blame] | 191 | %s%pp/%pe: %?it<%it|%fn> - %?ia<%ia|%d2> - %?id<%id|%d1> |
| 192 | %pc%?ps<*|/>%pt |
Björn Stenberg | 2042c50 | 2002-09-23 05:19:11 +0000 | [diff] [blame] | 193 | |
| 194 | and for recorder: |
| 195 | |
Linus Nielsen Feltzing | c6f234a | 2003-11-04 13:46:37 +0000 | [diff] [blame] | 196 | # Default WPS for Recorder |
Björn Stenberg | a218ec0 | 2003-04-15 12:57:25 +0000 | [diff] [blame] | 197 | %s%?it<%?in<%in. |>%it|%fn> |
| 198 | %s%?ia<%ia|%?d2<%d2|(root)>> |
| 199 | %s%?id<%id|%?d1<%d1|(root)>> %?iy<(%iy)|> |
| 200 | |
| 201 | %pc/%pt [%pp:%pe] |
| 202 | %fbkBit %?fv<avg|> %?iv<(id3v%iv)|(no id3)> |
Björn Stenberg | 2042c50 | 2002-09-23 05:19:11 +0000 | [diff] [blame] | 203 | %pb |
Björn Stenberg | 3a44d4d | 2002-10-11 12:15:49 +0000 | [diff] [blame] | 204 | %pm |