Support and General Use > Theming and Appearance Customization

Need Help Re: Displaying the Volume in 10% increments using Bitmap Strips

<< < (2/5) > >>

Llorean:
db is much less a pretend scale than percent volume. Decibels are a relative scale - they let you know exactly who much you're reducing the sound from line level (or if you're amplifying it above it) whereas a percentage "volume" doesn't provide any practical useful information.

Some players have a range from -54 db to +6. Others go from -74 to +12. Your percent volume on the other hand will more or less always go from 0% to 100% even if 1% is significantly louder on one player than another (especially if your WPS fits the screen of multiple targets) or if on one player 100% is line level, while on another player 100% is amplified beyond line level and causes clipping.

The last two images are 100% volume and >100% volume in the %pv conditional, which is why it may be balancing improperly - the second to last image probably only covers one "level" of volume, while the last image probably covers a set amount that doesn't correspond (in your way of thinking) to 10% at all.

Basically %pv gives you an arbitrary list. The first element is always mute. The last two elements are 100% volume, and "all values greater than 100%". So if you want increments of 10% the list must have 13 entries. Mute, 1-10%, 11-20%, 21-30%, 31-40%, 41-50%, 51-60%, 61-70%, 71-80%, 81-90%, 91-99%, 100%, >100%. You can re-use an image for some of these if you want to merge them (and the percentages may be slightly different such as 1-9%, I'm not sure how it divides them).

[Saint]:

--- Quote from: Llorean on December 02, 2009, 11:25:06 PM ---db is much less a pretend scale than percent volume. Decibels are a relative scale - they let you know exactly who much you're reducing the sound from line level (or if you're amplifying it above it) whereas a percentage "volume" doesn't provide any practical useful information.

--- End quote ---

A 0 to 100 percentage of Total Volume provides usefull/and valuable information, if that is the desired effect You wish to achieve.
And in My case, it is.

The problem is, I want a symmetrical effect between the battery meter (which DOES show a percentage, unless I'm wrong again) and the volume meter.
Both of these values are displayed in text on the screen in the WPS as well. I'd just like to get the volume "slide bar" working as smoothly as I can before I release it to the themes page.
As in, no odd jumps between incorrectly spaced increments of db.

I *believe* that the volume range on the Nano is -74 db which is mute to +6db, so (in My mind, with the newfound understanding of db range) the effect I want to achieve would be to display -74db as Mute or "0%", -73db as "1%" and accordingly....+6db would ultimately be "100%"

If it takes me asking blatantly, in lamens terms, How can I achieve this effect using a 10 sub-imaged Bitmap Strip? Or, what is the code I'd need to use to achieve this effect?

Well.....I believe that was Me just doing so now.

I understand what it is You're saying about the db, and it's range in comparison to a true "percentage",  but I'm not exactly up to speed on how I can achieve this effect.


I apologise if I have missed an effort on Your, or anyone elses behalf, to do so.



Sincerely,
[St.]

Llorean:
I edited my post quite some time back explaining how many images you'd need to use.

You really, really should not try to act like values >0db are the same as values below it. They can cause clipping and sound distortion.

As well if you use the same image for the whole range from 91-100% how is someone to tell whether they've accidentally lowered the volume - it's usually good to have "Mute" and "Full volume" as distinct states of exactly one value, then everything else in between.


--- Quote ---A 0 to 100 percentage of Total Volume provides usefull/and valuable information, if that is the desired effect You wish to achieve.
And in My case, it is.

--- End quote ---

I fear you're confusing "useful information" with "information that is aesthetically pleasing to me." There is no use that you can put a percentage volume to that you couldn't also put db volume to, while there are many uses for the decibel value that can't be replicated easily with an approximated percentage.

As I said, WPSes posted to the gallery may automatically fit into categories for multiple players. Percentage volume is non-useful as, say "80%" can be significantly different on two players, while if two players have similarly performing hardware but one only goes to -54 and one goes to -74, then -25 on both (if the DACs are similar in output capabilities, as they are for several of the players) will be in a very similar range and 0db will always be line level, whereas "100%" as per your made up scale can on some players clip (the Nano, for example, will often clip at +6 and users need a way to know when they're passing 0db so that they can avoid doing so).

Basically a percentage *hides* useful information from players if you don't take into account what the numbers behind it actually *mean* and use "1db above mute" through "0db" as your range, rather than trying to force the range to go up into positive values.

JdGordon:

--- Quote from: [St. ---
The error the RockBox iPod Nano Simulator is giving out is:

WARNING: Maximm Tokens exceeded (1023)

--- End quote ---

Which sim are you using? (where did you get the build from?)


So heres the thing... if you want exact percentage scale you cant do it (you can go between mute and 0dB with 100 steps if you are a masocist though)... this is how cabbiev2 (the deault theme) does it and it works really well and is close enough...
%?pv<%xdCa|%xdCb|%xdCc|%xdCd|%xdCe|%xdCf|%xdCg|%xdCh|%xdCi|%xdCj>

[Saint]:
Hmmmmm....

So if I want to do it that way:


--- Quote from: [St.] on December 02, 2009, 05:03:28 AM ---[Example 2]

%?pv<%xd*n*a|%xd*n*a|%xd*n*a|%xd*n*a|%xd*n*a|%xd*n*a|%xd*n*a|%xd*n*a|%xd*n*a|%xd*n*a|%xd*n*a|
%xd*n*b|%xd*n*b|%xd*n*b|%xd*n*b|%xd*n*b|%xd*n*b|%xd*n*b|%xd*n*b|%xd*n*b|%xd*n*b|%xd*n*c|
%xd*n*c|%xd*n*c|%xd*n*c|%xd*n*c|%xd*n*c|%xd*n*c|%xd*n*c|%xd*n*c|%xd*n*c|%xd*n*d|%xd*n*d|%xd*n*d|
%xd*n*d|%xd*n*d|%xd*n*d|%xd*n*d|%xd*n*d|%xd*n*d|%xd*n*d|%xd*n*e|%xd*n*e|%xd*n*e|%xd*n*e|
%xd*n*e|%xd*n*e|%xd*n*e|%xd*n*e|%xd*n*e|%xd*n*e|%xd*n*f|%xd*n*f|%xd*n*f|%xd*n*f|%xd*n*f|%xd*n*f|
%xd*n*f|%xd*n*f|%xd*n*f|%xd*n*f|%xd*n*g|%xd*n*g|%xd*n*g|%xd*n*g|%xd*n*g|%xd*n*g|%xd*n*g|%xd*n*g|
%xd*n*g|%xd*n*g|%xd*n*h|%xd*n*h|%xd*n*h|%xd*n*h|%xd*n*h|%xd*n*h|%xd*n*h|%xd*n*h|%xd*n*h|
%xd*n*h|%xd*n*i|%xd*n*i|%xd*n*i|%xd*n*i|%xd*n*i|%xd*n*i|%xd*n*i|%xd*n*i|%xd*n*i|%xd*n*i|%xd*n*j|
%xd*n*j|%xd*n*j|%xd*n*j|%xd*n*j|%xd*n*j|%xd*n*j|%xd*n*j|%xd*n*j|%xd*n*j>

where *n* = the %xl ID assigned to the Bitmap Strip and a, b, c etc. the sub-image
*note that there are 11 "a's" instead of 10 to accommodate for mute.

--- End quote ---

is correct? I used 101 conditionals I *believe*...it's been a while...I think I added an extra "%xd|*n*a" to accomodate for mute...do I not need to do this?

From what I've gathered from what various people including yourself have tried to explain to me, I can also achieve this by using 13 sub-images (or 13 references to the 10 images) and the code:

%?pv<mute|10%|20%|30%|40%|50%|60%|70%|80%|90%|100%|100%|>100%>

Is this correct? sorry for My need for absolute clarification.


and also Re:



--- Quote from: JdGordon on December 03, 2009, 12:15:24 AM ---
--- Quote from: [St. ---
The error the RockBox iPod Nano Simulator is giving out is:

WARNING: Maximm Tokens exceeded (1023)

--- End quote ---

Which sim are you using? (where did you get the build from?)


--- End quote ---

Sim I am using is the current one availabe on this site, as is the build, I usually take it from the "daily build" page so I believe it is r22799? it's the current build anyway...even does it with rb3.4 but I'm not sure this is the correct forum regarding this matter.


Sincerely,
[St.]

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version