IPB

Welcome Guest ( Log In | Register )

3 Pages V   1 2 3 >  
Reply to this topicStart new topic
De-emphasis components, Postprocessor and a DSP plugin
lvqcl
post Feb 10 2013, 22:58
Post #1





Group: Developer
Posts: 3412
Joined: 2-December 07
Member No.: 49183



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.

Version 0.0.3:
Postprocessing plugin (works only with lossless sources): Attached File  foo_deemph.zip ( 47.29K ) Number of downloads: 851
DSP plugin: Attached File  foo_dsp_deemph.zip ( 53.33K ) Number of downloads: 582
sources: Attached File  deemph_sources.rar ( 9.59K ) Number of downloads: 197

Version 0.1.0:
Postprocessing plugin (works only with lossless sources): Attached File  foo_deemph_0.1.0.zip ( 47.79K ) Number of downloads: 103
DSP plugin: Attached File  foo_dsp_deemph_0.1.0.zip ( 53.78K ) Number of downloads: 84
sources: Attached File  deemph_sources_0.1.0.rar ( 9.84K ) Number of downloads: 38



This post has been edited by lvqcl: Apr 25 2014, 19:29
Go to the top of the page
+Quote Post
Porcus
post Feb 10 2013, 23:34
Post #2





Group: Members
Posts: 1920
Joined: 30-November 06
Member No.: 38207



Nice.

QUOTE (lvqcl @ Feb 10 2013, 22:58) *
* 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?


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
mudlord
post Feb 11 2013, 04:50
Post #3





Group: Developer (Donating)
Posts: 813
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...
Go to the top of the page
+Quote Post
Sandrine
post Feb 11 2013, 09:39
Post #4





Group: Members
Posts: 320
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
Go to the top of the page
+Quote Post
Porcus
post Feb 11 2013, 12:12
Post #5





Group: Members
Posts: 1920
Joined: 30-November 06
Member No.: 38207



QUOTE (Sandrine @ Feb 11 2013, 09:39) *
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”.


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
Sandrine
post Feb 12 2013, 00:20
Post #6





Group: Members
Posts: 320
Joined: 2-July 10
Member No.: 81991



QUOTE (Porcus @ Feb 11 2013, 13:12) *
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?
Go to the top of the page
+Quote Post
Porcus
post Feb 12 2013, 01:18
Post #7





Group: Members
Posts: 1920
Joined: 30-November 06
Member No.: 38207



QUOTE (Sandrine @ Feb 12 2013, 00:20) *
QUOTE (Porcus @ Feb 11 2013, 13:12) *
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).


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
lvqcl
post Feb 12 2013, 16:58
Post #8





Group: Developer
Posts: 3412
Joined: 2-December 07
Member No.: 49183



QUOTE (Porcus @ Feb 11 2013, 02:34) *
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.

QUOTE (Sandrine @ Feb 11 2013, 12:39) *
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)

This post has been edited by lvqcl: Apr 24 2014, 22:52
Go to the top of the page
+Quote Post
Porcus
post Feb 12 2013, 20:37
Post #9





Group: Members
Posts: 1920
Joined: 30-November 06
Member No.: 38207



QUOTE (lvqcl @ Feb 12 2013, 16:58) *
QUOTE (Porcus @ Feb 11 2013, 02:34) *
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).


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
mudlord
post Feb 12 2013, 21:43
Post #10





Group: Developer (Donating)
Posts: 813
Joined: 1-December 07
Member No.: 49165



But end users might not want the extra DSPs, like reverb/echo/bass boost/pitch shifting.
Go to the top of the page
+Quote Post
Porcus
post Feb 13 2013, 14:30
Post #11





Group: Members
Posts: 1920
Joined: 30-November 06
Member No.: 38207



QUOTE (mudlord @ Feb 12 2013, 21:43) *
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.


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
mjb2006
post Feb 14 2013, 05:44
Post #12





Group: Members
Posts: 829
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:
  • foo_deemph
  • foo_dsp_deemph
  • foo_convolve (auto level adjust disabled) with the Wombat impulse
  • foo_convolve (auto level adjust disabled) with the lvqcl SoX impulse

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
Go to the top of the page
+Quote Post
lvqcl
post Feb 14 2013, 16:01
Post #13





Group: Developer
Posts: 3412
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
Go to the top of the page
+Quote Post
mjb2006
post Feb 14 2013, 18:29
Post #14





Group: Members
Posts: 829
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.
Go to the top of the page
+Quote Post
lvqcl
post Feb 14 2013, 18:36
Post #15





Group: Developer
Posts: 3412
Joined: 2-December 07
Member No.: 49183



QUOTE (mjb2006 @ Feb 14 2013, 21:29) *
Something else of note: foo_convolve results in more samples output than were input.

Try this: http://www.hydrogenaudio.org/forums/index....showtopic=85107
Go to the top of the page
+Quote Post
mjb2006
post Feb 15 2013, 00:57
Post #16





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



Oh, thanks...that did the trick. All is well with foo_dsp_convolve.
Go to the top of the page
+Quote Post
nu774
post Feb 15 2013, 04:03
Post #17





Group: Developer
Posts: 538
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.
Go to the top of the page
+Quote Post
mudlord
post Feb 16 2013, 12:11
Post #18





Group: Developer (Donating)
Posts: 813
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
Go to the top of the page
+Quote Post
Sandrine
post Feb 16 2013, 19:02
Post #19





Group: Members
Posts: 320
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!
Go to the top of the page
+Quote Post
kumbbl
post 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!
Go to the top of the page
+Quote Post
lvqcl
post Feb 17 2013, 22:03
Post #21





Group: Developer
Posts: 3412
Joined: 2-December 07
Member No.: 49183



QUOTE (kumbbl @ Feb 17 2013, 22:59) *
How good is the de-emphasis applied by the foo_deemph.dll compared to "sox deemph"?

~ the same.
Go to the top of the page
+Quote Post
mjb2006
post Feb 17 2013, 22:19
Post #22





Group: Members
Posts: 829
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.
Go to the top of the page
+Quote Post
kumbbl
post Feb 18 2013, 16:55
Post #23





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!
Go to the top of the page
+Quote Post
mjb2006
post Feb 18 2013, 21:03
Post #24





Group: Members
Posts: 829
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. sad.gif

This post has been edited by mjb2006: Feb 18 2013, 21:03
Go to the top of the page
+Quote Post
mudlord
post Feb 19 2013, 00:57
Post #25





Group: Developer (Donating)
Posts: 813
Joined: 1-December 07
Member No.: 49165



needs rewriting i suppose. people can use lvqcl's dsp in the meantime.

or: mudlord.info/temp/foo_dsp_effect.zip

This post has been edited by mudlord: Feb 19 2013, 04:33
Go to the top of the page
+Quote Post

3 Pages V   1 2 3 >
Reply to this 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: 24th October 2014 - 21:49