HydrogenAudio

Hydrogenaudio Forum => General Audio => Topic started by: giro1991 on 2014-04-13 20:40:51

Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-13 20:40:51
Hello all,

Odd question but is it possible to stretch 16 bits file outward symetrically to 32bit, instead of padding?

Perhaps with addition of upsampling at the same time could generate a new wave entirely in the digital 'realm'.
Like an artifical re-creation of the wave.

Thoughts welcome.

Cheers

EDIT, is fixed / floating point precision related to this?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Nick.C on 2014-04-13 21:21:19
Odd question but is it possible to stretch 16 bits file outward symetrically to 32bit, instead of padding?


Padding with 16-bits moves the existing 16-bit samples 16-bits apart, i.e. multiplies them by 65536. Is that not stretching?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-13 21:22:10
16-bit signed: -32768 to +32767.
Example: a value of 8 (binary 1000) is -72.25 dB below full scale.

32-bit signed: -2147483648 to +2147483647.
Example: a value of 8*65536 = 524288 (binary 1000 0000 0000 0000 0000) is -72.25 dB below full scale.


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.
Think of it this way: if you don't multiply the values you get the same signal at 32 bits but a very low level. Above the original values you then have 16 empty bits for extra dynamic range.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Octocontrabass on 2014-04-13 21:44:50
I know that for unsigned integers, the simplest way to stretch a lower number of bits to a higher number of bits while maintaining the full range is to duplicate the higher bits into the low bits. For 16-bit to 32-bit, you'd just duplicate the entire 16 bits. This method is frequently used in image processing, where it is important that the range of color is not reduced during upsampling.

This method is slightly incorrect for signed values, which are typical of 16-bit audio. I never did work out if there was an easier way, but you could achieve the correct results by converting to unsigned, upsampling, and then converting back to signed.

If the destination format is floating-point, then it's even easier: convert the number to a float, then divide by 32767.


However, I would choose to zero-pad in order to upconvert. It is mathematically correct for both signed and unsigned, and some lossless codecs (including FLAC, which I typically use) have specific optimizations to compress the padding.


I don't know of any algorithms that would help "regenerate" the lower bits, but I do know that there is not much sense in trying if the audio is already 16-bit to begin with.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: saratoga on 2014-04-13 22:15:07
This question doesn't make sense, but probably ordinary zero padding is what the OP is asking for.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: db1989 on 2014-04-13 23:08:29
edit: The extra 16 bits just add extra dynamic range.
Think of it this way: if you don't multiply the values you get the same signal at 32 bits but a very low level. Above the original values you then have 16 empty bits for extra dynamic range.
Whereas if you do shift/0-pad, you get the signal at the same level but with more room for finer details in the new lower bits.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Martel on 2014-04-14 09:54:45
Perhaps with addition of upsampling at the same time could generate a new wave entirely in the digital 'realm'.
Like an artifical re-creation of the wave.
You can't get any more information about the original wave than what was in the original digitized waveform. No amount of upsampling/upconverting is going to re-introduce information lost during digitization of the original signal.
What you call "an artifical re-creation of the wave" is actually done in a digital-to-analogue converter and results in a "perfectly smooth" analogue wave. Only frequencies above half of the original sampling frequency are missing and quiet components might drown in the quantization noise. But all this was already lost, the best you could do is somehow make up the missing information (empirical/statistical modelling) but this is never going to be perfect (the precise information is lost).

If you convert a 44.1kHz/16bit waveform of a 1kHz sine wave to 192kHz/24bit, it will appear "smoother" (i.e. it will have more samples, there will be sample values using all 24 bits) but no additional information will be actually created.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-14 16:09:27
... you could achieve the correct results by converting to unsigned, upsampling, and then converting back to signed.

If the destination format is floating-point, then it's even easier: convert the number to a float, then divide by 32767.

I don't know of any algorithms that would help "regenerate" the lower bits, but I do know that there is not much sense in trying if the audio is already 16-bit to begin with.


Yes, this is my main curiosity.
Consider computer graphics for example, edges in games are jagged by default, then it is up to another (independant) algorithm to smooth out edges. Likewise for images.

From that smooth edge produced you can always go back to the orginal by reversing surely.

What you call "an artifical re-creation of the wave" is actually done in a digital-to-analogue converter and results in a "perfectly smooth" analogue wave."


Forget "digital filters" found on hardware for time being.
Smoothness in the dsp realm is what would like to acheive, if input is 16, obviously you need to down convert to 16bit for playback, what what i'm interested in though is the stage between, which exists only in the computational realm, a signal to 'work with'.

I am aware you can't add details from the original session/track of course, but that is not my curiosity..

I notice foobar pipeline is 32bit float internal, If I were to enable an up sampler for example, I wonder if the wave is zero padded or in fact a genuine wave spanning the enire 32bit realm or whther or not I need to infact sign and unsign in between, with the additonal samples of course.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-14 16:12:36
It may be odd question but reciprocal thinking is healthy.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: pdq on 2014-04-14 16:29:11
It may be odd question but reciprocal thinking is healthy.

That may be, but until someone here actually understands what you are trying to ask, you may not get any satisfactory answers.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: saratoga on 2014-04-14 16:31:36
Resizing an image is analogous to resampling audio, not zero padding.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: pdq on 2014-04-14 16:45:16
If you resize an image to increase the number of pixels, it becomes closer and closer to being continuous, but no matter what, it still consists of pixels.

This is not the case with audio. The reconstruction filter that follows digital-to-analog conversion creates a true, continuous, analog signal with no "steps".
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Martel on 2014-04-14 16:59:13
Have you ever thought about why computer games take a considerable performance hit from enabling anti-aliasing? It's not just some cheap soften or edge-detection (un-informed algorithm) applied to the image. The graphics card is actually calculating more information about the image. It's not just up-converting the aliased base resolution image (without AA).
Title: Is it possible to stretch 16 bits symmetrically?
Post by: drewfx on 2014-04-14 17:00:52
Assuming you are trying to generate a new and different sounding (distorted) waveform and aren't trying to "add detail" or something like that to the original, it is of course possible.

Google waveshaping.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: [JAZ] on 2014-04-14 22:25:07
like saratoga said, the analogy with resizing an image is actually equivalent to resampling, and resampling is perfectly possible with audio.

The correct analogy is color bit depth.  You cannot get a 24bit color image out of a 8bit image, just like you cannot get a 24bit sound file out of an 8 bit sound file. The "noise" (lack of precision) is maintained.

On Audio, I thought once of a method to "kill" the noise floor, but my (lack of) knowledge, and some limitations that I've read about point that it could produce unwanted results. Basically, it would be to try to apply the "noise gate" idea in the frequency domain. I.e. audio->frequency, zero frequencies below a determined dB range, frequency -> audio.
I had this idea when listening to some low bitrate (bad quality) MP3 files out of Vinyl. Since there weren't enough bits, the encoder was removing part of the background noise (not only because of the filter).
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-15 17:50:17
Glad hear this regarding that analogy.  I am a not a proffesional in this subject so bear with me.
I do not believe waveshaping is what I'm after.
It surprises me that I cannot find a dsp that quantizes to 32bit to create this fanatical wave.
I did find a "crusher" which can output 24bit (not sure if this is it, but it appears to work below).
24 is enough but surely 32bit would be easier to compute from 16bit?

Most application pipelines are 32/64bit float but never involve this 'spreading' because it is presumed 9/10 users have a well implimented DAC on the end to do alll this fiddle, which I am trying to acheive myself.

I'm certain a 32bit quantizer would be beneficial if used with a upsampler, to generate a signal.
Cant help but notice Quantize and quantum are alike - picture the digital 'realm'(https://i.imgur.com/jFJKFYL.jpg)I picture it like this in my head, though not as many waves.

This is the closest I got to below, though only 24bit, and the results through mobo output improved considerably in the treble tregion, I even applied a steep filter at 10k (like the Asus One does!) and the highs differed very little which really surprised me, though I am doing this through rubbish portable speakers, the result is definately pleasant compared to default mobo dac.
So much so it makes me wonder how they are even classed as safe for manufacture because the highs are litterally deafening.

I was reading the application of a 14bit dac from the 80's to get an idea and noticed the clever use of a ramp like dither applied towards the end of the spectrum to keep SNR low and slow roll off to aid output in a way I can not explain technically (which is what makes CDPs sound how they do, it essentially a DSP priot to dac).

There is also this same ramp shape on the geektronic dsp and can be made to to oscilate with the speed notch.
(https://i.imgur.com/Ow4BYjX.jpg)

I know to some people on this forum this is not news, but for laymen like myself it would very interesting to experiment with a 32 bit quantizer, if one exists.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: saratoga on 2014-04-15 17:56:40
Glad hear this regarding that analogy.  I am a not a proffesional in this subject so bear with me.
I do not believe waveshaping is what I'm after.
It surprises me that I cannot find a dsp that quantizes to 32bit to create this fanatical wave.


On a typical PC, almost all DSP effects will be quantized at 32 bits because they use 32/64 bit processors.  Beyond what you already have, I do not understand what you are expecting to find.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-15 18:08:04
The way I picture it,
bit depth is vertical definition and
sample rate is horizontal definition.
surely, stretching bitdepth (however acheived) would allow more definition... and you could technically keep adding definition, (not from the original source of course) but definition in the quantum realm.

EDIT: as opposed to padding with zero's which im certain is what pieplines do.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-15 18:18:56
edit: The extra 16 bits just add extra dynamic range.

Perhaps in a playback sense yes, but isnt dynamic range just a measure that exists otherwise in the digital realm?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: saratoga on 2014-04-15 19:09:26
EDIT: as opposed to padding with zero's which im certain is what pieplines do.


They're exactly the same thing.  One and the same. 

And yes, internally everything you're processing is running at 32 bit or higher, so this is being done for you already.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: db1989 on 2014-04-15 19:16:12
Multiplying a.k.a. shifting a.k.a. padding with 0s is stretching the sampling points.

0 becomes 0. 1 becomes 2. 2 becomes 4. And so on.

Quote
I am a not a proffesional in this subject so bear with me.
You don’t need to be a professional to think about this for a few seconds and realise that what you want is already being done and your alternative hypothetical methods are nonsensical.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: [JAZ] on 2014-04-15 22:39:58
I should start by saying that I haven't understand half of your post, so this is an advise.

Said that, you are still confusing concepts. Audio is one dimensional. 2D Graphics are two dimensional. 3D graphics are three dimensional.  Or said it in other words, at one point in time, audio has only one value, graphics have an X/Y or X/Y/X coordinate (depending on 2D or 3D).

As I said before, you should not think on audio bitdepth as a "vertical", or "Y" coordinate. It is comparable to color depth, not to any coordinate.

When audio is sampled, it is sampled at a constant speed. This gives it some properties which translate in preserving frequencies up to half its samplerate (strictly lower than). With adequate algorithms, the samplerate can be changed while maintaining all the frequencies (depending on the filter slope used, and always being the highest one to preseve, less than double the samplerate).

But while the time is strictly defined and constant (and even when it isn't, and there's jitter, most of the time it can be safely ignored), the same isn't true for the value we store for that time. We quantize to a discrete amount of values, determined by the bit depth used.

Say we record 33.40, 44.15, 25.90.  But when writing the file, we need to store 33, 44 and 26.  The difference between the real value and the value stored is not only a numerical difference, but also part of the audio that will be reproduced. The correct term is quantization distortion.
This distortion will be present in the audio, is correlated to the signal, and isn't nice.
To avoid the correlation, which is what makes it bad, a process called "dither" is applied, which means that, instead of quantizing based on the recorded value, a noise signal is added before quantizing (which can be of different kinds, and desirably shaped so that more noise is present in the upper frequencies, to improve the lower ones).

So now, this noise+signal+quantization is going to become only signal by which means exactly?



Edit:  Just to make it clear... What i am saying is that audio bit depth cannot be improved. As it has been said, when increasing the bit depth, the usual method is zero-padding. It's the safest bet. One can also add noise at the next bit, but adding noise on all new bits is useless.

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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-16 13:51:53
The way I picture it,
bit depth is vertical definition and
sample rate is horizontal definition.
surely, stretching bitdepth (however acheived) would allow more definition... and you could technically keep adding definition, (not from the original source of course) but definition in the quantum realm.

EDIT: as opposed to padding with zero's which im certain is what pieplines do.

Well kinda, see [JAZ]'s post above.

At each sampling interval you measure the current value, for example 0.472392 and then you quantize to 16 bits 0.472392 * 32768 = 15479[.341056]. The decimal places cannot be stored so you get a quantization error.

This error is irreversible.
If you resample to a higher sample rate all you do is interpolate between existing points (that all have quantization errors).
If you increase the bit depth you get exactly the same signal with some empty (wasted) bits.

Higher bit depth makes sense when you do processing. If you quantized back to 16 bits after each processing step you would potentially accumulate a lot of errors.




Perhaps in a playback sense yes, but isnt dynamic range just a measure that exists otherwise in the digital realm?

Put simply, increasing dynamic range is all that extra bits do. You can only make use of this though, if the original signal uses that dynamic range or even exceed it.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: dhromed on 2014-04-16 14:30:42
surely, stretching bitdepth (however acheived) would allow more definition


You're confusing stretching a value across a new range, with "stretching" the bits that represent that value.

Say, the maximum 4-bit value is:

1111

And then you "stretch" it across 8 bits, according to your idea:

10101010

It's no longer the maximum! It's just a random value. You just distorted the signal. Good job.

The correct way is padding:

11110000

We don't know anything about those lower 4 bits. That information does not exist. At all. Therefore we can't make them 1111 as well.

Title: Is it possible to stretch 16 bits symmetrically?
Post by: DVDdoug on 2014-04-16 20:18:19
Quote
Is it possible to stretch 16 bits symetrically?, instead of padding with zero's?
I have another simple analogy for you -

If you convert dollars to cents, it gets "padded with zeros".

If you convert meters to millimeters, it gets "padded with zeros".

Remember we are starting out with integers,  so you can't start-out with $111.25 and get 11125 cents.  If you start with $111 you get 11100 cents...  Two more zeros with no more information. 

Now once you've converted to pennies, you can start keeping track of changes, deposits, withdrawals, interest, etc., with more precision.  But with 32-bit audio it's sort-of like keeping track of 1/1000th or 1 millionth of a penny...  Too small to worry about...
Title: Is it possible to stretch 16 bits symmetrically?
Post by: fluzzknock on 2014-04-18 02:46:14
The way I picture it,
bit depth is vertical definition and
sample rate is horizontal definition.
surely, stretching bitdepth (however acheived) would allow more definition... and you could technically keep adding definition, (not from the original source of course) but definition in the quantum realm.

EDIT: as opposed to padding with zero's which im certain is what pieplines do.


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.  Depending on what you are trying to achieve, however, there may no benefit to doing any of this digital conversion from an audio playback perspective.  If your goal is the most accurate reproduction of the original analog waveform, this process can actually degrade that.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-18 13:30:01
I really like the money analogy because it is so simple.

If you start with integer dollars and you go to cents you have to multiply by 10^2 = 100 (decimal is base 10).
$1 = 100c (decimal 1 followed by 2 zeros)
$2 = 200c
...

With 16 to 32 bits it is exactly the same, you have to multiply by 2^16 = 65536 (binary is base 2).
1 = 65536 (binary 1 followed by 16 zeros)
2 = 131072 (binary 10 followed by 16 zeros)
...


If you upsample by 2x, all you basically do is interpolation (linear in the example below just for the sake of simplicity, shouldn't be used for audio!):
1, 2, 4, 5 => 1, 1.5, 2, 3, 4, 4.5, 5

If you stayed at 16 bits you'd just introduce additional errors, because 1.5 would have to become either 1 or 2.
Upsampling doesn't add information to the signal.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: KMD on 2014-04-18 16:17:50
The output from a DAC in the fundamental  architecture of digital audio is not a smooth curve. The reconstruction filter only removes the steps abouve 10 Khz . Low frequency square waves steps are still there. Modern DACs are delta sigma interpolating oversampling and so the output is smooth. Converting to 32 bits and interpolating would be beneficial but obsolete considering that.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: db1989 on 2014-04-18 18:35:39
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.  Depending on what you are trying to achieve, however, there may no benefit to doing any of this digital conversion from an audio playback perspective.  If your goal is the most accurate reproduction of the original analog waveform, this process can actually degrade that.
Yes, this was all already known, but the OP refused to believe that upconverting bit-depth really stretched the possible samples/codes equally. It does. Upconverting is pointless unless it is to do processing at higher precision.

The output from a DAC in the fundamental  architecture of digital audio is not a smooth curve. The reconstruction filter only removes the steps abouve 10 Khz . Low frequency square waves steps are still there. Modern DACs are delta sigma interpolating oversampling and so the output is smooth. Converting to 32 bits and interpolating would be beneficial but obsolete considering that.
Notwithstanding the fact that I have no idea why you think this is relevent, {citation needed} × at least 6
Title: Is it possible to stretch 16 bits symmetrically?
Post by: fluzzknock on 2014-04-18 19:20:40
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.  Depending on what you are trying to achieve, however, there may no benefit to doing any of this digital conversion from an audio playback perspective.  If your goal is the most accurate reproduction of the original analog waveform, this process can actually degrade that.
Yes, this was all already known, but the OP refused to believe that upconverting bit-depth really stretched the possible samples/codes equally. It does. Upconverting is pointless unless it is to do processing at higher precision.


Agreed.  It just seemed that what he was actually looking for wasn't the same as what he said he was looking for. 
Title: Is it possible to stretch 16 bits symmetrically?
Post by: KMD on 2014-04-18 23:07:44
the relevance is  that the comment thread  is pontificating about  the purpose of converting a data stream to a higher bit depth. Is it really nessasary to confirm that a 22Khz brick wall filter does not remove artefacts below 22Khz,  but do you have a question about that.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Nimos on 2014-04-18 23:11:05
To make it easier for you, you can compare audio to a single pixel of graphics. Or a sub pixel to be exact(red, green or blue)

Now for simplicity we can restrict to a grayscale pixel where only one sub pixel is present .  For a 8 bit image, you have 256 shades from 0( deep black) to 255(  bright white). 32 bit images that you use generally is 8 bit each for red, green, blue and transparency.

Now if you have a 8 bit pixel at 128(half bright) and upscale it to 16 bit, and view in 16 bit display then you should get the same shade at 32768. You can change the 8 bit value up or down by 1 and you will get 16 bit value up or down by 256. You won't have a value in between.

But if you are increasing the frame rate, analogous to resampling audio, you will get values in between the two levels of gray at frames between the original frames. For example of you are doubling the frame rate, you will get a value up our down by 128 at the new frames being created in between the existing frames(assuming a linear sweep).

Okay, now will the new frame rate make the video appear smooth? Not necessarily. In analogue domain, your Crt, Lcd or Led monitor will not jump abruptly from one level to another level of brightness. It may appear like a slow smooth transition due to the characteristics of the element producing the light. Ever seen a light bulb or tube when power goes off? Similarly, the inertia of the speaker diaphragm will make any rapid movement smoothed out.

Also you cannot go on increasing the frame rate and expect smooth transition. Your eye has a limitation where it can sense only a signal which persisted for a specific time period. Any image persisted below this period will not be sensed and it will get mixed with the next image. For audio we have already reached this point and we can go no further. Your ear low passes and thus smoothens the Audio like your eye.

This is based on my knowledge and may not be 100% correct. But don't bother about data that is not there or problems that do not exist.

NOTE: since audio data is signed you will have range of one bit less for audio levels than for image.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: saratoga on 2014-04-18 23:58:38
Is it really nessasary to confirm that a 22Khz brick wall filter does not remove artefacts below 22Khz,  but do you have a question about that.


I think he means the nonsense you wrote about a stairstep below 10 kHz.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-19 00:07:04
But if you are increasing the frame rate, analogous to resampling audio, you will get values in between the two levels of gray at frames between the original frames. For example of you are doubling the frame rate, you will get a value up our down by 128 at the new frames being created in between the existing frames(assuming a linear sweep).

Okay, now will the new frame rate make the video appear smooth? Not necessarily. In analogue domain, your Crt, Lcd or Led monitor will not jump abruptly from one level to another level of brightness. It may appear like a slow smooth transition due to the characteristics of the element producing the light. Ever seen a light bulb or tube when power goes off? Similarly, the inertia of the speaker diaphragm will make any rapid movement smoothed out.

Also you cannot go on increasing the frame rate and expect smooth transition.

I understand we've reached the optimum, for recording, and listening and that our perception won't notice. But i'm talking strictly proccessing, forget output.
If I read it right, you've proved that combining upsampling with an increase in depth allows more definition.

Quote
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.

So there is an alternative method? Plrease excuse my persistance but I've seen adobe audition show up before prior to posting and also noted some DAWs reduce volume by -6dB, when doing 16>24, some don't.
So there are discrepancies.

What sparked my curiosity initially is how Philips achieved "16bit performance using a 14bit dac" in the 80s.
Noiseshaped dither applied to an oversampled signal is clear so lets not discuss this, but rather the 16>28>14bit stage (http://www.dutchaudioclassics.nl/img/info/tda1540/fig-2.jpg).
I wanted to know what exactly is going on and whether or not there is a strict way of going about it if I were to replicate it in DAW/player remaining in computational realm for time being, when converting up/down.
See this thread, the 3rd post. My curiousty surrounds mysterious 'Upconverting' (another wild term let loose).
http://forums.stevehoffman.tv/threads/upsa...-dither.304816/ (http://forums.stevehoffman.tv/threads/upsampling-coverting-from-16-to-24-bit-and-dither.304816/)

I can't see how recording analog in 24 bit then (compressing with dither) to 16 bit yields good results but you can't do it the other way?
EDIT, though you probably have told me it's just not getting through.

Sound cards today are rediculous 24bit SNR yet are subject to noise present on 16bit material, can you not emulate 24bit with 16? perhaps a stupid question?

Something else - older hardware with a low SNR specificaton.
Surely that is form of dynamic compression, pschoacoustically no? likewise truncating/rounding 16bit file to 8bit?

I appreciate the input (:

I should really take up a course on this.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: saratoga on 2014-04-19 00:16:52
What sparked my curiosity initially is how Philips achieved "16bit performance using a 14bit dac" in the 80s.
Noiseshaped dither applied to an oversampled signal is clear so lets not discuss this, but rather the 16>28>14bit stage (http://www.dutchaudioclassics.nl/img/info/tda1540/fig-2.jpg).


http://en.wikipedia.org/wiki/Oversampling (http://en.wikipedia.org/wiki/Oversampling)

I wanted to know what exactly is going on and whether or not there is a strict way of going about it if I were to replicate it in DAW/player remaining in computational realm for time being, when converting up/down.


Oversampling is used to improve the accuracy when converting from analog to digital, or digital to analog.  If aren't actually doing anything, then this question doesn't even make sense.  A loss of SNR is only defined when you are actually doing something.     

Sound cards today are rediculous 24bit SNR yet are subject to noise present on 16bit material, can you not emulate 24bit with 16? perhaps a stupid question?


The question doesn't really make sense.  Actually, I don't understand why you are asking complex questions when you have not understood the fundamentals.  It is a waste of time.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-19 01:21:01
I am trying to replicate this, in foobar...
(http://m.eet.com/media/1059079/adisarf3.gif)
more specifically this
(http://www-3.unipv.it/cibra/Korg_MR1_DSD_PCM192k_noise.gif)
Title: Is it possible to stretch 16 bits symmetrically?
Post by: saratoga on 2014-04-19 01:35:55
I am trying to replicate this, in foobar...


By using the EQ?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-19 01:43:51
I understand we've reached the optimum, for recording, and listening and that our perception won't notice. But i'm talking strictly proccessing, forget output.
If I read it right, you've proved that combining upsampling with an increase in depth allows more definition.

Higher sampling rate allows for storing higher frequencies. This helps especially with nonlinear effects that would otherwise create a lot of aliasing.
Higher bit depth allows for higher dynamic range, reduces the quantization errors for each processing step.


Quote
Plrease excuse my persistance but I've seen adobe audition show up before prior to posting and also noted some DAWs reduce volume by -6dB, when doing 16>24, some don't.

Just increasing bit depth should not change the levels at all. I've never seen a DAW do this.


Quote
Noiseshaped dither applied to an oversampled signal is clear so lets not discuss this, but rather the 16>28>14bit stage (http://www.dutchaudioclassics.nl/img/info/tda1540/fig-2.jpg).

If you have a higher sampling rate you can get away with lower bit depth, because you can move the noise out of the audible range.


Quote
I wanted to know what exactly is going on and whether or not there is a strict way of going about it if I were to replicate it in DAW/player remaining in computational realm for time being, when converting up/down.
See this thread, the 3rd post. My curiousty surrounds mysterious 'Upconverting' (another wild term let loose).

That is nonsense. Increasing bit depth is a simple matter of multiplying by 2^(increase in bits), which is just zero padding.
The sample values do not change nonlinearly, so there is no need to attenuate anything.


Quote
Sound cards today are rediculous 24bit SNR yet are subject to noise present on 16bit material, can you not emulate 24bit with 16? perhaps a stupid question?

Yes it is. Did you not get the previous examples?

A 24-bit value of 98304 would be a 16-bit value of 1.5, but since we're only storing integers we have to use 1 or 2 (so we introduce an error, i.e. lose information).
If you have a 16-bit value of 1, how on earth would you restore the lost information to find out what the original 24-bit value was?


Quote
Surely that is form of dynamic compression, pschoacoustically no? likewise truncating/rounding 16bit file to 8bit?

No, low SNR just means that: a high noise floor.

Think of it as the information in the lower bits being destroyed by setting the bits to random values.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-19 01:49:34
I am trying to replicate this, in foobar...

This doesn't make any sense.

The noise is already in your recordings.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-19 02:24:08
I have a 16bit mulitbit dac, which I will be using with its digital filter bypassed to compare sound.
Then it makes sense...

Quote
If you have a higher sampling rate you can get away with lower bit depth, because you can move the noise out of the audible range.


Ok thank you that one explains it all.

EQ won't work because almost all vsts, yes do operate at high bit depths and large sample rates but always apply effects within 22.05, never beyond.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Arnold B. Krueger on 2014-04-19 04:37:47
The output from a DAC in the fundamental  architecture of digital audio is not a smooth curve.


Yes it is.

Quote
The reconstruction filter only removes the steps above 10 Khz .



Not a problem because the steps are all above 22.05 KHz (44.1 KHz sampling)


Quote
Low frequency square waves steps are still there.


What low frequency square waves?

Quote
Modern DACs are delta sigma interpolating oversampling and so the output is smooth.


No, the steps are there, they are just at a higher frequency because of the oversampling.


Quote
Converting to 32 bits and interpolating would be beneficial but obsolete considering that.


Beneficial, why?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-19 11:24:22
The main process I'm going about is quantization, If only I had known this term earlier.
As said, increasing rate can allow a reduction in bit depth without affecting output quality, but what is often overlooked is dither (specifically noise shaped) as a method of reducing bit depth (to 8,12 or 14), and that 3 stages can work together to "quantize" the signal.

When you look at the way quantization is used in older hardware, which is where this method first appears (always do your history/look at the timeline!) it is clear that ultrasonic dither that was/is present at the dac input, at a high level, outwith band out-of-interest (noise shaped not TDPF), was an intentional feature that kept dac linear. ultrasonisic content,  actually aids thelinearity, because, in reality, if you reverse engineer the process, ADCs saw ultrasonic content above 22.5 all the time, present on studio tape. quantizing simply reverses the process, and outputs appears to have less of this distortion mentioned by JAZ.

What I find really flipping odd is mastering engineers today (analog tape never used mind you) seem to use noise shaped dither plugins, most of which only apply "dither shape" below 22050
(http://help.izotope.com/docs/rx1/pages/images/dither.jpg),

This shape above is "phsycoacoustic shape" base on flethcer munson curve, similar in application method (regarding bit depth), but is not the same as noise shaped dither rendered in the ultrasonic range, a computation that exists in D/A conversion process (hardware dsp) on older hardware and, iirc on todays hardware too (I think I read noiseshaping is inherant feature on Delta converters somewhere).

EDIT: Please see this, another gem from the web

Quote
This topic has come up again and again for years. The analog guys generally knew about the importance of sound +20kHz, but with the digital takeover, much of this arcane knowledge is becoming lost.
I'd like to point to a thread from recording.org:
The following is an excerpt from the much talked about On Line Chat with Mr. Rupert Neve, Fletcher of Mercenary Audio fame moderating.....(as it pertains to this thread).
Quote
Fletcher: "There has been some measure of debate about bandwidth including frequencies above 20kHz, can we hear them, do they make a difference, etc.?"

Rupert: "OK, Fletch, pin your ears back... back in 1977, just after I had sold the company,
George Martin called me to say that Air Studios had taken delivery of a Neve Console which did not seem to be giving satisfaction to Geoff Emmerick.
In fact, he said that Geoff is unhappy... engineers from the company, bear in mind that at this point I was not primarily involved,
had visited the studio and reported that nothing was wrong. They said that the customer is mad and that the problem will go away if we ignore it long enough.

Well I visited the studio and after careful listening with Geoff, I agreed with him that three panels on this 48 panel console sounded slightly different. We discovered that there was a 3 dB peak at 54kHz Geoff's golden ears had perceived that there was a difference. We found that 3 transformers had been incorrectly wired and it was a matter of minutes to correct this. After which Geoff was happy. And I mean that he relaxed and there was a big smile on his face.

As you can imagine a lot of theories were put forward, but even today I couldn't tell you how an experienced listener can perceive frequencies of the normal range of hearing. And following on from this, I was visiting Japan and was invited to the laboratories of Professor Oohashi 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."

Notice how they ridicule the OP at first,
Source (http://audiosex.pro/index.php?/topic/1925-looking-for-vst-equalizer-for-boosting-40khz-range/page__st__20__p__17306#entry17306)
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-19 11:50:10
And note that izotope mbit among others, is industry standard for 24 > 16 down conversion, with that dither peaking at 22050? It's no wonder music today sound like garbage.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: lvqcl on 2014-04-19 12:02:53
So you don't understand that frequencies above 22050 don't exist in a signal sampled at 44100 Hz?

Then I agree with saratoga: "I don't understand why you are asking complex questions when you have not understood the fundamentals. It is a waste of time."
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-19 12:05:28
I do, but during the conversion process it appears to be essential.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: KMD on 2014-04-19 12:25:48
OK.    I did temporarily overlook the fact that the use of dither  keeps the input moving between quantization levels at a rate of a least 10KHz.

Here  is a reference that is relevant  Resolution below the Least Significant Bit in Digital Systems with Dither  by  John Vanderkooy and Stanley P. Lipshitz
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-19 12:30:30
???

I feel so confused.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-19 12:35:19
"The work was motivated by some common misunderstandings about digital systems.
It is commonly believed that small signals or signal details are lost if they are smaller
than the quantizing step. Expanding on previous- arguments, it is shown that this is not
true when the signal to be quantized contains a wide-band noise dither with an amplitude
of approximately the step size."

I like it already, will give it a read.

http://www.drewdaniels.com/dither.pdf (http://www.drewdaniels.com/dither.pdf)
Title: Is it possible to stretch 16 bits symmetrically?
Post by: drfisheye on 2014-04-19 12:59:06
Quote
I was visiting Japan and was invited to the laboratories of Professor Oohashi 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."

That's because the mosquito's stopped biting when the high frequencies were present.

Quoting a guy who tells a story about a Japanese professor who I can't find on the internet isn't going to convince anyone.

Power cables can also make a hell of a difference in  sound by the way. Without them, you don't hear anything. That's what a Korean professor told me.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: db1989 on 2014-04-19 13:23:15
This will be a strong contender for worst thread of the year.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: alexeysp on 2014-04-19 14:10:02
I feel so confused.


If your remark is about the last few KMD's posts, you shouldn't be. As I understand, KMD is referring to the situation when, if no dithering is applied, and the signal is slowly changing, then due to quantization long runs of consecutive equal magnitude values can appear in the digital sample stream. These values form a "stairstep", which can not be removed by linear filtering. This was discussed before, in this thread (http://www.hydrogenaudio.org/forums/index.php?showtopic=94113&st=0), with a nice illustration in this post (http://www.hydrogenaudio.org/forums/index.php?showtopic=94113&view=findpost&p=790042).

@giro1991: noise shaping can only be performed in the process of adding the noise, i.e., during the quantization. If you have the signal which is already quantized (say, to a 16-bit resolution), then the noise is already mixed into it, and in general case there is no way to remove or reduce it.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: [JAZ] on 2014-04-19 14:57:54
@giro: Since you are willing to learn, I suggest you to take a look at these two videos from Monty, from the Xiph.org.

http://xiph.org/video/vid1.shtml (http://xiph.org/video/vid1.shtml)
http://xiph.org/video/vid2.shtml (http://xiph.org/video/vid2.shtml)

Especially video 2 talks and shows about bitdepth, quantization and what happens to a digital signal when it passes through a DAC.

Said that, the problem that you seem to be having is with the source at which dither is applied.
Dither by itself can be applied to any signal. It is a type of noise. And this noise can be shaped, and the shape can be of multiple ways as you have even shown in a graphic.

But by itself, this dither doesn't bring the noise down, more so if the is already noise in there.

To be of any use, the dither is applied when changing down the bit depth (i.e. 32 ->24, 24->16, etc...) due to the necessary quantization of values, not when increasing it, because the whole new bits added would be based on those that were already present in the signal, not to their correct values.

Those examples that you mention that oversample, change the bitdepth to have room for the new values that will get generated during the whole process. It doesn't really change the noise floor.

Title: Is it possible to stretch 16 bits symmetrically?
Post by: db1989 on 2014-04-19 15:18:51
This was discussed before, in this thread (http://www.hydrogenaudio.org/forums/index.php?showtopic=94113&st=0), with a nice illustration in this post (http://www.hydrogenaudio.org/forums/index.php?showtopic=94113&view=findpost&p=790042).
…and was concluded by less sensationalist posters to be neither surprising nor audibly relevant, if I’m not mistaken?

@giro: Since you are willing to learn, I suggest you to take a look at these two videos from Monty, from the Xiph.org.

http://xiph.org/video/vid1.shtml (http://xiph.org/video/vid1.shtml)
http://xiph.org/video/vid2.shtml (http://xiph.org/video/vid2.shtml)
Thanks: these excellent videos should be recommended at every opportunity.

Quote
Those examples that you mention that oversample, change the bitdepth to have room for the new values that will get generated during the whole process. It doesn't really change the noise floor.
Yup, the increased bit-depth just enables more precise interpolationm and since even a theoretical perfect interpolation leaves the original signal functionally unchanged, interpolating between samples of noise yields only an upsampled equivalent of the original noise. Apparently we can never emphasise it enough: you can’t create something from nothing, especially not ‘quality’.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-19 15:38:22
If your remark is about the last few KMD's posts, you shouldn't be. As I understand, KMD is referring to the situation when, if no dithering is applied, and the signal is slowly changing, then due to quantization long runs of consecutive equal magnitude values can appear in the digital sample stream. These values form a "stairstep", which can not be removed by linear filtering.


Not really about KMD's post, but anyway, well of course if you store a square wave then it's not magically going to turn into a smooth sine wave. That is regardless of bit depth.
If you don't dither you will get nonlinear distortion products. The closer you get to the limit of the dynamic range the bigger those will be, effectively turning sines more and more into aliased squares.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-19 15:47:11
Lets ignore my nonsensical 'Uprezzing' tangent and focus reducing bit depth.

As you seen in previous posts, I'm experimenting with dsps.

I successfully applied noise shaped dither to a 16bit file, to output 8bit, I didnt believe it possible but the difference barely audible, if noise shaping is employed correctly (majority of dither based beyond 22.5).

My goal is actually to try replicate the proccessing a digital filter would otherwise do prior to entering a multibit dac, but with foobar. I have a setup where I've bypassed the digital chip, so that the multibit DEM DAC chip is receiving 48khz via optical.

This digital filter is early model from the dawn of Digital, it's very noisy but it's purpose is clear to me.
The oversampling, creating multiple images introduces ultrasonics.
I know I need to create something at relative amplitude to rest of signal, so mirroring makes sense to "create ultrasonic material" which I can base the noise shaped dither on.
Doing it this way, presents the dac with a 16bit file with ultrasonics present, as intended by designer of this DAC, which maintiaining linearity (... i've said all this before).

I have foobar setup so sox is at 4x,
I have two plugins that acheive aliasing, one is called quantiser, which nearly acheives what I'm after by replicating the image beyond 22.5, nearly only because its "vector'd" and still too near band of interest, the other is uselss because it wont budge from 22050 sample decimation. The quantizer is interesting i'm still playing with it. It has an envelope function.
I'd like to get them a little further away from 22.05, for obvious reasons.
The first image is a comparison with the "quantiser plugin" off/on, the second to demonstrate the mirroring it does a little bit more clearly.
(http://i.imgur.com/EnJa4Q1.jpg)(http://i.imgur.com/iTBx7Ay.jpg)
THEN I want to apply quantising and noise shaping to this signal, while still at 176.4, then sampling output at 48khz, where it will go via optical to the multibit.

Hope this is more clear now?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: db1989 on 2014-04-19 16:05:58
Lets ignore my nonsensical 'Uprezzing' tangent and focus reducing bit depth.
“tangent”??? That was your core reason for starting this thread! Not a very good attempt at deflection. Perhaps you should start another thread about your depth-reducing idea to get more topical replies – and to satisfy TOS #5.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: alexeysp on 2014-04-19 16:20:40
This was discussed before, in this thread (http://www.hydrogenaudio.org/forums/index.php?showtopic=94113&st=0), with a nice illustration in this post (http://www.hydrogenaudio.org/forums/index.php?showtopic=94113&view=findpost&p=790042).
…and was concluded by less sensationalist posters to be neither surprising nor audibly relevant, if I’m not mistaken?


Of course it's not something unexpected, just an illustration of how quantization error can result in actual appearance of the infamous "stair steps"  Although strictly speaking it's not a real "stair step", since the reconstructed signal will not stay constant between the sampled points.

With 16 bits of resolution even undithered quantization noise is unlikely to become an audible problem.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-19 17:39:29
I've actually found this which I think is exactly what i'm trying to acheive.
http://skipyrich.com/wiki/Foobar2000:Tube_Sound (http://skipyrich.com/wiki/Foobar2000:Tube_Sound)
Title: Is it possible to stretch 16 bits symmetrically?
Post by: db1989 on 2014-04-19 17:57:03
The descriptions on that page are almost totally devoid of logic, so yes, it seems to be a good fit.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: drewfx on 2014-04-19 18:13:13
Seems to me it's simple:

You have a signal. You dither appropriately and then quantize it.

You now have a quantized signal, which consists of your original signal, dither and quantization error.

You increase bit depth by zero padding.

Now the only way you can take advantage of those extra bits is if you have some way of differentiating your original signal from the dither + QE.

In oversampling, you know that you have no signal above a certain frequency so you can filter things out.

But in the general case, if you don't know what part of the quantized signal is the original signal and what isn't, there's nothing you can gain.

What am I missing?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-19 18:21:52
Seems to me it's simple:

You have a signal. You dither appropriately and then quantize it.

You now have a quantized signal, which consists of your original signal, dither and quantization error.

Can't have this at all. Does this quantization error occur simply because there isnt anything past 22050?
By your post, surely oversampling comes first, generate harmonics using that tube sound dsp second, then quantising (up or down) last?

Which seems to me just the reversal of ADC process, what ever the musical content is. (by musical i mean transient content, not tones and sne waves, which people seem to use for proof)...

Quote
Now the only way you can take advantage of those extra bits is if you have some way of differentiating your original signal from the dither + QE.

What about enabling asymetric option/balance in tube emulatior? (which is a feature on this dsp actually).
Title: Is it possible to stretch 16 bits symmetrically?
Post by: drewfx on 2014-04-19 18:27:36
Quantization error is, by definition, the difference between an unquantized signal and the quantized signal.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-19 18:37:00
Quantization error is, by definition, the difference between an unquantized signal and the quantized signal.


"Error resulting from trying to represent a continuous analog signal with discrete, stepped digital data. The problem arises when the analog value being sampled falls between two digital “steps.” When this happens, the analog value must be represented by the nearest digital value, resulting in a very slight error. In other words, the difference between the continuous analog waveform, and the stair-stepped digital representation is quantization error"

doesnt oversampling address this?

edit: spelling mistake -.-
Title: Is it possible to stretch 16 bits symmetrically?
Post by: KMD on 2014-04-19 18:59:30
oversampling refers to rate not depth. It is used to allow less complex analog filters.  Maybe you are envisioning that  adjacent samples can be summed to increase bit depth and decrease bandwidth that is possible in principle  and is simmillar  the delta sigma technique
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-19 19:02:18
You mean digital filters not analog right?

Something else if anyone could answer.

If noise shaped dither applied in the ultrasonic range exceeds that of the peak amplitude of the baseband audio, does this push the baseband further in the noise floor upon conversion...?

Title: Is it possible to stretch 16 bits symmetrically?
Post by: KMD on 2014-04-19 19:10:13
No I meant the  analog anti aliasing or anti image filters that are part of the process.

noise floor can be  a misleading term as noise is summed with and accompanies a signal, not a floor that it sits on top off. It can even increase with an increaese signal level in some scenarios.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: drewfx on 2014-04-19 19:11:23
Oversampling at a lower bit depth allows you (among other things) to increase the bit depth at the output and then filter out the QE + dither that is above the Nyquist frequency of the (lower) output sample rate. So you can effectively trade sample rate for bit depth.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-19 19:21:17
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?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: drewfx on 2014-04-19 19:27:45
I believe that without noise shaping you only get ~3dB for every doubling of sample rate.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-19 19:30:53
I've been condoning noise shaping the entire thread, I will be using it. It must be used.
I believe that without noise shaping you only get ~3dB for every doubling of sample rate.

Please excuse my persistance but I've seen adobe audition show up before prior to posting and also noted some DAWs reduce volume by -6dB, when doing 16>24, some don't.
So there are discrepancies.

I knew I was on to something from the start I was almost conviced to be getting no where.

I still need to find a way to apply noise shaping as far as 48khz would allow.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-19 19:37:50
multiply rate to 352.8khz (DSD rate), allows 1 bit performance.


Please... DSD operates at 2822.4 kHz.
Also, DSD uses PDM and not PCM. It contains a sigma-delta modulated signal.

I find DSD to be nonsense. If you want to do processing you usually need to convert to superior PCM first anyway, then back to DSD, and then nowdays you pass this 1-bit signal to a multibit DAC doing more conversions...
And there's the problem with all the ultrasonic noise..


Just get a proper (oversampling) DAC and feed it 44.1 resampled to 88.2 or 96 kHz at 24 bit if it makes you happier.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: [JAZ] on 2014-04-19 19:40:47
Ouch!! Didn't we address this already?


A) Sample Rate: Rate at which samples are obtained/played from/to the ADC/DAC (recording/playback).
B) Bit Depth: The number of bits used to represent each of the samples obtained/played from/to the ADC/DAC.

A is responsible, due to the Shannon Theorem, to define an upper limit of the frequencies that will be stored precisely (given a perfect filter). Sampling at 44Khz, lets one have from 0 to 22.05Khz of frequencies. (0Hz = DC offset).
Since the whole theory of sampling is made around bandlimited (band = frequencies, limited = upper limit for frequencies), it requires a filter to represent the samples how they really are.  The mirroring you see without applying the filter is not something added, but a consequence of not having a filter on a sampled signal. Even resampling entirely in the digital domain requires a filter to avoid the aliasing images. (I extend about this below)

B) is responsible to define the noise floor, also called signal to noise ratio (SNR) that the signal could have (given that the ADC/DAC are precise enough). The noise floor consists of the miminum signal amplitude (in the frequency domain) that is considered not part of the sampled signal. If there is no dithering when quantizing, then there are frequencies that have alias-like effects (that is why we call it correlated).
If there is dither, then, there is a noise signal present. It's noise is visible in the frequency domain like in the graphics you showed in post 36 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=105361&view=findpost&p=863427)


What do I want to say with this?

First, don't use the word "quantize" when talking about sampling rate and frequency bands. There is no quantization in there, there is an upper limit.
Second, don't mix the two concepts. Oversampling is about sample rate, and frequency bandwith. Quantization, dither, SNR is about Bit Depth.


Example of sampling (supposedly, what you now try to do):
If you have a 5Hz sine wave, and a 15Hz sine wave, and you sample it at 20Hz (i.e. 20 samples each second, which means bandlimited to 10Hz) without applying any filter, you get:
(Assuming 0 degrees of phase, and 1 and -1 to be the upper and lower amplitude of the sine)

5Hz -> 0, 1, 0, -1, 0, 1, 0, -1, 0, 1.
15Hz -> 0, -1, 0, 1, 0, -1, 0, 1, 0,  -1.

So... are the signals recorded really different? No. The 5Hz signal is equal to the 15Hz signal recorded. There is a difference only in that the phase is inverted in the 15Hz one.
But if it is so, how can we know if we have a 5Hz sine, or a 15Hz sine? The truth is: Only the one that respects the Shannon theorem (i.e. being below the bandlimited frequency) can exist in a properly sampled signal.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: KMD on 2014-04-19 19:43:06
theres also problem with compessing the file length of a DSD stream for storage , and dithering  is a problem, aren't all DSD encoders all at least 3 bits nowadays anyway
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-19 19:45:43
I mistook dsd for dxd, which I read somewhere.
Ultrasonic isnt an issue, the final 48khz resampling stage gets rid of them.

Thanks JAZ, that well and truely de boggles everything.

theres also problem with compessing the file length of a DSD stream for storage

Not going to store it.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: KMD on 2014-04-19 19:48:08
quantisation depth isn't just s/n ratio. if dither is not applied at sampling then small signals are lost
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-19 19:54:41
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?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: KMD on 2014-04-19 19:54:57
> giro1991

how about a quick re-cap of what you were enquiring about
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-19 19:56:32
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 (:
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-19 20:00:17
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?!
Title: Is it possible to stretch 16 bits symmetrically?
Post by: [JAZ] on 2014-04-19 20:04:10
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: KMD on 2014-04-19 20:08:35
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
Title: Is it possible to stretch 16 bits symmetrically?
Post by: fluzzknock on 2014-04-19 20:17:39
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-19 20:34:22
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Kees de Visser on 2014-04-19 20:34:29
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) ?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-19 22:54:11
Yes

I've split the thread, however
See here

http://www.hydrogenaudio.org/forums/index....st&p=863537 (http://www.hydrogenaudio.org/forums/index.php?showtopic=105424&view=findpost&p=863537)

Thanks for input to everyone
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Arnold B. Krueger on 2014-04-20 15:29:35
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Rotareneg on 2014-04-20 16:10:28
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-22 12:43:11
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?



Title: Is it possible to stretch 16 bits symmetrically?
Post by: KMD on 2014-04-22 13:21:21
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
Title: Is it possible to stretch 16 bits symmetrically?
Post by: alexeysp on 2014-04-22 16:24:45
'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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: db1989 on 2014-04-22 19:08:33
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-22 23:12:17
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: fluzzknock on 2014-04-23 02:08:29
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?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Porcus on 2014-04-23 07:20:30
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Kohlrabi on 2014-04-23 08:10:20
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 (http://en.wikipedia.org/wiki/Bit) (which has been explained here already ad inf.), basic sampling (http://en.wikipedia.org/wiki/Sampling_%28signal_processing%29) and quantization (http://en.wikipedia.org/wiki/Quantization_%28signal_processing%29). You seem to worry about all kinds of technical terms and details without knowing about the fundamentals what those numbers even represent.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-24 17:25:59
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.
(http://www.dutchaudioclassics.nl/img/info/tda1540/fig-2.jpg)
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 (http://en.wikipedia.org/wiki/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 (http://forum.cockos.com/showpost.php?p=71490&postcount=76)) accompanied with oversampling to reconstruct a wave in the computational realm to work from.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: 2Bdecided on 2014-04-24 17:48:54
(http://www.analog.com/static/imported-files/tech_articles/figure7.gif)
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: saratoga on 2014-04-24 17:49:07
Ignoring final application I can't see why we can't experiment with 32bit dither (which does exist (http://forum.cockos.com/showpost.php?p=71490&postcount=76)) 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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-24 17:54:24
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: pdq on 2014-04-24 18:01:36
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?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-24 18:26:48
Yes. It appears I got alot of terms and methods confused getting here I wholeheartedly accept full responsibility for that.

for example
I've been condoning noise shaping the entire thread, I will be using it. It must be used.


haha, I was so sure 

Sorry.

Seems to me it's simple:

You have a signal. You dither appropriately and then quantize it.

You now have a quantized signal, which consists of your original signal, dither and quantization error.

I missed this one...

so yeah, back on track, does 32bit dither exist, would make sense if to minimise error.
I found one herelink (http://forum.cockos.com/showpost.php?p=71490&postcount=76) but it does not appear to be a valid VST that works in foobar. (last edited seven years ago what on earth guys)
Though the source code is in that file I'm sure
Title: Is it possible to stretch 16 bits symmetrically?
Post by: pdq on 2014-04-24 18:43:49
At 32 bits, and also at 24 bits, processing will produce roundoff errors. This is acceptable because it is below the level of audibility. You should never need to add dither at anything more than 16 bits, and even at 16 bits it is debatable whether dither is actually necessary.

Whenever possible, do all of your processing at 24 bits or more, and only when you must reduce to 16 bits for distribution, such as on a CD, do you add dither,

Edit: typo
Title: Is it possible to stretch 16 bits symmetrically?
Post by: saratoga on 2014-04-24 19:01:08
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...


Aside from noise, what other concerns would you have?

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


What about them?  This is a thread about audio. 

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, which is only distantly related to what you are wondering about.  28 and 36 bits were common register sizes.  Using less is probably not possible without having an unacceptable error in the filter.  If you want to know how rounding error in fitlers works, I suggest a textbook.  This is a well studied, if incredibly boring topic.

Edit:  missed a word in that last paragraph.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-24 19:26:50
You should never need to add dither at anything less than 16 bits

Typo?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: pdq on 2014-04-24 19:31:15
You should never need to add dither at anything less than 16 bits

Typo?

Corrected, thanks.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: drewfx on 2014-04-24 19:32:44
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.
(http://www.dutchaudioclassics.nl/img/info/tda1540/fig-2.jpg)
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 (http://en.wikipedia.org/wiki/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.


There's no dither in that picture - only noise shaping.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: drfisheye on 2014-04-24 22:53:03
Isn't it true that most audio software internally works at 32 float point bits? And that in 32 float bit audio, only the values between -1 and 1 are used? 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.

So let's stop talking about 32 bit as if that is better than 24 bit. It's the same. Regular x86 processors are faster with float calculations than with integers, so working in 32 bit floats makes sense for speed. Not for precision.

Also, 16 bits provides enough precision for the human hearing, so 24 bits provides more than enough headroom for rounding errors. No need to go above that.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: saratoga on 2014-04-24 22:58:49
Isn't it true that most audio software internally works at 32 float point bits? And that in 32 float bit audio, only the values between -1 and 1 are used?


Yes, at least on PCs. 

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. 

Also, 16 bits provides enough precision for the human hearing, so 24 bits provides more than enough headroom for rounding errors. No need to go above that.


Well yes, in general caring about these things is foolish, but this thread exists so we're stuck with it. 
Title: Is it possible to stretch 16 bits symmetrically?
Post by: drfisheye on 2014-04-24 23:28:57
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. 

You just had to say that, didn't you? Now Neil Young needs to remaster everything in floating point. 
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-25 00:09:57
Similar signal to noise ratio, but the obvious difference is in the dynamic range.
With 32-bit floating point you could achieve a dynamic range over 1500 dB.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: fluzzknock on 2014-04-25 00:44:22
Similar signal to noise ratio, but the obvious difference is in the dynamic range.
With 32-bit floating point you could achieve a dynamic range over 1500 dB.


Great, now he's going to add another pointless "upconverting" node in his processing chain with the idea that he'll get 1500 dB dynamic range out of it! 
Title: Is it possible to stretch 16 bits symmetrically?
Post by: drewfx on 2014-04-25 00:52:24
Isn't it true that most audio software internally works at 32 float point bits? And that in 32 float bit audio, only the values between -1 and 1 are used? 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.

So let's stop talking about 32 bit as if that is better than 24 bit. It's the same. Regular x86 processors are faster with float calculations than with integers, so working in 32 bit floats makes sense for speed. Not for precision.


By convention 0dBFS in fixed point = 1 in floating point and numbers above +/- 1 will be clipped when converting back to fixed point.

As levels get lower, 32bit floating point has increasingly more precision compared to 24 bit fixed. Thus, for instance, if you were to reduce volume dramatically and then increase it again the lower bits are preserved under floating point rather than truncated.


Quote
Also, 16 bits provides enough precision for the human hearing, so 24 bits provides more than enough headroom for rounding errors. No need to go above that.


If you are doing recursive processing, there is indeed a need to go above that, as errors can accumulate. For this reason, 64 bit double precision is commonly used for certain types of DSP processing in which there might be thousands of iterations.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Martel on 2014-04-25 08:03:07
... noise shaping the entire thread... It must be used.
I agree.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Nick.C on 2014-04-25 09:29:39
|By convention 0dBFS in fixed point = 1 in floating point and numbers above +/- 1 will be clipped when converting back to fixed point.


For 32-bit and 64-bit float, certainly. For 16-bit float, not at all. The proof of concept converter I wrote (TransPCM) makes use of the full dynamic range of 16-bit float and allows values in the range -65504 to +65504. foobar2000 will play 16-bit float WAV and WavPack files.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: 2Bdecided on 2014-04-25 09:49:12
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.
You want more bits, but noise floor is not what bothers you?


Good luck everyone.

Cheers,
David.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-25 10:53:14
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.

You may not agree but graphics is exactly the same regarding interpolation.

There's no dither in that picture - only noise shaping.

Noise shaping is just dither but shaped. It's dither. How low dither is applied is key.

Similar signal to noise ratio, but the obvious difference is in the dynamic range.
With 32-bit floating point you could achieve a dynamic range over 1500 dB.

Which is a scary number if you convert it. But we're not converting, only processing. The added accuracy is benificial.

If you are doing recursive processing, there is indeed a need to go above that, as errors can accumulate. For this reason, 64 bit double recision is commonly used for certain types of DSP processing in which there might be thousands of iterations.

I agree. I'm sure what i'm talking is very well understood and commonly used by technicians who make dsps, but that knowledge stays there. By asking this question I have shed some light on the fact that we can quantise music ourselves prior to it entering hardware, so that dsps following work at optimum capacity (32 float).
Title: Is it possible to stretch 16 bits symmetrically?
Post by: lvqcl on 2014-04-25 11:31:54
Increase in sample rate should be directly proportional to increase in quantisising steps.

Not true.

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

Sample rate and bit depth are unrelated.

Noise shaping is just dither but shaped. It's dither.

Not true.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: julf on 2014-04-25 11:46:50
I agree. I'm sure what i'm talking is very well understood and commonly used by technicians who make dsps, but that knowledge stays there. By asking this question I have shed some light on the fact that we can quantise music ourselves prior to it entering hardware, so that dsps following work at optimum capacity (32 float).


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...
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-25 11:53:28
lvqcl, is this also true for fixed point?

Floating point involves head room, which is perhaps why proportions stop being relevant...
But for fixed point, if 0dbfs max / MSB remains fixed and the LSB extends (or w/e approach dithering takes) with increase in quantising slices, then you are theroetically extending the "dynamic range", yes?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: lvqcl on 2014-04-25 12:09:12
But you said that "sample rate is proportional to increase in quantisising steps". Now you say that "dynamic range is proportional to increase in quantisising steps"... 
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-25 12:11:38
Sample rate proportional to the dynamic range ...

I now realise that applying a 24bit dither (or even a 32bit dither) to a 16 bit file, does not extend the dynamic range.

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...
Title: Is it possible to stretch 16 bits symmetrically?
Post by: julf on 2014-04-25 12:16:36
Sample rate proportional to the dynamic range ...


Sample rate and dynamic range are independent of each other.

Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-25 12:35:28
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?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: julf on 2014-04-25 12:37:38
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.

Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-25 12:41:12
And by independant, is there no way I can apply each to a streaming wave?

I think I'm trying to break the laws of physics right here, bear with...
Title: Is it possible to stretch 16 bits symmetrically?
Post by: julf on 2014-04-25 13:56:25
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...
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Martel on 2014-04-25 14:22:49
I think I'm trying to break the laws of physics right here, bear with...
Don't worry, it's pure math, no physics.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: saratoga on 2014-04-25 15:00:20
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. 
Title: Is it possible to stretch 16 bits symmetrically?
Post by: KMD on 2014-04-25 17:03:06
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: drfisheye on 2014-04-25 17:12:21
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: saratoga on 2014-04-25 17:45:30
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: drfisheye on 2014-04-25 18:48:20
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: db1989 on 2014-04-25 19:36:25
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-27 13:54:13
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.

(https://i.imgur.com/63AkDq1.jpg)

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.

(http://i.imgur.com/KpyZe8t.png)"32 bit output"
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-27 14:26:09
Not helpful...?
If I can really Quantizise like this using foobar for free, who the hell needs a $10k DAC?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-27 14:32:07
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).
Title: Is it possible to stretch 16 bits symmetrically?
Post by: lvqcl on 2014-04-27 14:56:32
So you think that "Dither Transform Results (increases dynamic range)" can increase dynamic range of some existing track? It can't.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-27 15:03:03
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-27 15:03:09
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: lvqcl on 2014-04-27 15:06:21
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".
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-27 15:32:55
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)
Title: Is it possible to stretch 16 bits symmetrically?
Post by: julf on 2014-04-27 16:45:31
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: lvqcl on 2014-04-27 17:21:39
Also what is a "signal level of baseband"?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-27 17:25:55
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"?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: saratoga on 2014-04-27 17:43:40
Stop wasting everyone's time with this stupid crap and go look up things for yourself.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-27 17:53:20
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: db1989 on 2014-04-27 18:38:09
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.

(http://www.thestrong.org/online-collections/images/Z004/Z00490/Z0049011.jpg)

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
Title: Is it possible to stretch 16 bits symmetrically?
Post by: saratoga on 2014-04-27 18:46:27
In all seriousness you should just lock this thread so hes forced to spend 15 minutes on Wikipedia reading about PCM audio.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-27 19:04:30
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
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-27 21:04:42
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: julf on 2014-04-27 21:24:02
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-27 22:27:14
In foobar2000 simply set the output bit depth to 24 bit.
In any DAW simply by changing bit depth to 24 bit.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: db1989 on 2014-04-27 22:40:39
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-28 01:20:00
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..
Title: Is it possible to stretch 16 bits symmetrically?
Post by: db1989 on 2014-04-28 01:30:25
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
Title: Is it possible to stretch 16 bits symmetrically?
Post by: bennetng on 2014-04-28 06:04:40
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 (http://www.hydrogenaudio.org/forums/index.php?act=attach&type=post&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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-28 07:14:17
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.
(http://4.bp.blogspot.com/-HIGcwkR1SZw/Tq6MpCeQqhI/AAAAAAAAACw/aNExGkNmL_U/s1600/PCM.svg.png)
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
Title: Is it possible to stretch 16 bits symmetrically?
Post by: dhromed on 2014-04-28 08:55:29
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: 2Bdecided on 2014-04-28 09:50:52
Title: Is it possible to stretch 16 bits symmetrically?
Post by: dhromed on 2014-04-28 09:52:43
How to stretch the depth of HA's collective patience.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: alexeysp on 2014-04-28 09:53:41
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. (http://www.digitalsignallabs.com/noiseb.ps)
It's a brief but well written article, and it touches many topics mentioned in this thread.

Davide Rocchesso. Introduction to Sound Processing. (http://profs.sci.univr.it/~rocchess/htmls/corsi/SoundProcessing/SoundProcessingBook/vsp.pdf)
A nice textbook on digital audio processing.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: bennetng on 2014-04-28 09:55:20
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-28 12:08:50
[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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-28 12:39:47
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: pdq on 2014-04-28 13:03:35
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).
Title: Is it possible to stretch 16 bits symmetrically?
Post by: pdq on 2014-04-28 13:08:54
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: julf on 2014-04-28 13:09:37
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.

Title: Is it possible to stretch 16 bits symmetrically?
Post by: rick.hughes on 2014-04-28 13:31:46
that image? Because it's not 16 bit, in case you thought that.

I thought it was 8bit.
Is this the root of the misunderstandings? Your chart is indeed 4 bit unsigned. 8bit would have 256 steps. And 16 bit has 65,536 steps.

Are we done?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Martel on 2014-04-28 13:43:31
"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 (https://www.youtube.com/watch?v=d7kJdFGH-WI)

Thank you.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: alexeysp on 2014-04-28 14:05:41
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-04-28 16:01:52
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Kohlrabi on 2014-04-28 16:26:50
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 (http://en.wikipedia.org/wiki/DBFS) 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 (http://en.wikipedia.org/wiki/Signed_number_representations) 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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: julf on 2014-04-28 16:35:35
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?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-28 16:40:56
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: drewfx on 2014-04-28 16:58:39
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.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Gecko on 2014-04-28 21:13:15
I found a black and white picture of Nyan Cat on the Internets:
(http://piq.codeus.net/static/media/userpics/piq_56715.png)

The information in this pic can be encoded using exactly 1-bit, so let's assume it is. 0 might be black and 1 might be white.

You and I both know that Nyan Cat is way more colorful. At the very least we need some shades of gray, so lets give it 8-bits where 0 represents black and 255 represents pure white. In between those extremes there are 253 lovely shades of gray. Since pure white was just 1 in the original 1-bit pic, but is now represented by 255, we need to stretch the values of the 1-bit pic so that 1 will become 255. This is the result:
(http://piq.codeus.net/static/media/userpics/piq_56715.png)
Regrettably, even though the 8-bit image can theoretically hold so many shades of gray, Nyan Cat still doesn't look one step closer to its colorful self.

The point being that, even though you could theoretically store a wonderful grayscale version of Nyan Cat in the 8-bit picture, the data you have to work with will only ever leave you with pure black and pure white, no matter the bit depth. Of course you can add some noise (dither) or smooth the values (lowpass) which will provide other values in between 0 and 255 but you are not increasing the fidelity of the picture since all your new values are just based on the old black & white pic and nothing more. Instead you are just further distorting it.

The process is pretty much the same in audio.

Meanwhile, blissfully unaware of this discussion and other worldly distractions, Nyan Cat continues to carelessly hop through endless space... http://www.nyan.cat/ (http://www.nyan.cat/)
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-04-28 21:35:39
But the second one looks better!!1111

Code: [Select]
22:34:19 : Test started.
22:34:27 : 01/01  50.0%
22:34:30 : 02/02  25.0%
22:34:31 : 03/03  12.5%
22:34:33 : 04/04  6.3%
22:34:35 : 05/05  3.1%
22:34:37 : 06/06  1.6%
22:34:40 : 07/07  0.8%
22:34:42 : 08/08  0.4%
22:34:44 : 09/09  0.2%
22:34:46 : 10/10  0.1%
22:34:48 : 11/11  0.0%
22:34:51 : 12/12  0.0%
22:34:52 : Test finished.

----------
Total: 12/12 (0.0%)


Title: Is it possible to stretch 16 bits symmetrically?
Post by: markanini on 2014-04-29 01:08:43
But the second one looks better!!1111


That's gonna mess with someones head 
Title: Is it possible to stretch 16 bits symmetrically?
Post by: fluzzknock on 2014-04-29 01:44:10
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?


He's trying to achieve world peace through dither + noise shaping. Why? Because he can.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Rotareneg on 2014-04-29 02:48:29
Here's a nice video visually demonstrating dither: https://www.youtube.com/watch?v=zWpWIQw7HWU (https://www.youtube.com/watch?v=zWpWIQw7HWU)

And two more, with audio samples: https://www.youtube.com/watch?v=U2mwXiJqAgA (https://www.youtube.com/watch?v=U2mwXiJqAgA) https://www.youtube.com/watch?v=tb6X3WZ3-Uc (https://www.youtube.com/watch?v=tb6X3WZ3-Uc)
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Porcus on 2014-04-29 09:05:59
I think I'll second db1989's vote of worst thread of the year.


I kinda feel that this posting tips the scores in ... I am not completely sure which direction:

Meanwhile, blissfully unaware of this discussion and other worldly distractions, Nyan Cat continues to carelessly hop through endless space... http://www.nyan.cat/ (http://www.nyan.cat/)


Title: Is it possible to stretch 16 bits symmetrically?
Post by: 2Bdecided on 2014-04-29 09:42:57
Meanwhile, blissfully unaware of this discussion and other worldly distractions, Nyan Cat continues to carelessly hop through endless space... http://www.nyan.cat/ (http://www.nyan.cat/)
Thanks for that - I clicked on the link while listening to Horowitz plays Mozart and, well, it wasn't the best mash-up ever!

Cheers,
David.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Martel on 2014-04-29 11:18:37
It does not blend with black metal either. 
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Porcus on 2014-04-29 11:29:57
It does not blend with black metal either. 


Try what is preserved of this classic: http://web.archive.org/web/20001017174641/...ortalbunnydance (http://web.archive.org/web/20001017174641/http://hop.to/immortalbunnydance)
Title: Is it possible to stretch 16 bits symmetrically?
Post by: alexeysp on 2014-04-29 12:35:43
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.


Extra precision is not "bought" by increased volume. It is "bought" by changing the data representation format. But when you change the format you have to simultaneously scale the audio data if you want to preserve the volume, since the volume is determined relative to full scale, and absolute value of the full scale is dictated by the chosen data format.

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

Sorry I refered to a picture regarding delta sigma.


If you mean the first image in this post (http://www.hydrogenaudio.org/forums/index.php?showtopic=105361&view=findpost&p=863427), then it does not show "one decibel per octave" - the ordinate axis is simply marked "dB" to show the units, it does not mean "one decibel". Besides, this image looks even conceptually wrong - the noise plot on the second graph should not be shown as if it "lifts off" the frequency axis, such depiction does not have any meaningful interpretation.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: drewfx on 2014-04-29 18:48:37
Besides, this image looks even conceptually wrong - the noise plot on the second graph should not be shown as if it "lifts off" the frequency axis, such depiction does not have any meaningful interpretation.


Couldn't it be interpreted as, "when approaching Nyquist of a Delta-Sigma, the noise must be above a certain level"?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: alexeysp on 2014-04-29 20:40:07
Couldn't it be interpreted as, "when approaching Nyquist of a Delta-Sigma, the noise must be above a certain level"?


Oh, must it?

I suspect the real reason is that image was made with some kind of vector image editor, and the author didn't know how or simply didn't care to put the right angle on that blue blob.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: drewfx on 2014-04-29 20:58:38
Couldn't it be interpreted as, "when approaching Nyquist of a Delta-Sigma, the noise must be above a certain level"?


Oh, must it?


I'm not sure. 

My thinking was that in Delta-Sigma the resolution becomes coarser as you approach Nyquist, or no?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: alexeysp on 2014-04-30 08:42:05
My thinking was that in Delta-Sigma the resolution becomes coarser as you approach Nyquist, or no?


I'm not sure how do you define "resolution" in this context. The core idea of SDM is that the useful signal bandwidth is narrow relative to the modulator sampling rate, so there's literally nothing but noise in vicinity of Fs/2. This is the design goal, but is it otherwise mandatory that the noise density increases toward Fs/2? It depends on the loop topology. The "canonical sigma-delta" implies that the filter is in the forward path, and it affects both the noise and the signal. This imposes certain restrictions upon the filter transfer function. In the "canonical noise shaper", on the other hand, the filter is in the feedback loop, and it only affects the noise. The latter design gives more freedom for the noise density shape manipulation, so there is no strict requirement that the noise must necessarily increase toward higher frequencies (although it's a natural intention in audio circuits).

The "canonical SDM" is more suitable for the ADC, due to hardware complexity considerations. In the DAC, however, the modulator operates entirely in digital domain, so virtually anything can be implemented.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Kees de Visser on 2014-04-30 16:00:34
Question: the terms "Delta-Sigma" and "Sigma-Delta" are both used. Are they equivalent ?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: saratoga on 2014-04-30 18:38:11
Question: the terms "Delta-Sigma" and "Sigma-Delta" are both used. Are they equivalent ?


The adder ('sigma') comes first, so probably Sigma-Delta is slightly more logical.  Both are used though, so I don't think one is more correct than the other.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: drewfx on 2014-04-30 21:21:21
My thinking was that in Delta-Sigma the resolution becomes coarser as you approach Nyquist, or no?


I'm not sure how do you define "resolution" in this context.


I was thinking in terms of the number of pulses compared to a higher and higher signal frequencies and that the noise must increase.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: alexeysp on 2014-05-01 19:41:27
I was thinking in terms of the number of pulses compared to a higher and higher signal frequencies and that the noise must increase.


Ok. How would you answer these questions:

- If you store 20 kHz sine wave on the Audio CD, how many pulses per wave period are there?
- Is that sine wave still recoverable?
- Is it still recoverable if it's peak magnitude is at -90 dB?
- What will happen if you replace integrator in a "canonical" SDM with differentiator?



Title: Is it possible to stretch 16 bits symmetrically?
Post by: drewfx on 2014-05-02 17:11:13
Very good questions!

Thinking about the same issues in terms of PCM (and without all the additional noise up there) indeed makes it much clearer. Thanks.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: 2Bdecided on 2014-05-02 18:53:20
My thinking was that in Delta-Sigma the resolution becomes coarser as you approach Nyquist, or no?


I'm not sure how do you define "resolution" in this context.


I was thinking in terms of the number of pulses compared to a higher and higher signal frequencies and that the noise must increase.

It does. The SNR is obviously lower.

The "resolution"? alexeysp gave you a though experiment with PCM. Whilst it is relevant and I get the point he's making, dithered PCM is linear. DSD isn't. It might be good enough, but the thought experiment would be fairer if you considered PCM with inadequate dither - now how sure are you that the 20kHz tone has sufficient "resolution"?

Cheers,
David.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Thad E Ginathom on 2014-05-02 20:14:39
Can this 8-page thread be symmetrical stretched to 16 pages? Would that improve the resolution? What will happen to the SNR?
Title: Is it possible to stretch 16 bits symmetrically?
Post by: alexeysp on 2014-05-03 23:42:12

I was thinking in terms of the number of pulses compared to a higher and higher signal frequencies and that the noise must increase.

It does. The SNR is obviously lower.


The key point is that resolution does not degrade because of "insufficient number of pulses". The Shannon theorem still holds, you only need 2+ pulses per period. The resolution is determined by the amount of error in the magnitude of these pulses, and by the changes of this error in time.

The SNR in sigma-delta audio codecs decreases at high frequencies because the noise shaping loop was designed like that, not because the high frequencies are inherently harder to preserve with SDM. It is possible, even with a 1-bit modulator, to shape the noise other way around, and improve SNR at high frequencies at the cost of low frequencies. It just doesn't make much sense for audio applications.

Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-05-06 18:46:10
I have been thinking on this and I would like to 'clarify' where I stand.

When I first saw an analog amplifier, with a dial - Like most people do as kids (common guys), we assume amps just boost input (especially dials without labels).
When it is infact the amp is always boosting and that the dial is actually there to attentuate the input.
Might depend on topology but most amps are like this.
So I get/got attentuation confused with volume, no biggie.

This confusion exists likewise in digital,
When referring to dynamic range for 'storage' (storage as in, media before it enters any form of processing), essentially just another way of saying 'volume the wave is stored at', that's all it is. 16bit volume, 24bit volume.

Consider a cd-rom, due to storage limitation the volume of the media can only be stored at 96db.

Convert a CD to mp3, the mp3 pcm should be an exact duplicate copy (regarding scale) of the CD copy.
However, mp3gain can adjust the properties of the mp3 so that when it is accessed, it plays at an attentuated level. Even so, the full scale is always present untouched.

Now, consider the resource we have available, 32bit float pipe. The wave aka data enters this realm... this arena (word just for you guys  ), yes the means of storage is limited to 96 initially (perhaps other factors aswell, I didn't look into signed bit), but surely when this data enters the dsp, it is just data, you should be able to scale the volume of the wave from 96 to 192db (just like you can attenuate), this would allow any subsequent dsps in the chain, after the boost like resampler to operate at higher precision.


Yes, by convention, there isn't a need to do it (depends on your intention, mines is definately new) seeing as adcs/dacs can only accomodate 24bit max (decided upon our hearing ability). But I wish not to listen to 32bit, I only would like it for processing purposes.
("lord have mercy on my soul")
Yes, 16bit being piped through a 32 bit float will increase 'quantisation slices' from 65536 to a higher number, but you are only operating within the initial depth (wave scaled across 16bits) as opposed to a wave scaled across 32bits, which I think is why people are misconcieving my point seeing as it's still reffering to a "32bit" pipe either way.

If you can attentuate a full scale wave, then it must to be possible to boost a full scale wave, in the dsp realm.
This is my point. ^

Furthermore, the reason I started persuing dither earlier on, is because it appears to be the only dsp available that increases bit depth that can be employed during live playback (i.e. foobar). The only one.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-05-06 18:47:22
"By what means is my intention." Don't ignore the boosting just because the means is not in sight? Rather restrictive.
Most people can't think of a means, so dismiss this view as rediculous, but there is a very valid reason.

If I have a 32bit wave, entering a resampler, then a new, almost infinite wave is constructed, from this new, near infinite wave I can then sample 48k new points, which I can then send to a multibit NOS dac, which is high performing (don't dismiss boosting just because of your opinion of this either).

Remembering the whole point of oversampling in the first place is to extend the limit away from 20khz.
By extending to 48k going by the method as described above, makes total sense for 44.1 sample audio.

Let me simplify my means even further. The chip on the right, is the digital chip, it is the dsp, that conditions the signal fit for the DAC. I've bypassed this and will be streaming 48k direct to the mulitbit. In essence, I'm replacing the digital filter (lots of distortion) with foobar or "32bit supercomputer from the future", atleast relatively speaking to the dac.
(https://i.imgur.com/74i3udk.jpg)
Title: Is it possible to stretch 16 bits symmetrically?
Post by: saratoga on 2014-05-06 19:16:04
Yes, by convention, there isn't a need to do it (depends on your intention, mines is definately new) seeing as adcs/dacs can only accomodate 24bit max (decided upon our hearing ability). But I wish not to listen to 32bit, I only would like it for processing purposes.


For the millionth time, all processing these days is done in floating point, so this happens automatically.

If you can attentuate a full scale wave,


Sure, in floating point, multiply by a value less than 1.0.

then it must to be possible to boost a full scale wave, in the dsp realm.


Sure, in floating point, multiply by a value greater than 1.0.

This is my point. ^


You have discovered multiplication.  Congratulations. 

Let me simplify my means even further. The chip on the right, is the digital chip, it is the dsp, that conditions the signal fit for the DAC. I've bypassed this and will be streaming 48k direct to the mulitbit. In essence, I'm replacing the digital filter (lots of distortion) with foobar or "32bit supercomputer from the future", atleast relatively speaking to the dac.


You're struggling to understand algebra.  You're not doing any of those things because you don't even know what they mean. 
Title: Is it possible to stretch 16 bits symmetrically?
Post by: db1989 on 2014-05-06 19:55:41
If you can attentuate a full scale wave, then it must to be possible to boost a full scale wave, in the dsp realm.
This is my point. ^
No one ever denied this except people with woefully incorrect concepts of digital audio, as you have had and continue to have

Quote
Furthermore, the reason I started persuing dither earlier on, is because it appears to be the only dsp available that increases bit depth that can be employed during live playback (i.e. foobar). The only one.
Dither does not increase bit depth in any useful way whatsoever

"By what means is my intention." Don't ignore the boosting just because the means is not in sight? Rather restrictive.
Most people can't think of a means, so dismiss this view as rediculous, but there is a very valid reason.
No, trust me: we dismiss this entire thread as ridiculous for a lot of “very valid reason”s

Quote
If I have a 32bit wave, entering a resampler, then a new, almost infinite wave is constructed, from this new, near infinite wave I can then sample 48k new points, which I can then send to a multibit NOS dac, which is high performing (don't dismiss boosting just because of your opinion of this either).
You are sampling, at best, intermediate points representing no additional depth/fidelity/quality whatsoever. Big deal! And your silly idea of dither will ensure that not only are you gaining no quality, you’re actually adding noise for no reason. Congratulations. I’ll slip your Nobel Prize for Physics in the mail.

Quote
Let me simplify my means even further. The chip on the right, is the digital chip, it is the dsp, that conditions the signal fit for the DAC. I've bypassed this and will be streaming 48k direct to the mulitbit. In essence, I'm replacing the digital filter (lots of distortion) with foobar or "32bit supercomputer from the future", atleast relatively speaking to the dac.
Stop acting like you’re doing anything (A) revolutionary / (B) logical. Just stop. Go away, read some textbooks, and then come back and agree with us about how misguided all your ideas here are.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-05-06 22:41:44
giro1991, by disabling that filter you will see square waves on the output of your DAC even if you resample to 48 kHz (which is actually quite an insignificant increase in sampling rate).

You trade in the distortion from the DSP chip with the extra HF roll-off, distortion, ultrasonic images ...

As I said, it would be better to buy a proper DAC...
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Kohlrabi on 2014-05-07 06:36:33
Quote
Das ist nicht nur nicht richtig, es ist nicht einmal falsch!

[transl.: It is not only not right, it is not even wrong!]
Title: Is it possible to stretch 16 bits symmetrically?
Post by: giro1991 on 2014-05-08 12:10:20
For the millionth time, all processing these days is done in floating point, so this happens automatically.

Yes it is always used but is multiplication always used?

then it must to be possible to boost a full scale wave, in the dsp realm.

Sure, in floating point, multiply by a value greater than 1.0.

Upon entering 32 float, atleast in foobar, I doubt multiplication is automatic, 16bit depth it is just passed onto 32bit float.

Question is anyone willing to show me a dsp/method that does this multiplication and will do it upto 192dB vst/foobar?
If one does not exist then how easy would it be to make one?

If you can attenuate a full scale wave, then it must to be possible to boost a full scale wave, in the dsp realm.
This is my point. ^
No one ever denied this except people with woefully incorrect concepts of digital audio, as you have had and continue to have

No one denied It no, but I'm now asking for an implementation that will do it.
I should have excluded my means and approached hydrogen audio with more understanding on the subject. My bad.
I thought it would have been an obvious answer. It was shown to me through theory and analogies very well (thankyou) and I appreciate this, but I'm really after a useable implementation/dsp/vst that can do it (mulitply).

Quote
Dither does not increase bit depth in any useful way whatsoever

But it still increases it, which is as close to "multiplication" I could find in dsp form. (before I knew about simply 'multiplication).
The link I posted to 32bit dither code is as close as I got, but it isn't in useable form.

Quote
You are sampling, at best, intermediate points representing no additional depth/fidelity/quality whatsoever. Big deal! And your silly idea of dither will ensure that not only are you gaining no quality, you’re actually adding noise for no reason.

I know I'm not adding fidelity.
I can however "multiply" 16 to 32bit, upsample/sample, then dither down to any depth with more precision (regardless of output rate)
I (now) do not intend to use dither to upconvert (my mistake), but to convert from 32bit to a lower depth.
It is clear how its used in quantization (higher depth to lower) which believe it or not, will favour more precision. (4bn slices)
What confused matters here was the fact that dither can also multiply (A simple line of code in the dither dsp i'm sure)
So, aplogies for that.
Also, at such depths dither will be inaudible.

giro1991, by disabling that filter you will see square waves on the output of your DAC even if you resample to 48 kHz (which is actually quite an insignificant increase in sampling rate).

You trade in the distortion from the DSP chip with the extra HF roll-off, distortion, ultrasonic images ...

As I said, it would be better to buy a proper DAC...


Don't tell me 48 thousand adjustments per second is not enough to reproduce sound.
The fact that there will now be content beyond 44.1 upto 48k (added by the last dithering down stage at output), dismisses ultrasonic/aliasing issues altogether - which by the way, in playback systems were only ever associated with the problematic 44.1 from the get go - which is very true only on the playback side - similar terms, different methods get confused with recording side).

Oversampling in playback systems would not be needed at all if CDs were 48000 from the start I believe.
That and the fact 44.1 sample rate was a compromise over space (play/runtime) regarding Redbook.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Porcus on 2014-05-08 12:32:37
Can this 8-page thread be symmetrical stretched to 16 pages? Would that improve the resolution? What will happen to the SNR?


It could improve readability, if you have applied too much vertical compression in order to get each page into a widescreen monitor.

I wonder whether the OP is looking for a way to stretch dynamic range.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: pdq on 2014-05-08 13:23:55
For the millionth time, all processing these days is done in floating point, so this happens automatically.

Yes it is always used but is multiplication always used?

then it must to be possible to boost a full scale wave, in the dsp realm.

Sure, in floating point, multiply by a value greater than 1.0.

Upon entering 32 float, atleast in foobar, I doubt multiplication is automatic, 16bit depth it is just passed onto 32bit float.

You are quite wrong. Each integer format and each floating point format has its own concept of what is full scale. In 8-bit integer the range is 0 to 255. In 16-bit integer the range is -32768 to +32767. In all floating point formats the range is -1.0 to 1.0.

Any conversion between any of these requires some kind of multiplication, and possibly an offset as well. All audio software handles this correctly.
Title: Is it possible to stretch 16 bits symmetrically?
Post by: xnor on 2014-05-08 14:38:00
Question is anyone willing to show me a dsp/method that does this multiplication and will do it upto 192dB vst/foobar?
If one does not exist then how easy would it be to make one?

By the time the samples hit any plugin they have already been converted to 32-bit floating point samples by foobar2000 automatically.
The plugin gets 32-bit floating point, usually processes them with at least 32-bit floating point precision and outputs 32-bit floating point samples.
As such, any plugin could achieve a much higher dynamic range than 192 dB.


Don't tell me 48 thousand adjustments per second is not enough to reproduce sound.

With your DAC it isn't, for high fidelity anyway.

Don't get me wrong. You can wonderfully store audible frequencies even with 44.1 kHz, but when it comes to reproduction your non-oversampling DAC will not perform very well.

If you want to reconstruct a sampled waveform then you need to interpolate (that's basic knowledge, see sampling theorem). You just increase the sampling rate by less than 9%, so the DAC will still very much follow the samples and output square waves.
Without knowing the details of your DAC, I cannot tell if it has steep and complex analog low pass filters or not. If it doesn't then you get square waves. If it does then you have lots of phase shift even in the audible range.


The fact that there will now be content beyond 44.1 upto 48k (added by the last dithering down stage at output), dismisses ultrasonic/aliasing issues altogether - which by the way, in playback systems were only ever associated with the problematic 44.1 from the get go - which is very true only on the playback side - similar terms, different methods get confused with recording side).

No, it does not dismiss those issues. Even if you have a perfect resampler that removes images from 22.05 to 24 kHz, you said yourself that you are adding shaped noise again. Also, images will still be created at ~26 kHz upward. Their suppression will depends on the analog low pass filters of your DAC.

This is also not only a D/A-conversion problem, see sampling theorem.


Oversampling in playback systems would not be needed at all if CDs were 48000 from the start I believe.

Well, you're wrong.
Oversampling is still used with even 96 kHz and higher for various reasons, like making the analog low pass filters in the DAC very simple and cheap, reducing phase shift in the audible range, ...
Title: Is it possible to stretch 16 bits symmetrically?
Post by: Kohlrabi on 2014-05-08 14:50:46
Yes it is always used but is multiplication always used?
Upon entering 32 float, atleast in foobar, I doubt multiplication is automatic, 16bit depth it is just passed onto 32bit float.
Question is anyone willing to show me a dsp/method that does this multiplication and will do it upto 192dB vst/foobar?
I thought it would have been an obvious answer. It was shown to me through theory and analogies very well (thankyou) and I appreciate this, but I'm really after a useable implementation/dsp/vst that can do it (mulitply).
Contrary to what you might believe, multiplication is a pretty common operation in IT and programming. How numbers are represented and converted has been mentioned several times here.

I can however "multiply" 16 to 32bit, upsample/sample, then dither down to any depth with more precision (regardless of output rate)
Sampling (http://en.wikipedia.org/wiki/Sampling_%28signal_processing%29) and upsampling (http://en.wikipedia.org/wiki/Upsampling) are absolutely not the same thing. I won't accept any more humpty-dumptyisms (http://en.wiktionary.org/wiki/Humpty_Dumptyism) here. If a signal contains sufficient information in the first place, a signal sampled with 32 bits will have a lot more information, compared to the same signal sampled with 16 bits and then upsampled to 32 bits, which will not have this information. This is all regardless of dither.

Don't tell me 48 thousand adjustments per second is not enough to reproduce sound.
The fact that there will now be content beyond 44.1 upto 48k (added by the last dithering down stage at output), dismisses ultrasonic/aliasing issues altogether - which by the way, in playback systems were only ever associated with the problematic 44.1 from the get go - which is very true only on the playback side - similar terms, different methods get confused with recording side).
Playing with the digital audio buzzword generator again?

My bad.
So, aplogies for that.
It is no longer acceptable that you continue to ignore all answers given here, and just continue to post nonsense. It doesn't do do just write "my bad" and keep going. Nobody cares for your apologies, and I cannot in good conscience have regulars waste any more time on this thread. Hence, this thread is now closed.


Congratulations, db1989 will hand out your reward.