lossyFLAC

This page offers a simple explanation of  the technology used in the releases on this site. Regardless of your technical knowledge of the relative subjects, after reading this page you will hopefully understand how lossyWAV and flac can bring the same listening experience as an EAC encode but without the file sizes. Again this is simple examination, so if you prefer you can just go here for technical documentation.

Lets start with flac. Flac is an audio codec which means it provides compression and decompression specifically tailored to audio. Rather simply, it does this by trying to reproduce audio's data in the least amount of "steps". The least amount of "steps" it takes to be able to reproduce the audio, the smaller the resulting audio file will be. One way flac achieves this is by prediction. It's not exactly like trying to predict the future, since flac has all the original data, so every time it's "wrong" it just adds another "step" to make sure it can reproduce the original. So, by the end of the process there are a lot of "steps" and of course the majority of these are dedicated on the really hard to predict things some of which aren't actually useful to us. Therefore, we could have a much smaller file if flac didn't bother trying to predict them. It turns out that there is a condition in which flac will not try to predict. This is what lossyWAV does, it promotes this condition so we can have a much smaller resulting file while sounding exactly the same as the original.

So, what exactly is happening? Well let's look at the spectrum data of a song called Sora from Bungaku Shoujo Mémoire - Soundtrack I


On the left we have the original song and on the right have the pre-processed encode. You should see some immediate difference, but lets quickly cover what we are looking at. 

On the X axis is time and on the Y axis is frequency. The legend on left allows us to reference how loud a particular frequency is. So, we can see, for example, that this song is rather gentle overall, the vocals (12 kHz) never exceed about -55 db and even the lower end (0-6 kHz), the most active frequency, sits around -40 db occasionally peaking. In the top end of the spectrum (16-20 kHz), we can see that most of it's "energy" correlates to activity in the mid band. It's worth noting on this point that most of the purple to dark blue frequencies are being "influenced" by those frequencies. Therefore, we could safely do something like this, because they aren't useful.


This is a mp3 encode. It confidently removes anything above the 20 kHz range because of the well studied field of psychoacoustics. But on this song we could be slightly more aggressive. However, unless we plan on analyzing each song individually the gain is very little. It's much more practical and reliable to use what is regarded as safe. So what is safe?


The image above is what lossyWAV considers safe to remove at a quality settings of five. Unlike the mp3 encoder this isn't based on any sort of psychoacoustics, but rather what is the least loudest sound in a frame of, generally, 11.6 milliseconds and removing all audio below it. If you recall our analysis of the song's spectrum, you should remember that the low end was the loudest at about -40 db and the high end was the quietest at -80 db. Therefore, the low and mid bands were rarely touched because there were always louder than the high band. in fact we can basically consider everything black to be an instrument or neighboring frequencies within approximately 60 db that it "influences". 

Before we finish up, lets answer a potential question you may of had. Why is lossyWAV adding activity to the spectrum? This is specific to lossy compression and is simply the adding of noise to avoid artifacts. But you don't have to worry it's well below the audible level for that particular frame.

For further reference, this is difference between the mp3@360kbps and the original. The difference in file size between the mp3 and lossy.flac encode is 4 megabytes.


The program I used for spectrum analysis is called Spek.
And here you can find the three audio files demonstrated on this page, the lossless flac, the lossy flac and the mp3 encode.

Feel free to abx them.