Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: firequalizer gain equation ? #11

Open
JorgeR81 opened this issue Feb 26, 2021 · 3 comments
Open

Question: firequalizer gain equation ? #11

JorgeR81 opened this issue Feb 26, 2021 · 3 comments

Comments

@JorgeR81
Copy link

Thanks for these great scripts.

I was just wondering how did you came up with such peculiar firequalizer gain equation values:

cubic_interpolate(2.8853900817779269*log(f/157.48+1)

In the documentation, the default is simply:

cubic_interpolate(f)

( https://ffmpeg.org/ffmpeg-filters.html#firequalizer )

@mfcc64
Copy link
Owner

mfcc64 commented Feb 28, 2021

It makes gain entry linear. The 15 bands placement is non-logarithmic (to allow 0 Hz) but at high frequency it becomes half-octaves band.
Assuming t = 2.8853900817779269*log(f/157.48+1)
Then f = 157.48 * (exp(t / 2.8853900817779269) - 1) = 157.48 * (sqrt(2^t) - 1)
And substitute t from 0 to 14, you get the center frequency.

@JorgeR81
Copy link
Author

OK, thanks. 
So if I want to use a simpler version, with less bands ( e.g.,  65 / 400 / 1250 / 2850 / 5600 / 12500 Hz ) it would be better to use the standard gain equation: cubic_interpolate(f) ?
Do you think there's a better equation for this band configuration? 

@mfcc64
Copy link
Owner

mfcc64 commented Mar 2, 2021

Using cubic_interpolate(f) is enough. Note that the default is gain_interpolate(f) which is less smooth than cubic_interpolate(f).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants