INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Replay gain values being truncated?  (Read 3979 times)

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Replay gain values being truncated?
« on: January 22, 2012, 10:12:58 am »

Morning,

Just completed my upgrade to v17 and noticed that calculated replay gain values that should have a zero on the end are now being truncated by a digit.



Would it be possible to get this to show (as in previous versions) as -8.50 ? I am so used to seeing all my replay gain data to two decimal places...

VP
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Replay gain values being truncated?
« Reply #1 on: January 22, 2012, 02:23:26 pm »

I was going to suggest a temporary workaround:

  FormatNumber([Gain R,0], 2)

But this is producing incorrect results also.  Sometimes it outputs 2 decimal places, and other times just 1.

So perhaps the issue your seeing is a bug with formatting the number of decimal places in general.
Logged
The opinions I express represent my own folly.

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Re: Replay gain values being truncated?
« Reply #2 on: January 22, 2012, 02:35:39 pm »

I was going to suggest a temporary workaround:

  FormatNumber([Gain R,0], 2)

But this is producing incorrect results also.  Sometimes it outputs 2 decimal places, and other times just 1.

So perhaps the issue your seeing is a bug with formatting the number of decimal places in general.


Something is definitely "off" here. Cannot understand why this - of all things -  would get changed. Hoping that dev can take a look for us.

VP
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42323
  • Shoes gone again!
Re: Replay gain values being truncated?
« Reply #3 on: January 22, 2012, 10:16:35 pm »

Internally Replay Gain is stored with high precision.

At display time, we use two decimals.

Trailing zeros are not shown, since they're superfluous.

In other words, 8.5 and 8.50 are the same number.
Logged
Matt Ashland, JRiver Media Center

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Re: Replay gain values being truncated?
« Reply #4 on: January 22, 2012, 10:40:52 pm »

In other words, 8.5 and 8.50 are the same number.

Understood...however...

Trailing zeros are not shown, since they're superfluous.

Suddenly superfluous in v17 but not in any version prior? Why not just leave it as it was? It is not doing any harm whatsoever.

Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Replay gain values being truncated?
« Reply #5 on: January 23, 2012, 12:00:47 am »

I'll suggest then that FormatNumber() is broken.  When you ask for 2 decimal places, you should get 2 decimal places.  Otherwise, it is not possible to column align trailing text such as:

  FormatNumber([some field], 2) blah blah blah
Logged
The opinions I express represent my own folly.

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Replay gain values being truncated?
« Reply #6 on: January 23, 2012, 02:21:54 am »

Trailing zeros are not shown, since they're superfluous.

Not in the context of a file list. They're necessary for readability. All numeric data should be shown with the appropriate number of significant digits, padded with zeros and right aligned—preferably with decimals in alignment.

If the number is not one in a list, a trailing zero is not required for readability, but may be necessary to convey the number of significant digits. '8.5' could mean anything between 8.46 and 8.54. '8.50' means 8.50.
Logged

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Re: Replay gain values being truncated?
« Reply #7 on: January 23, 2012, 06:45:05 am »

Not in the context of a file list. They're necessary for readability. All numeric data should be shown with the appropriate number of significant digits, padded with zeros and right aligned—preferably with decimals in alignment.

If the number is not one in a list, a trailing zero is not required for readability, but may be necessary to convey the number of significant digits. '8.5' could mean anything between 8.46 and 8.54. '8.50' means 8.50.

+100. Please consider returning the trailing zero for readability purposes. Thank you.

Cheers,

VP
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42323
  • Shoes gone again!
Re: Replay gain values being truncated?
« Reply #8 on: January 23, 2012, 10:25:19 am »

Not in the context of a file list. They're necessary for readability. All numeric data should be shown with the appropriate number of significant digits, padded with zeros and right aligned—preferably with decimals in alignment.

If the number is not one in a list, a trailing zero is not required for readability, but may be necessary to convey the number of significant digits. '8.5' could mean anything between 8.46 and 8.54. '8.50' means 8.50.

I don't have a strong feeling on this.  Turning on trailing zeroes, which we suppress by default when formatting decimals, will likely lead to other bug reports where we show things like "13.000" in places where users don't expect it.

As for digits of significance, neither "8.5" or "8.50" are representing the number of significant digits.  Replay Gain is stored with several more digits than displayed.  However, it's hardly worth showing "8.4997632" just because that's what we have stored.
Logged
Matt Ashland, JRiver Media Center

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Re: Replay gain values being truncated?
« Reply #9 on: January 23, 2012, 10:34:15 am »

I don't have a strong feeling on this.  

Well - I do.

Turning on trailing zeroes, which we suppress by default when formatting decimals, will likely lead to other bug reports where we show things like "13.000" in places where users don't expect it.

This "suppress by default" is something new and is not the way it was in 16.0.181.

I cannot understand what harm or "bug reports" could possible come from displaying 8.5 as 8.50 just so it looks "in line" with all the other values to two decimal places.

I am not asking for 14 decimal places nor do I want it to suddenly cause "bug reports". Please consider reinstating the standard "two" decimal places as it has been for as long as I have used MC.

Cheers,

VP





Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42323
  • Shoes gone again!
Re: Replay gain values being truncated?
« Reply #10 on: January 23, 2012, 02:13:02 pm »

Currently the database has a data type decimal.

Formatting these values for display uses up to 2 decimal places, but trims trailing zeroes.  That way integers aren't shown like 24.00.

It's easy to switch to keeping trailing zeroes, but this will change other fields as well.

Is it good for a list of frame rates to look like:
24.00
25.00
etc.

Or is there something special about Replay Gain, so the database needs a new data type for just it?
Logged
Matt Ashland, JRiver Media Center

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Re: Replay gain values being truncated?
« Reply #11 on: January 23, 2012, 02:30:39 pm »

Is it good for a list of frame rates to look like:
24.00
25.00
etc.

Or is there something special about Replay Gain, so the database needs a new data type for just it?

Someone please correct me but I believe it's industry standard to show frame rates to at least two decimal points (aka 23.976 FPS for NTSC etc) so shaving superfluous zeros off of those makes no sense to me.

Regarding Replay gain...I believe it's generally standard to display that to two decimals as well.

Bottom line - this was displayed just fine for years and suddenly now you decide to shave a zero? Why? Is there some huge gain being made by doing that? If so - I am cool with it...but doing it for no reason just makes these values jarring to look at onscreen.

VP
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Replay gain values being truncated?
« Reply #12 on: January 24, 2012, 12:57:41 am »

As for digits of significance, neither "8.5" or "8.50" are representing the number of significant digits.  Replay Gain is stored with several more digits than displayed.  However, it's hardly worth showing "8.4997632" just because that's what we have stored.

I was only refuting your contention the trailing '0' is superfluous. I do understand the meaning of "significant digits" and was not trying to suggest you should be displaying all of them. When reporting a number, one decides how many significant digits to include. I don't believe it's improper to refer to those as a "number of significant digits."

What you've gone on to describe is a limitation in your display system. I don't know why an integer wouldn't be displayed as an integer and a decimal as a decimal. I'm just pointing out that if you display a decimal with two digits of significance (hopefully rounded correctly), trailing zeroes should not be dropped. And in a column, the numbers should be right-aligned.
Logged

vagskal

  • Citizen of the Universe
  • *****
  • Posts: 1227
Re: Replay gain values being truncated?
« Reply #13 on: January 24, 2012, 02:01:16 am »

And in a column, the numbers should be right-aligned.

+1
Logged

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Re: Replay gain values being truncated?
« Reply #14 on: January 24, 2012, 06:56:20 am »

What you've gone on to describe is a limitation in your display system. I don't know why an integer wouldn't be displayed as an integer and a decimal as a decimal. I'm just pointing out that if you display a decimal with two digits of significance (hopefully rounded correctly), trailing zeroes should not be dropped. And in a column, the numbers should be right-aligned.

+2
Logged
Pages: [1]   Go Up