IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Closed TopicStart new topic
is fading in/out a lossy process?, [moved from FLAC]
unicorn20
post Feb 19 2013, 18:09
Post #1





Group: Members
Posts: 4
Joined: 19-February 13
Member No.: 106748



hey all you audio experts of the forum.
i've been interested in lossless music for a long time and i got almost all of my knowledge about it from this forum.
i have an issue that i'm trying to figure out, and i've searched everywhere possible for info about it but i couldn't find any.
so you guys are my last resort, i hope you can help...
here's the issue :

i download many lossless albums all the time (WAV,APE,ALAC,FLAC), but i only keep to myself those few songs (if any) from each album, those songs that i liked the most.
most albums are ripped with gap detection so they begin with silence and end with silence, but there are some albums that don't, albums such as :

mixed albums (where the songs dissolve into each other)
live albums (where the tracks begin and end with the audience clapping or shouting)
one track albums (where there are no gaps or pauses between tracks)

i find it very annoying to listen to songs that comes from albums like the above, so i fix it using audacity, i fade in, and fade out, add some silence if necessary (using the "generate - silence" option), the thing is i can't help thinking maybe i am turning this perfect lossless file into a lossy one, and by doing so actually creating a fake lossless (since i'm always exporting as flac), my ears can't hear any difference, but still, you know way more than i do about these things.

so please tell me, does the "fade in / fade out / add silence" processes make a lossless file lossy?

sorry if my english is bad, i hope it's understandable, and if you find any mistakes please correct me.

thanks smile.gif

This post has been edited by unicorn20: Feb 19 2013, 18:10
Go to the top of the page
+Quote Post
halb27
post Feb 19 2013, 18:16
Post #2





Group: Members
Posts: 2439
Joined: 9-October 05
From: Dormagen, Germany
Member No.: 25015



In a formal sense fading in/out is a lossy process - simply because the result of the process differs from the original.
In a practical sense it's a lossless process as you just change loudness of restricted ranges of the original in a well-behaved dynamic way.
So don't worry.

This post has been edited by halb27: Feb 19 2013, 18:18


--------------------
lame3100m -V1 --insane-factor 0.75
Go to the top of the page
+Quote Post
Garf
post Feb 19 2013, 18:36
Post #3


Server Admin


Group: Admin
Posts: 4886
Joined: 24-September 01
Member No.: 13



Fade in and out is lossy. You cannot recover the original signal where the volume has been altered. This should be obvious if you consider the point where it faded to silence. You can't turn silence into music by amplyfing it.

Wouldn't a player with crossfading work better for this?
Go to the top of the page
+Quote Post
andrew_berge
post Feb 19 2013, 18:56
Post #4





Group: Members
Posts: 116
Joined: 17-November 09
From: Canada
Member No.: 75012



Also, Audacity dithers everything by default, so if you haven't changed any settings your whole track is being modified.
Go to the top of the page
+Quote Post
jensend
post Feb 19 2013, 18:57
Post #5





Group: Members
Posts: 145
Joined: 21-May 05
Member No.: 22191



halb27, being different isn't what defines lossy, non-invertibility of the transformation is (exactly what Garf says about recovering the signal). Equivalently, you can ask "are there two inputs that are mapped to the same output?"

With infinite precision numbers, fade in/out would be lossless except for any samples which were transformed to perfect silence, since you could just amplify each non-silent sample by the amount you faded it. With floating-point formats, the entire fade will be lossy but the difference between the original and the "recovered" signal would be insignificant except for samples that were sent to either silence or denormals. With normal integer PCM the more you fade a sample the more bits of precision you're throwing away.

This post has been edited by jensend: Feb 19 2013, 19:12
Go to the top of the page
+Quote Post
extrabigmehdi
post Feb 19 2013, 19:32
Post #6





Group: Members
Posts: 409
Joined: 15-August 09
Member No.: 72330



QUOTE (unicorn20 @ Feb 19 2013, 17:09) *
so please tell me, does the "fade in / fade out / add silence" processes make a lossless file lossy?

"fade in / fade out" is strictly speaking a lossy processing, but it doesn't make you file "lossy" in the sense that no lossy encoding is applied (like mp3, lossy encoding get rid of lot information, according to some psychoacoustic principles).
In fact, everything between the fade in and fade out, would remain exactly the same ( "lossless" if you want to absolutely use that word) , so if it makes your music listening more enjoyable, why not. Just don't expect to be able to restore the original file.
If you just add silence at begin/end of track, again the music would remain strictly the same, and at the bit level (unless you changed overall volume, sampling rate, bit depth , etc...).

This post has been edited by extrabigmehdi: Feb 19 2013, 19:34
Go to the top of the page
+Quote Post
halb27
post Feb 19 2013, 19:34
Post #7





Group: Members
Posts: 2439
Joined: 9-October 05
From: Dormagen, Germany
Member No.: 25015



As far as I can see the OP doesn't want to restore the changed files back to the original version. Instead he's thinking about audible quality. My reply was on this basis: formally lossy (and of course also in a practical sense in case it's about recovering the original), but lossless in a practical sense when it's about audible deviations from the original (with the exception of the loudness change of course).

@andrew_berge: Yes, the dithering default of Audacity isn't nice. I fell into this trap, too, and hopefully I will never forget. Easy to change however.

This post has been edited by halb27: Feb 19 2013, 19:36


--------------------
lame3100m -V1 --insane-factor 0.75
Go to the top of the page
+Quote Post
db1989
post Feb 19 2013, 20:01
Post #8





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



QUOTE (extrabigmehdi @ Feb 19 2013, 18:32) *
if it makes your music listening more enjoyable, why not.
Because the same result can be achieved without altering one’s files at all by using a player with crossfading functionality designed specifically for this purpose.

Not that I care if someone needlessly alters their warez.
Go to the top of the page
+Quote Post
dhromed
post Feb 19 2013, 20:41
Post #9





Group: Members
Posts: 1323
Joined: 16-February 08
From: NL
Member No.: 51347



Andrew Berge's comment about dither is more important than any theoretical lossiness of fading, but I can't find anything in Audacity's preferences that unambiguously refers to dithering when saving to a compressed file.
Go to the top of the page
+Quote Post
halb27
post Feb 19 2013, 21:19
Post #10





Group: Members
Posts: 2439
Joined: 9-October 05
From: Dormagen, Germany
Member No.: 25015



My problems with Audacity was when exporting to a wav file. Dither can be disabled with 'Preferences' 'Quality'. My experience was with an earlier version of Audacity though. Not sure whether this applies to the current version. Can be tested by importing a file and immediate exporting it to another filename. foobar has an audio data comparison tool. Audio data should be identical.


--------------------
lame3100m -V1 --insane-factor 0.75
Go to the top of the page
+Quote Post
unicorn20
post Feb 19 2013, 23:11
Post #11





Group: Members
Posts: 4
Joined: 19-February 13
Member No.: 106748



wow, you guys are quick hehehe
well, thank you all for answering, and i sure have learned a lot, but something is still unclear to me.
on the one hand, i understand from halb27 & extrabigmehdi that everything i didn't touch (aka everything not faded) will remain the same, which is perfect for me, and extrabigmehdi is right, i don't care about the fact that whatever's been faded cannot be recovered, it's only 1 second of the entire song in most cases.
but then there's this dithering thing that andrew_berge is talking about, i never heard of it, and if it modifies the entire file than even the parts i didn't mess with are becoming different, which is a big problem for me, could you please explain to me what is this dithering thing, and how can i change it so that it won't change the file completely?
oh, and Garf, if you meant a portable player, i don't have one, i'm just listening to the music in my PC.
and if you meant a media playing software like winamp and such, i don't realy like it, since it's only cosmetic.
i also want to make sure that other people who aren't as techy as i am can enjoy these songs (i share them to many people) without having to download any extra software for it.
Go to the top of the page
+Quote Post
andrew_berge
post Feb 19 2013, 23:29
Post #12





Group: Members
Posts: 116
Joined: 17-November 09
From: Canada
Member No.: 75012



I'm not so good at explaining this, so i'll just link you to Audacity's Wiki page on the subject.

And a good quote from there:
QUOTE
If you have recorded in 16-bit and are only doing simple editing (cut, delete, paste, trim...) and not doing any processing (amplify, equalize, frequency filter....) then for highest accuracy dither can be set to "none". In this case, because there are no 32-bit operations prior to export there is no benefit to using dither. Exporting a 16-bit track to 16-bit with dither set to "none" will be lossless. The same applies if exporting from a 24-bit track to an uncompressed 24-bit file format with dither disabled.


The setting can be changed in the Preferences, under "Quality", as halb27 has already said.

Go to the top of the page
+Quote Post
halb27
post Feb 19 2013, 23:32
Post #13





Group: Members
Posts: 2439
Joined: 9-October 05
From: Dormagen, Germany
Member No.: 25015



Dithering adds some noise to the least significant bits in the music signal. It is meant to 'smooth' the music after heavy manipulation of the music when simple rounding to 16 bit can have a negative effect.
In Audacity the kind of dithering chosen under 'Preferences' 'Quality' is used when exporting to wav or flac, no matter what you've done before. I just tried: when a dither method is selected Audacity will dither on export thus modifying the original.

So if you use Audacity for fading in or out: switch dithering off.
If you don't use Audacity: don't care about all this stuff.


I see I'm late.

This post has been edited by halb27: Feb 19 2013, 23:33


--------------------
lame3100m -V1 --insane-factor 0.75
Go to the top of the page
+Quote Post
db1989
post Feb 20 2013, 00:09
Post #14





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



QUOTE (unicorn20 @ Feb 19 2013, 22:11) *
oh, and Garf, if you meant a portable player, i don't have one, i'm just listening to the music in my PC.
and if you meant a media playing software like winamp and such, i don't realy like it, since it's only cosmetic.
Winamp is by no means the only media player that can crossfade, and many that can provide countless features beyond “only cosmetic” ones. But if you’d rather spend lots of time manually and irreversibly altering your files when you could instead use a player capable of automatically and non-destructively fading them for you, then OK.

QUOTE
i also want to make sure that other people who aren't as techy as i am can enjoy these songs (i share them to many people) without having to download any extra software for it.
Oh, you should have said! Definitely upsample your files to 192 kHz and 32-bit floating-point, then encode them with Blade. Happy sharing!
Go to the top of the page
+Quote Post
yourlord
post Feb 20 2013, 00:21
Post #15





Group: Members
Posts: 223
Joined: 1-March 11
Member No.: 88621



QUOTE (unicorn20 @ Feb 19 2013, 17:11) *
i also want to make sure that other people who aren't as techy as i am can enjoy these songs (i share them to many people) without having to download any extra software for it.


Let me just say that this forum is not the place to make such confessions..

And please, if you're going to distribute the files (not something condoned here unless you own the copyright) then leave them unmodified!
Go to the top of the page
+Quote Post
greynol
post Feb 20 2013, 01:04
Post #16





Group: Super Moderator
Posts: 10022
Joined: 1-April 04
From: San Francisco
Member No.: 13167



I think the world is better off to have them modified per db1989's suggestion.


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
mjb2006
post Feb 20 2013, 09:22
Post #17





Group: Members
Posts: 827
Joined: 12-May 06
From: Colorado, USA
Member No.: 30694



unicorn20, in your original post, you mentioned gap detection. You seem to misunderstand what it is.

The audio on a CD is divided into tracks. Each track is divided into one or more sections called indexes. Usually there's only one section, index 01, which takes up the whole track. Sometimes there's two sections: index 01 for the main song, and before that, a brief section called index 00 (that track's "gap" or "pre-gap"). This is often silence, but might be an interlude, count-in, applause, or other filler. It is what you probably think of as being "between" the tracks, or perhaps at the end, audio-wise, of the previous track. Technically, though, it's the beginning of the current track. But since we always rip or play tracks starting at index 01, it's more natural to think of it as being at the end.

Only index 00 is what we call the "gap". There can also be indexes up to 99, but anything above 01 is uncommon (I think 2 or 3 out of 1000 CDs I own have index 02s) and anything higher than 03 is extremely rare (apparently it's mostly on sound effects CDs that would otherwise need to exceed the 99-track limit).

Now consider what happens when you're using a real CD player, and you reach the end of a song. As the gap/index 00 (if any) at the start of the next track plays, you see the track number go up by 1, and the time display switches to negative numbers, counting up to 0:00, at which point index 01 plays. You don't see this when playing files or even CDs in a computer; the gap is normally just at the end of the previous track's file.

For example, if there's a 5-second gap at the end of a song 3 minutes, 30 seconds long, in a computer you'll just see the counter go 3:29, 3:30, 3:31, 3:32, 3:33, 3:34, 0:00 (track number increments here). On a real CD player you would see 3:29, -0:05 (track number increments here), -0:04, -0:03, -0:02, -0:01, 0:00. The audio would be the same in either case.

Apparently there was some folklore on some excessively bureaucratic file-sharing forums that said to make the ripping software do a gap detection pass before ripping. There's no point to doing so. Ripping software that's capable of gap detection does it automatically when needed. And it's only needed for three situations: 1. when generating accurate cue sheets for discs that have gaps (so you can use the files to burn a CD that behaves as described above in a real CD player); 2. doing an index-based rip, where each index goes into its own file, rather than each complete track going into a file (useful for when you want interludes to be in files separate from the main songs); or 3. deliberately omitting gap audio from a rip, such as when you're ripping from a CD-R that has had silent gaps added in error (but you have to tell the ripper to do this; just detecting gaps doesn't make it omit them).

Gap & other index info isn't always possible or reliable (it's in the "subcode" alongside the audio data, harder to read). It all depends on the software, the drive, and the CD. When gap detection isn't done, the ripper just treats each track as if it only has one section, index 01. No audio is left out.

This post has been edited by mjb2006: Feb 20 2013, 09:24
Go to the top of the page
+Quote Post
unicorn20
post Feb 20 2013, 21:47
Post #18





Group: Members
Posts: 4
Joined: 19-February 13
Member No.: 106748



i'd like to begin by saying ***THANK YOU SO MUCH*** to each and every one of you for helping me and teaching me so many new things i had no idea about, i seriously love this forum and you guys are the best, so honestly... THANK YOU, i appreciate it smile.gif smile.gif

QUOTE (andrew_berge @ Feb 19 2013, 23:29) *
I'm not so good at explaining this, so i'll just link you to Audacity's Wiki page on the subject.

thanks for the info about dithering smile.gif

QUOTE (halb27 @ Feb 19 2013, 23:32) *
Dithering adds some noise to the least significant bits in the music signal. It is meant to 'smooth' the music after heavy manipulation of the music when simple rounding to 16 bit can have a negative effect.
So if you use Audacity for fading in or out: switch dithering off.

you say rounding to 16bit can have a negative effect, what kind of negative effect?
i switched the dithering thing off, it seems weird to me that audacity will do the dithering by default and not by user request, since the whole point of lossless music is to be the same as the original, and the dithering modifies the file, but who am i to judge.

QUOTE (db1989 @ Feb 20 2013, 00:09) *
Oh, you should have said! Definitely upsample your files to 192 kHz and 32-bit floating-point, then encode them with Blade. Happy sharing!

i'm sure it's a nooby question, but why should i upsample? will it benefit the sound quality in any way?
also, i've so far encoded using the latest LAME, is this blade a better encoder? and as i asked above, will it benefit the sound quality in any way?

QUOTE (yourlord @ Feb 20 2013, 00:21) *
Let me just say that this forum is not the place to make such confessions..

you're absolutely right, it was a moment of foolishness... wacko.gif

QUOTE (mjb2006 @ Feb 20 2013, 09:22) *
unicorn20, in your original post, you mentioned gap detection. You seem to misunderstand what it is.

Now consider what happens when you're using a real CD player, and you reach the end of a song. As the gap/index 00 (if any) at the start of the next track plays, you see the track number go up by 1, and the time display switches to negative numbers, counting up to 0:00, at which point index 01 plays. You don't see this when playing files or even CDs in a computer; the gap is normally just at the end of the previous track's file.

For example, if there's a 5-second gap at the end of a song 3 minutes, 30 seconds long, in a computer you'll just see the counter go 3:29, 3:30, 3:31, 3:32, 3:33, 3:34, 0:00 (track number increments here). On a real CD player you would see 3:29, -0:05 (track number increments here), -0:04, -0:03, -0:02, -0:01, 0:00. The audio would be the same in either case.

Gap & other index info isn't always possible or reliable (it's in the "subcode" alongside the audio data, harder to read). It all depends on the software, the drive, and the CD. When gap detection isn't done, the ripper just treats each track as if it only has one section, index 01. No audio is left out.

you're right. i did misunderstand the entire concept of what these gaps are, but you've done a really good job of explaining it.
i haven't used an actual CD player in more than 10 years so i had to dig in my memory a little, but you're right, i do remember the countdown to the next song (-0:05, -0:04...), you just made me do a little time travel in my mind smile.gif .
and i never really realized why there is that index 00 in the cue files, but now i do, so thanks, i just got a little smarter.
Go to the top of the page
+Quote Post
pdq
post Feb 20 2013, 22:01
Post #19





Group: Members
Posts: 3420
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



QUOTE (unicorn20 @ Feb 20 2013, 15:47) *
QUOTE (db1989 @ Feb 20 2013, 00:09) *
Oh, you should have said! Definitely upsample your files to 192 kHz and 32-bit floating-point, then encode them with Blade. Happy sharing!

i'm sure it's a nooby question, but why should i upsample? will it benefit the sound quality in any way?
also, i've so far encoded using the latest LAME, is this blade a better encoder? and as i asked above, will it benefit the sound quality in any way?

db1989 should have made it more clear that he was being sarcastic. Blade was an awful encoder, and upsampling and 32-bit floating point have no benefit in this case.
Go to the top of the page
+Quote Post
unicorn20
post Feb 20 2013, 22:54
Post #20





Group: Members
Posts: 4
Joined: 19-February 13
Member No.: 106748



QUOTE (pdq @ Feb 20 2013, 22:01) *
db1989 should have made it more clear that he was being sarcastic. Blade was an awful encoder, and upsampling and 32-bit floating point have no benefit in this case.

i see hehehe, i kinda had a feeling it was something like that, it seemed illogical to me, but since i don't know as much as other respected forum members, i didn't want to argue wink.gif
Go to the top of the page
+Quote Post
greynol
post Feb 20 2013, 23:03
Post #21





Group: Super Moderator
Posts: 10022
Joined: 1-April 04
From: San Francisco
Member No.: 13167



QUOTE (pdq @ Feb 20 2013, 13:01) *
db1989 should have made it more clear that he was being sarcastic. Blade was an awful encoder, and upsampling and 32-bit floating point have no benefit in this case.

The benefit was to discourage people from engaging in illegal distribution of copyrighted material.


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
mjb2006
post Feb 20 2013, 23:03
Post #22





Group: Members
Posts: 827
Joined: 12-May 06
From: Colorado, USA
Member No.: 30694



QUOTE (unicorn20 @ Feb 20 2013, 13:47) *
you say rounding to 16bit can have a negative effect, what kind of negative effect?

It adds a small amount of noise that almost certainly isn't audible. It would probably be quite audible if you were reducing to 8-bit. Some people like to add dither when reducing to 16-bit "just in case". It's kind of like the decision to use lossless or maximum-bitrate lossy, even though 99.9999% of the time, lossy encoding with modest settings yields transparency. When dither is used, the dither itself may be audible (like tape hiss), unless you use noise shaping to confine it to the higher frequency ranges. Personally I wouldn't worry about it; just leave the dither off unless you're going below 16-bit. Though I admit, I fall into the "just in case" trap a lot. smile.gif

QUOTE (unicorn20 @ Feb 20 2013, 13:47) *
it seems weird to me that audacity will do the dithering by default

Audacity is trying to accommodate more kinds of processing and merging of files than just the simple cut/copy/paste and volume-level adjustments that you're doing. However even for more complex processing, as long as you're working at 16-bit or higher, dither is still a "just in case" kind of thing for people who swear their golden ears can hear a difference, despite the failure of blind testing to show that anyone can. (someone correct me if I'm wrong)

QUOTE (greynol @ Feb 20 2013, 15:03) *
The benefit was to discourage people from engaging in illegal distribution of copyrighted material

Encouraging him to share degraded, pointlessly converted material doesn't seem to be a good way to discourage him from doing that. It's just hazing and well-poisoning that you seem to think would be funny. And he didn't actually admit to the material being copyrighted, though it does seem likely.

This post has been edited by mjb2006: Feb 20 2013, 23:22
Go to the top of the page
+Quote Post
greynol
post Feb 21 2013, 00:09
Post #23





Group: Super Moderator
Posts: 10022
Joined: 1-April 04
From: San Francisco
Member No.: 13167



My point was not necessarily targeted exclusively at those actively engaging in the essentially universal crime of uploading, it is also to discourage people from grabbing files from the "wild" because there is no guarantee that the well isn't poisoned by people who are clueless about how to handle digital audio. Gods know the internet is chalked-full of them!

Please tell me where I encouraged him to share anything or are you done with your futile attempt at arguing with me? Please may it be the latter. I don't really have the time to deal with your misinterpretation of my post, my intentions and what I appear to find funny.

I do not find the use of this forum to aid in criminal behavior funny. As I have said elsewhere, this forum has lost revenue as a direct result of posts that were not in accordance with the spirit of TOS #9.

This post has been edited by greynol: Feb 21 2013, 00:32


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
db1989
post Feb 21 2013, 00:46
Post #24





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



If I make sure to include something like this wink.gifwink.gifwink.gifwink.gifwink.gifwink.gifwink.gif in my next post containing sarcasm about processes that a user could easily identify as not being beneficial to quality by spending a minute or two on Google, will it preclude over-the-top allegations such as “hazing and well-poisoning”?

Never mind the fact that, in that specific context, I don’t think I would have been bothered about how long ago the user had registered: regardless of the age of a user’s account, “hazing”, with all its negative connotations and associated tales of woe (and, FWIW, I tick approximately zero of the boxes necessary to be a frat-boy), is a silly exaggeration when used to describe a joke.

I wasn’t picking on someone because s/he was new: I just made a (failed? bad?) joke based upon my reluctance to have Hydrogenaudio provide yet more facilitation to file-sharing. That, in itself, is nothing personal to unicorn20 or an indication that I don’t want the other questions to be answered: it’s just sideways (sidewarez?) commentary on one particular phenomenon and how it tends to intersect with this site. I kept it deadpan as tacit commentary about my opinion of said phenomenon.

So, it was an attempted joke and one that, I would hope, would be obvious as such after a tiny bit of research. So, with that said, here is where I try to make a positive contribution to this discussion: Independent research and scepticism are healthy, and I encourage them, especially when the subject is something about which you are happy to admit to having little knowledge.

However, although I could extend that logic also to cover staff on websites, I don’t want to harm the reputation that Hydrogenaudio has as a reliable source of information, so I apologise for not making it clear that I was joking – not because of hypersensitivity such as the above but because staff are trusted to be equally reliable, and it’s certainly not my place to cast any doubt upon the site in that capacity, regardless of intent.

So, yes, next time I’ll either make it clear that I’m being a grinch, or I’ll just do my deadpanning in a literal way.
Go to the top of the page
+Quote Post
greynol
post Feb 21 2013, 00:49
Post #25





Group: Super Moderator
Posts: 10022
Joined: 1-April 04
From: San Francisco
Member No.: 13167



You are too kind, db1989.

I stopped aiding people who give the appearance of being up to no good or not taking the time to help themselves.

Just so that I don't come off as a complete trollish asshole (assholish troll, asshole troll?), the answer to the question in the subject line is yes.

This post has been edited by greynol: Feb 21 2013, 01:04


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post

2 Pages V   1 2 >
Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th October 2014 - 06:39