AudCompDemo V1.0 by: Dan Charrois LIMITATION OF LIABILITY No representations or warranties are stated or implied with respect to the accuracy, reliability, performance, or general operation of this software. All usage must be accepted at your own risk. The author does not assume any responsibility or liability whatsoever with respect to your use of this software. BACKGROUND PROBLEM Lately, there has been a great deal of interest in compressing data on the Amiga and other personal computers - and for good reason. The size of the "average" executable and data files are increasing dramatically as programmers endeavour to make their software as complete as possible. Many algorithms have been written which do a wonderful job of compressing code and data, but until now, there has been a noticeable lack in software specifically designed to compress audio files. Due to typical sampling rates of 10,000 samples/second and up, it doesn't take too long for a sample to use up a great deal of disk space. SOLUTION To address this problem, I have created AudComp - a program which can both compress audio IFF 8SVX files to a fraction of their original size, and decompress the resulting files back into an audio IFF 8SVX. The version of AudComp contained within this archive (AudCompDemo) is provided for you to assess the capabilities of the software, and hear what a typical decompressed sample sounds like at varying quality levels. It is unable to create compressed audio files, but is capable of decompressing them. For this reason, a few sample compressed files (the same sample, compressed at varying quality levels) are provided in the archive. The registered version of AudComp has the ability to both compress and decompress audio files of your own. HOW DO I OBTAIN A REGISTERED VERSION OF AUDCOMP? To obtain a registered version of AudComp, please send $15.00 in Canadian funds to: Dan Charrois Box 75 Legal, Alberta T0G 1L0 CANADA Please don't forget to include your return address so that I can send a disk with the registered version back to you! Once you have become a registered user of AudComp, subsequent versions will be made available to you for half the cost I'd be asking otherwise. IS THERE ANY OTHER SOFTWARE DESIGNED TO COMPRESS AUDIO IFF 8SVX FILES? Strictly speaking, almost any compression algorithm should be able to reduce the size of an audio file somewhat. However, non-lossy algorithms (algorithms which can restore the file back to its exact original form) such as Stefan Boberg's LHA usually do not perform any better than getting in the neighbourhood of a 20% file size reduction. To get a substantial compression ratio, we must resort to lossy algorithms. This class of compression algorithm does not guarantee to decompress a file back to its exact original form, but instead will only try to come up with something approximating the original. Ideally, this approximation should be almost indistinguishable from the original. AudComp uses a lossy algorithm particularly designed for use with audio files to try and get the best results with as high a compression ratio as possible. To my knowledge, the only other software currently in existence for the Amiga to compress audio files using a lossy algorithm are a few titles which support the Fibonacci-Delta encoded method (such as PerfectSound). This format (documented in the Amiga Rom Kernel Reference Manuals as an IFF standard), provides a fairly good compression ratio, though nowhere near as good as files created by AudComp. Typically, files created using Fibonacci-Delta encoding take up half the disk space as uncompressed files, whereas AudComp routinely creates compressed files being 10 times smaller than the original or better! WHAT DOES "QUALITY" OF A COMPRESSION MEAN? Some mention was made of the "quality" of compression a little earlier. This is simply some measure of how well the decompressed version of a file using a lossy algorithm varies from the original. Fibonacci-Delta encoded audio files have a fixed "quality". AudComp, on the other hand, allows you to vary the quality of compression. If, for example, you were to choose a very high quality, the resulting compressed file would be relatively large (though usually still substantially smaller than a Fibonacci-Delta compressed file) , but upon decompressing the file the results would be virtually indistinguishable from the original. If intelligibility is your only criteria, you can decrease the quality required, resulting in extremely high compression ratios. This archive contains a few files of the same audio sample compressed at varying quality factors, to allow you to assess what different quality compressions sound like, and to give you an idea of the varying file sizes associated with each compression quality. WHAT KIND OF AUDIO FILES DOES IT WORK BEST ON? The best results usually occur on audio files containing a digitization of speech. In fact, the original purpose of this software was to provide a high compression for use with voice mail. If intelligibility is your main criteria, you can usually bring the compression quality down to a point where you're compressing the files by a factor of 10 or more. For compression of music, musical instruments, etc., you will find that you will need a fairly high quality compression to retain an acceptable harmonic range. Nevertheless, even fairly high quality compressions using AudComp usually still require substantially less storage space than compressions using another method. HOW DOES AUDCOMP WORK? Unfortunately, the algorithm used by AudComp is proprietary and can therefore not be disclosed. If you are a developer interested in including the ability for your software to compress and decompress audio files using the AudComp algorithms, the required object files are available, along with the required documentation and examples of their usage, for the fee of $100.00 in Canadian funds to the above address. Source code can not be made available. One interesting thing about files compressed using AudComp is that since they are not compressed using an algorithm similar to that used by LHA, Zoo, etc., they can be compressed even further by these other compression programs. For example, LHA'ing a file compressed by AudComp can often reduce its size further by a third or more. COMPARISONS BETWEEN OTHER COMPRESSION ALGORITHMS By far, AudComp's biggest selling feature is the dramatic compression ratios it can attain when compressing audio files. Here is a brief summary of the results of compressing an audio file using a variety of different methods. (The audio file used was the same as that encoded in the AudComp compressed files contained in this archive.) Compression Method File Size Compression factor ------------------ --------- ------------------ original 60930 1.0X zoo 50657 1.2X compress 48039 1.3X lha 43774 1.4X Fibonacci-Delta 30766 2.0X AudComp, quality 9 15852 3.8X AudComp, quality 9 + lha 10540 5.8X AudComp, quality 7 5568 10.9X AudComp, quality 7 + lha 4202 14.5X AudComp, quality 5 3279 18.6X AudComp, quality 5 + lha 2559 23.8X AudComp, quality 3 2133 28.6X AudComp, quality 3 + lha 1706 35.7X Admittedly, an AudComp quality 3 file doesn't result in a very great sounding output when it is decompressed (a quality 3 file is included in this archive so you can hear for yourself), but I think that the results of using AudComp are obvious. To me personally, an AudComp quality 9 file often sounds better than a Fibonacci-Delta compressed file, and I usually still find voice files intelligible even when compressed down to a a quality of 5 or 6. USING THE AUDCOMPDEMO SOFTWARE Before you start, keep in mind that you'll need a stack of at least 15000 (20000 might be a bit better) to run the program. One of the first things you'll notice in using the software on an unaccelerated Amiga is that the decompression is quite slow. For this reason, two versions of the AudCompDemo software are provided. AudCompDemo000 is provided for those with an unaccelerated Amiga (stock 68000), and AudCompDemo881 is provided for those with a 68020+ CPU and a math chip. (Both versions of the software are provided with the registered software as well). Suffice it to say that the version for accelerated computers is substantially faster than that for unaccelerated computers. At this point, you'll want to decompress some of the sample audio files to see what they sound like. The various compressed filenames are called sample.n.acp, where n is the quality level of the sample. (1=lowest quality, smallest compressed file size, 9=highest quality, largest compressed file size). At the moment, this is a CLI-only program, so WorkBench users will have to open up a CLI. To decompress a file, just type AudCompDemo000 d or AudCompDemo881 d depending on which version you elect to use. A status line will appear below describing what portion of the decompression has been completed. When the status line reaches 100%, the decompression is done. You then have an IFF 8SVX audio file called whatever you specified when you called audcomp. This can be played with any of the many IFF 8SVX sound players publicly available, such as "Sound" or "upd". Try decompressing the files which were compressed using different quality levels, to get a feel for what is currently possible with the software. You should be able to hear a dramatic difference between files compressed at a quality level of 9 and 5, for example. FUTURE DIRECTIONS Future versions of this software will depend on the success of the current version. Some the things I would like to work on for future versions include: - Faster operation. It may be possible to tweak a bit more speed out of the algorithm. - Better compression ratios. Believe it or not, it may still be possible to compress the files down a bit further yet. - Better quality sound at a given compression ratio. - GUI (Graphic User Interface) for Workbench users. FURTHER QUESTIONS If you have any questions, comments, or suggestions regarding either this demo version or the registered version of AudComp, please feel free to contact me. If you have access to Internet email, my email account is "charro@ee.ualberta.ca" (at least until the end of April, 1994). And of course, you can always write to me at the postal address given earlier if you prefer. Thanks for your interest in AudComp. Dan Charrois OTHER SOFTWARE PACKAGES REFERENCED IN THIS DOCUMENT Lha - Stefan Boberg Zoo - Rahul Dhesi compress - Unix distribution. Unix is a trademark of AT&T. Perfect Sound - Anthony J. Wood Sound - Richard Lee Stockton Upd - Jonas Petersson