Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: For Comment and Trial: "Alternating WPS Lines" Proposed WPS extension

For Comment and Trial: "Alternating WPS Lines" Proposed WPS extension

From: c s <rb_dev_at_yahoo.com>
Date: Thu, 17 Apr 2003 20:47:04 -0700 (PDT)

I wanted a better way other than using very long
scrolling lines to display all the information that I
wanted to see on wps within the limited player
display space, so I decided to extend the
functionality of the wps to accomplish this. I have
summarized what I have done to solicit input from
anyone who would like to try it out and/or make any
comments or suggestions.

My wps extension introduces a concept of alternating
"sub-lines".

An alternating sub-line is defined as a wps format
line which will be displayed on one line of the wps
for a specified time, followed by one or more
additional wps format lines which will be displayed on
the line for a specified time.

Every line of the wps can have it's own group of
sub-lines that are each displayed for a specified
time. The display presented on the wps for each line
will consist of the alternating consecutive display of
each sub-line defined for that line.

The sub-line concept is similar to specifying several
formats on one line and using scrolling so that they
all can be seen, except that sub-lines are more
powerful in the following ways:

1) Sub-lines that fit the width of the LCD will not
scroll but will simply be displayed on the line until
the next sub-line item is displayed (however sub-lines
that are longer than the width of the LCD can still be
scrolled).

2) Sub-lines can combine any wps formats, so you can
now display a non-scrollable format such as track
elapsed time followed by a scrolled format on the same
line.

3) The user has control over how long each sub-line
item is displayed before the next item is displayed.
For example, on one line you can:

  a. Display the Artist and Title ID3 tags
     for 5 seconds (scrolled), and then....
  b. Display file bit rate and file frequency
     for 1 second (not scrolled), and then....
  c. Display track elapsed time for 2 seconds
     (not scrolled), and then repeat the cycle.

4) The ability to control the time that each item is
displayed and the fact that long lines can be split
into smaller sub-lines that can be displayed with or
without scrolling makes for a display where each
individual item is much easier to read than if they
were all specified on one long line that is
continuously scrolled.

--------------------------------

Changes To The WPS Format Specification

This wps extension is backward compatible with the
current wps specification. Current wps definitions
will still display the same as they do now.

The wps format specification language is extended as
follows:

1) The ';' character is used to separate items on a
line into sub-lines.

2) The "%t[0-9]" tag is used to specify a time 0-9
(seconds) for the sub-line to be displayed before the
next sub-line is displayed. (example: %t3)

3) The "%;" tag can be used to escape the special
meaning of the ';' character and display a ';'
character on wps line.

Example wps sub-line specifications:

%s%t5%ia - %it;%t1%fb;%t2%pc %pr

This will display the artist and title ID3 tags for 5
seconds (scrolled if it's longer than the display
width), then display the file bit rate for 1 second
(not scrolled), then display the track current and
remaining time for 2 seconds (not scrolled).

Conditionals can be used within sub-line
specifications just as they are currently used for
single line specifications.

Here is a more complex sub-line specification that
uses conditionals (note that this is all one line
although it may be wrapped in this message):

%?ia<%t6%s%it by %ia|%t1No ID3
Info>;%?ia<%t0|%t5%sFilename:%fn>;%t1%fb kbps;%t1%ffHz

The format above will do two different things
depending if the artist ID3 tag is present:

If the Artist ID3 tag is defined, the wps line will
appear as follows:
"<ID3 title> by <ID3 artist>" displays for 5 seconds
(scrolled)
"<file bitrate> kbps" displays for 1 second
"<file frequency>Hz displays for 1 second

If the Artist ID3 tag is not defined, the wps line
will appear as follows:
"No ID3 Info" displays for 1 second
"Filename:<filename>" displays for 5 seconds
(scrolled)
"<file bitrate> kbps" displays for 1 second
"<file frequency>Hz displays for 1 second

Note that with the use of conditionals and using a
sub-line time of 0 inside the condition branch, a
different number of sub-lines can be displayed on the
line depending on the branch taken for the
conditional.

---------------------------

This extension to the wps specification is primarily
useful for the player where you only have 2 lines of
11 characters, but there is nothing player specific in
the implementation and it should work on the recorder
also.

Although there are still a few improvements I plan to
add to this, I am presenting what I have working now
to solicit comments from the group and inquire if
anyone finds this useful and would like to see it
submitted to be considered for inclusion in the CVS.

The source code still needs to be cleaned up before I
make it available, but if anyone wants to try out what
I have so far, executables are available at:
http://home.pacbell.net/csath

I need someone to test it on a Recorder as I only have
a Player for testing.




=====
Craig

rb_dev_at_yahoo.com

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
Received on 2003-04-18

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy