Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

KettyKrueger

macrumors 6502a
Original poster
Feb 17, 2007
509
4
UK
Would this kind of conversion keep my files lossless? or is this akin to converting mp3s to wavs??
 

zygo

macrumors member
Dec 17, 2006
70
0
UK
They're lossless. WAV is lossless (when encoded as Linear PCM). No loss. :D

But wouldn't going from Apple lossless to wav cause similar issues as mp3-wav? Taking a compressed file and 'uncompressing' it causes artifacts.
 

Bunuel

macrumors newbie
Mar 25, 2008
1
0
If you zip a wav file and unzip it you don't loose anything. The same goes with lossless.
Mp3/lossy isn't really compression at all, it's subtraction.
 

killmoms

macrumors 68040
Jun 23, 2003
3,752
55
Durham, NC
But wouldn't going from Apple lossless to wav cause similar issues as mp3-wav? Taking a compressed file and 'uncompressing' it causes artifacts.

What about the word "lossless" don't you understand? :confused:

MP3 is not lossless. It's lossy. The artifacts are within the MP3.
 

Killyp

macrumors 68040
Jun 14, 2006
3,859
7
But wouldn't going from Apple lossless to wav cause similar issues as mp3-wav? Taking a compressed file and 'uncompressing' it causes artifacts.

Apple Lossless is compressed in the same way a ZIP archive is. There is no loss of data, but the file size is smaller. The only downside to Apple Lossless is that it isn't as easy to process as PCM audio (what usually goes into WAV).

Bear in mind that WAV doesn't mean anything as such, it's just a file 'container' where sound of different codecs is stored.
 

zygo

macrumors member
Dec 17, 2006
70
0
UK
I stand corrected [but not entirely convinced].

I've have done some research and all tests seem to indicate both file types produce identical audio (phase reverse tests=silence).

What exactly does lossless remove?

What is added again when converting to wav?

Is there changes in bit rates?
 

killmoms

macrumors 68040
Jun 23, 2003
3,752
55
Durham, NC
What exactly does lossless remove?

What is added again when converting to wav?

Is there changes in bit rates?

It doesn't remove or add anything, just like ZIP doesn't remove or add anything from files. Lossless compression merely uses algorithmic data compression techniques. Lossy compression removes data, that's why it's called "lossy." If you really want to learn how these sorts of things work, I'd suggest picking up a book on it.

There's a change in bit rate in that because the file has been compressed, it now takes less bits over time to represent the same data.
 

zygo

macrumors member
Dec 17, 2006
70
0
UK
So do lossless codecs effectively get decoded back to PCM during playback?
 

zygo

macrumors member
Dec 17, 2006
70
0
UK
Effectively, EVERYTHING gets decoded back to PCM during playback, which is then converted into an analog signal which drives your speakers.

So PCM is the best suited to A/D and D/A conversion, but is inefficient at storing data as bits?

Mp3 and other lossy codecs were just messy stop-gaps until we got lossless. Plus, for those who don't care about quality, take up less space.

And presumably in the future we will be recording directly to more efficient lossless codecs [such as Apple lossless]?
 

killmoms

macrumors 68040
Jun 23, 2003
3,752
55
Durham, NC
So PCM is the best suited to A/D and D/A conversion, but is inefficient at storing data as bits?

Mp3 and other lossy codecs were just messy stop-gaps until we got lossless. Plus, for those who don't care about quality, take up less space.

And presumably in the future we will be recording directly to more efficient lossless codecs [such as Apple lossless]?

Not really. Just like video professionals don't record directly to H.264, neither would audio professionals record to lossless. It'd just introduce one more piece of unnecessary complexity to the audio acquisition chain. There the focus isn't on saving space, it's on reducing complexity and thus maximizing quality. They have huge gobs of disk space to work with, so size isn't really a concern.
 

Killyp

macrumors 68040
Jun 14, 2006
3,859
7
The easiest way to think of it is like this.

If there is a large part of the waveform for your music which contains no information (ie, it is silent), PCM would look like '000000000000000000000000000000' (very very very VERY simplified).

Apple Lossless would store it as '0 x 30', 30 being the number of 0s.

This isn't technically 'correct', but it gives you a vague understanding of how it works.

BMP vs PNG is exactly the same, they both produce exactly the same image, but PNG is much smaller than BMP.
 

zygo

macrumors member
Dec 17, 2006
70
0
UK
The easiest way to think of it is like this.

If there is a large part of the waveform for your music which contains no information (ie, it is silent), PCM would look like '000000000000000000000000000000' (very very very VERY simplified).

Apple Lossless would store it as '0 x 30', 30 being the number of 0s.

This isn't technically 'correct', but it gives you a vague understanding of how it works.

BMP vs PNG is exactly the same, they both produce exactly the same image, but PNG is much smaller than BMP.

I understand that principle-thats how far my understanding into it goes. But how often is a piece of music completely silent? My confusion in that sense comes from the fact that an audio waveform is constantly changing-therefor it would be unlikely 2bits in the row have the same value [in PCM state]?

Is this confusion stemming from the "very very very very simplified" way of explaining it? Do the 'compressed' bits of data have to be in a row? Or is that just the easiest way to visualise/understand it?
 

killmoms

macrumors 68040
Jun 23, 2003
3,752
55
Durham, NC
From Wikipedia:

FLAC uses linear prediction to convert the audio samples to a series of small, uncorrelated numbers (known as the residual), which are stored efficiently using Golomb-Rice coding. It also uses run-length encoding for blocks of identical samples, such as silent passages. The technical strengths of FLAC compared to other lossless codecs lie in its ability to be streamed and in a fast decode time, which is independent of compression level.

Run-length encoding (a very basic and specific sort of encoding) is what Killyp described above. See the linked bits in the original article for explanations of linear prediction and Golomb-Rice encoding. Hope you like math! ;)
 

zygo

macrumors member
Dec 17, 2006
70
0
UK
Run-length encoding (a very basic and specific sort of encoding) is what Killyp described above. See the linked bits in the original article for explanations of linear prediction and Golomb-Rice encoding. Hope you like math! ;)

I hate maths even more now!!!! haha!

And from reading up through those wiki's I'm even more confused as to what it's doing! But thanks for the link. At least now I know not to get into coding or too deep into compression techniques!

Sorry to the O/P for half hijacking your thread!
 

KettyKrueger

macrumors 6502a
Original poster
Feb 17, 2007
509
4
UK
Thanks for the replies!!

The reason I asked is because my music library is in Apple Lossless but to stream it to my PS3 it needs to be .wav (or a lossy format).

Trouble with wavs is that you can't embed artwork or tags.

Oh well, at least I can enjoy my lossless music in the living room :)
 

killmoms

macrumors 68040
Jun 23, 2003
3,752
55
Durham, NC
I hate maths even more now!!!! haha!

And from reading up through those wiki's I'm even more confused as to what it's doing! But thanks for the link. At least now I know not to get into coding or too deep into compression techniques!

Sorry to the O/P for half hijacking your thread!

To quote the great sage Strong Bad:

"Technology is... magic! Basically, it's something that's really cool that you don't know how it works, and when it breaks you have to buy a new one!"
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.