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

Biquad: Highshelf filter #432

Closed
rtoy opened this issue Nov 12, 2014 · 0 comments
Closed

Biquad: Highshelf filter #432

rtoy opened this issue Nov 12, 2014 · 0 comments

Comments

@rtoy
Copy link
Member

rtoy commented Nov 12, 2014

A follow-up to #419, for a lowshelf filter

Blink uses

A = 10^(dbGain/40)
S = 1; // filter slope (1 is max value)
alpha = 0.5 * sin(w0) * sqrt((A + 1 / A) * (1 / S - 1) + 2);
k = cos(w0);
k2 = 2 * sqrt(A) * alpha;
aPlusOne = A + 1;
aMinusOne = A - 1;

b0 = A * (aPlusOne + aMinusOne * k + k2);
b1 = -2 * A * (aMinusOne + aPlusOne * k);
b2 = A * (aPlusOne + aMinusOne * k - k2);
a0 = aPlusOne - aMinusOne * k + k2;
a1 = 2 * (aMinusOne - aPlusOne * k);
a2 = aPlusOne - aMinusOne * k - k2;

This matches the cookbook except the Q parameter (called S above) is fixed to 1.

@mdjp mdjp modified the milestone: Uncommitted May 14, 2015
@joeberkovitz joeberkovitz modified the milestones: Uncommitted, Web Audio V1 Jun 1, 2015
rtoy pushed a commit to rtoy/web-audio-api that referenced this issue Jun 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants