Plugins to do de-emphasis of pre-emphasized CDs:
* Postprocessing (foo_deemph): works only with lossless sources; always active during playback and ReplayGain scan.
* DSP plugin (foo_dsp_deemph): works with any source
* To de-emphasize a track, add a tag named PRE_EMPHASIS or PRE-EMPHASIS with a value 1, on or yes. Other tracks are unaffected.
* There's no reason to use both components at the same time.
* Don't use both foo_deemph and foo_dsp_effect (the latter has its own de-emphasis postprocessor).
* Note that even foo_dsp_deemph works only when a track is tagged: just adding it to the list of active DSPs is not enough to make it work.
Changelog:
0.1.1
- recompiled with latest SDK (2018-10-11). Works with foobar2000 1.4.x; users of 1.3.x need to download and install MSVC redist (here (https://aka.ms/vs/15/release/VC_redist.x86.exe)).
Nice.
* Don't use both foo_deemph and foo_dsp_effect (the latter has its own de-emphasis postprocessor).
Assuming that I turn off the de-emph of foo_dsp_effect: Are there any incompatibilities which prevents me from using foo_deemph for the EQ (say, for the sake of the more extensive tagging support) and still have foo_dsp_effect installed?
I should deprecate deemphasis support and just get people to use lvqcl's component.
or update mine to use the tags dbpowerAMP uses...
Why another component? Mudlord already had a nice solution!
Why another component?
It is even another two, facilitating choice between DSP and post-processing. (Is that an answer? ;-)
I guess users may diverge on a “one module for each task” philosophy and “one wonder-do-it-all” philosophy – it strikes me that since HDCD is treated different (reading the actual audio first, and then deciding whether to process), there is not going to be any tags-based “foo_fix_weird_CDs_dsp”.
it strikes me that since HDCD is treated different (reading the actual audio first, and then deciding whether to process), there is not going to be any tags-based "foo_fix_weird_CDs_dsp".
I didn't quite understand that - do you mean there is yet another plugin which can do de-emph automatically?
it strikes me that since HDCD is treated different (reading the actual audio first, and then deciding whether to process), there is not going to be any tags-based "foo_fix_weird_CDs_dsp".
I didn't quite understand that - do you mean there is yet another plugin which can do de-emph automatically?
Ah, me meandering randomly away. No, there are a couple of effects I enable permanently while playing CD rips (because CD rips is something I like to keep bitperfect), and that is HDCD correction and de-emphasis. From an end-user point of view (
my end-user point of view, I'd have to add), it makes more sense to have these separate from that component I only need when I process file-->file (which I would do with RIAA correction on a vinyl rip or Dolby on a tape rip).
Assuming that I turn off the de-emph of foo_dsp_effect: Are there any incompatibilities which prevents me from using foo_deemph for the EQ (say, for the sake of the more extensive tagging support) and still have foo_dsp_effect installed?
If you have a lossless track with
PRE_EMPHASIS tag equal to
1 then it will be processed twice: with foo_deemph and with foo_dsp_effect. Not a good thing.
Why another component? Mudlord already had a nice solution!
The main reason for me: foo_dsp_effect adds several entries into the list of available DSPs. I prefer to have only one column in this list: it's much simpler to select a particular DSP in this case. (I already removed official EQ but it wasn't enough)
Assuming that I turn off the de-emph of foo_dsp_effect: Are there any incompatibilities which prevents me from using foo_deemph for the EQ (say, for the sake of the more extensive tagging support) and still have foo_dsp_effect installed?
If you have a track with PRE_EMPHASIS tag equal to 1 then it will be processed twice: with foo_deemph and with foo_dsp_effect. Not a good thing.
Certainly, but foo_dsp_effect has other features that may be useful if its de-emphasis filter is disabled. I take it to mean that you don't know any technical incompatibilities (and my fb2k hasn't crashed while testing).
But end users might not want the extra DSPs, like reverb/echo/bass boost/pitch shifting.
But end users might not want the extra DSPs, like reverb/echo/bass boost/pitch shifting.
That is kinda my point. Your component does jobs I actively choose for processing files.
HDCD and de-emphasis OTOH, I apply to playback streams without altering files, in the background without my interacting.
So to me it makes sense to enable your DSP precisely when I need it, and otherwise keep it out.
But by all means keep the deemphasis in. There is no reason to take that one out of a do-it-all DSP component.
I just tested with a sine sweep, generated with SoX like this:
sox -b 16 -r 44100 -c 2 -n output.wav synth 40 sine 0:22050 gain -6
In foobar2000, I tagged the resulting WAV with PRE_EMPHASIS=1, then used the converter with various settings to produce de-emphasized output files. I then looked at the frequency analysis curves in Audition (Blackmann-Harris, FFT size 32768, linear scale, zoomed in a bit).
These all produce output that is, for all intents, identical to that of WaveEmph (http://www.picosound.de/E_SOFT.HTM#emphasis):
- foo_deemph
- foo_dsp_deemph
- foo_convolve (auto level adjust disabled) with the [a href='index.php?showtopic=76191']Wombat impulse[/a]
- foo_convolve (auto level adjust disabled) with the lvqcl SoX impulse (http://www.hydrogenaudio.org/forums/index.php?showtopic=67376&view=findpost&p=620372)
However, foo_dsp_effect (with the "CD de-emphasis" IIR filter preset enabled) is shockingly wrong. It only boosts the bass, resulting in quite a bit of clipping and aliasing. It's not even close to being correct. Did I do something wrong?
foo_dsp_effect postprocessing service vs. SoX:
(http://i.imgur.com/YnSgetH.png)
If you want to use foo_dsp_effect de-emph IIR DSP filter then you should select the last option: "High shelf" (some bug in its code, apparently). Also, there should be no PRE_EMPHASIS tag in the file.
But even without this bug, foo_dsp_effect curve is noticeably steeper.
Something else of note: foo_convolve results in more samples output than were input. With input of 1,764,000 samples, the Wombat impulse produces 1,765,376, and the SoX impulse produces 1,764,032.
So at this point, I can only recommend WaveEmph, SoX, foo_deemph, or foo_dsp_deemph.
Something else of note: foo_convolve results in more samples output than were input.
Try this: http://www.hydrogenaudio.org/forums/index....showtopic=85107 (http://www.hydrogenaudio.org/forums/index.php?showtopic=85107)
Oh, thanks...that did the trick. All is well with foo_dsp_convolve.
Quickly glanced at the code: https://github.com/FauxFaux/foo_mudlord/blo.../iirfilters.cpp (https://github.com/FauxFaux/foo_mudlord/blob/master/foo_dsp_effect/iirfilters.cpp)
Seems basically the same as biquad filter implementation of SoX, but is using sqrt(A + A) instead of 2 * sqrt(A) in SoX.
BTW doesn't fb2k read "FLAGS PRE" in cuesheet? It would be nice if fb2k reads it as metadata, and this plugin could be applied to it.
thank you for alerting me to the bugs, I really should rewrite iirfilters.cpp
I forgot to say thanks for keeping tag support the same as in mudlord's component, so thanks for that!
How good is the de-emphasis applied by the foo_deemph.dll compared to "sox deemph"? Can anybody judge this? Thanks in advance!
How good is the de-emphasis applied by the foo_deemph.dll compared to "sox deemph"?
~ the same.
I'm just eyeballing graphical frequency-analysis plots of deemphasized sine wave sweeps, but foo_deemph and SoX deemph overlap nearly perfectly. And they're still within a few hundredths of a dB of the output of WaveEmph. I don't know which is closer to the ideal, but they're so close, it doesn't matter. The analog components that do the deemphasis in real CD players probably result in even greater variation.
just tested with some preemphasis CDs and works like a charm - many thanks for this great and very valuable foobar-component!
With mudlord's new DLL I'm getting the same result as before. "CD De-emphasis" IIR Filter preset results in a massive bass boost, no attenuation.
needs rewriting i suppose. people can use lvqcl's dsp in the meantime.
or: mudlord.info/temp/foo_dsp_effect.zip
just tested with some preemphasis CDs and works like a charm - many thanks for this great and very valuable foobar-component!
this concerns to foo_deemph.dll and NOT to foo_dsp_effect.dll!
fair enough.
in the foo_dsp_effect thread, I made a optional download for people that dont want the foo_dsp_effect's deemp postprocessor service.
that way, they can still use the superior component without it interfering.
The latest update to foo_dsp_effect has resolved the problem, so I wouldn't call any of them superior now... they're all equally good, IMHO:
original sweep = green
foo_dsp_effect = red
SoX deemph = yellow
WaveEmph = blue
foo_deemph, foo_dsp_deemph, and foo_dsp_convolver all produce results (almost?) identical to that of SoX deemph, so I didn't plot them.
(http://skew.org/tmp/hydrogenaudio/deemph/comparison.PNG)
If you want to have a look yourself, the WAVs are in the same folder as the graph (http://skew.org/tmp/hydrogenaudio/deemph/).
OK, I have the question - what is the practical difference (in usage) between foo_deemph and foo_dsp_deemph ?
I highlighted the relevant part in the 1st post with blue color. Or do you want to know something else?
That blue text was there before I asked the question? Sorry for bothering you, looks like sometimes I'm blind :/ . That's exactly what I wanted to know. So looks like I need only foo_deemph, not dsp. Thanks.
The text was there, the color wasn't
* To de-emphasize a track, add a tag named PRE_EMPHASIS or PRE-EMPHASIS with a value 1, on or yes. Other tracks are unaffected.
Could foo_deemph be made to read 'FLAGS PRE' that already exist in my EAC/Cueripper cue sheets. I ask because I don't believe it is possible for foobar to read 'PRE-EMPHASIS' tag from an external cue sheet, eg, 'REM PRE_EMPHASIS yes'.
If all tracks were made with pre-emphasis then you can add PRE-EMPHASIS tag to the image file. (And don't forget to reload tags for the corresponding cue sheet)
Is there any reason why these components are not in the official repository?
* To de-emphasize a track, add a tag named PRE_EMPHASIS or PRE-EMPHASIS with a value 1, on or yes. Other tracks are unaffected.
What does "add a tag" specifically mean? I added PRE_EMPHASIS=1 to pre-emphasis wav files via the field option in foobar2000, converted them, then converted another copy of the album using the de-emphasis function in SoX. Results are:
1) fb2k -0.77
2) SoX -0.03
Obviously, the tag I added with fb2k for the first set of files didn't work. Is the tag the right type of tag? And if it isn't, what's the proper way to tag the files so that the foo_deemph works correctly?
Added PRE_EMPHASIS to the file names, nothing. Also added it to the tag info of every file name (like 01. trackname.PRE_EMPHASIS.wav), still nothing. I'm starting to think that this plugin doesn't work with the latest fb2k. Going back to command line SoX. At least I know the damn thing works the way it's supposed to!
you add tags via the properties dialog. highlight playlist items>right click>properties.
now right click a blank area>add new field. give it the name/value as instructed above.
Finally got the damn thing to work. The results? Not that great. Of course, being that it replicates what you get in SoX, I'm not surprised. IMO, the de-emphasize feature isn't all that it's cracked up to be. The method that I use, oddly, is based on work that actually improves upon what they've did. It makes Black Sabbath's Preemph "Paranoid" go from sounding like mud (with SoX) to sounding so clear it blows your mind. I forget who I got it from here, but, dude, you've, most definately, got some skills. Whoever you are.
I have two questions:
- What does "always active during playback and ReplayGain scan" for the Postprocessing (foo_deemph) version mean? Will ALL files been de-emphasized, even the majority which doesn't need it?
- Where/How do I add the tag named PRE_EMPHASIS or PRE-EMPHASIS? Do I have to add it only for the dsp version or for both versions (which would answer question 1)?
The method that I use, oddly, is based on work that actually improves upon what they've did. It makes Black Sabbath's Preemph "Paranoid" go from sounding like mud (with SoX) to sounding so clear it blows your mind. I forget who I got it from here, but, dude, you've, most definately, got some skills. Whoever you are.
I don't understand. Do you use other component? other DSP? what is the "method that you use"? I'm quite curious
Will ALL files been de-emphasized, even the majority which doesn't need it?
No
Where/How do I add the tag named PRE_EMPHASIS or PRE-EMPHASIS? Do I have to add it only for the dsp version or for both versions (which would answer question 1)?
As usual: right click -> Properties; or use any tagging program. For both.
... As usual: right click -> Properties; or use any tagging program...
Thank you very much!
So I will use Mp3tag.
BUT:
As far as I understand, you can tag only e.g. .mp3 or .flac files.
How does it work for .wav files?
BUT:
As far as I understand, you can tag only e.g. .mp3 or .flac files.
How does it work for .wav files?
Nope, WAV files can be tagged too, although fewer programs support this; foobar2000 became one such program in v1.1.9 (changelog (http://www.foobar2000.org/changelog)).
... WAV files can be tagged too, ...
Thank you very much!
And now one last question:
If I have only lossless sources, what is the advantage/disadvantage of using the Postprocessing or the DSP version?
Use postprocessing if you want to add correct ReplayGain tags to your files.
Use DSP if you have lossy files that you want to de-emphasize.
Otherwise, there's no difference.
@lvqcl
Thanks for this very interesting alternative. Especially post processing (foo_deemph) plugin. Personally I'm using convolver plugin with loaded De-emphasis impulse files :
Waves_De-Emphasis. I can't remember where did I found this but it contains impulse files for all 16, 24 and 32 bit files. I was able to do some listening tests in comparison with my original cds de-emphasized by analog circuitry in my player and I can't tell any difference at all. These are really great. Can I upload them so we can make some comparison with all others like in mjb2006 graph in previous post?
My next question is about the possibility of adding a line in status bar about anytime the plugin is active (foo_deemph). Something like for HDCD post processing plugin: HDCD: $if2($info(hdcd),no) Is it possible?! It would be awesome to see status Pre-Emphasis: Yes/No without any clicking and checking let's say “Yes” status could be in re color. Somebody skilled in syntax who can help here? Thanks again for help.
Ok I tried some files which I de-emphasized by this plugin (on playback not permanently) and the result is pretty bad. It totally kills audio which sounds dull and dead. Especially stereo imaging is non-existent. Original cds sounds nothing like this. Something is wrong with post processing here. As I said convolver loaded with my impulses is far better. Strange. You can try. Of course uncheck “Auto level adjust” option in convolver.
Waves_De-Emphasis (http://d01.megashares.com/dl/R51pfkg/Waves_De-Emphasis.rar)
My next question is about the possibility of adding a line in status bar about anytime the plugin is active (foo_deemph). Something like for HDCD post processing plugin: HDCD: $if2($info(hdcd),no) Is it possible?! It would be awesome to see status Pre-Emphasis: Yes/No without any clicking and checking let's say “Yes” status could be in re color. Somebody skilled in syntax who can help here? Thanks again for help.
This plugin works if PRE_EMPHASIS tag is set to "1" so you can try something like $ifequal(%pre_emphasis%,1,Yes,No)
Ok I tried some files which I de-emphasized by this plugin (on playback not permanently) and the result is pretty bad. It totally kills audio which sounds dull and dead. Especially stereo imaging is non-existent. Original cds sounds nothing like this. Something is wrong with post processing here. As I said convolver loaded with my impulses is far better. Strange. You can try. Of course uncheck “Auto level adjust” option in convolver.
Not confirmed: there's almost no difference between deemph and Waves impulse.
My next question is about the possibility of adding a line in status bar about anytime the plugin is active (foo_deemph). Something like for HDCD post processing plugin: HDCD: $if2($info(hdcd),no) Is it possible?! It would be awesome to see status Pre-Emphasis: Yes/No without any clicking and checking let's say “Yes” status could be in re color. Somebody skilled in syntax who can help here? Thanks again for help.
This plugin works if PRE_EMPHASIS tag is set to "1" so you can try something like $ifequal(%pre_emphasis%,1,Yes,No)
Ok I tried some files which I de-emphasized by this plugin (on playback not permanently) and the result is pretty bad. It totally kills audio which sounds dull and dead. Especially stereo imaging is non-existent. Original cds sounds nothing like this. Something is wrong with post processing here. As I said convolver loaded with my impulses is far better. Strange. You can try. Of course uncheck “Auto level adjust” option in convolver.
Not confirmed: there's almost no difference between deemph and Waves impulse.
Thanks for the swift responses. I appreciate it. I thing the whole concept of your foo_deemph plugin is best by far. Your files are untouched, you don't need to care anymore for manually activate your dsp when you put the right tags in your file and I can confirm it works absolutely flawlessly. Is there any possibility for some advanced option to load your own impulses instead the default one from sox? Something like in plugin for playing of SACD DSD files in your computer. It has different switchable filters which are transforming DSD into PCM. That could make this one as the ultimate plugin and all you need. I'm not really some kind of programmer and sorry if I misunderstood the concept of your plugin but I think that the output even on post precessing plugin is based on sox deeemp .wav impulse..Right? BTW Thanks for the syntax for status bar.
No, it is implemented as a biquad filter, it doesn't use any impulses.
I see. I tried a little with status bar syntax and here are some possibilities. It was easier than I thought.
Pre-Emphasis: $if($meta(pre-emphasis),Yes,No)
or
Pre-Emphasis: $if($meta(pre_emphasis),Yes,No)
Depends on your tag name. It doesn't matter which value you are using 1, on or yes. It simply scans for PRE-EMPHASIS or PRE_EMPHASIS tag name presence.
second
Pre-Emphasis: $ifequal($meta(pre-emphasis),1,Yes,No)
or again
Pre-Emphasis: $ifequal($meta(pre_emphasis),1,Yes,No)
This one only works with value 1 and NOT with on or yes. I guess there are other possibilities. Hope this helps.
I'm experiencing a strange problem - I've uninstalled this component (foo_dsp_deemph) but still seem to notice the effect when applying the %PRE-EMPHASIS% tag or deleting it. There is no active DSP in my chain, just replaygain. I'm currently at work though, looking to test if the same thing happens at my work station where I don't think I've ever installed either plugin, foo_deemph or foo_dsp_deemph. Anyone else able to reproduce this?
EDIT: I also checked for any leftover .dll's in the programs' component folder and APPDATA components folder.
Is there an effective way to know if a CD/track has pre-emphasis?
Thanks.
foo_dsp_effect also has its own deemph postprocessing. But IIRC it uses only PRE_EMPHASIS tag, and not PRE-EMPHASIS.
Is there an effective way to know if a CD/track has pre-emphasis?
I had a few in my collection that were known to have pre-emphasis: an old
Dark Side of the Moon, New Order's
Low-life (old Nimbus Factory disc), Journey's
Frontiers (original US disc and Japan)... But I recently acquired two more discs from Japan on the Canyon label. I wouldn't have known unless dBpoweramp tagged them for me with %PRE-EMPHASIS% = Yes
IIRC, I believe there is a flag on the disc's TOC and/or subchanel information that lets EAC or dBpoweramp know and I'm not sure if any other ripping software besides iTunes accounts for these old discs (although some were or are still being manufactured for whatever reason).
I had a few in my collection that were known to have pre-emphasis: an old Dark Side of the Moon, New Order's Low-life (old Nimbus Factory disc), Journey's Frontiers (original US disc and Japan)... But I recently acquired two more discs from Japan on the Canyon label. I wouldn't have known unless dBpoweramp tagged them for me with %PRE-EMPHASIS% = Yes
Sorry for keeping OT... mostly for the Pink Floyd albums, what if you only have the files and not the discs anymore, I've never tried but can you scan with dBpa for that feature?
foo_dsp_effect also has its own deemph postprocessing. But IIRC it uses only PRE_EMPHASIS tag, and not PRE-EMPHASIS.
When I noticed this, I was definitely using PRE-EMPHASIS. I know nothing about your code (or coding in general, sorry) but is there some part of post-processing leftover even after removing the component(s)? I'm just spit-balling..
@eahm : To quote one of Greynol's old posts on the subject "apart from an educated guess? no." On the other hand, they'll probably sound especially bright when not de-emphasized. There's a pretty good list going here (http://www.studio-nibble.com/cd/index.php?title=Pre-emphasis_(release_list)) and on Steve Hoffman's forum of known pre-emph CDs.
@eahm : To quote one of Greynol's old posts on the subject "apart from an educated guess? no." On the other hand, they'll probably sound especially bright when not de-emphasized. There's a pretty good list going here (http://www.studio-nibble.com/cd/index.php?title=Pre-emphasis_(release_list)) and on Steve Hoffman's forum of known pre-emph CDs.
Yes, I saw both while ago, I'll ask again in the future, maybe they'll come up with something and I may have one or two albums only anyway. Thanks.
foo_dsp_effect also has its own deemph postprocessing. But IIRC it uses only PRE_EMPHASIS tag, and not PRE-EMPHASIS.
After getting back to the home office I was able to test this. You're right it was foo_dsp_effect and I didn't even make the mental connection to Mudlord's component, especially since it wasn't part of the DSP chain. FWIW, foo_dsp_effect also worked for the tag "PRE-EMPHASIS" and "Yes", not just "PRE_EMPHASIS" and "1". Thanks for the help. I don't know how I got so confused.
Hi, I have downloaded the foo_deemph.zip and have a few questions:
- Is there a set of step by step instructions that a novice can follow to install?
- I am using ASIO4all, does foo-deemph just sit in front of that and pass the processed signal to it?
- I gather the filter cuts in automatically ONLY when a pre-emphasised file is detected and that non pre-emphasised files will pass untouched. Is this correct?
- If so, how do I ensure that the relevant files have the correct flag/code.
Sorry for all the questions - I thought the zip would have an idiots guide text file.
Thanks in advance.
1) "How do I install additional components?" from http://www.foobar2000.org/FAQ (http://www.foobar2000.org/FAQ)
2) This component doesn't interact with ASIO4ALL
3) Yes
4) From the 1st post in this thread: "add a tag named PRE_EMPHASIS or PRE-EMPHASIS with a value 1, on or yes"
lvqcl What's the difference between 0.0.3 and 0.1.0 Version?
0.0.3 works only with audio with 44100 Hz samplerate.
0.1.0 can apply deemph filter to audio with 44100, 48000, 88200, 96000, 176400, 192000 Hz samplerate.
lvqcl thanks
Postprocessing (foo_deemph): works only with lossless sources; always active during playback and ReplayGain scan.
Does it mean that it
always performs frequency response correction, no matter if audio has pre-emphasis or not? Or it also needs some flags in audio data to start de-emphasis?
Does it mean that it always performs frequency response correction, no matter if audio has pre-emphasis or not? Or it also needs some flags in audio data to start de-emphasis?
No.
To de-emphasize a track, add a tag named PRE_EMPHASIS or PRE-EMPHASIS with a value 1, on or yes. Other tracks are unaffected.
Use postprocessing if you want to add correct ReplayGain tags to your files.
Use DSP if you have lossy files that you want to de-emphasize.
Otherwise, there's no difference.
I have image files with embedded cuesheet which is replaygained.
Excuse my ignorance, does this mean that I have to re-scan RG after any of these components is installed?
How do they affect RG values?
Pre-emphasis increases the loudness of audio, and de-emphasis decreases it. So it makes sense to calculate loudness after applying de-emphasis.
foo_deemph allows this, so you may re-scan albums with pre-emphasis to get better RG values. It's not necessary, but advantageous.
OTOH, foo_dsp_deemph is a usual DSP plugin. It's not possible to take it into account during RG analysis. So, if you use this component then there's no reason to re-scan files (and this means that their loudness will always be slightly off).
this means that their loudness will always be slightly off
Just in case anyone wonders how far off: on
Dark Side of the Moon (first CD mastering), it's a difference of 0.03 to 0.08 dB for each track, and 0.05 dB for the whole album. I can't imagine it would be much higher on an album with more high-frequency content. So it's absolutely nothing to worry about. You probably can't detect differences of less than 0.5 dB even with test tones in headphones anyway; see http://www.audiocheck.net/blindtests_index.php (http://www.audiocheck.net/blindtests_index.php).
I have an image+cue for Dark Side of the Moon, and here the difference is 1.13 dB (album gain = +1.78 dB w/o de-emphasis, +2.91 with it). But even 1dB difference isn't that big actually.
Oh, good catch. I was actually comparing the wrong files!
When I do the R128-based RG scan against the original rip, with de-emphasis i get +2.86 dB, and without I get +1.78. So yes, about a 1 dB difference.
My old tags in the original rip said +2.91 instead of +2.86. This was where I was getting the 0.05 difference from. I'm guessing this is reflecting the use of different de-emphasis algorithms.
lvqcl: foo_deemph works with any lossless sources (ape, wv) or only flac?
read the first post...
Plugins to do de-emphasis of pre-emphasized CDs:
* Postprocessing (foo_deemph): works only with lossless sources; always active during playback and ReplayGain scan.
* DSP plugin (foo_dsp_deemph): works with any source
lvqcl: foo_deemph works with any lossless sources (ape, wv) or only flac?
It works with any decoder that supports postprocessing service. Monkey's Audio and WavPack included. Maybe it won't work with the current OptimFROG decoder...
lvqcl: I have Monkey's Audio and WavPack lossless files, which work only with foo_dsp_deemph. Possibly older versions these codecs do not support postprocessing?
What versions of foobar2000 and foo_input_monkey do you use?
lvqcl: I tested it again and the problem is with files image + cue sheet. The first must load only image file, add metadata and Apply. Only then you can load cue file. If first load cue file, so add metadata don't save and it does not work!
I see. I tried a little with status bar syntax and here are some possibilities. It was easier than I thought.
Pre-Emphasis: $if($meta(pre-emphasis),Yes,No)
or Pre-Emphasis: $if($meta(pre_emphasis),Yes,No)
Depends on your tag name. It doesn't matter which value you are using 1, on or yes. It simply scans for PRE-EMPHASIS or PRE_EMPHASIS tag name presence.
or also
$if(%pre-emphasis%or%pre_emphasis%,Yes,No)
Sorry if this was already discussed, but what advantages does this component over foo_dsp_effect's own CD de-emphasis post-processor, in terms of implementation? In other words, which one should I use if I am looking for accuracy?
Plugins to do de-emphasis of pre-emphasized CDs:
* Postprocessing (foo_deemph): works only with lossless sources; always active during playback and ReplayGain scan.
* DSP plugin (foo_dsp_deemph): works with any source
* To de-emphasize a track, add a tag named PRE_EMPHASIS or PRE-EMPHASIS with a value 1, on or yes. Other tracks are unaffected.
* There's no reason to use both components at the same time.
* Don't use both foo_deemph and foo_dsp_effect (the latter has its own de-emphasis postprocessor).
* Note that even foo_dsp_deemph works only when a track is tagged: just adding it to the list of active DSPs is not enough to make it work.
Use postprocessing if you want to add correct ReplayGain tags to your files.
Use DSP if you have lossy files that you want to de-emphasize.
Otherwise, there's no difference.
Thank you for replying, but please re-read what I've posted above; I'm already aware of that information, and it does not answer my question. I'm asking which plugin has a higher quality CD de-emphasis post-processor: mudlord's foo_dsp_effect plugin, or lvqcl's foo-deemph.
Note that the plugin name "foo_dsp_effect" is a tad misleading, as it contains the functionality of both of lvqcl's plugins: foo_deemph (a post-processor), as well as foo_dsp_deemph (a dsp filter). I am only discussing the former (the post-processor).
As mentioned in my post earlier in this thread (https://www.hydrogenaud.io/forums/index.php?showtopic=99394&view=findpost&p=824806), they are all within a fraction of a dB of each other. Sonically they should be indistinguishable.
Here's the image that is supposed to be in that post. The original image link is no longer working in some browsers due to the forum going to HTTPS.
(https://skew.org/tmp/hydrogenaudio/deemph/comparison.PNG)
original sweep = green
foo_dsp_effect = red
SoX deemph = yellow (foo_deemph, foo_dsp_deemph, foo_dsp_convolver are identical to this)
WaveEmph = blue
Hi, I have a problem with the "foo_deemph" component. I think is taking too much treble off some Flac files.
The Flac files are from the Human League CD, Dare! (CDV 2192); known to have pre-emphasis.
I tested the component with Michael Jackson's Thriller (35.8P-11) and it sounds great. It's just that Dare! album that's having the problem.
The original image link is no longer working in some browsers due to the forum going to HTTPS.
It should at least display a thumbnail, since that's what the current HTTPSizer script does. Cache locally as a thumbnail, display a link to the original image.
Here's my experience with these guys.
Contrary to what's stated in the OP, foo_deemph / foo_dsp_deemph do work when fed AAC LC as M4A - but foo_deemph will indeed disregard MP3s. (I suppose the DSP component has no way of checking input file format.)
I'd rather have them work irrespective of format, since I've encountered at least one case of an album on Amazon MP3 and iTunes lately that seems to have been sourced from a rip of an emphasis CD with no deemphasis applied, with the CD issue not being easily available.
It also gets a bit messy when you've got both DLLs installed at the same time. If foo_dsp_deemph is in the DSP chain, then:
MP3, PRE-EMPHASIS tag set: Deemphasis applied once
M4A/FLAC, PRE-EMPHASIS tag set: Deemphasis applied twice
This potentially affects both playback and conversion.
I'd rather have the DSP component be entirely "dumb", so you can just add it to the DSP chain when needed and be sure that it'll apply deemphasis no matter what (sample rate permitting). Modifying the DSP chain or creating an additional conversion preset is no biggie (emphasis material isn't that common either unless you're into Japanese '80s stuff), but unpredictable / incorrect results are.
Another source of confusion arises when you use the converter to create a second version with deemphasis already applied to audio data. Foobar will duly transfer all tags, including the PRE-EMPHASIS field, so on playback of the converted files, deemphasis will be applied again (and potentially even twice as we've seen, so if you don't know what you're doing this could be up to 4 times total). You have to remove the field by hand. I don't think there's much that can be done about this, but it's still a nuisance. I suppose that's what happened with the guy two posts up.
I do wish things could be made to work just a little more predictably, without having to double-check that you're in fact getting the desired results.
Tested the post-processor foo_deemph only, since I am lazy:
foo_deemph / foo_dsp_deemph do work when fed AAC LC as M4A - but foo_deemph will indeed disregard MP3s. (I suppose the DSP component has no way of checking input file format.)
mp3 as m4a: pre-emphasis APPLIED
mp3 as mka: pre-emphasis tag DISREGARDED
As for conversion: is there any way the component can interfere with the conversion when DSP is set to be applied, so that it removes the tag?
Contrary to what's stated in the OP, foo_deemph / foo_dsp_deemph do work when fed AAC LC as M4A - but foo_deemph will indeed disregard MP3s.
foo_dsp_deemph should work with all formats, but foo_deemph should be inactive with lossy formats.
So the fact that foo_deemph is also active for
AAC all codecs in MP4 container looks like a bug in foobar2000.
It also gets a bit messy when you've got both DLLs installed at the same time. If foo_dsp_deemph is in the DSP chain, then:
MP3, PRE-EMPHASIS tag set: Deemphasis applied once
M4A/FLAC, PRE-EMPHASIS tag set: Deemphasis applied twice
If you have them both installed and active then it's expected, no?
This potentially affects both playback and conversion.
It affects conversion only if "Enable decode postprocessing" checkbox is on, in this case foo_deemph is also active during conversion.
If this checkbox is off then only foo_dsp_deemph can work.
mp3 as m4a: pre-emphasis APPLIED
Maybe foobar2000 sends anything in MP4 container into postprocessing service because of ALAC codec.
As for conversion: is there any way the component can interfere with the conversion when DSP is set to be applied, so that it removes the tag?
I doubt it.
Maybe foobar2000 sends anything in MP4 container into postprocessing service because of ALAC codec.
The tag seems to be disregarded for AC3-in-mp4.
I've encountered at least one case of an album on Amazon MP3 and iTunes lately that seems to have been sourced from a rip of an emphasis CD with no deemphasis applied, with the CD issue not being easily available.
lvqcl:
If you allow a little bit of user configuration, this could be accommodated.
The component will apply de-emphasis if it reads a tag value of "1", "on" or "yes".
Suggestion: let the user choose the tag values that the DSP shall observe. E.g., the user could choose to let the DSP be triggered by the tag value "lossy". That is "human readable": the user will know that this is a file that "arrived as lossy with the wrong EQ". (Makes it easier to know whether I did myself carelessly convert from lossless to lossy.)
Hi, is there any chance to let "foo_deemph" active with lossy format (with pre-emphasis tag) as well? Like a switch?
The reason I asked so is because I have some MP3 rips of pre-emphasis CDs which unfortunately are not available any more. So all I have are those MP3 copies.
While I can just use foo_dsp_deemph instead, the problem is that one doesn't work with ReplayGain. I.e. when calculating RG, it doesn't take de-emphasis into consideration because it's a DSP, not in post-processing.
Thanks.
It's limited by foobar2000 itself, not by this component.
The reason I asked so is because I have some MP3 rips of pre-emphasis CDs which unfortunately are not available any more. So all I have are those MP3 copies.
Your problem is to get RG calculated? Unless you want to rely on the issue I had with mp3-in-m4a, see above, then I suggest:
1) Transcode them to a lossless format, with tags preserved.
2) Throw in the PRE-EMPHASIS tag in the lossless ones.
3) RG scan those.
4) Use MP3Tag to copy over the tags. It copies RG tags too.
5) Fix the PRE-EMPHASIS tag in the mp3s. (Delete or keep as a reminder, whatever suits you.)
The reason I asked so is because I have some MP3 rips of pre-emphasis CDs which unfortunately are not available any more. So all I have are those MP3 copies.
Your problem is to get RG calculated? Unless you want to rely on the issue I had with mp3-in-m4a, see above, then I suggest:
1) Transcode them to a lossless format, with tags preserved.
2) Throw in the PRE-EMPHASIS tag in the lossless ones.
3) RG scan those.
4) Use MP3Tag to copy over the tags. It copies RG tags too.
5) Fix the PRE-EMPHASIS tag in the mp3s. (Delete or keep as a reminder, whatever suits you.)
Very elegant solution! Thanks!
I should add, though, the whole process is actually more tedious:
To get RG scan to include de-emphasis, I have to use foo_deemph (because DSP version will not work when calculating RG).
Then, when I finished the whole process, I have to switch back to DSP version for playback, because foo_deemph doesn't work with lossy format. And I can't just keep two versions active at the same time because that will double de-emph the lossless ones, obviously.
So basically, everytime I want to deal with some pre-emphasized lossy formats, I have to restart foobar2000 quite a few times to disable those components.
(Also, you said I can delete those pre-emphasis tag in MP3s at the end, but I actually still need them because my MP3s are still pre-emphasized.)
Oh, but maybe I can just apply de-emphasis during transcoding via DSP (instead of using tag; actually you surely should remove the tag afterwards to avoid essential double deemph), then RG scan, then copy RG info to previous MP3s. This way, I don't need foo_deemph at all.
Also thanks for your reply, lvqcl.
Bug:
foo_deemph doesn't work with FLAC+embedded CUE when only some tracks have pre_emphasis tag.
The tag is totally disregarded (i.e no de-em applied).
foo_dsp_deemph doesn't have this problem.
foo_deemph doesn't work with FLAC+embedded CUE when only some tracks have pre_emphasis tag.
The tag is totally disregarded (i.e no de-em applied).
I doubt that it's possible to hava different PRE_EMPHASIS tags in a FLAC file with embedded CUE.
AFAIK this tag inside embedded CUEs is ignored by foobar2000, and if it's in the FLAC file then it's applied to all tracks.
foo_dsp_deemph doesn't have this problem.
Do you mean foo_dsp_deemph made by mudlord or foo_dsp_deemph from this thread?
AFAIK this tag inside embedded CUEs is ignored by foobar2000
You're right, but that exactly is why you can add "pre-emphasis" to only part of the the tracks:
(https://my.mixtape.moe/ywalvq.gif)
You actually can't do it with actual CUE files.
In the same vein, you can even have different "ALBUM" tags for different tracks within one single FLAC file, despite you can't do it with CUE (in foobar2000, embedded CUE is only there to provide index timestamps AFAIK).
Do you mean foo_dsp_deemph made by mudlord or foo_dsp_deemph from this thread?
The one developed by you in this thread. It can detect the tag correctly, de-em (and only de-em) the tracks with pre-em tags.
These quite accurate coefficients are calculated in Octave using MIM (Magnitude Invariance Method). I did these calculations 'bout a year ago.
IIR filter coefficients for CD
pre-emphasis
order [num]
[den]
1 [ 0.46502919 -0.08587729 ]
[ 1.0 -0.62084810 ]
2 [ 0.46039863 0.12793807 -0.04856151 ]
[ 1.0 -0.15829192 -0.30193289 ]
3 [ 0.46017735 0.36661178 -0.00875582 -0.02057091 ]
[ 1.0 0.36049763 -0.44176711 -0.12126812 ]
4 [ 0.46016861 0.60879421 0.15632160 -0.03386380 -0.00771702 ]
[ 1.0 0.88680338 -0.31259764 -0.34623051 -0.04427164 ]
5 [ 0.46016813 0.85120377 0.44874398 0.02498515 -0.02531949 -0.00269302 ]
[ 1.0 1.41358954 0.09309909 -0.53516182 -0.19924854 -0.01518974 ]
6 [ 0.46016811 1.09387524 0.869244888 0.22317697 -0.02253671 -0.01394880 -0.00090035 ]
[ 1.0 1.94094357 0.776877703 -0.54272822 -0.46296216 -0.09803154 -0.00502000 ]
8 [ 0.46016811 1.07486732 0.614144690 -0.28201629 -0.37418109 -0.08705805 0.01121497 0.00482825 0.00025508 ]
[ 1.0 1.89963712 0.240531593 -1.39566438 -0.70552789 0.172873179 0.17618023 0.03277840 0.00141473 ]
de-emphasis
order [num]
[den]
1 [ 2.12788780 -1.30498995 ]
[ 1.0 -0.17710215 ]
2 [ 2.17089358 -0.30993361 -0.67547310 ]
[ 1.0 0.29340958 -0.10792271 ]
3 [ 2.17300832 0.81716225 -0.96263811 -0.27531828 ]
[ 1.0 0.81222848 -0.01347376 -0.04654055 ]
4 [ 2.17311339 1.95699625 -0.66588831 -0.76587166 -0.10071593 ]
[ 1.0 1.33672688 0.35187712 -0.07344653 -0.01752371 ]
5 [ 2.17311860 3.10009349 0.23008501 -1.17063737 -0.44398916 -0.03464344 ]
[ 1.0 1.86274168 0.99361199 0.05978604 -0.05597792 -0.00613466 ]
6 [ 2.17311885 4.24512445 1.72940632 -1.17435914 -1.02141556 -0.21945040 -0.01146182 ]
[ 1.0 2.38964825 1.91337654 0.49890284 -0.04781872 -0.03109218 -0.00205401 ]
8 [ 2.17311887 3.84681874 -0.22310992 -3.62676223 -1.51777033 0.61575440 0.49615426 0.08964053 0.00387487 ]
[ 1.0 2.20636064 0.93494492 -1.07017666 -1.03881467 -0.22165432 0.03315453 0.01320640 0.00069833 ]
Magnitude response comparison against sox (new) and BLT based filters:
https://s26.postimg.org/qzlvoowex/cd_emph.png
(
plot range: 20Hz-22050Hz)
MIM method has some aliasing issue with low order filters so I made improved 1st order coefficients :
1 [ 0.45855794 -0.08474775 ]
[ 1.0 -0.62618980 ]
1 [ 2.15724369 -1.33446450 ]
[ 1.0 -0.17722082 ]
Magnitude quite close with sox new.
Is there a way to have stauts indication about PREemphasis being applied? (as in HDCD)
Thanks!
Hi everybody, I am new here. I had a strange problem with Mudlord's De-emphasis postprocessor I recently downloaded from https://www.foobar2000.org/components/view/foo_dsp_deemph - or let's say it worked differently from what I expected: As soon as it was installed, every audio file I played that had the pre-emphasis tag was played with de-emphasis applied, even when the plugin was not listed in "Actice DSPs". I wanted more control, so I removed the component, and I was happy to find out that the foo_dsp_deemph.zip (version 0.0.3) available at the beginning of this thread works exactly the way I like: Does not do anything as long as it is not added to Actice DSPs, and starts de-emphasising files during playback as soon as I add it to Active DSPs.
Anyway, given that the components posted here are from 2013, I am wondering if there are any updates? Or aren't there any updates because the tools work just right? (That would make sense.)
Also, did anyone else encounter the problem I had with (the current version of) Mudlord's component?
use
http://www.foobar2000.org/components/view/foo_dsp_effect instead put your cd in. File, Open Audio Cd, it should find your drive, hit Rip, A dialog box comes up, you can use any of the databases for the track listing, now hit the button "Proceed to the converter set up dialog"
Now another box comes up, in the left box it has your saved presets, if any just delete them all, we'll start from scratch, on the right hand side you can choose output format, pick whatever suits you, now click on 'processing' another box appears, check the box in the upper left, now in the right hand box you will see a box filled with different filters and such, scroll till you find IIR Filter, highlight it and click the arrow so it goes into the Active DSP box, now highlight that and click on 'configure selected' there will be a dropbox, select 'CD-De-emphasis" click ok, now you can go 'Back' now you "Save' that preset, and it should show in the left hand box "Saved Presets", I just named mine 'pre' , now hit the 'convert' button, a file destination folder will pop up, so just direct it where you want the files (songs) to go. a 'converter' box will pop up adding the new EQ while it's ripping the disc :)
Now whenever you have another disc with pre, after you hit 'Rip' you now have a choice of using the preset
use
http://www.foobar2000.org/components/view/foo_dsp_effect instead put your cd in. File, Open Audio Cd, it should find your drive, hit Rip, A dialog box comes up, you can use any of the databases for the track listing, now hit the button "Proceed to the converter set up dialog"
Now another box comes up, in the left box it has your saved presets, if any just delete them all, we'll start from scratch, on the right hand side you can choose output format, pick whatever suits you, now click on 'processing' another box appears, check the box in the upper left, now in the right hand box you will see a box filled with different filters and such, scroll till you find IIR Filter, highlight it and click the arrow so it goes into the Active DSP box, now highlight that and click on 'configure selected' there will be a dropbox, select 'CD-De-emphasis" click ok, now you can go 'Back' now you "Save' that preset, and it should show in the left hand box "Saved Presets", I just named mine 'pre' , now hit the 'convert' button, a file destination folder will pop up, so just direct it where you want the files (songs) to go. a 'converter' box will pop up adding the new EQ while it's ripping the disc :)
Now whenever you have another disc with pre, after you hit 'Rip' you now have a choice of using the preset
Wow, thank you very much for the detailed description, it is appreciated!
However, this is not exactly what I want. I have ripped multiple pre-emphasised discs with EAC, they are now put away in store; I have the FLAC files on my PC, and what I am looking for is a way of playing these files the way they are, with de-emphasis added on the fly. The tools discussed here are exactly what I need.
Anyway, I am just interested in why Mudlord's plugin simply de-emphasises every PE-tagged file I play even when the plugin is NOT listed in "Active DSPs"; and if there's any updates the the components shared in the first post of this thread.
P.s.: I just noticed that lvqcl's foo_dsp_deemph.zip seems to have a weird bug: I played two FLAC files from two different folders, both have the PRE-EMPHASIS tag properly set to "1"; and lvqcl's DSP plugin is listed in "Active DSPs". Now, one file gets de-emphasised - and one doesn't! I experimented a bit and found out this: When I copied he file that didn't get de-emphasised to a different location on my hard drive with much less subdirectories and shorter folder names, it suddenly did get de-emphasised properly. I added both, the original file at the original location and the one I had moved to a different location, to the playlist, and indeed: 100% identical files sound differently because one does not get de-emphasised apparently because its file path is too long! I am just happy I figured this out quickly. Will re-organise my folders now in order to avoid long paths with too many letters.
I am just interested in why Mudlord's plugin ignores simply de-emphasises every PE-tagged file I play even when the plugin is NOT listed in "Active DSPs"
Because it is postprocessor, not just DSP. Did you read its description?
Performs RIAA CD/phono deemphasis eith as a decode postprocessor or selectable DSP.
I am just interested in why Mudlord's plugin simply de-emphasises every PE-tagged file I play even when the plugin is NOT listed in "Active DSPs"
Because it is postprocessor, not just DSP. Did you read its description?
Performs RIAA CD/phono deemphasis eith as a decode postprocessor or selectable DSP.
Thanks! Yes, I read that. But I am pretty new to this kind of stuff, I wasn't sure what it means. Does it mean that as soon as the Plugin is installed, it will start de-emphasising every file that is played and has the PRE-EMPHASIS tag set to "1" or "yes"?
EDIT: But given that the description says EITHER postprocessor or selectable DSP, there should be a way to use it as DSP rather as postprocessor, no? I just didn't find out how I can do that.
As postprocessor it works on files that have tag PRE_EMPHASIS or PRE-EMPHASIS with value "1", "on" or "yes" even if it is not in active DSP list. As DSP it works on ALL files if it is in active DSP list.
As postprocessor it works on files that have tag PRE_EMPHASIS or PRE-EMPHASIS with value "1", "on" or "yes" even if it is not in active DSP list. As DSP it works on ALL files if it is in active DSP list.
I see, thanks! So that's a big difference to lvqcl's foo_dsp_deemph.zip, right? Because on my PC, lvqcl's DSP plugin does only de-emphasise files that have the PRE_EMPHASIS or PRE-EMPHASIS with value "1", "on" or "yes". Why is lvqcl's DSP plugin not available on Foobar's official components page anyway?
what it means is post processing rarely works unless marked loading as a dsp is mush simpler especially when the preset is used but be sure only use it on content you know needs it because it will per mentally alter the file
dont worry about anything just follow my instructions
what it means is post processing rarely works unless marked loading as a dsp is mush simpler especially when the preset is used but be sure only use it on content you know needs it because it will per mentally alter the file
dont worry about anything just follow my instructions
I do appreciate your comments. However, altering the file permanently really isn't what I want. I want the de-emphasis to be done on-the-fly. And given that, it seems that for now, I will have to accept one drawback or other: Either I use Mudlord's plugin as a postprocessor, in which case I will have to accept that the only way of stopping it from automatically de-emphasising all PE-tagged files is to uninstall it. (My problem with this is that sometimes I WANT to hear how a PE'ed recording sounds without de-emphasis treatment.) Or I use lvqcl's foo_dsp_deemph.zip, in which case I will have to accept that it doesn't work with long file paths. That's why I would be very interested in an update for lvqcl's DSP plugin.
it doesn't work with long file paths.
I very much doubt it. Are you sure that foobar2000 sees PRE-EMPHASIS tag in that file?
Also try this: right click on the file -> Tagging -> Reload info from files (if you don't have such menu item then hold Shift key during right click).
it doesn't work with long file paths.
I very much doubt it. Are you sure that foobar2000 sees PRE-EMPHASIS tag in that file?
Also try this: right click on the file -> Tagging -> Reload info from files (if you don't have such menu item then hold Shift key during right click).
Thanks for your response! As explained above, I made an exact copy of the file to a different folder with a shorter path, and that one worked without a problem. Anyway, I can do another test, I will report my finding. Thanks for your great tool anyway, even with the path problem it is still very helpful.
it doesn't work with long file paths.
I very much doubt it. Are you sure that foobar2000 sees PRE-EMPHASIS tag in that file?
Also try this: right click on the file -> Tagging -> Reload info from files (if you don't have such menu item then hold Shift key during right click).
Thanks again for your reply. I just repeated the test. And now your plugin just works, for both copies of the file. I have no idea why it didn't before, I did repeat the test several times when I did it first. Anyway, the important thing is that it works now. :-)
Is the version that you posted at the beginning of this thread the most recent one?
Thanks and kind regards
There's also beta version: https://hydrogenaud.io/index.php/topic,115734.0.html
There's also beta version: https://hydrogenaud.io/index.php/topic,115734.0.html
Oh. What about taking them to the official repository?
There's also beta version: https://hydrogenaud.io/index.php/topic,115734.0.html
Great, thank you very much!
There's also beta version: https://hydrogenaud.io/index.php/topic,115734.0.html
Oh. What about taking them to the official repository?
Good idea!
Oh. What about taking them to the official repository?
There's already foo_dsp_deemph (http://www.foobar2000.org/components/view/foo_dsp_deemph) (by mudlord) there.
Oh. What about taking them to the official repository?
There's already foo_dsp_deemph (http://www.foobar2000.org/components/view/foo_dsp_deemph) (by mudlord) there.
Yes, but as discussed above, it works very differently from yours. I didn't even know that before it was explained by Rollin above. For my purposes, your plugin is much better. Why not add it to the repository and shortly explain the difference in the description? And maybe rename yours in order to avoid confusions? Just making suggestions of course.
Thank you, lvqcl, for this great component.
It works like a charm and I prefer the post-processing way.
Very handy for ReplayGain.
I have a question: would it be possible to indicate its status when the de-emph porcess is active?
Of course, you could use the PRE_EMPHASIS tag, but I'm talking about visual feedback when the component is actually in circuit, during playback.
Is there some way doing that?
Thanks.
I don't know if there's a better place to put this, but I made a column script to display "Yes" if the PRE-EMPHASIS or PRE_EMPHASIS tag is present and valid. It will display "INVALID" if the tag is not valid. I made sure it works for all valid tags regardless of capitalization because the values "yes" or "on" are not case-sensitive for activating the de-emphasis plug-in. I found this functionality useful and thought others here might as well.
$if(%PRE-EMPHASIS%,$if($or($stricmp(%PRE-EMPHASIS%,1)$stricmp($upper(%PRE-EMPHASIS%),ON)$stricmp($upper(%PRE-EMPHASIS%),YES)),Yes,INVALID))$if(%PRE_EMPHASIS%,$if($or($stricmp(%PRE_EMPHASIS%,1)$stricmp($upper(%PRE_EMPHASIS%),ON)$stricmp($upper(%PRE_EMPHASIS%),YES)),Yes,INVALID)) |
Oh. What about taking them to the official repository?
There's already foo_dsp_deemph (http://www.foobar2000.org/components/view/foo_dsp_deemph) (by mudlord) there.
Does anyone here know why mudlord's foo_dsp_deemph component is not available on the Foorbar2000 components webpage anymore?
(I don't find it anywhere else anymore either.)
Sorry if this is the wrong thread to ask that, I just didn't know what the right place was.
Happy new year everybody.
EDIT: The mudlord component can still be found here:
https://web.archive.org/web/20200628051501/http://www.foobar2000.org/components/view/foo_dsp_deemph
here is the latest version 2.0 of the component...
here is the latest version 2.0 of the component...
Thank you very much.
and here is the installation file, for those who aren't able to install the component manually...
Does anyone here know why mudlord's foo_dsp_deemph component is not available on the Foorbar2000 components webpage anymore?
Because I thought lvqcl's stuff completely replaces it :/
Does anyone here know why mudlord's foo_dsp_deemph component is not available on the Foorbar2000 components webpage anymore?
Because I thought lvqcl's stuff completely replaces it :/
Thanks for the reply!
Sounds like one more reason to try and get lvqcl's plugin into the official components' list.
Ok, I learned something new today. I've been using fb2k for years, but just very rudimentarily. (Just to play CDs, or MP3 or FLAC files burned to CD-Rs.) I finally wanted to figure out how to deemphasize properly.
I just figured out, that it doesn't work on the fly. I mean, I play a song right now, and I add the tag and value, deemphasis won't start until I *replay* the song. Duh. This is very cool though, I'm using the dsp_deemph version, because I play MP3 sometimes ... :)
Any chance of FB V2.x 32/64 compliant versions? (please)
Until we get a proper compile fromlvqcl I got a friend to do this plain x64 compile with no alterations done.
Could foo_deemph be made to read 'FLAGS PRE' that already exist in my EAC/Cueripper cue sheets. I ask because I don't believe it is possible for foobar to read 'PRE-EMPHASIS' tag from an external cue sheet, eg, 'REM PRE_EMPHASIS yes'.
I also think it would be great if de-emphasis turned on automatically for tracks with PRE flag set in cuesheet. Would this be difficult to implement?
Is the main issue for the implementation of flag based auto de-emphasis that components cannot easily (or at all) read per-track FLAGS in cuesheet?
it would be great if de-emphasis turned on automatically for tracks with PRE flag set in cuesheet. Would this be difficult to implement?
foo_external_tags (https://www.foobar2000.org/components/view/foo_external_tags) may help you here:
- Open cue of an album with pre-emphasis in foobar2000.
- Select all its tracks - right click - Tagging - Edit External Tags.
- Click on "+ add new" in the opened window, call new tag PRE-EMPHASIS, set its value to 1.
Hello,
Sorry if my question may sound simplistic...
After having read the whole thread I'm still unable to figure out if it is possible, with this foobar component to directly rip a CD to de-emphasized files (wav or others).
If yes, what would be the exact procedure ?
Thanks !
I don't even know if foobar2000 can detect pre-emphasis flags in a CD at all? (CUERipper - part of CUETools - can check for de-emphasis both in the CD's TOC and in the subcode.)
But even if you can, do not. There are CDs with inaccurate pre-emphasis flags (https://www.studio-nibble.com/cd/index.php?title=Pre-emphasis_(release_list)), so better keep an unprocessed file.
(Also, if you keep a rip as it is, you can later retro-verify AccurateRip and possibly even repair the rip with CUETools.)
Tx.
In fact I have 1 CD that's confirmed with emphasis : Pet Shop Boys - Please.
I counter checked it with EAC and, yes, it says the same.
So, I had to process it.
What I did :
- rip it to wav with Foobar
- edit the properties of each single wav file to add the "PRE-EMPHASIS" tag and value "1"
- convert it to wav again with Foobar
This should, I think, have de-emphasized the files.
I then analyzed the frequencies with Audacity.
The same 16khz sample :
- was at -51dB
- is now at -62dB
So...if I correctly understand it looks like it did what I was expecting.
You don't have to convert the files - presuming you use fb2k as player. If a file has the tag, then the relevant component will apply the EQ upon playback.
Another thing - anyone?
lvqcl licensed out foo_deemph with "Permission to use, copy, modify, and distribute" [provided the notice is kept], so I presume it is OK to make a proper recompile for both 32-bit and 64-bit use . (And submit it to the official component list, for that matter.)
It is still unclear to me....so
- is it possible to directly rip and remove the pre-emphasis ?
- if not, I still have to rip the file and then add the pre-emphasis tag
- and then ? How can I get a file without pre-emphasis without re-converting it ?
It is still unclear to me....so
- is it possible to directly rip and remove the pre-emphasis ?
I don't know how.
- if not, I still have to rip the file and then add the pre-emphasis tag
Yeah, but adding a tag to a number of files - if you know which ones! - that isn't much job.
- and then ? How can I get a file without pre-emphasis without re-converting it ?
Once you have the component installed and the file tagged, the component
will do the de-emphasis upon playback.
Imagine that you have a good old-fashioned equalizer in your bookshelf, and then indicators saying "to do de-emphasis, set sliders as indicated". The component does that for you.
Understood.
But I don't want to listen to a de-emphasized file.
I want to create a de-emphasized file I will then use on my home systems.
It is still unclear to me....so
- is it possible to directly rip and remove the pre-emphasis ?
- if not, I still have to rip the file and then add the pre-emphasis tag
- and then ? How can I get a file without pre-emphasis without re-converting it ?
Personally I rip the disc, keeping it and the CUE sheet containing the PRE codes, then use sox to create a de-emphasized version that I use for playing. I do the same for HDCD discs as I like to have a copy of the originals.
More information can be found here (https://archimago.blogspot.com/2020/09/how-to-cd-pre-emphasis-and-dealing-with.html).
Thank you.
I used Sox successfully.
Greetings to all!
This is my first post, I just joined the forum.
The de-emphasis used to work fine for me in foobar2000. I spent a lot of time with it today (half a day) reading forums, searching for official Foobar components, but nothing was there when I searched for the word "emphasis". I'm getting tired of it and have not found a solution.
Please help me, is there a during playback de-emphasis component for 64 bit Foobar 2.0 that automatically "fixes" e.g. mp3 files tagged "PRE_EMPHASIS" or "PRE-EMPHASIS" (not only lossless files)?
Why am I looking for it?
There is a lot of good music from the 80s, most of which cannot be obtained in good quality lossless format. Even if I buy a CD, I can't be sure that it will have the best mastered version. There is a Dynamic Range database ( https://dr.loudness-war.info/ ), but it doesn't have everything. However, in most cases I can download hundreds of lossy files from a single piece of music and pre-filter some of them quickly with MasVis ( https://www.lts.a.se/ljudteknik/masvis/ ). I delete dynamically compressed files. Then I listen to the rest to decide which are the best. In most cases, good quality LAME-encoded 256-320 kbit/s files with good dynamics can be found, while lossless, barely available with good dynamics. My experience is that, in terms of sound quality, it usually matters more what the master is than whether the file is lossless. Some of the files were clearly audibly (and visibly from the frequency response) recorded with pre-emhasis. I would like to play these files correctly with de-emphasis.
Please help me. Thank you very much!
So far I have picked out about 200 tracks from about 32GB of data in this way and the result is very good. It's time consuming, so I thought about automating it. Maybe some kind of artificial intelligence solution could be an option. Rarely (just as a curiosity) I load MP3 files into EncSpot to see what has been encoded with what. ( https://www.rarewares.org/rrw/encspot.php ) Sometimes an MPC, OGG, or WMA file will sound best.
... However, in most cases I can download hundreds of lossy files from a single piece of music and pre-filter some of them quickly with MasVis ( https://www.lts.a.se/ljudteknik/masvis/ )...
11 security vendors and no sandboxes flagged this file as malicious ~ https://www.virustotal.com/gui/file/c3469b820b56a3e7b98451732a88ce4d8a107ebadd020420ba33418a599b2843
is there a during playback de-emphasis component for 64 bit Foobar 2.0 that automatically "fixes" e.g. mp3 files tagged "PRE_EMPHASIS" or "PRE-EMPHASIS" (not only lossless files)?
No. It doesn't work on-the-fly for mp3 (checked in fb2k 1.6.16). However you may convert the pre-emph'ed mp3 to de-emph'ed wav and play the latter.
11 security vendors and no sandboxes flagged this file as malicious
False positive.
In regards to CD De-emphasis:
You may be interested in this video by Gary Galo.
RED-BOOK DE-EMPHASIS USING THE IZOTOPE RX EQ MODULE presented by Gary Galo
youtube.com/watch?app=desktop&v=WL2t0X8Mb-w
He suggests F = 5780 Hz, Gain = -5.2 dB, Q = 0.5, for his de-emphasis parameters.
Using foo_dsp_effect 0.50 beta 7: IIR Filter, I added these parameters to the High shelf filter option and converted a known pre-emphasis CD. I have no idea whether these parameters match what Gary Galo is doing since I don't know the inner workings of foo_effect_dsp. I just listened to and compared replay gain data in Foobar2000 between this and the default CD De-emphasis filter for fun. I think Gary Galo had his filter going from 1 Hz to 100 kHz.
I have no expertise in this area but maybe someone would like to investigate this.
Thanks
SHM-CD
I took a look into the IIR Filter: CD De-emphasis (RIAA_CD) settings of foo_dsp_effect.
if (filter_type == RIAA_CD)
{
//thanks to lvqcl for coeffs
switch (samplerate)
{
case 44100:
pf_gain = -9.465;
pf_qfact = 0.4850;
pf_freq = 5277;
break;
I put these values into the High-shelf filter of foo_dsp_effect to check that they produced the same results as the default "CD De-emphasis" filter after converting a known pre-emphasis CD. The results were exactly the same when looking at replay gain data.
I noticed that Gary Galo's gain parameter was for the "mid Gain = -5.2 dB" at 5780 Hz. I decided to change the gain to -10.4 dB to match what I believe the High-shelf filter is asking for with this program. The results were very close to the default "CD De-emphasis" filter, again using just replay gain data. This was done just for fun without graphing any results. So the final settings to replicate Gary Galo's parameters in foo_dsp_effect: High-shelf filter are:
F = 5780 Hz, Gain = -10.4 dB, Q = 0.5
Maybe someone can check to see if this is actually correct and giving good results.
My test CD was: Bob James & Earl Klugh - One on One (rec 1979, CD year = 1983, CBS/Sony, 35DP 10, Japan)
Matrix (1983 CD): 35DP-10 81A2
or use Matrix (October 1982): 35DP-10-2 1B1
Thanks
SHM-CD
I just watched Gary Galo's updated video presentation from October 19, 2022 below:
Red-Book De-Emphasis Using the iZotope RX EQ Module, Presented by Gary Galo
youtube.com/watch?v=pSjvVNz4Rlk
His final CD De-emphasis settings calculated using mathematics are:
1) math calculation: F = 5811.52 Hz, mid Gain = -5.23 dB, Q = 0.5
accuracy: +/- 0.015 dB, 20 Hz - 20 kHz.
2) simulation results: F = 5780 Hz, mid Gain = -5.2 dB, Q = 0.5
accuracy: +/- 0.025 dB, 20 Hz - 20 kHz.
In foo_dsp_effect / IIR Filter / High-shelf filter, I believe you enter the "full gain" as below:
1) math calculation: F = 5811.52 Hz, mid Gain = -10.46 dB, Q = 0.500
2) simulation results: F = 5780 Hz, mid Gain = -10.4 dB, Q = 0.500
Thanks
SHM-CD
In foo_dsp_effect / IIR Filter / High-shelf filter, I believe you enter the "full gain" as below:
1) math calculation: F = 5811.52 Hz, Gain = -10.46 dB, Q = 0.500
2) simulation results: F = 5780 Hz, Gain = -10.4 dB, Q = 0.500
Could not edit previous post, Thanks
SHM-CD