I've been interested in audio codecs lately for some unknown reason.
I find it fascinating how it's possible to compress data and restore the original.
There is two common "high compression ratio" codecs : MP3 and OGG. There is several other lower compression ratio codecs such as IMA-ADPCM, which I guess is similar to BRR used in SNES and XA used in Plastation.
There is also the FLAC coded which is losless - it restores exactly the original data, but is not very efficient.
At stereo CD quality, uncompressed data is 44100 * 2 * 16 = 1.44 MBps (mega bits per second). (note that this is actual mega bits, in powers of ten, not common megabits in power of two)
FLAC can code this data without any losses, but is not efficent. The theorical bitrate varies between 0 and 1.44 MBps, in practice it will go arround 600-1000 kBps. I figured that classical-ish music compresses overall better than Rock-ish music for some reason.
The medium compression ratio ADPCM based techniques can compress data down to 1/4 (or close to 1/4) of it's original size, for CD-quality this is 352 kbps. Usually you can't hear the differences, although in theory there is some.
Then comes MP3, which can compress at selectable rates. The highest quality is 320 kbps where again you can't hear the difference typically. However, for lower bitrates such as 160 kbps, I assure you it sounds like total shit. This is the reason I've hated MP3s for so many years, it's just because people used them badly.
Note that for example at 160 kbps it might sound fine sometimes, but as soon as there is anything "special" such as disonnant chords, or some suddent attack, it will sound like shit. Some people don't mind, but I do. Also, for NES music for example this works really NOT well, as the square waves are very rich in harmonics, and if there is any dissonant notes done with squarewaves it will be very affected by MP3 compression.
Finally comes OGG, which also compresses at selectable quality. I guess -q0 to -q10 are available (-q0 will be lower quality, while -q10 will be higher quality).
All theorical tests I've seen shows this coded is supposed to be slightly supperior to MP3, but from my personal experience, it is incredibly better. Even at -q1 I can't hear the difference from the original most of the time, and this is at only 70 kbps, 20 times less data than the original ! In fact I can hear the difference it's just some slight loss in the trebbles, as if the sample rate were reducted a bit, but really it doesn't sound like it comes through water as it does in MP3.
To be honnest I'm incredibly impressed by the OGG coded I wonder how it's possibly possible it can compress data so much !
I want to hear you guys' experiences with all of this. The only common thing between this and Nesdev is compression I guess.
EDIT : This is an interesting read. Too bad it only covers OGG against MP3, and it doesn't cover other compressions such as ADPCM and FLAC.
I find it fascinating how it's possible to compress data and restore the original.
There is two common "high compression ratio" codecs : MP3 and OGG. There is several other lower compression ratio codecs such as IMA-ADPCM, which I guess is similar to BRR used in SNES and XA used in Plastation.
There is also the FLAC coded which is losless - it restores exactly the original data, but is not very efficient.
At stereo CD quality, uncompressed data is 44100 * 2 * 16 = 1.44 MBps (mega bits per second). (note that this is actual mega bits, in powers of ten, not common megabits in power of two)
FLAC can code this data without any losses, but is not efficent. The theorical bitrate varies between 0 and 1.44 MBps, in practice it will go arround 600-1000 kBps. I figured that classical-ish music compresses overall better than Rock-ish music for some reason.
The medium compression ratio ADPCM based techniques can compress data down to 1/4 (or close to 1/4) of it's original size, for CD-quality this is 352 kbps. Usually you can't hear the differences, although in theory there is some.
Then comes MP3, which can compress at selectable rates. The highest quality is 320 kbps where again you can't hear the difference typically. However, for lower bitrates such as 160 kbps, I assure you it sounds like total shit. This is the reason I've hated MP3s for so many years, it's just because people used them badly.
Note that for example at 160 kbps it might sound fine sometimes, but as soon as there is anything "special" such as disonnant chords, or some suddent attack, it will sound like shit. Some people don't mind, but I do. Also, for NES music for example this works really NOT well, as the square waves are very rich in harmonics, and if there is any dissonant notes done with squarewaves it will be very affected by MP3 compression.
Finally comes OGG, which also compresses at selectable quality. I guess -q0 to -q10 are available (-q0 will be lower quality, while -q10 will be higher quality).
All theorical tests I've seen shows this coded is supposed to be slightly supperior to MP3, but from my personal experience, it is incredibly better. Even at -q1 I can't hear the difference from the original most of the time, and this is at only 70 kbps, 20 times less data than the original ! In fact I can hear the difference it's just some slight loss in the trebbles, as if the sample rate were reducted a bit, but really it doesn't sound like it comes through water as it does in MP3.
To be honnest I'm incredibly impressed by the OGG coded I wonder how it's possibly possible it can compress data so much !
I want to hear you guys' experiences with all of this. The only common thing between this and Nesdev is compression I guess.
EDIT : This is an interesting read. Too bad it only covers OGG against MP3, and it doesn't cover other compressions such as ADPCM and FLAC.