Effacer les filtres
Effacer les filtres

Can anyone help turn these 'Audio EQ Cookbook' codes into functions?

2 vues (au cours des 30 derniers jours)
Sarah Bell
Sarah Bell le 14 Jan 2018
I need to create functions using these codes, but I don't understand how to do that.
Here is the first code (to create a low shelf filter):
H(s) = A * (s^2 + (sqrt(A)/Q)*s + A)/(A*s^2 + (sqrt(A)/Q)*s + 1)
b0 = A*( (A+1) - (A-1)*cos(w0) + 2*sqrt(A)*alpha )
b1 = 2*A*( (A-1) - (A+1)*cos(w0) )
b2 = A*( (A+1) - (A-1)*cos(w0) - 2*sqrt(A)*alpha )
a0 = (A+1) + (A-1)*cos(w0) + 2*sqrt(A)*alpha
a1 = -2*( (A-1) + (A+1)*cos(w0) )
a2 = (A+1) + (A-1)*cos(w0) - 2*sqrt(A)*alpha
And here is the second (to create a high shelf filter):
H(s) = A * (A*s^2 + (sqrt(A)/Q)*s + 1)/(s^2 + (sqrt(A)/Q)*s + A)
b0 = A*( (A+1) + (A-1)*cos(w0) + 2*sqrt(A)*alpha )
b1 = -2*A*( (A-1) + (A+1)*cos(w0) )
b2 = A*( (A+1) + (A-1)*cos(w0) - 2*sqrt(A)*alpha )
a0 = (A+1) - (A-1)*cos(w0) + 2*sqrt(A)*alpha
a1 = 2*( (A-1) - (A+1)*cos(w0) )
a2 = (A+1) - (A-1)*cos(w0) - 2*sqrt(A)*alpha
  2 commentaires
Darshan Ramakant Bhat
Darshan Ramakant Bhat le 17 Jan 2018
You can design shelving equalizers directly from the inbuilt MATLAB functions:
robert bristow-johnson
robert bristow-johnson le 26 Juil 2020
i realize that this is 2 1/2 years old.
must a person but the Audio Toolbox to use designshelvingeq() or does it come for free with regular-old MATLAB?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Audio Processing Algorithm Design dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by