# # This code creates Linkwitz Transform and is based on spreadsheet you can download from minidisp site# Brought to you by jiiteepee@yahoo.se# http://jiiteepee.blogspot.fi/2016/03/phonoeq-software-project.html?view=sidebar## set your parameters ------------Do:`f0 = 57.68`Do:`fp = 35`Do:`q0 = 0.66`Do:`qp = 0.577`# --------------------------------# Coefficient calculations--------Do:`B11 = (f0 + fp) / 2.0`Do:`B26 = (2.0 * pi * f0) * (2.0 * pi * f0)`Do:`B27 = (2.0 * pi * f0) / q0`Do:`B30 = (2.0 * pi * fp) * (2.0 * pi * fp)`Do:`B31 = (2.0 * pi * fp) / qp`Do:`B34 = (2.0 * pi * B11) / tan(pi * B11 / sampleRate)`Do:`B35 = B30 + (B34 * B31) + (B34 * B34)`Do:`a0 = 1`Do:`a1 = -(2.0 * (B30 - (B34 * B34)) / B35)`Do:`a2 = -((B30 - B34 * B31 + (B34 * B34)) / B35)`Do:`b0 = (B26 + B34 * B27 + (B34 * B34)) / B35`Do:`b1 = 2.0 * (B26 - (B34 * B34)) / B35`Do:`b2 = (B26 - B34 * B27 + (B34 * B34)) / B35`# --------------------------------# Enable filterFilter:ONIIROrder2Coefficients`b0``b1``b2``a0``-a1``-a2`# --------------------------------
Produces this equalization:
.
Paste above code either to config.txt or save as .txt file and use Include: statement to load it into use.
.
I didn't test this with other but with parameters shown there in code so let me know if there's issues with coding.
EDIT:
Note: I didn't remove the minus signs from a1/a2 coefficients in code but reversed back the coefficients in Filter command ... a remainder of the difference in coefficient handling between MiniDSP and EqAPO.
.
Made another test filter by taking parameter values from the spreadsheet (LT -tab):
f0 = 55
q0 = 1.21
fp = 25
qp = 0.5
fs 48000
which results this equalization:
and it equals with the plot shown in spreadsheet --> implemented part of the LT looks working as supposed.
Hello!
Discussion opened by johein activated me a bit to prepare a Linkwitz Transform script for to produce a 'LT filter' for EqualizerAPO. Script is based on 'Biquad calculation spreadsheet' from MiniDSP site https://www.minidsp.com/applications/advanced-tools/linkwitz-transform. Here's the code:
Produces this equalization:
.
Paste above code either to config.txt or save as .txt file and use Include: statement to load it into use.
.
I didn't test this with other but with parameters shown there in code so let me know if there's issues with coding.
EDIT:
Note: I didn't remove the minus signs from a1/a2 coefficients in code but reversed back the coefficients in Filter command ... a remainder of the difference in coefficient handling between MiniDSP and EqAPO.
.
Made another test filter by taking parameter values from the spreadsheet (LT -tab):
which results this equalization:
and it equals with the plot shown in spreadsheet --> implemented part of the LT looks working as supposed.
EDIT2:
Suggestion: Filter: LT ON|OFF (<lphp>) <f0> <q0> <fp> <qp></qp></fp></q0></f0></lphp>
Last edit: Juha 2016-05-24