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 57701 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Is it possible to stretch 16 bits symmetrically?

Reply #75
I mistook dsd for dxd, which I read somewhere.
Ultrasonic isnt an issue, the final 48khz resampling stage gets rid of them.

DXD is just normal PCM at 352.8 kHz with 24 bit samples.


If I understood you right, you reduce bit depth for no good reason, so at the same time you have to upsample to push the additional noise out of the audible range and then you downsample again to the original rate?
What's the point in that other than reducing quality?

And then you feed this mangled signal to a 16-bit DAC with the filters disabled, so you degrade quality even further?
"I hear it when I see it."

Is it possible to stretch 16 bits symmetrically?

Reply #76
> giro1991

how about a quick re-cap of what you were enquiring about

Is it possible to stretch 16 bits symmetrically?

Reply #77
What's the point in that other than reducing quality?

To layer ultrasonic sound on top, which I can't otherwise do with the normal 44.1, as its band limited to 22.05.

I think we're better informed overall.
The tube dsp seems to do what I wish. I'm not sure how/if it affects baseband. If it is detrimental I'd need to find another solution.

One last thing though
Regarding the multibit chip I will be experimenting with.
It has Max diff. linearity errors of

bit 1-7 EdL < 0.5 LSB
bit 8-15 EdL < 1 LSB
bit 16 EdL < 0.75 LSB

Not sure how to optimise this now.

If I apply noise shaping to a high enough level peaking at around 40-48khz, this will affect final volume of the data presented to the DAC, a kind of pre amp if that makes sense? Or am I wrong. IF I am wrong regarding this point it would and have explained it please quote (:

Is it possible to stretch 16 bits symmetrically?

Reply #78
To layer ultrasonic sound on top, which I can't otherwise do with the normal 44.1, as its band limited to 22.05.


Just upsample 2x without a filter and apply a lowpass filter that fits your needs?!
"I hear it when I see it."

Is it possible to stretch 16 bits symmetrically?

Reply #79
quantisation depth isn't just s/n ratio. if dither is not applied at sampling then small signals are lost


Lost. ...In the Cyberspace?

If there is no dither (noise shaped, I assume, else it will definitely be lost, in the noise!), a signal below the 6.02dB*bit value will still survive, but there will be quantization distortion that might not let you hear (or pleasantly hear) it.

Edit: Ok, that would only work for the first bit. Signals even lower will definitely be just silence with a simple quantizer.
Edit2: On a second thought, on an ADC, you might be correct after all.
Edit3: But then, we could be picky about the definition of SNR... One would argue that is precisely the level at which a signal cannot properly exist. Anyway, mixing Analog SNR and Digital SNR is not a good thing to do.

Is it possible to stretch 16 bits symmetrically?

Reply #80
variations within the space of one  quantization gap will not be recorded, thats not the same as the way noise affects an analog recording, so  bit depth is not just s/n

Is it possible to stretch 16 bits symmetrically?

Reply #81
SO starting from/using 16bit standard...
16bit / 44.1, at 88.2, you could get away 8bit
multiply the rate by two again, you can halve the depth again, for same theoretical performance...
multiply rate to 352.8khz (DSD rate), allows 1 bit performance.

But I think the way dither is employed is crucial, perhaps increasing the noise beyong the peak amplitude of the signal being dither contributes.

This is why badly implimented DSD players have massive peaks 100khz... it's on the disc because this is how they encode it, THE SECRET IS OUT

hehe just kidding, but can someone confirm?


No, this is just wrong.  If you sample at a 2x rate, you don't "get away" with half the bit depth.  Each time you double the sampling frequency, you could drop ONE bit, not half of the bits.  This would mean sampling at 88.2kHz with a bit depth of 15.  And that's for pulse code modulation, not delta sigma.  This is the problem with trying to jump into more advanced concepts without understanding the basics - you don't know how to properly relate the information you're receiving, and things get very confusing.

Is it possible to stretch 16 bits symmetrically?

Reply #82
I appreciate that, I feel anyone else reading will also learn from my mistake as well as myself  I would donate if I could.

Just upsample 2x without a filter and apply a lowpass filter that fits your needs?!

Quote
DACs are known to exhibit at least two forms of non-linear distortion. The first, integral non-linearity is similar to the non-linearities typically found in loudspeakers, phono cartridges and tube amplifiers. Integral non-linearity is a large- scale and smooth deviation of the DAC’s transfer function from a perfectly straight line. The second type of non-linearity found in DACs is differential non-linearity. This form of non-linear behavior has a finely detailed grainy structure.

In an ideal DAC, each transition from one digital input code to the next higher code results in exactly the same increase in the analog output current or voltage. For example, if an ideal DAC’s digital input is changed from 1000 to 1001, a DVM monitoring its output may register a change of 100 microvolts. In that case, one would expect that changing the digital input code from 1001 to 1002 would again increase the output voltage by exactly another 100 microvolts. However, real world DACs do not show the same change in the analog output for every equal change in the digital input code.

What’s important here is that while differential non-linearity is found in all DACs, it has no counterpart in the analog domain. Differential non-linearity, like jitter, is a uniquely digital form of non-linear distortion. In mutibit DACs, distortion due to differential non-linearity tends to increase with signal level.

Upsampling Ameliorates Differential Non-linearity
One way to reduce differential non-linearity is to average the outputs of two or more DACs connected in parallel. Indeed, several CD players use this technique to improve sound quality. The idea is that the differential non-linearity errors in each individual DAC will tend to be random and thus tend to average out when DACs are connected in parallel. Oversampling provides another method for averaging away differential non-linearity but without requiring multiple DACs. The ultrasonic image energy that a slow roll-off anti-imaging filter presents to the DAC can be thought of as a form of dither.

As mentioned above, the image spectrum is folded which has the effect of de-correlating it from the baseband audio signal thus making it random for all practical purposes.
To see how this works consider that for each original sample of the 44.1 kHz data stream there are normally 8 interpolation samples generated by the oversampling digital filter and presented to the DAC. If no ultrasonic energy is present, as is the case using a conventional sharp anti-imaging filter (in my case brickwalled 22.05 content, presented as-is to the mulitbit dac), the amplitude of each sample changes very little from one to the next within the 8-sample interpolation period.
With the ultrasonic images present, as occurs with a gentle anti-imaging filter, these interpolated samples can and do change significantly and, for all practical purposes, randomly, from one sample to the next.
We can think of the waveform presented to the DAC as consisting of the superposition of a slowly changing audio baseband signal plus a rapidly changing ultrasonic image signal. The ultrasonic image signal essentially frustrates any systematic interaction between the DAC’s differential non-linearity errors and the slow-changing baseband audio signal, which would otherwise create audible non-linear distortion.
The ultrasonic energy is filtered out first by a analog filter (after the dac - in my case there is a 5th order butterworth at 30-40khz iirc), power amplifier, loudspeakers, air in the room and finally by the ear.
[/size][/font]


Sorry if its a bit long, I tried to cut it down as much as I could.

Is it possible to stretch 16 bits symmetrically?

Reply #83
Sorry if I've missed something, since I've only been following this thread with one eye.
Could it be that the OP was asking how to re-create (synthesize) high frequency content above Nyquist that was filtered out during sampling (ADC or SRC) ?


Is it possible to stretch 16 bits symmetrically?

Reply #85
I appreciate that, I feel anyone else reading will also learn from my mistake as well as myself  I would donate if I could.

Just upsample 2x without a filter and apply a lowpass filter that fits your needs?!

Quote
DACs are known to exhibit at least two forms of non-linear distortion. The first, integral non-linearity is similar to the non-linearities typically found in loudspeakers, phono cartridges and tube amplifiers. Integral non-linearity is a large- scale and smooth deviation of the DAC’s transfer function from a perfectly straight line. The second type of non-linearity found in DACs is differential non-linearity. This form of non-linear behavior has a finely detailed grainy structure.

In an ideal DAC, each transition from one digital input code to the next higher code results in exactly the same increase in the analog output current or voltage. For example, if an ideal DAC’s digital input is changed from 1000 to 1001, a DVM monitoring its output may register a change of 100 microvolts. In that case, one would expect that changing the digital input code from 1001 to 1002 would again increase the output voltage by exactly another 100 microvolts. However, real world DACs do not show the same change in the analog output for every equal change in the digital input code.

What’s important here is that while differential non-linearity is found in all DACs, it has no counterpart in the analog domain. Differential non-linearity, like jitter, is a uniquely digital form of non-linear distortion. In mutibit DACs, distortion due to differential non-linearity tends to increase with signal level.

Upsampling Ameliorates Differential Non-linearity
One way to reduce differential non-linearity is to average the outputs of two or more DACs connected in parallel. Indeed, several CD players use this technique to improve sound quality. The idea is that the differential non-linearity errors in each individual DAC will tend to be random and thus tend to average out when DACs are connected in parallel. Oversampling provides another method for averaging away differential non-linearity but without requiring multiple DACs. The ultrasonic image energy that a slow roll-off anti-imaging filter presents to the DAC can be thought of as a form of dither.

As mentioned above, the image spectrum is folded which has the effect of de-correlating it from the baseband audio signal thus making it random for all practical purposes.
To see how this works consider that for each original sample of the 44.1 kHz data stream there are normally 8 interpolation samples generated by the oversampling digital filter and presented to the DAC. If no ultrasonic energy is present, as is the case using a conventional sharp anti-imaging filter (in my case brickwalled 22.05 content, presented as-is to the mulitbit dac), the amplitude of each sample changes very little from one to the next within the 8-sample interpolation period.
With the ultrasonic images present, as occurs with a gentle anti-imaging filter, these interpolated samples can and do change significantly and, for all practical purposes, randomly, from one sample to the next.
We can think of the waveform presented to the DAC as consisting of the superposition of a slowly changing audio baseband signal plus a rapidly changing ultrasonic image signal. The ultrasonic image signal essentially frustrates any systematic interaction between the DAC’s differential non-linearity errors and the slow-changing baseband audio signal, which would otherwise create audible non-linear distortion.
The ultrasonic energy is filtered out first by a analog filter (after the dac - in my case there is a 5th order butterworth at 30-40khz iirc), power amplifier, loudspeakers, air in the room and finally by the ear.
[/size][/font]


Sorry if its a bit long, I tried to cut it down as much as I could.


Not only is it long but it is irrelevant, largely wrong, and poorly written. IMO not the best place to start from.

For example, when DACs are put in parallel the realizable  goal is to drop the noise floor and one of its disadvantages is that nonlinear distortion is not reduced. Put them in push pull, and the signal doubles and even order nonlinear distortion decreases, and the noise floor only goes up 3 dB so there is a net improvement in SNR.

Is it possible to stretch 16 bits symmetrically?

Reply #86
Quote
He had discovered that when filters were applied to an audio signal
cutting off frequencies of 20 kHz, the brain started to emit electric signals which can be measured and quantified

These signals were at the frequencies and of the pattern which are associated with frustration and anger. Clearly we discussed this at some length and I also would forward the idea that any frequencies which were not part of the original music, such as quantisizing noise produced by compact discs and other digital sources, also produced similar brain Waves."


I think I'll second db1989's vote of worst thread of the year.

Is it possible to stretch 16 bits symmetrically?

Reply #87
After reading over the thread, I agree my intention is very unclear so I want to apologize for this.

Now that I am enlightened in the matter, 'Is it possible to stretch 16 bits symetrically?' should read,

'How to quantise 16bit signal to 32bit+'

Like I said I'm more eductated now thanks to HA

I now know that quantisation error is something that should only exist between adc/dac in the digital realm, be it mp3 or CD etc, and only if the dac is properly implimented. ADC is the cause of this error, not the dac.
To resolve QE error, a secondry wave is rendered using a combination of oversampling and dither (dither applied to oversampled + filtered digital representation), where it is then added ontop of the original digital representation, to to fill gaps present in it, once done it is passed to the dac.
In the case of early CDPs etc, this process was often carried out by a dsp chip in series/to a dac.

I was uncertain how to quantise to 32 bit, (the old 90s dac 1540 had '28-bit' dsp - which makes me think noise is added 28bits down. I'm unsure if this stetches the signal, in a quantum sense, or not, though I'm sure, as explained, MSB cannot move from 0dbfs, only LSB can change I think).

.

whether or not I settle with 48khz, and perhaps use somethign else in future, it is usefull to know this process!

44100 input
1. upsample 48000
2. at this stage I'm trying to extend the original 44100 to 48000 with artifical ultrasonic content up to 24000, currently doing this with noise shaping, though there could be another way
3. Oversample multiple MHZ using sox
4. apply dither, 24bit is all I can find. There is the option here to clip the dither beyond 0dbfs, though I think serious noise shaping would need to be employed to do this. Unsure if 'output bit depth' is output bit depth of dither, or signal.
5. Quantised signal is created, sample this at new rate ie
32k
24k
or 48k with artifical ultrasonics present from begining
or a higher rate, ie 192k, or however high output device allows.

Totally unsure if truncating final outoput will affect the process.

What do we think?




Is it possible to stretch 16 bits symmetrically?

Reply #88
You cannot compensate for  or correct quantization error after the sampling process has allready been carried out.



Are you trying to make  synthetic High frequency content like Aphex aural excieter or a synthetic spectral Codec, as used by Digital Radio Mondiale

Is it possible to stretch 16 bits symmetrically?

Reply #89
'How to quantise 16bit signal to 32bit+'


The answer is: multiply by 65536. That's it. You don't need to do anything else.

As I already said above in this thread, the noise shaping can only be performed when you add the noise. When you requantize from 16 to 32 bits, you are not adding any noise, thus there is nothing to shape. And you can not shape the noise which is already present in original quantized signal, as there is no way, generally, to distinguish the noise from the signal - they already occupy the same frequency band.

Is it possible to stretch 16 bits symmetrically?

Reply #90
Now that I am enlightened in the matter, 'Is it possible to stretch 16 bits symetrically?' should read,

'How to quantise 16bit signal to 32bit+'
What? Quantisation is loss of precision resulting from truncation to a lower precision. You can’t quantise upwards.

Quote
To resolve QE error, a secondry wave is rendered using a combination of oversampling and dither (dither applied to oversampled + filtered digital representation), where it is then added ontop of the original digital representation, to to fill gaps present in it, once done it is passed to the dac.
Um.

Quote
I was uncertain how to quantise to 32 bit, (the old 90s dac 1540 had '28-bit' dsp - which makes me think noise is added 28bits down. I'm unsure if this stetches the signal, in a quantum sense, or not
what

Quote
though I'm sure, as explained, MSB cannot move from 0dbfs, only LSB can change I think).
Again! None of the bits change! They stay next to each other! They’re just shifted.

And as has also already been said, you could refrain from shifting so that the new headroom is above the previous maximal amplitude, not below.

Quote
It appears SoX resampler for example can be set to sample at multiple MHZ, so I was wondering if this is benificial here.
Why would it be?

Quote
44100 input
1. upsample 48000
2. at this stage I'm trying to extend the original 44100 to 48000 with artifical ultrasonic content up to 24000, currently doing this with noise shaping, though there could be another way
for what reason? Can you actually hear beyond ~20 kHz?

Quote
What do we think?
I can’t even.

Is it possible to stretch 16 bits symmetrically?

Reply #91
giro1991, what you want to do has nothing to do with 16 bit to 32 bit conversion (quantization is the wrong word).

Your DAC is limited to 16 bit, so higher bit depths only make sense during processing. In the end you have to quantize back down to 16 bit anyway...
Your DAC is also limited to 48 kHz, so for CD audio you potentially have only 1.95 kHz "space" to add noise or whatever.

I really don't see the point in what you're trying to do.
"I hear it when I see it."

Is it possible to stretch 16 bits symmetrically?

Reply #92
I'm very curious as to the nature of this mysterious "ultrasonic content."

giro, have you gotten your setup to work with 16-bit / 48kHz without any of the additional tinkering?

Is it possible to stretch 16 bits symmetrically?

Reply #93
I was uncertain how to quantise to 32 bit, (the old 90s dac 1540 had '28-bit' dsp - which makes me think noise is added 28bits down.


OK, let me attempt an explanation at what I have a vague hunch that you are thinking of. Let us do this in digits (not bits) first - I will use four digits (although that is less than 2^16) just for the illustration.

You have an original signal 1234. You want higher resolution, right? You "quantise" this to the double precision: 1234.0000. That is, for the illustration, one more (decimal) digit than your old DAC.
Now why did that DAC use more bits internally, even though the final DAC'ing were in 16 bits? Because of roundoff errors. If you do any processing with "1234", then any change in any step needs to affect (in the very least) the "4".  If you make a change that accumulate to twelve, but in fifty operations, then what?  Much better idea to perform the calculations with higher precision, arrive at 1235.678, and only then round off to 1236.

Now I have a decimal point in there. It would of course be the same thing if I had 0.1234 and 0.12340000. PCM signals are treated a bit that way: "all ones" (1111 1111 1111 1111 if sixteen bits) is a full volume signal, and more bits <--> finer resolution. Think of it as "0." in front. Converting to 32 bits would mean throwing sixteen zeroes at the end. It would be a larger number in the digital domain, but in reality it works as if it were 0.thirtitytwo_binary_digits_with_last_sixteen_being_zero rather than 0.sixteen_binary_digits. That is - possibly - the stretching you are talking about.

Is it possible to stretch 16 bits symmetrically?

Reply #94
So we're on page four already, and we're still explaining again and again the difference and conversion between 16 and 32 bits? This feels like someone wants to calculate Riemann integrals and doesn't understand the difference between natural and rational numbers.

I think I'll second db1989's vote of worst thread of the year.
Hell, yeah.

Just a well-meaning advice: giro1991, read up on representation of numbers in digital domain (which has been explained here already ad inf.), basic sampling and quantization. You seem to worry about all kinds of technical terms and details without knowing about the fundamentals what those numbers even represent.
It's only audiophile if it's inconvenient.

Is it possible to stretch 16 bits symmetrically?

Reply #95
What you are getting at (I think) can be achieved with existing digital audio editors.  In Adobe Audition, for example, you can take a 16-bit/44kHz FLAC file and "upconvert" it to 24-bit/96kHz or 32-bit/192kHz or whichever combination you want.  This will give you an increased number of samples per second over a larger range of potential quantization values.


Exactly. Dither is applied at 32LSB, extends the noise floor to 32bit. Quantizing.
When oversampling a 32bit signal (not a floating 16bit) it can Interpolate new values with greater accuracy, resulting in a smoother wave.
If a signal is not quantised first and is left at 16bit, resampling algo working at 32float, i understand has 32bit defintion to work with but the LSB relative to MSB is has not changed, so a resampler is only ever giving you 16bit ACCURACY.

although that is less than 2^16
[...]
That is - possibly - the stretching you are talking about.

Yes it is.

See this picture, it was 28 for a reason, because the dac the very first dac from philips was a 14bitter, initially CD spec was going to be 14bit, but sony changed it to 16bit last minute forcing philips to use noisehaped dither.

Not sure what the purpose of 28bit here is but it appears to be half the definition allowable of the 1540, so to minimise rounding errors, it makes sense.

Signal is quantised/oversampled to 28bits/176.4, (interpolation) smooths out the wave 44.1 wave for the dac to reconstruct.
Noise shaping is only employed here to reduce the audible effect of dither by shifitng it out-of-band because to improve SNR through the 1540.
NS is not at all needed to quantize, as i first though either. Regardless of how it is employed dither is needed.

Ignoring final application I can't see why we can't experiment with 32bit dither (which does exist) accompanied with oversampling to reconstruct a wave in the computational realm to work from.

Is it possible to stretch 16 bits symmetrically?

Reply #96

I have been refering to this picture.
That's showing you the theoretical maximum dynamic range for each bitdepth.

However, if you convert 16-bits to 24-bits, you still have the noise floor of the original 16-bit recording. The noise floor hasn't dropped at all, because you haven't removed any noise. It's the same signal. Just like, when you record a hissy cassette onto a CD, it still has the hiss from the cassette. When you convert a 16-bit signal into 24-bits, it still has the 16-bit noise floor. You don't get that downwards step in the diagram by converting an existing recording to a higher bitdepth.

It's true that any more noise you add due to subsequent processing will be at that lower level, but it's completely swamped by the noise that's still there from the original signal, at the "16-bit level".


If you were starting with a really clean (and quiet!) 24-bit signal, and you were doing lots of processing, then it might just possibly be useful. But you're not, and you're not, so it isn't.


Read this post very carefully over and over until you properly understand it.

Cheers,
David.

Is it possible to stretch 16 bits symmetrically?

Reply #97
Ignoring final application I can't see why we can't experiment with 32bit dither (which does exist) accompanied with oversampling to reconstruct a wave in the computational realm to work from.


This doesn't mean anything.  Its not an experiment you could even try and do.

Is it possible to stretch 16 bits symmetrically?

Reply #98
I'm very curious as to the nature of this mysterious "ultrasonic content."

giro, have you gotten your setup to work with 16-bit / 48kHz without any of the additional tinkering?

Not yet still experimenting ...

However, if you convert 16-bits to 24-bits, you still have the noise floor of the original 16-bit recording. The noise floor hasn't dropped at all, because you haven't removed any noise. It's the same signal.

Yes, but noise floor is not what bothers me. What I'm gettin at is the increase in depth helps at the interpolation stage...

Just like computer games graphics (and I mean smooth), just like image editing...

I know, 24bit is limit of human hearing, but for proccessing, that is irrelevant.

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

Is it possible to stretch 16 bits symmetrically?

Reply #99
Yes, but noise floor is not what bothers me. What I'm gettin at is the increase in depth helps at the interpolation stage...

Yes, any kind of reprocessing, such as resampling, needs to be done at higher bit depth than the source in order to not add significant quantization noise.

Is this what you have been getting at?