Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Is it possible to stretch 16 bits symmetrically? (Read 57698 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Is it possible to stretch 16 bits symmetrically?

Reply #150
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.


We are really trying to help here, but unfortunately you come across as someone who has made the dramatic discovery that you can multiply by 10 by adding a 0 at the end, and is now asking why you can't multiply by 9 by just adding a 9 at the end.

It would help if you could explain, in simple words, what you actually want to accomplish. Give us the top level picture, without misusing technical terms you don't understand.

Is it possible to stretch 16 bits symmetrically?

Reply #151
In foobar2000 simply set the output bit depth to 24 bit.
In any DAW simply by changing bit depth to 24 bit.
"I hear it when I see it."

Is it possible to stretch 16 bits symmetrically?

Reply #152
is done simply by mere multiplication
How can do I do this exactly using foobar or any DAW for that matter?
And, yet again, for the (I shudder to think)th time, you can do this “exactly” by upconverting the bit-depth in the normal way offered by almost any relevant program.

But, also repeated yet once more, nothing whatsoever in the sense of quality can be gained by upconverting. You cannot create something from nothing. Upconverting, again, is only relevant to increase precision of processing.

Quote
It's not specific, I am a noob, a curious noob.
I don’t wish to discourage anyone from learning. But the problem here is that you oscillate between two incompatible extremes: declaring how new you are vs. formulating big-sounding ideas containing lots of technical words of whose meanings you have almost no concept. The proper way to be a noob in this situation would be to learn the basics of digital audio, binary numbers, and suchlike before you start citing technical terms and (irrelevant) statistics of 30-year-old DACs.

Quote
Please help.
We’ve tried. We’ve really tried. But you have to meet people halfway. Not many people have the patience to continually explain basic things in extremely fine detail to someone else. When that someone keeps ignoring the basic advice and bringing up irrelevant topics, that patience diminishes even further.

Is it possible to stretch 16 bits symmetrically?

Reply #153
I've heard this a couple of times now: "you cannot create something from nothing". I beg to differ.

You can add anything you want to the signal, but since a part of the original information is lost, the probability that you're not just adding even more errors is virtually zero.


If you only had a single steady tone then filtering would be trivial, but real music is a mix of many many tones and even noise that change all the time..
"I hear it when I see it."

Is it possible to stretch 16 bits symmetrically?

Reply #154
I've heard this a couple of times now: "you cannot create something from nothing". I beg to differ.

You can add anything you want to the signal, but since a part of the original information is lost, the probability that you're not just adding even more errors is virtually zero.
Right, I should be more specific: one can’t create quality from nothing.

We can’t restore details that aren’t present in the original waveform, can’t create additional dynamic range without distorting the original signal, and so on

 

Is it possible to stretch 16 bits symmetrically?

Reply #155
Sorry about the binned post and I should have describe the function my uploaded javascript calculator more clearly
http://www.hydrogenaudio.org/forums/index....ost&id=7886

The "Digital: bit depth" field is 16 by default, if you enter a number such as 24 or 32 then the calculated sample value will also be stretched. Just think that this may explain how the stretching works.

Is it possible to stretch 16 bits symmetrically?

Reply #156
And, yet again, for the (I shudder to think)th time, you can do this “exactly” by upconverting the bit-depth in the normal way offered by almost any relevant program.

I wish to do it to a streaming wave, using foobar for example. Not at output either.

Men, this picture looks to me like both a wave and binary that represents the wave. THOUGH this is NOT dynamic range notation which is the hell i'm getting confused with. I've been refering to the two as they were the same.
I understand 32bit float is probably enough accuract but I was just wantin' to experiment.
I'm being told it is impossible to make it span a greater height using (probably new) code?

To save time, answer in yes or no. If its a yes I will stop right here. If you don't have the time, don't answer at all?

I want to thank everyone for the input on this thread, I've learned alot.
I actually think post #2 might have addressed what it is i'm tyring to do afterall,
Though back then I was really looking for an implementation, a ui of somesort to play with. that's all.

Thanks again.

EDIT; thats a nice calculator.

good day / ciao

Is it possible to stretch 16 bits symmetrically?

Reply #157
Whats'a a streaming wave?



Highlight for the stunning reveal:
Spoiler (click to show/hide)


Quote
I'm being told it is impossible to make it span a greater height using (probably new) code?


In the image, those samples at 0 and 1 are not quiet sounds. They're very loud. The quiet sounds are at 6/7/8 in that image.

It's not impossible to stretch (Just add zeroes. Bam. Done.), it's just impossible to add more detail, and it's impossible to add more dynamic range to the signal. After converting to a higher bit depth, you can't interpolate values because you don't have two adjacent values to work with, like you do when oversampling.


Is it possible to stretch 16 bits symmetrically?

Reply #159
How to stretch the depth of HA's collective patience.

Is it possible to stretch 16 bits symmetrically?

Reply #160
Men, this picture looks to me like both a wave and binary that represents the wave. THOUGH this is NOT dynamic range notation which is the hell i'm getting confused with.


There may be, indeed, different definitions of "dynamic range", with appropriate uses in different situations. Unfortunately, this difference is often not emphasized in the literature, since the authors imply that the reader understands it from the context.

The common formula "1 bit = 6 dB" refers to the most basic definition of the dynamic range, as the ratio of the maximum magnitude representable by the code to the minimum magnitude which is still above quantization threshold. Notice that this definition does not take into account any properties of the signal except its magnitude. So it's the most general definition, but it's not specifically tailored to audio.

We can make one step further and recall that what we are actually interested in is the (useful) signal to (useless) noise ratio, and that for sufficiently complex signals we can assume the quantization noise to be white. We can then bring the statistics into play, and define dynamic range as the ratio of the peak magnitude of the (useful) signal to the root mean square value of the added quantization noise (here we assume that there are no other sources of noise). This will lead us to the formula of SNR = 20*log((2^b)*sqrt(3)), where b is the number of bits in the code. This formula gives the value of about 101 dB for a 16-bit quantizer.

But we can go even further and take into account the spectral density of the signal itself. We can then recall that our ears act as a spectrum analyzer, and define the dynamic range as the ratio of the maximum representable signal magnitude to the minimum magnitude of perceivable signal, i.e. the signal that is still detectable by a human listener among the background noise. With this definition, the dynamic range will depend on the form of the signal, and on the abilities of the particular listener. The latter can be leveled by providing a statistically defined model of the "average listener". By this definition, we can expect significantly larger dynamic range for narrow-band signals, especially for those falling into the maximum ear sensitivity band (approximately 3 to 4 kHz), as compared to the wideband signals.

The noise shaping helps to increase the dynamic range in that third sense.


Quote
I'm being told it is impossible to make it span a greater height using (probably new) code?


You can make it "span a greater height" (i.e., change the volume) by multiplying it by a constant value. You can requantize it to a higher precision first - this will not enhance the original signal, but will help to minimize the additional error introduced by a volume change.

You can requantize the signal to a higher precision and then resample it to a higher sample rate. This will insert new sample values, at the increased precision. But this will not enhance the original signal. The initial quantization noise will still be there, and it's there to stay forever.

You could imagine the following procedure: requantize the signal to a higher precision and then adjust the existing sample values in order to "enhance" the original signal. But how exactly you would adjust them? How would you select the supposedly "more correct" sample values? What is the "correctness" criterion? If it's to make the corrected signal closer to the initial, non-quantized one, then to do this you need to have at least some information about that initial signal. If you know, for example, that your initial signal is a pure sine wave, then enhancing its quantized representation is a relatively easy task. But if you do not know anything about how that initial signal looked like, then there's nothing you can do.


Finally, I recommend to read through these freely available sources (beware, it's an advanced reading, will require some effort and some knowledge of the college-grade mathematics):

Christopher Hicks. The Application of Dither and Noise-Shaping to Nyquist-Rate Digital Audio: an Introduction.
It's a brief but well written article, and it touches many topics mentioned in this thread.

Davide Rocchesso. Introduction to Sound Processing.
A nice textbook on digital audio processing.

Is it possible to stretch 16 bits symmetrically?

Reply #161
thats a nice calculator.

Just want to clarify that my script only convert between dBFS and sample values in specified bit depth but not stretching existing sample values, but fiddling with the input fields may provide some hints to you.

Is it possible to stretch 16 bits symmetrically?

Reply #162
[img]


You're just confusing yourself even more now.

The picture above shows quantization with a 4-bit unsigned integer.
Unsigned means that the most significant bit (MSB) is not used for negative numbers, so the range is 0 to 15, with the silence usually defined as the midpoint.
If it were signed the min value would be -8 and the max value would be 7 with 0 being silence.


If you go from 4-bit to 16-bit (usually always signed) guess what the unsigned value 0 or the signed value -8 will be ... -32768. Full-scale stays full-scale no matter what bit depth you choose.

The quality of the signal however is in the lowest bits. If you went from 16-bit to 4-bit (simply rounding to the nearest integer) back to 16-bit, you have to assume the intermediate value of -8 was -32768, but the original value could have been anywhere between -30720 and -32768.
"I hear it when I see it."

Is it possible to stretch 16 bits symmetrically?

Reply #163
that image? Because it's not 16 bit, in case you thought that.

I thought it was 8bit.

In the image, those samples at 0 and 1 are not quiet sounds. They're very loud.

Easy, I know what a peak when I see one d:

Quote
It's not impossible to stretch (Just add zeroes. Bam. Done.), it's just impossible to add more detail, and it's impossible to add more dynamic range to the signal. After converting to a higher bit depth, you can't interpolate values because you don't have two adjacent values to work with, like you do when oversampling.

Like you say if 1 bit = 6 dB, then by padding out with zero's must be the equivelant to boosting amplitude to 192db fixedorfloat, which results in a new 32 bit wave with theroretical dynamic range (*in the dsp) of 192db, isn't this atleast correct?

The latter can be leveled by providing a statistically defined model of the "average listener". By this definition, we can expect significantly larger dynamic range for narrow-band signals, especially for those falling into the maximum ear sensitivity band (approximately 3 to 4 kHz), as compared to the wideband signals.
By this definition, we can expect significantly larger dynamic range for narrow-band signals, especially for those falling into the maximum ear sensitivity band (approximately 3 to 4 kHz), as compared to the wideband signals.

The noise shaping helps to increase the dynamic range in that third sense.

Right, (I'm positive) this is psychoacoustic noise shaping, whereby dither is shaped similarly to fletcher munson curve within the band of interest and commonly applied when downconverting 24>16.
Theres also another shape though; dither shaped at 1db/oct to beyond band of interest, which is very similar to delta sigma signals. Either is still dither.

You can make it "span a greater height" (i.e., change the volume) by multiplying it by a constant value. You can requantize it to a higher precision first - this will not enhance the original signal, but will help to minimize the additional error introduced by a volume change.

Agreed

Quote
You can requantize the signal to a higher precision and then resample it to a higher sample rate. This will insert new sample values, at the increased precision. But this will not enhance the original signal. The initial quantization noise will still be there, and it's there to stay forever.


I know it will not enhance, (or undo) error created by an ADCs ("quantization error").
But I thought the qhole point of using dither and oversampling together was to fill in gaps in between.
It's done all the time in DACs, just dont understand why doing it at higher precision is so unheard of.

Is it possible to stretch 16 bits symmetrically?

Reply #164
Like you say if 1 bit = 6 dB, then by padding out with zero's must be the equivelant to boosting amplitude to 192db fixedorfloat, which results in a new 32 bit wave with theroretical dynamic range (*in the dsp) of 192db, isn't this atleast correct?

Yes, 32 bits is capable of encoding up to a 192 dB range, but that doesn't mean that the data encoded as 32 bits contain 192 dB of useful information (in fact, almost certainly not).

Is it possible to stretch 16 bits symmetrically?

Reply #165
I know it will not enhance, (or undo) error created by an ADCs ("quantization error").
But I thought the qhole point of using dither and oversampling together was to fill in gaps in between.
It's done all the time in DACs, just dont understand why doing it at higher precision is so unheard of.

Dither (or noise shaping) is applied any time there is more information (i.e. more resolution) than can be encoded in the digital form to which it is about to be converted. Some form of this higher resolution information is then preserved in spite of the limited resolution. This can be either when the source is analog, with theoretical infinite resolution (such as in the case of an ADC), or when the source has a higher bit depth than the destination.

You keep trying to apply dither when going from one digital resolution to a higher resolution, which makes absolutely no sense.

Is it possible to stretch 16 bits symmetrically?

Reply #166
But I thought the qhole point of using dither and oversampling together was to fill in gaps in between.


It isn't.

Quote
It's done all the time in DACs, just dont understand why doing it at higher precision is so unheard of.


It isn't.



Is it possible to stretch 16 bits symmetrically?

Reply #168
"But I thought the qhole point of using dither and oversampling together was to fill in gaps in between."

What gaps are you talking about?

Please, watch the following video from start to end (and actually pay attention to it, especially the part which starts before 7th minute).

https://www.youtube.com/watch?v=d7kJdFGH-WI

Thank you.

Is it possible to stretch 16 bits symmetrically?

Reply #169
Right, (I'm positive) this is psychoacoustic noise shaping, whereby dither is shaped similarly to fletcher munson curve within the band of interest and commonly applied when downconverting 24>16.
Theres also another shape though; dither shaped at 1db/oct to beyond band of interest, which is very similar to delta sigma signals. Either is still dither.


Where did you come up with the 1db/oct figure? Even the textbook first order modulator should provide steeper response than this, and real DACs implement much more aggressive shaping. Anyway, this is also a "psychoacoustic" shaping, since it moves noise to the ultrasonic range, and this is only meaningful because we can not hear ultrasonics (and thus don't need to reproduce them).

Quote
But I thought the qhole point of using dither and oversampling together was to fill in gaps in between.


Dithering is used to convert colored spectrum distortion caused by quantization into a white noise, by means of adding small random component to the signal prior to quantization, which in its turn causes redistribution of the noise spectral density. The terms "dithering" and "noise shaping" are not equivalent, although you may view dithering as one specific way of noise shaping. In practice, with a sufficiently high resolution quantizer, artificial dithering is not needed since all physical signals are inevitably contaminated with noise, and thus are "naturally dithered".

Oversampling is used for two purposes: to provide the headroom in frequency domain for noise shaping, and to move spectral images (which are present in the spectrum of any time-discrete signal) further into ultrasonic range, to simplify the analog filter at the DAC output.

Both techniques (dithering and oversampling) are primarily aimed toward specific changes in the spectrum of the signal. The fact that the associated computations are performed at high precision and thus produce time domain sample values encoded at correspondingly high precision is just a side effect, and not the primary intention. The calculations associated with noise shaping and digital filtering have to be performed at high precision because otherwise the algorithms will not work as predicted by theory (the theory is developed for infinitely precise numbers).

Quote
It's done all the time in DACs, just dont understand why doing it at higher precision is so unheard of.


What do you mean by "unheard"? All oversampling DACs perform their computations at 24- or 32-bit precision internally. All sound processing software usually works at equal or even higher precision. It's a common practice, moreover, it's a requirement for proper operation of many algorithms.

Is it possible to stretch 16 bits symmetrically?

Reply #170
How to stretch the depth of HA's collective patience.

Am I forcing anyone to reply? Asking doesn't do harm to anyone.
I'm interested yet because I know-no-better or get confused with terms (easily done) I get ridiculed, it doesn't bother me but pictures of suicide for example is just not something I'd expect, especially on here of all places.
It's an open forum we're all equals. I will accept and acknowledge a mod mentioned TOS#4.

If you go from 4-bit to 16-bit (usually always signed) guess what the unsigned value 0 or the signed value -8 will be ... -32768. Full-scale stays full-scale no matter what bit depth you choose.

So, full scale of a file is 0dbfs and MSB. What happens everything below then? (don't answer if you do not wish to).

Is this the root of the misunderstandings?

Are we done?

Yes and almost. I will watch that video.

You keep trying to apply dither when going from one digital resolution to a higher resolution, which makes absolutely no sense.

You are right, I am (wrong). I thought it could be applied both ways, seeing as it was used in a "playback" system.
I now realise it was used to downconvert 16>14.

Dithering aside there still appears to be contradiction on the thread regarding the theoretical 192db attainable by increasing volume and the extra precision this buys.
Are you here reffering to accuracy of the volume change applied
or
that it is possibe to increase signal to 192db - That is the ultimate question <<< Though I think it's the former.

Anything other than multiplying by 65536 (the 16 extra bits = 2^16) will result in distortion.
In binary, a multiplication by 2 is just shifting all bits to the left by one bit. Multiplying by 2^16 is equivalent to shifting all bits to the left 16 times.
edit: The extra 16 bits just add extra dynamic range.
[/color]
POST 3 by the way ^

EDIT
Where did you come up with the 1db/oct figure?

Sorry I refered to a picture regarding delta sigma.

Is it possible to stretch 16 bits symmetrically?

Reply #171
I'm interested yet because I know-no-better or get confused with terms (easily done) I get ridiculed, it doesn't bother me but pictures of suicide for example is just not something I'd expect, especially on here of all places.
You get ridiculed because you don't seem to read the answers given to you, nor invest much time to conduct research yourself. Warranted, most of the terms and problems are not that easy to grasp without some sort of technical background, but this is not the place to expect an "Information Technology 101" lecture. Before you use the words, at least try to research on their meaning. Science and engineering normally don't leave terms up to individual interpretations, most of the time they are quite clearly defined. And these definitions can be found online or in books.

So, full scale of a file is 0dbfs and MSB.
Ostensibly 0 dB (relative to) digital fullscale is the highest representable number in whatever number representation you have. Whether that is just the MSB or any other combination of bits is up to the number representation at hand. For example, '1111' could be 15 in unsigned representation, but -1 in two's-complement signed representation, in which '0111' would be the highest number, 7.

What happens everything below then? (don't answer if you do not wish to).
I don't understand that question, but maybe I answered it above? What the bits represent is determined by the representation.
It's only audiophile if it's inconvenient.

Is it possible to stretch 16 bits symmetrically?

Reply #172
It's an open forum we're all equals.


No, we aren't. Some people here have a heck of a lot of knowledge and experience and know what they are talking about. Others don't.

Once again I repeat my question - what exactly are you trying to accomplish, and why?

Is it possible to stretch 16 bits symmetrically?

Reply #173
Yes, full scale means 0 dBFS but has not much to do with the MSB.

A unsigned 4-bit value of 0 is full scale, a signed 16-bit value of -32768 is full scale, a normalized floating point value of +/-1.0 is full scale ...

Quote
What happens everything below then?

The same scaling.

A tone at -6.02 dBFS (that is half the amplitude) would have a peak 16-bit signed value of 16384, or 0.5 normalized float.
A tone at -90 dBFS would have a peak 16-bit value of 1, or 0.0000316 normalized float.

A tone at -120 dBFS would have to have a peak 16-bit value of 0.0328 ... but since we're only storing integers that is impossible. If you round down to 0 the sample is silence (-infinity dBFS), if you round up to 1 you make a big error.
Either way, you lose the information and cannot restore it magically.
"I hear it when I see it."

Is it possible to stretch 16 bits symmetrically?

Reply #174
Dithering aside there still appears to be contradiction on the thread regarding the theoretical 192db attainable by increasing volume and the extra precision this buys.
Are you here reffering to accuracy of the volume change applied
or
that it is possibe to increase signal to 192db - That is the ultimate question <<< Though I think it's the former.


The first thing that needs to be kept straight is the input/output bit depth used (or SR for that matter) vs. the bit depth used for additional processing. Doing additional processing at a higher resolution is to minimize or prevent any new noise/distortion/etc. from getting into the signal - it does nothing to improve any noise/distortion/etc. already in the signal. Thus any "extra precision" only affects new calculations. If you aren't doing any additional processing, you can only either change nothing or make things worse.

The bit depth/SR used for additional DSP will generally be determined by a competent programmer based on the type of DSP being done and the resources (such as CPU, data types, etc.) available.

If you aren't the one doing the programming (or designing a DAC), you probably don't gain much by worrying about this. And if you were doing the programming, you would likely already know how much precision is necessary based on understanding the DSP you were implementing.

IOW, you don't start with the precision - you start with what you're trying implement and choose an appropriate level of precision for the DSP you are implementing.