DSPRelated.com
Forums
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →

Calculating dynamic range on signed data?

Started by gct ●December 12, 2009
Jerry Avins  <jya@ieee.org> wrote:

> It is often said that the dynamic range of CDs is 20*log(2^15) dB.
That's the dynamic range of a channel. I interpreted this question as being about the dynamic range of a signal. Steve
Steve Pope wrote:
> Jerry Avins <jya@ieee.org> wrote: > >> It is often said that the dynamic range of CDs is 20*log(2^15) dB. > > That's the dynamic range of a channel. I interpreted this question > as being about the dynamic range of a signal.
Your interpretation is probably the right one here. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Sat, 12 Dec 2009 16:33:05 -0600, gct wrote:

>>So what you want is a sliding window operation followed by a RMS >>calculation. The maximum and minimum values thus exhibited as you slide >>the window over your data will be its dynamic range. The characteristics >>of the window/filter must "make sense" with respect to your data. >> >>Hope this helps. >> >>Steve >> >> > OK so I slide a window over the data finding RMS values for each > location, then find the max/min RMS values to get the dynamic range?
Your wording worries me. You slide the window over the data and find the RMS value for the data in the window for each window location (yes, that's a complicated way to say it; sorry -- sometimes it's hard to choke precision out of English). Then you compare max/min. -- www.wescottdesign.com
On Sat, 12 Dec 2009 19:16:31 -0500, Jerry Avins wrote:

> gct wrote: >> I've got some signed audio data (16 bit so -32768-32767) and I'd like >> to calculate a dynamic range figure for it, but obviously taking the >> logarithm of a negative number is a no-no, but neither shifting the >> scale so everything's positive or absolute value seem right to me. Is >> there a 'correct' way to do this? > > The dynamic range in bits is just the largest magnitude -- + or - -- > contained in the file. Remember: you can't take the log of zero, either. > It is customary to take the lowest value as 1 for just that reason. > > Jerry
OTOH, you could have perfectly valid narrow band signal that's buried well below the quantization noise yet is still recoverable. -- www.wescottdesign.com
On Sat, 12 Dec 2009 16:12:43 -0600, gct wrote:

> I've got some signed audio data (16 bit so -32768-32767) and I'd like to > calculate a dynamic range figure for it, but obviously taking the > logarithm of a negative number is a no-no, but neither shifting the > scale so everything's positive or absolute value seem right to me. Is > there a 'correct' way to do this?
What dynamic range? In radio practice the dynamic range is the ability for a receiver to pick out a small signal in the presence of one or more large nearby signals; a receiver with a really large dynamic range would be one that you could site right next to a high-power transmitter yet still hear signals from across the world on flea-power transmitters. Others may specify dynamic range to be the difference between the quietest passages in a signal vs. the loudest -- I think this is what you mean, and if it's audio then you want to shape your test to the psychoacoustics involved. Even with audio the term 'dynamic range' may mean something different -- a more 'radioish' use of the term would be reproduction that's so good you can hear the valves of the oboe clacking*, or the guitarist's fingers squeaking on the strings (or the traffic noise outside the studio, as they found on some of the Beatles master tapes). * Which led to an irritating fad in classical music recording for a while -- 'sound so good you can hear the keys clacking' was supposed to mean 'when the clacking is really, really quiet', but someone with small imagination must have said "Oh they want to hear clacking? We'll give 'em clacking". So all of a sudden you started hearing pieces where they were obviously miking the wind players' keys, and the conductor's feet, etc. It seems to be dying down, mercifully. -- www.wescottdesign.com
Tim Wescott  <tim@seemywebsite.com> wrote:

>Your wording worries me.
>You slide the window over the data and find the RMS value for the data in >the window for each window location (yes, that's a complicated way to say >it; sorry -- sometimes it's hard to choke precision out of English).
>Then you compare max/min.
That's what I intended to suggest. Steve
Steve Pope wrote:
> Tim Wescott <tim@seemywebsite.com> wrote: > >> Your wording worries me. > >> You slide the window over the data and find the RMS value for the data in >> the window for each window location (yes, that's a complicated way to say >> it; sorry -- sometimes it's hard to choke precision out of English). > >> Then you compare max/min. > > > That's what I intended to suggest.
The OP was thrown off by the bipolar nature of audio's instantaneous values. Dynamic range is about magnitudes, as should be clear to him by now. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;