Welcome, Guest. Please login or register.

Author Topic: Simple Amiga audio question.  (Read 17651 times)

Description:

0 Members and 2 Guests are viewing this topic.

Offline bubblebobble

  • Jr. Member
  • **
  • Join Date: Dec 2003
  • Posts: 66
    • Show all replies
    • http://www.hd-rec.de
Re: Simple Amiga audio question.
« Reply #14 from previous page: June 13, 2010, 02:24:15 PM »
Here is an example of my implementation of ADPCM4.

All files are converted back to .wav so you can easily play them.

If you decide to use this codec, I can pass you the source along.
I personally find 4bit quite good, although with extreme material you can hear a slight crackling. In case of 8bit I dont hear any difference, whatever I encode.
The 2bit is more experimental how low you can go. I find it amazing what 2 bits per sample still can do, however, you can hear a significant degradation in quality.
Probably 6bit is quite hi-fi too, but it's a little hazzle to implement since 6 is not a fraction of 8, so you need to decode always 4 samples at once. But if 4 samples turns out to be too poor, 6bit would be doable too.

FF10 (original 16bit PCM) - File size  ~5MB
FF10 (8bit ADPCM) - File size ~ 2.5MB
FF10 (4bit ADPCM) - File Size ~ 1.3MB
FF10 (2bit ADPCM) - File size ~ 0.8 MB
--
Author of
HD-Rec, Sweeper, Samplemanager, ArTKanoid, Monkeyscript, Toadies, AsteroidsTR, TuiTED, PosTED, TKPlayer, AudioConverter, ScreenCam, PerlinFX, MapEdit, AB3 Includes and many more...
Homepage: http://www.hd-rec.de
 

Offline bubblebobble

  • Jr. Member
  • **
  • Join Date: Dec 2003
  • Posts: 66
    • Show all replies
    • http://www.hd-rec.de
Re: Simple Amiga audio question.
« Reply #15 on: August 06, 2010, 09:15:00 PM »
@Thorham
This won't work. A MOD is smaller because it uses samples, usually at a low quality (short, low samplerate, bitresolution, mono etc.). In a regular music production (if done using samples), they could easily exceed the memory needed to store the final mixdown. As soon as you start to use analog things like voice recordings, real instruments etc. the amount of information needed to describe this goes immediately up.

Apart from that, mixing the channels is a lossy process and cannot be reverted. What we hear is extemely lossy, even worse than an mp3.

What the human ear is doing is tracking instruments/noises by harmonic frequencies or other frequency distributions that have been learned before. Doing that, they miss a lot of stuff that is actually in the music. You might hear it the next time you listen, but then ignore something else. The ear uses a lot of information available prior to listening to the music.

E.g. put it to the extreme, you could write a codec that stores the entire music that will ever be encoded/decoded using this codec in a database. Then, encoding/decoding comes down to an index lookup, every music score is compressed to an integer.
But, at the end, you have to store the information, in the encoded data or outside from meta knowledge.

The same with predictors in looseles codecs. They represent prior knowledge that is assumed and put into the decoder. Once the data doesnt obey this knowledge, your codec screws up, e.g. on white noise.

The best predictors achieve roughly 1:2. Just accept this. Anything else is lossy.
mp3 or ogg are pretty good by compressing 1:12. They make assumptions how the human ear works.
--
Author of
HD-Rec, Sweeper, Samplemanager, ArTKanoid, Monkeyscript, Toadies, AsteroidsTR, TuiTED, PosTED, TKPlayer, AudioConverter, ScreenCam, PerlinFX, MapEdit, AB3 Includes and many more...
Homepage: http://www.hd-rec.de