Author Topic: 24 bit or 16?  (Read 7451 times)

Offline KrazyKatz

  • Crazy artist
  • ****
  • Posts: 645
    • http://www.sonicbrilliance.com
24 bit or 16?
« on: May 25, 2007, 21:36:48 »
When converting each instrument into a .wav in order to mix them in another program, is it better to save them as 24bit even if the original samples are 16bit, or would it make no difference? If yes than is there a point to upping it to 32 bit?
Sonic Brilliance Studios
http://www.sonicbrilliance.com

Offline Sam_Zen

  • Extreme artist
  • *****
  • Posts: 3,689
    • http://www.xs4all.nl/~samzen/
24 bit or 16?
« Reply #1 on: May 25, 2007, 23:48:01 »
Good question. I'm not sure about this.
One could think, that upping wouldn't make any real difference, regarding the sound as isolated track.
In the case that it is mixed with other tracks, or being modulated, it's another story, I guess.
If I want to edit a JPG-file, I first convert it to BMP, do the edit, and only when I'm done, I convert back to JPG.
So I assume that for mixing or effects of a post-MPT track, it's best to have the highest resolution possible.
At the end, one can always convert it down to 16 bits again.

Rest the question : when doing the upsampling ? Because the recieving program may have such a tool as well.
0.618033988

Offline Snu

  • Workaholic artist
  • ***
  • Posts: 320
  • Gender: Male
    • http://www.snuq.com
  • Operating System: Windows 7 64bit
24 bit or 16?
« Reply #2 on: May 26, 2007, 05:38:18 »
well, mpt cant really import 24bit wav files yet anyway (it just downsamples them to 16bit), so if you are just exporting them so you can import into mpt, then saving as 16bit, or even just leaving them as 16bit for the whole editing would probably be better (i dont know how good mpt's downsampling engine is, but its probably not as good as whatever program you are using).
on the other hand, if you plan on editing the file, saving it, then later editing it again; or if you want to think torward the future when mpt CAN load 24bit files, you should save as 24bit to keep the highest quality with future edits.

from what ive heard, saving as 32bit is pointless, since its actually just 24bit with 8 added 'throwaway' bits that dont do anything... at least with standard wav files.

Offline Sam_Zen

  • Extreme artist
  • *****
  • Posts: 3,689
    • http://www.xs4all.nl/~samzen/
24 bit or 16?
« Reply #3 on: May 26, 2007, 23:51:29 »
If the last thing is true, it's good to know.
I will see if I can check this out with a hex-viewer.
0.618033988

Offline LPChip

  • Administrator
  • *****
  • Posts: 5,135
    • http://lpchip.nl
  • Operating System: Windows 10 Pro x64
24 bit or 16?
« Reply #4 on: May 27, 2007, 00:40:04 »
And its not really usefull to go from 16 bit to a higher value, as there's nothing more added than silence.

A proper conversion between 16 to 24 or higher should not improve quality, but the sound should be exactly the same. Since 24 bits add more space to the file, its a waste of space.

and even if you'd apply effects over them at 24 bit depth, it might be a little difference, but not much, and certianly if you're going to move it back to 16 bit afterward.

In fact, if thats the goal, it might be that working in 16 bits only could yield in a better result as there are no roundings being done when going back from 24 to 16 bits.

Also handy to know:

Even though you can export a wav in mpt to 24 bits, the samples will always be played at 16 bits because MPT's sample engine is 16 bits, regardless of the quality of the samples (unless lower ofcource).

VSTi's however do play at 32 bits, so you could gain there by exporting to 24 or 32 bits.

edit: spotted a typo: i wrote 15 bits, and must be 16 ofcource.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Offline Sam_Zen

  • Extreme artist
  • *****
  • Posts: 3,689
    • http://www.xs4all.nl/~samzen/
24 bit or 16?
« Reply #5 on: May 27, 2007, 01:51:31 »
Interesting issue.
Of course 16 to 32 will not improve quality, because there's no extra data to add.
But the range of values of the bit is bigger, so the number can be more precise.

Quote
And its not really usefull to go from 16 bit to a higher value, as there's nothing more added than silence.

I'm afraid this is not correct. Of course a 32-bit file is twice as big as a 16-bit one, but it doesn't mean that it's twice
as long due to added silence.
I guess you mean that the original value of the sample-bit is relatively not changed in the new range. A simple calculation.
Maybe intelligent upsampling can do more, because of the higher resolution, to recalculate the smooth value between the
previous- and the post-bit values.
But especially when mixing other material with it, so indeed adding extra data, it will make a difference in the result,
because more details can be written because of a bigger range.
This will, I assume, result in a more precise downsampling to play it back.
0.618033988

Offline LPChip

  • Administrator
  • *****
  • Posts: 5,135
    • http://lpchip.nl
  • Operating System: Windows 10 Pro x64
24 bit or 16?
« Reply #6 on: May 27, 2007, 12:22:42 »
well, I indeed ment that the number itself is not being changed.


Say: you have a 1 bit number:


(can only be 0 or 1)

And you convert it to a 2 bit number:

can be 00, 01, 10, 11, so you get 4 values.

Normally when you have a 1 bit value which can only be 0 or 1, the 2 bit value would be reduced to a 1 bit first.

So values 3 and 4 are being set as 1, where the 0 and 1 are being set as 0.

The other way around works too.

1bit 0 would be converted to either 2 bit 1 or 2, while the 1bit 1 would be converted to a 2 bit 3 or 4.

As you can see by this small equasion, its already not precise. In fact, its as presice as the 1 bit value, but we've established that already.

Say you put everything at 2 and 4, and then you start doing calculations with them.

It could be possible that you have some effects that move the 4 bits to a 3, and another effect that blends the 2 and 3 to say a 2,5 where since its only 4 bits, is being rounded to a 3. That means that all the 2's are now set to a 3. Converting it back would make them all a 1.

I know what I wrote here is kind of vague, but I don't know a better way to describe it.

I just say that if you first upsample, and then add effects, just so you are going to downsample it at a later stage, you might risk loosing quality due to the conversion process itself, where a higher quality can be archieved if the conversion doesn't take place at all.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Offline Sam_Zen

  • Extreme artist
  • *****
  • Posts: 3,689
    • http://www.xs4all.nl/~samzen/
24 bit or 16?
« Reply #7 on: May 28, 2007, 01:54:30 »
You're right about the vagueness of such conversion. I reckon '00' stands for the single '0', but what
is the interpretation of a single '1' ? All three other 2-bits can be a candidate for the representation of '1'
according to some formula.

Because this is about up- and downsampling of start and finish of the process, and such a formula is application-bound,
it would be better to do this up and down with the same app. This enhances the chance of using the proper formula
in reverse.
0.618033988

Offline LPChip

  • Administrator
  • *****
  • Posts: 5,135
    • http://lpchip.nl
  • Operating System: Windows 10 Pro x64
24 bit or 16?
« Reply #8 on: May 28, 2007, 10:50:36 »
Even then, I merelly ment to point out, that rounding errors that do not occour on the higher bitrates such as 24 bit, can screw up the song when converting back to 16 bit, as rounding errors occur during conversion. True, those errors are not big quality losses, but they will not happen at all in when doing 16 bit only.

Its basically like having this MP3, you decompress it to wav, apply effects on it, and then encoding it back to mp3.

Although this example is not suitable enough, because it always encodes an encoded file, which means quality loss, it does show that the file is being affected. A better example would be from wav to mp3, to wav, but thats the other way around :P

Maybe see it as this: you have a jpeg file with a compression factor of 20. So you see tiny artifacts around letters. You save it as bmp, then do alot of effort to remove those artifacts, so you can save as jpg with compression 20 again.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Offline Sam_Zen

  • Extreme artist
  • *****
  • Posts: 3,689
    • http://www.xs4all.nl/~samzen/
24 bit or 16?
« Reply #9 on: May 29, 2007, 00:07:15 »
I'm just speculating about this in a theoretical way, because I only work on a 16 bit level myself.

Although conversion of resolution is something else than compression, you're absolutely right about the danger of encoding already encoded files. And the jpg-bmp-jpg is the right example. Apart from removing those artifacts, but it is valid for any graphic editing. Especially in a chain of different edit-actions, it would be dramatic, if every time the result was saved as jpg, before the next step.
0.618033988

Offline LPChip

  • Administrator
  • *****
  • Posts: 5,135
    • http://lpchip.nl
  • Operating System: Windows 10 Pro x64
24 bit or 16?
« Reply #10 on: May 29, 2007, 09:48:08 »
But my point is: If you know that the end result will be 16-bit, what can you possibly gain by converting to 24-bit in between?

The only difference would be made if you have only one or 2 16-bit sounds, convert it to 24 bit, do extra work on that level, and keep the output 24 bits in case you want to use that too. a 16 bit backwards conversion could be done but as you also want the 24 bits one, it is a reason.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Offline Sam_Zen

  • Extreme artist
  • *****
  • Posts: 3,689
    • http://www.xs4all.nl/~samzen/
24 bit or 16?
« Reply #11 on: May 30, 2007, 03:01:23 »
In fact it's just a matter of a vague intuition to me.
Any editing of a wav-file is executing a calculation with some formula on the available bits.
So I reckon, if the number of bits are twice as much regarding the same data, the result of the formula would be more precize.

But I stlll want to emphasize the aspect of mixing two tracks together. If both are represented in a higher resolution during
the mixing process, the chance of a correct result will be bigger.
0.618033988

Offline LPChip

  • Administrator
  • *****
  • Posts: 5,135
    • http://lpchip.nl
  • Operating System: Windows 10 Pro x64
24 bit or 16?
« Reply #12 on: May 30, 2007, 07:57:29 »
Yes, on the 24-bit part. But if you're going to convert back to 16 bits afterward, you'll loose that of what you gained, because the data is twice as less, and it can occour that rounding errors cause for bad sounds.

anyway, I reread the first post, and if the other program has a 24-bit audio engine, and the effects you're gonna use are 24 or higher too, then its certainly a good thing (unless you're going to put it back to 16-bits after you're done.).
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs