English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 04 June 2010, 16:13   #1
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,764
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

Edited: Corrected the bad sentence.

Last edited by Thorham; 04 June 2010 at 17:07.
Thorham is offline  
Old 04 June 2010, 22:39   #2
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,764
This seems to be solved thanks to amiga.org (no offense guys ). 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 View Post
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
Thorham is offline  
Old 05 June 2010, 19:58   #3
absence
Registered User
 
Join Date: Mar 2009
Location: moon
Posts: 373
Quote:
Originally Posted by Thorham View Post
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.)
absence is offline  
Old 06 June 2010, 08:45   #4
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,764
Quote:
Originally Posted by absence View Post
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 View Post
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 View Post
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 View Post
(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
Thorham is offline  
Old 06 June 2010, 10:17   #5
absence
Registered User
 
Join Date: Mar 2009
Location: moon
Posts: 373
Quote:
Originally Posted by Thorham View Post
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 View Post
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 View Post
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.
absence is offline  
Old 06 June 2010, 10:30   #6
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,764
Quote:
Originally Posted by absence View Post
In that case, there is no difference.
Good I'm currently playing around with deltas between samples, and chopping off two bits will make the deltas smaller.
Quote:
Originally Posted by absence View Post
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
Thorham is offline  
Old 06 June 2010, 10:46   #7
absence
Registered User
 
Join Date: Mar 2009
Location: moon
Posts: 373
Quote:
Originally Posted by Thorham View Post
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 View Post
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.
absence is offline  
Old 06 June 2010, 10:55   #8
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,764
Quote:
Originally Posted by absence View Post
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 View Post
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 ), then I'll most certainly take this in consideration 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
Thorham is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
15 bit 44 khz audio idea. Thorham Coders. General 33 15 September 2021 06:22
High Quality reproduction of Audio on 8 bit. pandy71 Amiga scene 0 01 July 2013 15:08
Simple Question bpazolli Coders. General 15 22 January 2009 17:16
Simple question Raffaz New to Emulation or Amiga scene 2 10 July 2007 14:08
Simple A1200 Question Methanoid support.Hardware 4 29 April 2005 00:34

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:22.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.11762 seconds with 13 queries