De-emphasis components, Postprocessor and a DSP plugin |
![]() ![]() |
De-emphasis components, Postprocessor and a DSP plugin |
Feb 10 2013, 22:58
Post
#1
|
|
![]() Group: Developer Posts: 2983 Joined: 2-December 07 Member No.: 49183 |
Postprocessing plugin (works only with lossless sources):
foo_deemph.zip ( 47.29K )
Number of downloads: 215DSP plugin:
foo_dsp_deemph.zip ( 53.33K )
Number of downloads: 192sources:
deemph_sources.rar ( 9.59K )
Number of downloads: 59* 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. This post has been edited by lvqcl: Feb 24 2013, 19:57 |
|
|
|
Feb 10 2013, 23:34
Post
#2
|
|
![]() Group: Members Posts: 1468 Joined: 30-November 06 Member No.: 38207 |
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? -------------------- geocities.com/hydrogenaudio: http://goo.gl/tqYZj
|
|
|
|
Feb 11 2013, 04:50
Post
#3
|
|
![]() Group: Developer (Donating) Posts: 712 Joined: 1-December 07 Member No.: 49165 |
I should deprecate deemphasis support and just get people to use lvqcl's component.
or update mine to use the tags dbpowerAMP uses... |
|
|
|
Feb 11 2013, 09:39
Post
#4
|
|
|
Group: Members Posts: 306 Joined: 2-July 10 Member No.: 81991 |
Why another component? Mudlord already had a nice solution!
This post has been edited by Sandrine: Feb 11 2013, 09:40 |
|
|
|
Feb 11 2013, 12:12
Post
#5
|
|
![]() Group: Members Posts: 1468 Joined: 30-November 06 Member No.: 38207 |
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”. -------------------- geocities.com/hydrogenaudio: http://goo.gl/tqYZj
|
|
|
|
Feb 12 2013, 00:20
Post
#6
|
|
|
Group: Members Posts: 306 Joined: 2-July 10 Member No.: 81991 |
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? |
|
|
|
Feb 12 2013, 01:18
Post
#7
|
|
![]() Group: Members Posts: 1468 Joined: 30-November 06 Member No.: 38207 |
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). -------------------- geocities.com/hydrogenaudio: http://goo.gl/tqYZj
|
|
|
|
Feb 12 2013, 16:58
Post
#8
|
|
![]() Group: Developer Posts: 2983 Joined: 2-December 07 Member No.: 49183 |
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. 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) |
|
|
|
Feb 12 2013, 20:37
Post
#9
|
|
![]() Group: Members Posts: 1468 Joined: 30-November 06 Member No.: 38207 |
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). -------------------- geocities.com/hydrogenaudio: http://goo.gl/tqYZj
|
|
|
|
Feb 12 2013, 21:43
Post
#10
|
|
![]() Group: Developer (Donating) Posts: 712 Joined: 1-December 07 Member No.: 49165 |
But end users might not want the extra DSPs, like reverb/echo/bass boost/pitch shifting.
|
|
|
|
Feb 13 2013, 14:30
Post
#11
|
|
![]() Group: Members Posts: 1468 Joined: 30-November 06 Member No.: 38207 |
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. -------------------- geocities.com/hydrogenaudio: http://goo.gl/tqYZj
|
|
|
|
Feb 14 2013, 05:44
Post
#12
|
|
|
Group: Members Posts: 582 Joined: 12-May 06 From: Colorado, USA Member No.: 30694 |
I just tested with a sine sweep, generated with SoX like this:
CODE 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:
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? This post has been edited by mjb2006: Feb 14 2013, 05:47 |
|
|
|
Feb 14 2013, 16:01
Post
#13
|
|
![]() Group: Developer Posts: 2983 Joined: 2-December 07 Member No.: 49183 |
foo_dsp_effect postprocessing service vs. SoX:
![]() 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. This post has been edited by lvqcl: Feb 14 2013, 20:32 |
|
|
|
Feb 14 2013, 18:29
Post
#14
|
|
|
Group: Members Posts: 582 Joined: 12-May 06 From: Colorado, USA Member No.: 30694 |
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. |
|
|
|
Feb 14 2013, 18:36
Post
#15
|
|
![]() Group: Developer Posts: 2983 Joined: 2-December 07 Member No.: 49183 |
Something else of note: foo_convolve results in more samples output than were input. Try this: http://www.hydrogenaudio.org/forums/index....showtopic=85107 |
|
|
|
Feb 15 2013, 00:57
Post
#16
|
|
|
Group: Members Posts: 582 Joined: 12-May 06 From: Colorado, USA Member No.: 30694 |
Oh, thanks...that did the trick. All is well with foo_dsp_convolve.
|
|
|
|
Feb 15 2013, 04:03
Post
#17
|
|
![]() Group: Developer Posts: 295 Joined: 22-November 10 From: Japan Member No.: 85902 |
Quickly glanced at the code: https://github.com/FauxFaux/foo_mudlord/blo.../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. |
|
|
|
Feb 16 2013, 12:11
Post
#18
|
|
![]() Group: Developer (Donating) Posts: 712 Joined: 1-December 07 Member No.: 49165 |
thank you for alerting me to the bugs, I really should rewrite iirfilters.cpp
This post has been edited by mudlord: Feb 16 2013, 13:48 |
|
|
|
Feb 16 2013, 19:02
Post
#19
|
|
|
Group: Members Posts: 306 Joined: 2-July 10 Member No.: 81991 |
I forgot to say thanks for keeping tag support the same as in mudlord's component, so thanks for that!
|
|
|
|
Feb 17 2013, 19:59
Post
#20
|
|
|
Group: Members Posts: 55 Joined: 6-June 06 Member No.: 31522 |
How good is the de-emphasis applied by the foo_deemph.dll compared to "sox deemph"? Can anybody judge this? Thanks in advance!
|
|
|
|
Feb 17 2013, 22:03
Post
#21
|
|
![]() Group: Developer Posts: 2983 Joined: 2-December 07 Member No.: 49183 |
|
|
|
|
Feb 17 2013, 22:19
Post
#22
|
|
|
Group: Members Posts: 582 Joined: 12-May 06 From: Colorado, USA Member No.: 30694 |
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.
|
|
|
|
Feb 17 2013, 23:32
Post
#23
|
|
![]() Group: Developer (Donating) Posts: 712 Joined: 1-December 07 Member No.: 49165 |
*delete this*
This post has been edited by mudlord: Feb 19 2013, 00:55 |
|
|
|
Feb 18 2013, 16:55
Post
#24
|
|
|
Group: Members Posts: 55 Joined: 6-June 06 Member No.: 31522 |
just tested with some preemphasis CDs and works like a charm - many thanks for this great and very valuable foobar-component!
|
|
|
|
Feb 18 2013, 21:03
Post
#25
|
|
|
Group: Members Posts: 582 Joined: 12-May 06 From: Colorado, USA Member No.: 30694 |
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.
This post has been edited by mjb2006: Feb 18 2013, 21:03 |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 23rd May 2013 - 04:29 |