Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_dsp_effect (Read 248194 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_dsp_effect

Reply #50
Yep, started adding this as a extra decode post processor service. Just like the HDCD and DTS support you added.


On the CD itself, the flag is in the subcode. Not sure if this is terra incognita, but is there even an agreed upon tag/metadata field for ID3/vorbis to reflect the use of pre-emphasis? If not, maybe foobar could be on the forefront of establishing one so we don't have to rely on reading the cuesheet (alone). Personally, I have excluded cuesheets from the media library since they are usually either embedded or the files are tagged accordingly.

Who said this was going to be easy?  But it's definitely fun!

foo_dsp_effect

Reply #51
What fields did you tag your files with (for preemphasis)?
FB2K currently does not give info on cuesheet tags or CD subcode/flags..

foo_dsp_effect

Reply #52
What fields did you tag your files with (for preemphasis)?
FB2K currently does not give info on cuesheet tags or CD subcode/flags..


None, so far. I've kept both an original copy of the CD and a de-emphasized version. I'm actually waiting on the outcome of this undertaking to start using tags.

foo_dsp_effect

Reply #53
And as a decode postprocessor service, it may retrieve the metadata from the track at the beginning of decoding and automatically instantiate and return a postprocessor instance that will handle the de-emphasis processing automatically for all supported formats. (CDDA, WAV, FLAC, and WavPack, at this time.)

It can also set and unset metadata which will be available through the dynamic file info functions of the input, so it may indicate that processing has been applied, [..] In which case, if it didn't, the filter would be applied again on playback, even if you already applied it during conversion.

kode54 has good points to keep in mind here.
1) The postprocessor service will only support (a few) lossless formats. However if I ripped a CD (long ago) with pre-emp, using EAC and converted it to MP3 or AAC, the pre-emphasis (increased high-end) would still be there (most of it anyway).
2) To keep track of the fact if de-emphasis is already applied is the tricky part. Imagine the case converting a FLAC to WAV and then to FLAC again. Without some magic the decoder postprocessor service would kick-in twice.

But certainly an interesting project.
In theory, there is no difference between theory and practice. In practice there is.

foo_dsp_effect

Reply #54
That is the main problem I am grappling with.
Maybe the decode postprocessor API can be extended to give info on whether the instance is a decode only or playback instance.

Like the input components.
What I got now is just a tag to see if its enabled or not, and then the decode postprocessor kicks in.

Sadly, unlike HDCD, which can have stream heuristics, I cannot.

foo_dsp_effect

Reply #55
There its added.

Already got complaints that the filter is not 100% perfect to SoX. Most likely will rewrite that filter to be so.
Yes, I know the filter is different to the usual method. Will add the proper method next time >_>

EDIT: 0.7.1 up.

foo_dsp_effect

Reply #56
Hello mudlord, I have a couple of questions about IIR filter DSP.

1. Min value Q is 1, and default is 10; but usually default value of Q is 0.5 or 0.707. So even minimal possible Q setting is often too high. What do you think about correcting these limits?

2. Formulas for coefficients for BBOOST/LSH/HSH/RIAA_CD - where are they from?

foo_dsp_effect

Reply #57
1. Yes, I will correct it.
2. Formulas were from as follows:

a) BBOOST is from Audacity
b) LSH/HSH is from http://www.musicdsp.org/files/biquad.c (which is public domain)
c) RIAA_CD/RIAA_PHONO is from SoX

Why do you ask? If this is somehow related to the legal precedent that there is such a thing as copyrighted numbers, then I have no hesitation in complying and removing the component.

foo_dsp_effect

Reply #58
1. Yes, I will correct it.

BTW: IMHO logarithmic scale is better than linear. 


b) LSH/HSH is from http://www.musicdsp.org/files/biquad.c (which is public domain)

So, it is "Based on the work "Cookbook formulae for audio EQ biquad filter coefficients" by Robert Bristow-Johnson"

It's interesting that this cookbook contains different formulae for LoShelf/HiShelf etc.

from musicdsp.org/files/biquad.c:
Code: [Select]
    A = pow(10, dbGain /40);
    omega = 2 * M_PI * freq /srate;
    sn = sin(omega);
    cs = cos(omega);
    beta = sqrt(A + A);
...
    b0 = A * ((A + 1) - (A - 1) * cs + beta * sn);

from Cookbook:
Code: [Select]
    A  = 10^(dBgain/40)
    w0 = 2*pi*f0/Fs
    alpha = sin(w0)/(2*Q)
...
    b0 = A * ((A + 1) - (A - 1) * cos(w0) + 2 * sqrt(A) * alpha)


beta * sn = sqrt(2*A) * sin(omega) = sqrt(2) * sqrt(A) * sin(omega)
2 * sqrt(A) * alpha = 2 * sqrt(A) * sin(omega) / (2 * Q) =  sqrt(A) * sin(omega) / Q

sqrt(2)*sqrt(A)*sin(omega) == sqrt(A)*sin(omega)/Q only if Q == sqrt(0.5)

foo_dsp_effect

Reply #59
Yeh, I have to agree. Found it works well regardless so I just lumped the formula in .
I tried other formulae including the ones in the cookbook, and found that it sounded a bit "off" in my implementations so I just cludged in the ones that sounded better. Can't remember the exact process in how I worked out what sounded the best to me though, sorry.

foo_dsp_effect

Reply #60
I'm having the darnedest problem with the de-emphasis post-processor. One of the DSP effects I'm using is TT-DR-Meter via foo_vst. The TT-DR-Meter measures the dynamic range of the music that is playing and tells me right away which CD editions are victims of the loudness war (i.e. highly compressed, small dynamic range). Now, when foo_dsp_effect is installed, the meter doesn't seem to be able to measure the DR anymore. If I delete the plugin, the meter works fine. I don't have any problems with the HDCD or DTS post-processors.

Any idea what could be the cause of this? Maybe some check that is constantly running instead of the first few seconds of each track?

foo_dsp_effect

Reply #61
I'm having the darnedest problem with the de-emphasis post-processor. One of the DSP effects I'm using is TT-DR-Meter via foo_vst. The TT-DR-Meter measures the dynamic range of the music that is playing and tells me right away which CD editions are victims of the loudness war (i.e. highly compressed, small dynamic range). Now, when foo_dsp_effect is installed, the meter doesn't seem to be able to measure the DR anymore. If I delete the plugin, the meter works fine. I don't have any problems with the HDCD or DTS post-processors.

Any idea what could be the cause of this? Maybe some check that is constantly running instead of the first few seconds of each track?


Yes, there is a check RIGHT at the start, when a track is loaded. It chacks the tags then, since I can't find a reliable way to check the metadata other times.

foo_dsp_effect

Reply #62
Yes, there is a check RIGHT at the start, when a track is loaded. It chacks the tags then, since I can't find a reliable way to check the metadata other times.


Yeah, of course, that is obvious. I was more thinking along the lines of something that could potentially modify the stream, or at least the processing flow before the DSP kicks in.

 

foo_dsp_effect

Reply #63
Too bad.

Component's been discontinued anyway.



foo_dsp_effect

Reply #65
A great pity this wonderful component has been discontinued - but thanks a lot for the revival of foo_dynamics!

Cheers hg

foo_dsp_effect

Reply #66
Considering other recent and now Recycle Bin-d posts by mudlord, which are quite out-of-character, I don't know whether people should take seriously the recent 'cancellations' of this and the YM decoder.

foo_dsp_effect

Reply #67
I'm having the darnedest problem with the de-emphasis post-processor. One of the DSP effects I'm using is TT-DR-Meter via foo_vst. The TT-DR-Meter measures the dynamic range of the music that is playing and tells me right away which CD editions are victims of the loudness war (i.e. highly compressed, small dynamic range). Now, when foo_dsp_effect is installed, the meter doesn't seem to be able to measure the DR anymore. If I delete the plugin, the meter works fine.


It seems that deleting foo_dsp_effect only temporarily alleviated the problem. The real culprit seems to have been the latest update of foo_vst 0.902.

foo_dsp_effect

Reply #68
This is funny what I write but I don't know how to run this plugin (I mean configure new preset)
I have ony foo_dsp_std.dll working (I can load equalizer preset from file).
Maybe foo_dsp_std.dll and foo_dsp_effect.dll can't working both ?

foo_dsp_effect

Reply #69
Preset loading works here

@Sandrine: so its a foo_vst fault. Yay, one less bug

foo_dsp_effect

Reply #70
since I am no longer able to edit posts due to insanity:

lvqcl - fixed the q issue you described, thanks!

foo_dsp_effect

Reply #71
Preset loading works here

@Sandrine: so its a foo_vst fault. Yay, one less bug


Ok I find it out where it is.
Pref -> Playback -> DSP Man

I have some old presets (23 *.feq files) from old version of foobar (files dates: 2003 and 2005) they're great but I don't know who is the author of these (my preset is "my preset.feq" which I created it long time ago).
If someone need old presets this is the link:

www.mediafire.com/?f8gf94d8xhe8ol6


foo_dsp_effect

Reply #73
Strange, tried your presets in the standard EQ and enabled a effect from my array, works.

O.O

Really don't know what the issue is.

edit: oh, new build here!

foo_dsp_effect

Reply #74
Oooooh... a dream come true: On the fly CD de-emphasing    http://www.hydrogenaudio.org/forums/index....c=70549&hl=

Thank You!

btw: What the sliders are doing in the CD de-emphasing mode?

Quality= OK, I suppose the quality of output?
Frequency=?
Gain=Gain of output?!
.halverhahn