Author Topic: Pre-emphasis  (Read 11846 times)

0 Members and 1 Guest are viewing this topic.

Online Daverz

  • Veteran member
  • *
  • Posts: 4985
  • You can't fool me, it's turtles all the way down!
Re: Pre-emphasis
« Reply #20 on: August 15, 2010, 06:10:05 AM »
The digital de-emphasis strikes me as problematic.  If the input signal uses 100% of the quantization range, then the de-emphasized signal will certainly exceed 100% at times.  This would cause clipping, unless the volume of the track is reduced.

Would this be the case when de-emphasis involves only attenuation across the frequency range?  I suppose one does have to worry about ripple with some DSP algorithms.  If it means anything to anyone here, sox uses a biquad filter for this.  If you look at the sox source code, they give a reference for the math used for each effect.  Also sox does all its math internally using 32-bit floats.

Sox warns the user if clipping occurred during processing (or is supposed to, at least), and I've never gotten such a message when applying its "deemph" effect. 

By the way, Squeezebox users should take a look at this page:

http://www.cuttingthebills.com/2010/06/my-digital-audio-guide-squeezecenter.html

He solves the problem by using images and cuefiles, then using the sox deemph filter on the fly during playback.  I opted to use a separate flac for each track and doing the de-emphasis during ripping.
« Last Edit: August 15, 2010, 06:20:28 AM by Daverz »

Scarpia

  • Guest
Re: Pre-emphasis
« Reply #21 on: August 15, 2010, 06:18:18 AM »
Would this be the case when de-emphasis involves only attenuation across the frequency range?  I suppose one does have to worry about ripple with some DSP algorithms.  If it means anything to anyone here, sox uses a biquad filter for this.  If you look at the sox source code, they give a reference for the math used for each effect.  Also sox does all its math internally using 32-bit floats.

The average level will go down with attenuation.  However it is theoretically possible for it to occasionally go above 100%.  It is possible that at a given instant a high frequency ripple is preventing the signal from going about the limit and when the ripple is removed it does go above.  That would be a rare event, but during 80 minutes of music rare things will occur.

Scarpia

  • Guest
Re: Pre-emphasis
« Reply #22 on: August 16, 2010, 05:33:37 AM »
Ok, I tried sox and it seems less annoying than switching back and forth between foobar and iTunes.  But EAC is starting to annoy me.  It occasionally pops up with "sync error."  They imply that their software is discovering mysterious read errors, but I suspect their interface to the CD drive is defective and they attribute the problems to the disc or drive.  Any alternatives for ripping CDs to single flac file + cue sheet?

Offline DavidRoss

  • Veteran member
  • *
  • Posts: 7590
  • Location: Northern California
Re: Pre-emphasis
« Reply #23 on: August 16, 2010, 05:42:03 AM »
Any alternatives for ripping CDs to single flac file + cue sheet?
CDex is a great opensource one-stop ripper that can be tailored however you like it.  Support for cue sheets is supposed to be available, but I don't use them so have no personal experience with that to share.
"Maybe the problem most of you have ... is that you're not listening to Barbirolli." ~Sarge

"The problem with socialism is that sooner or later you run out of other people's money." ~Margaret Thatcher

Franco

  • Guest
Re: Pre-emphasis
« Reply #24 on: August 16, 2010, 05:49:25 AM »
Quote
Copy a track from the disc to a wav file on your hard disk using iTunes.

I haven't kept up with the changes in recent upgrades to iTunes - my iTunes automatically copies files from a CD in the compressed format, m4p.  Has iTunes made it easier to store tracks in a lossless format?  Or is this something available on Macs but not iTunes for Windows.

Scarpia

  • Guest
Re: Pre-emphasis
« Reply #25 on: August 16, 2010, 07:28:35 AM »
I haven't kept up with the changes in recent upgrades to iTunes - my iTunes automatically copies files from a CD in the compressed format, m4p.  Has iTunes made it easier to store tracks in a lossless format?  Or is this something available on Macs but not iTunes for Windows.

I do it on Windows.  My iTunes has a buttons that say "import CD" and "import settings."  Import setting allows you to change the input format, and you can pick Apple lossless.

Offline DavidRoss

  • Veteran member
  • *
  • Posts: 7590
  • Location: Northern California
Re: Pre-emphasis
« Reply #26 on: August 16, 2010, 07:47:43 AM »
I haven't kept up with the changes in recent upgrades to iTunes - my iTunes automatically copies files from a CD in the compressed format, m4p.  Has iTunes made it easier to store tracks in a lossless format?  Or is this something available on Macs but not iTunes for Windows.
Ack.  Yes, iTunes will let you rip into Apple's own lossless format...but I hate iTunes (at least older versions--haven't tried any iterations less than 3 years old) due to its questionable error correction and good support only for Apple's proprietary formats (evil!  >:D ).  I much prefer the widely accepted open source standard FLAC for lossless and LAME for lossy compression. 
"Maybe the problem most of you have ... is that you're not listening to Barbirolli." ~Sarge

"The problem with socialism is that sooner or later you run out of other people's money." ~Margaret Thatcher

Scarpia

  • Guest
Re: Pre-emphasis
« Reply #27 on: August 16, 2010, 07:53:38 AM »
Ack.  Yes, iTunes will let you rip into Apple's own lossless format...but I hate iTunes (at least older versions--haven't tried any iterations less than 3 years old) due to its questionable error correction and good support only for Apple's proprietary formats (evil!  >:D ).  I much prefer the widely accepted open source standard FLAC for lossless and LAME for lossy compression.

But anything other than iTunes will happily play your pre-emphasized CDs without the corresponding de-emphasis, causing excessive treble boost.  Hmmm, maybe if I manually apply de-emphasis to by DG CDs they will actually sound like an orchestra.   8)

Anyway, I'm going the open source flac route but there are difficulties there too.

Offline DavidRoss

  • Veteran member
  • *
  • Posts: 7590
  • Location: Northern California
Re: Pre-emphasis
« Reply #28 on: August 16, 2010, 08:12:44 AM »
But anything other than iTunes will happily play your pre-emphasized CDs without the corresponding de-emphasis, causing excessive treble boost.  Hmmm, maybe if I manually apply de-emphasis to by DG CDs they will actually sound like an orchestra.   8)

Anyway, I'm going the open source flac route but there are difficulties there too.
Per the earlier comments on this thread it appears that not all labels used pre-emphasis and that those who did mostly stopped by around 1990.  (Perhaps that helps account for why CDs often sounded awful--"CD screech" or "digital glare"--until the early '90s...?)  To me the virtues of FLAC over Apple's proprietary codec make it a no brainer.  Appleheads will, of course, feel differently.  (Apple fan boys, that is.  Appleheads, as in "applehead siamese cats," don't really give a damn about much of anything that interests their human servants...at least judging from the attitude of the one currently nuzzling my feet.  She must think it's time for me to feed her...again!)  ;D
"Maybe the problem most of you have ... is that you're not listening to Barbirolli." ~Sarge

"The problem with socialism is that sooner or later you run out of other people's money." ~Margaret Thatcher

Online Daverz

  • Veteran member
  • *
  • Posts: 4985
  • You can't fool me, it's turtles all the way down!
Re: Pre-emphasis
« Reply #29 on: August 16, 2010, 01:03:15 PM »
(Perhaps that helps account for why CDs often sounded awful--"CD screech" or "digital glare"--until the early '90s...?) 

I doubt it.  I suppose some players might have done a poor job with de-emphasis, but this would have only effected a small percentage of CDs even back then.  And properly decoded CDs with pre-emphasis can sound excellent, with smooth highs, as many of those pre-emphasized Bis and Supraphon CDs did.

Scarpia

  • Guest
Re: Pre-emphasis
« Reply #30 on: August 16, 2010, 01:11:42 PM »
I doubt it.  I suppose some players might have done a poor job with de-emphasis, but this would have only effected a small percentage of CDs even back then.  And properly decoded CDs with pre-emphasis can sound excellent, with smooth highs, as many of those pre-emphasized Bis and Supraphon CDs did.

Done right it would reduce digital artifacts.  But done foolishly (using unsophisticated digital algorithms to do the emphasis and de-emphasis) it could make matters worse.  The annoying thing is that it is now a semi-supported feature which some CD players apparently don't recognize, and most ripping software doesn't deal with correctly.  It is sort of like those track indices that you sometimes see on CDs.   

I have a CD of the Alpine symphony with many index points to mark the different sections, all on one track.  However, despite having owned at least 10 cd players since 1986 I've never had one that recognized a track index.  As a result, it is just one 60 minute track.  What's the use?

Online Daverz

  • Veteran member
  • *
  • Posts: 4985
  • You can't fool me, it's turtles all the way down!
Re: Pre-emphasis
« Reply #31 on: August 16, 2010, 01:58:03 PM »
Some good info on pre-emphasis here:

http://wiki.hydrogenaudio.org/index.php?title=Pre-emphasis

Still, there doesn't seem to be anything besides iTunes that can automatically detect and  undo PE.  Maybe one of the windows rippers allows for post-ripping scripts?

Offline Ghost of Baron Scarpia

  • Veteran member
  • *
  • Posts: 1798
  • Location: California
Re: Pre-emphasis
« Reply #32 on: December 05, 2018, 12:03:14 AM »
A new twist. I downloaded BIS CD-458 from Presto Classical (Kokkonen String Quartets). When I listened it seemed unnaturally bright, with an artificial "sizzle" on the treble. I know from experience that BIS CDs from this era often had pre-emphasis, so I applied compensation (SoX deemph function). The result sounded normal. So I became suspicious that Presto was distributing the raw audio data from the CD, not taking into account that deemphasis was required. I also purchased one track of the CD from Amazon Digital Music as an MP3 download. Same unnaturally boosted treble.

There was only one way to know for sure, I purchased a used copy of the CD and ripped to cue+flac using XLD. Sure enough, the cue file had the preemphasis flag set. The raw flac file seemed to be identical to the raw FLAC download. Both the FLAC file from Presto and the MP3 file from Amazon have uncorrected preemphasis.

I sent an email to BIS, curious what they'll say. In the mean time, beware of downloads of BIS recordings before the mid 1990's, when the finally abandoned preemphasis.
There are two kinds of music. Good music, and the other kind. - Duke Ellington

Online Daverz

  • Veteran member
  • *
  • Posts: 4985
  • You can't fool me, it's turtles all the way down!
Re: Pre-emphasis
« Reply #33 on: December 05, 2018, 07:49:32 AM »
What disc is this [ok, got it, never mind :p]?  I wonder if the copy on Tidal is properly de-emphasized.  I could check some of the other discs I know have pre-emphasis.
« Last Edit: December 05, 2018, 09:30:12 AM by Daverz »

Offline 71 dB

  • Veteran member
  • *
  • Posts: 6328
  • I free-think, therefore I am free
    • Soundcloud
  • Location: Helsinki, Finland
Re: Pre-emphasis
« Reply #34 on: December 05, 2018, 08:23:23 AM »
A new twist.

A new twist 8 years in the making...  :D
Spatial distortion is a serious problem deteriorating headphone listening.
Crossfeeders reduce spatial distortion and make the sound more natural
and less tiresome in headphone listening.

My Sound Cloud page

 

Don't Like These Ads? Become a GMG Subscriber!
For as little as 14 cents per day, subscribers get no advertising on the forum, a larger Inbox for your PM's, and a warm glow of knowing you are supporting the forum. All this and a groovy Subscriber badge too!
Click here to read more.