Skip to main content

Topic: Is it possible to stretch 16 bits symmetrically? (Read 25412 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • julf
  • [*][*][*][*]
Is it possible to stretch 16 bits symmetrically?
Reply #125
And by independant, is there no way I can apply each to a streaming wave?


Sure - the 16->24->32->whatever bit conversion is trivial. You won't increase the resolution of the original signal, but you will gain additional precision in case you need to do additional processing. You can separately do an up- or downsampling using a sample rate conversion. Both can be done with SoX.

Quote
I think I'm trying to break the laws of physics right here, bear with...


Never a good idea...

  • Martel
  • [*][*][*][*][*]
Is it possible to stretch 16 bits symmetrically?
Reply #126
I think I'm trying to break the laws of physics right here, bear with...
Don't worry, it's pure math, no physics.
IE4 Rockbox Clip+ AAC@192; HD 668B/HD 518 Xonar DX FB2k FLAC;

  • saratoga
  • [*][*][*][*][*]
Is it possible to stretch 16 bits symmetrically?
Reply #127
I'm trying to increase theoretical dynamic range in the quantisation sense, in the dsp realm - 1500 yes is loud and impossible, no dacs today do it (there's no need lol) - but to increase for processing only...


For like the 10th time in this thread, I'm going to point out to you that common DSP software operates in floating point, and often double precision, which has far more than 1500 dB dynamic range.  Basically, what you're asking is trivial and automatic. 

  • KMD
  • [*][*][*]
Is it possible to stretch 16 bits symmetrically?
Reply #128
and just to add,  interpolation in the amplitude domain does not acheive anything as, as you  have aknowledged,  you can't do anything to improve the effect of quantization once it is baked into the cake.

  • drfisheye
  • [*]
Is it possible to stretch 16 bits symmetrically?
Reply #129
With 32-bit floating point you could achieve a dynamic range over 1500 dB.

Only if it uses the values beyond 1. The wav and aiff format both normalize to values between -1 and 1, leaving 24 bits for the audio. Going beyond 1, precision is lost. (Which is why in financial systems, they don't use floats. They don't like missing pennies.)

So does audio software in practice use the full 32 bits when calculating floats? Switching to 64 bit seems the easier way to increase resolution.

  • saratoga
  • [*][*][*][*][*]
Is it possible to stretch 16 bits symmetrically?
Reply #130
With 32-bit floating point you could achieve a dynamic range over 1500 dB.

Only if it uses the values beyond 1.


Only 50% of values are above 1, so the difference is only 1 bit, hardly relevant when you are talking about 1500 dB range.

(Which is why in financial systems, they don't use floats. They don't like missing pennies.)


They dislike float because they are actually operating on integer quantities, not real numbers.  Thus, rounding maybe incorrect, or at least unexpected. 

So does audio software in practice use the full 32 bits when calculating floats? Switching to 64 bit seems the easier way to increase resolution.


Depends on the software.  Both are used.  In practice is matters very little, except for some types of recursive operations.

  • drfisheye
  • [*]
Is it possible to stretch 16 bits symmetrically?
Reply #131
Only 50% of values are above 1, so the difference is only 1 bit, hardly relevant when you are talking about 1500 dB range.

Hm, you are right. I had that wrong in my head. Never mind then.

  • db1989
  • [*][*][*][*][*]
  • Global Moderator
Is it possible to stretch 16 bits symmetrically?
Reply #132
Aside from noise, what other concerns would you have?
Rounding error caused by the disproportional increase.
Increase in sample rate should be directly proportional to increase in quantisising steps.

Direct Proportion
"When two quantities are in direct proportion, as one increases, the other increases by the same percentage."

This is crucial for processing audio.
Read this, and read it well:
Asking questions about things you don't know about or understand is great, but making all sorts of strange claims at the same time doesn't work very well...
I’ll go further. It works abysmally. I harbour an intense dislike of this thread.

Sample rate proportional to the dynamic range ...
Sample rate and dynamic range are independent of each other.
So it's impossible to increase each, by the same factor, independantly?
if they are independent of each other you can of course increase or decrease each one as much as you want independently.
And by independant, is there no way I can apply each to a streaming wave?
You can. But again, your premise is completely flawed, because you don’t need to increase both in proportion as you so confidently seem to think.

Quote
I think I'm trying to break the laws of physics right here, bear with...
The laws of physics cannot be broken. Especially by people who have lamentably failed to do the research. While somehow still thinking they’re in a position to design supposedly revolutionary new systems.

  • giro1991
  • [*][*][*]
Is it possible to stretch 16 bits symmetrically?
Reply #133
Ok thread started off wonky because I jointly misinterpreted bits as dynamic range. It is an easy mistake to make seeing how the term 'bits' is so widely used to specify dynamic range (they should specify the dB in specs, not bits if you wanted to be picky). In comparison to regularson here - I know nothing but I was curious about quantizing as its applied beside the original "dynamic sounding" TDA1540. Notice after the TDA1540 all the digital filters went to using 18 and 20bit - this I cannot understand.



I doubt foobar and many programs do this when decoding mp3 file for playback, and it is this (above) I am trying to achieve as a seperately in foobar (dsp/vst).
Music being passed into a 32 float pipe should be quantized first! If you pass a 16bit file through 32 float, with theoretical DR of 96 then you are only quantising within this 96db range - you are insreasing the steps but you would get even more accuracy if you quantized to 32bit first using fixed point system (like the 28bitter does), with upsampling (creates a very highly accurate, newly interpolated wave, which can then be passed onto a 32bit - or 64 - float pipe).

And refering to the 28bit dsp. 28bits is ALOT considering were talking 1984 here.


Not really.  That is a fixed point filter.  The precision there refers to how accurately the filter tap output is computed.


Since 32 bit floats use exactly 24 bits to represent all numbers between -1 and 1, 32 bit floats audio has exactly the same precision as 24 bit audio.


They're not exactly the same, since floating point handles extreme values better than fixed point. 


When an mp3 is decoded consider you are just increasing it's dynamic range to 32bit equivelant with a fixed approach. Floating is nescessary if you are going to have 'overs'. It's impossible for a 16bit wave on a cd/mp3 to have overs, its limited to 96 from the get-go.

The main advantages of floating point are clear, headroom and keeping errors beyond the initial depth and I think is something more aptly suited for mixing, not playback. Regardelss, many DSPs I'm sure have pregains to adjust the line level to avoid clipping anyway ... and regardless of even this, 64bit is available today, so errors created of this new 32bit render would be negligible if using a 64 float pipe.

"32 bit output"
  • Last Edit: 27 April, 2014, 09:49:13 AM by giro1991

  • giro1991
  • [*][*][*]
Is it possible to stretch 16 bits symmetrically?
Reply #134
Not helpful...?
If I can really Quantizise like this using foobar for free, who the hell needs a $10k DAC?
  • Last Edit: 27 April, 2014, 09:50:07 AM by giro1991

  • giro1991
  • [*][*][*]
Is it possible to stretch 16 bits symmetrically?
Reply #135
I'm just after an implimentation that inceases the dynamic range like cool edit pro does (why would it be on their app if its such a stupid idea!?). If from your perspective it appears silly, let that be.
But atleast let me experiment jeez.

Might I add, more quantising steps does increase accuracy - you can never have enough accuracy - at interpolation, as is said in the dither paper (which I did read by the way).

EDIT 2, perhaps its because only 24bit dacs exist people think im crazy, but for processing and >resampling<. Seems obvious to me, create new wave, almost infinite in a sense, which flows at original rate (in time) and then resample (pluck new points from it) for an interpretation of that wave at a new higher or lower rate, output at desired depth (24bit max).
  • Last Edit: 27 April, 2014, 10:01:32 AM by giro1991

  • lvqcl
  • [*][*][*][*][*]
  • Developer
Is it possible to stretch 16 bits symmetrically?
Reply #136
So you think that "Dither Transform Results (increases dynamic range)" can increase dynamic range of some existing track? It can't.

  • xnor
  • [*][*][*][*][*]
  • Developer
Is it possible to stretch 16 bits symmetrically?
Reply #137
giro1991, you are once again confusing several topics, but now you also add mp3 for even more confusion ...

The "dither transform results" has the following use:
Imagine you have a 16-bit sample. You apply a fade out to silence effect. This effect is calculated internally with 32-bit floating point, but the final sample has to be stored in the original format again (16-bit).
With the option enabled dither will be added. Without it samples will simply be truncated.

Instead of the waveform becoming more and more distorted and finally turning into complete silence, with dither the waveform will finally disappear in the noise floor of the dither. The dynamic range of the format itself didn't change, but perceived dynamic range can be greater, because we can hear tones at or below the noise floor.


Notice that each time you add dither you just add more noise.


All of this doesn't matter for playback, because the tracks you play usually do not have a greater dynamic range than roughly 70 dB.
  • Last Edit: 27 April, 2014, 10:09:09 AM by xnor
"I hear it when I see it."

  • giro1991
  • [*][*][*]
Is it possible to stretch 16 bits symmetrically?
Reply #138
So you think that "Dither Transform Results (increases dynamic range)" can increase dynamic range of some existing track? It can't.

No, to simply give me more quantisation steps to work with to when forming a new wave.
  • Last Edit: 27 April, 2014, 10:46:48 AM by giro1991

  • lvqcl
  • [*][*][*][*][*]
  • Developer
Is it possible to stretch 16 bits symmetrically?
Reply #139
So you think that "Dither Transform Results (increases dynamic range)" can increase dynamic range of some existing track? It can't.

No, to simply give me more quantisation steps to work with to when forming a new wave.

Well, dither also can't give you "more quantisation steps".

  • giro1991
  • [*][*][*]
Is it possible to stretch 16 bits symmetrically?
Reply #140
Okay I see now!
Two more questions however

With the use of dither (shaped outwith the baseband) and a fixed approach is it possble to alter (preferably decrease) signal level of baseband?

And, irrelevant to previous question but is it also perhaps possible to increase amplitude of a signal to use all 32 bits in fixed point? like a serious volume dial?
(I recall jaz mention volume boosting earlier)
  • Last Edit: 27 April, 2014, 11:21:17 AM by giro1991

  • julf
  • [*][*][*][*]
Is it possible to stretch 16 bits symmetrically?
Reply #141
With the use of dither (shaped outwith the baseband) and a fixed approach is it possble to alter (preferably decrease) signal level of baseband?


What is your definition of "baseband"? You seem to, once again, to be confusing amplitude-related issues with bandwidth-related issues.

Quote
And, irrelevant to previous question but is it also perhaps possible to increase amplitude of a signal to use all 32 bits in fixed point? like a serious volume dial?


Only if your volume control goes to 11.

Full scale is full scale. Whatever factor you use for normalisation is irreelevant. Yes, of course you can take your 16 or 24 bit data and multiply the values with 2^8 or 2^16, but that will give you 8 or 16 empty bits at the lsb end. No increase in dynamic range of the original signal.

  • lvqcl
  • [*][*][*][*][*]
  • Developer
Is it possible to stretch 16 bits symmetrically?
Reply #142
Also what is a "signal level of baseband"?

  • giro1991
  • [*][*][*]
Is it possible to stretch 16 bits symmetrically?
Reply #143
Sorry, by baseband I meant 0-22050. sorry if I have the terms wrong.

I was experimenting with a dither dsp in foobar, capable of noise shaped dither. There is a clip function, with it on, cliping is allowed to exceed the amplitude of the input depth (floating point) I think.
If I turn this off then it must simulate fixed point. When I then apply 8bit noise shaped dither, it appears as ultrasonic noise on a realtime spectrum analyser, but still exceeds the max peaks of the baseband, so surely this means the signal is now operating or 'swing' between lowest 8bits...

I then realise that this is essentially all delta sigma is. Right?
"Noise shaping is commonly implemented with delta-sigma modulation. Using delta-sigma modulation, Super Audio CD obtains 120 dB SNR at audio frequencies using 1-bit audio with 64x oversampling."
Like xnor said, dsd operates at multiple MHZ.

My experminetal nos mulit bit dac works best between a given range. It's linearity error is < 0.5 LSB when operating between 1-7, meaning it will accurately produce a current output from the DAC proportional to the values of that range of the input word. Hence why I ask . I do not care if output is low, the SNR of the output following is 110db, and even if the result was in millivolts, thats what preamplifiers are for. (did anyone notice swing of vinyl player prior to pre-amp is 10mV? - no wonder digitial sounds like its on fire sometimes)...

Also, Is there a dsp that can "multiplying input by 65536"?
  • Last Edit: 27 April, 2014, 12:44:24 PM by giro1991

  • saratoga
  • [*][*][*][*][*]
Is it possible to stretch 16 bits symmetrically?
Reply #144
Stop wasting everyone's time with this stupid crap and go look up things for yourself.

  • giro1991
  • [*][*][*]
Is it possible to stretch 16 bits symmetrically?
Reply #145
On google multiplying input by 65536 links to "Binary scaling" and that is all .
Surely there is a dsp/vst that can do it.

EDIT: I'm also trying out your TransPCM code, so thankyou for that too.
EDIT2 IT is possible

Edit2: It just occurred to me that the other concept that you might think when talking about stretching isn't what you expect. If you expand the 16bits, so that they are evenly distributed on a 24bit signal, or 32bit signal, what you have achieved is volume boosting it. But since 24 or 32bit have the same 0dBFS, what you end with is a more silent file, with the opposite effect of a DSP compressor.


This is what I would like to acheive, could please someone please show me how using foobar / vst.
  • Last Edit: 27 April, 2014, 01:18:10 PM by giro1991

  • db1989
  • [*][*][*][*][*]
  • Global Moderator
Is it possible to stretch 16 bits symmetrically?
Reply #146
On google multiplying input by 65536 links to "Binary scaling" and that is all .
Surely there is a dsp/vst that can do it.

Quote
EDIT2 IT is possible
Edit2: It just occurred to me that the other concept that you might think when talking about stretching isn't what you expect. If you expand the 16bits, so that they are evenly distributed on a 24bit signal, or 32bit signal, what you have achieved is volume boosting it. But since 24 or 32bit have the same 0dBFS, what you end with is a more silent file, with the opposite effect of a DSP compressor.
This is what I would like to acheive, could please someone please show me how using foobar / vst.



REALLY now. How many times must people explain to you, over and over again, that ‘stretching’ the codes across a larger-bit-depth file is done simply by mere multiplication?

Look at that nice picture there. Now press the × button. This is what upconverting/right-shifting does.

Damn it

  • saratoga
  • [*][*][*][*][*]
Is it possible to stretch 16 bits symmetrically?
Reply #147
In all seriousness you should just lock this thread so hes forced to spend 15 minutes on Wikipedia reading about PCM audio.

  • xnor
  • [*][*][*][*][*]
  • Developer
Is it possible to stretch 16 bits symmetrically?
Reply #148
If you want to expand the dynamic range then you need to do nonlinear* processing with an .... (surprise!) ... expander.

*) this means the waveform will be distorted
  • Last Edit: 27 April, 2014, 02:05:02 PM by xnor
"I hear it when I see it."

  • giro1991
  • [*][*][*]
Is it possible to stretch 16 bits symmetrically?
Reply #149
is done simply by mere multiplication


How can do I do this exactly using foobar or any DAW for that matter? It's not specific, I am a noob, a curious noob.
Please help.