English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. General (https://eab.abime.net/forumdisplay.php?f=37)
-   -   Simple 14 bit audio question... (https://eab.abime.net/showthread.php?t=53166)

Thorham 04 June 2010 16:13

Simple 14 bit audio question...
 
Hi,

If I take a 16 bit audio file, and chop of the bottom two bits from each sample, it seems that the sound quality (when playing back in 14 bit on the miggy) isn't reduced. What I want to know is simple: Is there really no audible difference, or is there still some?

Any thoughts are appreciated :great

Edited: Corrected the bad sentence.

Thorham 04 June 2010 22:39

This seems to be solved thanks to amiga.org (no offense guys :D). Apparently, 14 bit replay routines already chop off the bottom two bits of a 16 bit sample.

Here's the post:
Quote:

Originally Posted by Karlos (Post 562902)
No conversion to 14-bit is necessary. The 14-bit replay routines do all that anyway.

Unless anyone has anything to add, this is a done deal :)

absence 05 June 2010 19:58

Quote:

Originally Posted by Thorham (Post 674991)
If I take a 16 bit audio file, and chop of the bottom two bits from each sample, it seems that the sound quality (when playing back in 14 bit on the miggy) isn't reduced. What I want to know is simple: Is there really no audible difference, or is there still some?

It may seem like there's no difference, but there is. Whether you can hear the difference depends on several factors, like your equipment, how noisy your listening environment is, how damaged your hearing is, and how trained your hearing is (including what kind of audio quality you're used to).

Conversion to 14 bit may not be "necessary", because you can toss away the extra bits at runtime. But if you're going to throw them away, why store them at all? They take up additional unnecessary space. Also, simply throwing away the least significant bits does not result in the best possible sound quality. Dithering and noise shaping reduce (but don't eliminate) the quality loss caused by bit reduction.

So there are two reasons to convert: Disk space and sound quality. (Of course you could dither and noise shape in real time, but it costs CPU time that isn't insignifficant on an Amiga.)

Thorham 06 June 2010 08:45

Quote:

Originally Posted by absence (Post 675296)
It may seem like there's no difference, but there is. Whether you can hear the difference depends on several factors, like your equipment, how noisy your listening environment is, how damaged your hearing is, and how trained your hearing is (including what kind of audio quality you're used to).

To be honest, I worded my question in quite the wrong way. What I mean is that there seems to be no difference between a 16 bit WAV and a 14 bit version of that same WAV when played back on an Amiga.
Quote:

Originally Posted by absence (Post 675296)
Conversion to 14 bit may not be "necessary", because you can toss away the extra bits at runtime. But if you're going to throw them away, why store them at all? They take up additional unnecessary space.

It's part of an audio compressor I'm doing for a little project of mine. Basically I want lossless compression, and because this is Amiga only, I figured I could get away with not storing bits that can't be played back by the audio hardware.
Quote:

Originally Posted by absence (Post 675296)
Also, simply throwing away the least significant bits does not result in the best possible sound quality. Dithering and noise shaping reduce (but don't eliminate) the quality loss caused by bit reduction.

Interesting. I tried to do it with Sox on the peecee, but it didn't want to convert 16 bit to 14 bit :( Perhaps I'll try writing something myself if it's not too difficult :)
Quote:

Originally Posted by absence (Post 675296)
(Of course you could dither and noise shape in real time, but it costs CPU time that isn't insignifficant on an Amiga.)

Probably, but it's still an interesting idea :great

absence 06 June 2010 10:17

Quote:

Originally Posted by Thorham (Post 675361)
To be honest, I worded my question in quite the wrong way. What I mean is that there seems to be no difference between a 16 bit WAV and a 14 bit version of that same WAV when played back on an Amiga.

In that case, there is no difference.

Quote:

Originally Posted by Thorham (Post 675361)
It's part of an audio compressor I'm doing for a little project of mine. Basically I want lossless compression, and because this is Amiga only, I figured I could get away with not storing bits that can't be played back by the audio hardware.

Ah right, I should have recognised you from the other thread. Was a bit tired. ;)

Quote:

Originally Posted by Thorham (Post 675361)
Interesting. I tried to do it with Sox on the peecee, but it didn't want to convert 16 bit to 14 bit :( Perhaps I'll try writing something myself if it's not too difficult :)

There probably aren't many tools that support 14 bits. Plain dithering is quite simple, you just add white noise with a triangular PDF (two rectangular PDF noise sources added together) and amplitude of two 14-bit steps (2/2^14 = 2^-13) to the 16-bit signal before removing the two lowest bits when converting to 14 bits. This replaces the distortion caused by throwing away bits with a slight hiss, which is less objectionable to our ears. Both distortion and hiss may be difficult to notice at 14 bits, so if you're going to implement it, try a more extreme setting like 4 bits first to make sure it works.

Noise shaping is tricker, as you use coloured/filtered noise instead of white in order to move the hissing to parts of the frequency spectrum where our ears are less sensitive.

As mentioned in the other thread, both methods will make it harder to compress the signal though, as noise doesn't compress well.

Thorham 06 June 2010 10:30

Quote:

Originally Posted by absence (Post 675373)
In that case, there is no difference.

Good :great I'm currently playing around with deltas between samples, and chopping off two bits will make the deltas smaller.
Quote:

Originally Posted by absence (Post 675373)
There probably aren't many tools that support 14 bits. Plain dithering is quite simple, you just add white noise with a triangular PDF (two rectangular PDF noise sources added together) and amplitude of two 14-bit steps (2/2^14 = 2^-13) to the 16-bit signal before removing the two lowest bits when converting to 14 bits. This replaces the distortion caused by throwing away bits with a slight hiss, which is less objectionable to our ears. Both distortion and hiss may be difficult to notice at 14 bits, so if you're going to implement it, try a more extreme setting like 4 bits first to make sure it works.

Noise shaping is tricker, as you use coloured/filtered noise instead of white in order to move the hissing to parts of the frequency spectrum where our ears are less sensitive.

As mentioned in the other thread, both methods will make it harder to compress the signal though, as noise doesn't compress well.

Pity it can't be done in real time if you chop off the bits before compressing :( If only you didn't need the extra bits for these techniques :( Oh, well, I'll still try those techniques to see if it improves the audio substantially. If so, then I'll just have to figure something to retain compression rates :)

absence 06 June 2010 10:46

Quote:

Originally Posted by Thorham (Post 675376)
Pity it can't be done in real time if you chop off the bits before compressing :( If only you didn't need the extra bits for these techniques :(

Yes, it's a pity, but once the bits are chopped off, the data is gone and can't be imagined back by an algorithm. :(

Quote:

Originally Posted by Thorham (Post 675376)
Oh, well, I'll still try those techniques to see if it improves the audio substantially. If so, then I'll just have to figure something to retain compression rates :)

It may not improve the quality substantially, but if you're only concerned about substantial quality differences, I still recommend to consider lossy compression. For example, it's not impossible that noise shaped lossy compressed audio will sound better than lossless compression where the bits are simply chopped off. You'll have to try to know for sure though. :)

Thorham 06 June 2010 10:55

Quote:

Originally Posted by absence (Post 675381)
It may not improve the quality substantially, but if you're only concerned about substantial quality differences, I still recommend to consider lossy compression.

Actually, I want the best quality I can get from the miggy, which is why lossy compression is a last resort for me.
Quote:

Originally Posted by absence (Post 675381)
For example, it's not impossible that noise shaped lossy compressed audio will sound better than lossless compression where the bits are simply chopped off. You'll have to try to know for sure though. :)

Interesting indeed :) If it proves impossible to lossless compress the audio onto a single CD (source is 1.67 gigs :crazy), then I'll most certainly take this in consideration :great I do think that it can be done, because the music is looped. It's just that theres a total of 93 tracks, and most of them are looped, so this would be quite a lot of work to do by hand :(


All times are GMT +2. The time now is 19:21.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04407 seconds with 11 queries