RKWAV - own Compressed Audio File Format
© Dipl.-Ing. Radovan Konečný - radkon, 2009-2012
Download the program:
About the project
RKWAV is a custom audio file format that uses lossless compression. It saves disk space and especially memory space, especially in my Sampler program, and in the Interactive musical system project where conventional compression methods cannot be used. Savings in storage of samples (audio recordings) improve the properties of the instrument - larger parts of samples or more samples can be stored in the computer's memory.
The RKWAV format meets the following requirements:
RKWAV stores only 16-bit stereo or mono audio data. The length limit is 4 giga-samples (WAV format is significantly worse - it has a 4 GB length limit).
The audio recording is divided into small sections and the most advantageous of the six compression methods is found for each section. There are 6 extremely simple compression methods, one of which is to store samples without compression. In addition, when compressing, the most advantageous size of the sections to be divided is to be sought.
One of the compression methods is based on storing the relative shift of the sample value relative to the previous one. There are places in the audio recordings where this jump is small - either quiet places or places with a low rate of high frequencies.
It's not about the smallest compressed file, but it's about saving space while maintaining an extremely simple algorithm, especially for decompression.
Additionally, a checksum (CRC) is added to the RKWAV-file so that the file can be checked for damage. Checking can also be done in the Sampler program that works with RKWAV-files.
Results and comparison
The practical use of RKWAV has shown that it is advantageous to store audio data for Sampler in this way. The sound data for the Sampler is usually a quarter to a half smaller.
If the RKWAV-file is additionally zipped, it is smaller than the zipped original WAV-file. This suggests that if a similar pre-processing of audio data were added to ZIP compression, this would significantly improve ZIP compression for audio data.
The following table shows the compression results for different types of sounds, plus in combination with ZIP compression:
Note: maximum compression (9) was selected for ZIP compression.
As can be seen from the table, in some cases RKWAV compression is much more efficient than ZIP compression, even though it is much less demanding for the computer.
|Copyright © 2009-2018 Dipl.-Ing. Radovan Konečný - radkon. All rights reserved.|