OFLC (Overloud Fast Lossless Compression) is a lossless compression/decompression algorithm that can provide compression ratios comparable to the state of the art and can decompress the audio streams with a very minimal cpu usage. It can be successfully used in software sinthesizer or samplers to increase system performance, reduce disk stress and distribute audio content with a very reduced size.
There are many audio lossless compression software available; most of these softwares are designed to distribute high audio contents on the net, or backup audio data. They offer a compression ratio which is usually comprised between 1:1.4 and 1:1.6, depending on the input audio data. The simpler is the audio content (e.g. a solo instrument), the better is the compression ratio that it is possible to achieve. The audio samples used in software synthesizers libraries are usually very simple; they are a single note of a single instrument and, except for the attack part, they do not use all the available bit resolution. They could be compressed very effectively with lossless compression algorithms, with ratios up to 1:5. However, all these algorithms requires very complex computations and can be hardly used runtime, especially if many streams have to be decompressed in the same time.
Advantages
With modern processors, the cpu computation power is an abundant resource, while the amount of fast memory (RAM) and the transfer rate from memory or hard disk to cpu is a critical bottleneck for performance. In software sampler can be very useful to keep the samples compressed. The advantages are:
- it can save disk space;
- it is possible to distribute audio content with a very reduced size (faster web download, or reduced number of DVD for releasing a library);
- user can keep on its hard drive more sample libraries;
- it is possible to keep in RAM up to 5 times more samples, greatly increasing the performance of the sampler and reducing disk stress;
- the amount of data transferred from hard disk to memory is reduced up to 5 times, increasing performances and reducing disk stress.
Technical specification
- Can work with any sampling rate. Higher sampling rate usually produce better compression ratios;
- Can work with any bit depth from 2 bit/sample to 32 bit/sample. Lower bit depth usually produce better compression ratios;
- Can exploit phase relationship between the two channels of a stereo pair;
- It works with fixed size blocks of 512 samples;
- Decompression speed: about 90 cpu cycles / sample on a Pentium 4 3GHz processor. However, performances are dependent on the system.
Tables 1 and 2 show the compression ratios and the decompression times on two audio samples:
- Piano.wav is a sample of a C4 note of a piano; it is a stereo file normalized at 0dB recorded at 96KHz 24 bit and successively reduced to the lower bit depth and sample rate.
- Snare.wav is a mono sample of a snare, normalized to 0dB.
| Resolution | Original length | OFLC ratio | OFLC decomp time | FLAC ratio | FLAC decomp time |
| 96KHz, 24 bit | 8.24Mb | 1:3.54 | 76 mSec | 1:3.78 | 1987 mSec |
| 96KHz, 16bit | 5.49Mb | 1:4.29 | 72 mSec | 1:4.62 | 1492 mSec |
| 48KHz, 24bit | 4.12Mb | 1:2.03 | 39 mSec | 1:2.19 | 1031 mSec |
| 48KHz, 16 bit | 2.75Mb | 1:2.96 | 36 mSec | 1:3.11 | 993 mSec |
Table1. Preformances on Piano.wav audiofile
| Resolution | Original length | OFLC ratio | OFLC decomp time | FLAC ratio | FLAC decomp time |
| 96KHz, 24 bit | 647Kb | 1:3.21 | 5.9 mSec | 1:3.29 | 36 mSec |
| 96KHz, 16bit | 431Kb | 1:4.19 | 5.6 mSec | 1:4.31 | 128 mSec |
| 48KHz, 24bit | 324Kb | 1:1.94 | 2.9 mSec | 1:2.11 | 87 mSec |
| 48KHz, 16 bit | 216Kb | 1:3.48 | 2.7 mSec | 1:3.66 | 84 mSec |
Table2. Preformances on Snare.wav audiofile
To understand the potential performance of the system, let’s consider the following scenario: a software sampler has to stream 64 notes of a stereo Piano instrument at 48KHz, 16 bit. The required transfer rate with uncompressed data is:
64 notes x 2 channels x 2 bytes x 48000 samples = 11.72 Mb / sec
Considering a measured compression ratio of 1:2.96, the transfer rate for compressed data is 3.96Mb/sec. Thus, 7.76Mb/sec are saved.
The cpu time required for decompressing the samples each second, is:
64 notes x 2 channels x 48000 samples x 90 cycles / 3.4GHz = 0.16 sec.
So, 16% of cpu is used (or 8% if a dual core cpu is used).
So, you can save 7.76Mb/sec of transfer rate by using 0.08 sec of cpu (in dual core case). Since transferring 7.76Mb from the hard disk requires much more than 0.08 sec, this compression scheme improves the performance of the system and also gives to the user all the advantages of a reduced disk and memory usage.
Conclusions
OFLC is an audio lossless compressio/decompression library tuned for high speed decompression. When used to store compressed samples in software synthesizer, it is possible to obtain:
- Compression ratio between 1:2.5 and 1:4.5;
- Increase system performance;
- Reduce hard disk stress;
- Easily distrbute audio content with a very reduced size;
- Make possible to deliver 96KHz, 24 bit libraries without the need of dozens of DVDs.
Please, contact Overloud for information about licensing and for obtaining an evaluation version of the library.