First order filter with Equalizer APO/Peace

How do I have a 1st order filter with Equalizer APO? In the list of filters there is no option for 1st order filter.
Also how do I add boost/gain to a single channel?
I am using Peace to configure EqualizerAPO

Thanks,
WA
 

Attachments

  • Peace.jpg
    Peace.jpg
    167.6 KB · Views: 363
Last edited:
Strangely, first order filters are missing in EqualizerAPO.
You can define one yourself with the free filter, but then you need to calculate the filter coefficients yourself.
Filter with custom coefficients (since version 0.9)

Syntax:
Filter <n>: ON IIR Order <m> Coefficients <b0> <b1> ... <bm> <a0> <a1> ... <am>
Description:
Adds a generic IIR filter with the given order and coefficients. The number of coefficients must be 2*(order+1).
 
For channel operations you just use Channel: command to target.

Channel: L
<your operations for L channel>

Channel: L R
<your operations for L & R channels>

etc.

1st order filtering goes as like Henrik wrote. An example:

Code:
# ------------------------------------------------------
# Massberg Analog-Matched 1st order LP filter
# Based on: [url=https://tinyurl.com/ya8no96r]Designing Audio Effect Plug-Ins in C++: With Digital Audio Signal Processing ... - Will C. Pirkle - Google Books[/url]
#
# Brought to you by [email]jiiteepee@yahoo.se[/email] (8/2018)
# ------------------------------------------------------

Eval: fs = sampleRate

# User parameter ---------------------------------------

Eval: fc = 1000

# ------------------------------------------------------

# calculations

Eval: g1 = 2 / sqrt(4 + (fs/fc)^2)

Eval: gm = max(sqrt(0.5), sqrt(g1))
Eval: wm = (2 * pi * fc * sqrt(1 - gm^2))/gm
Eval: Om = tan(wm / (2 * fs))
Eval: Os = Om * sqrt((gm^2 - g1^2) * (1 - gm^2)) / (1-gm^2)
        
Eval: g0 = Os + 1

Eval: a0 = (Os + g1)/g0
Eval: a1 = (Os - g1)/g0
Eval: b1 = (Os - 1)/g0

# filtering        
Filter: ON IIR Order 1 Coefficients `a0` `a1` 1 `b1`
 
Hello jiiteepee,


thank you for this nice piece of code!
works very fine!


But I would also need a 1st order HP , but I cant figure out how to change the code to turn the LP to HP.


Would be very thankful for your help!




regards
Matthias
 
I have not implemented HP1 using similar method but, here you see the difference between LP1 and HP1 :

Code:
w0 = 2.0 * pi * fc/fs;
a0 =   cos(w0) + sin(w0) + 1;
a1 =   sin(w0) - cos(w0) - 1;

LP1:
b0 =   sin(w0);
b1 =   sin(w0);

HP1:
b0 =   cos(w0) + 1;
b1 = -(cos(w0) + 1);
 
You can use that latter code I gave for HP1 because of you probably can't turn that Massberg LP1 into HP1 without thinking a fully new design.

So, for HP1 in EqualizerAPO, you write:

Code:
# cut off frequency
Eval: fc = 1000 

Eval: w0 = 2.0 * pi * fc/sampleRate
Eval: a0 =   cos(w0) + sin(w0) + 1
Eval: a1 =   sin(w0) - cos(w0) - 1
Eval: b0 =   cos(w0) + 1
Eval: b1 = -(cos(w0) + 1)

# filtering        
Filter: ON IIR Order 1 Coefficients `a0` `a1` `b0` `b1`
 
Hello,


just tried it:
its doing something, but it does sound like an high pass.


Where did this whole part go?


Eval: gm = max(sqrt(0.5), sqrt(g1))
Eval: wm = (2 * pi * fc * sqrt(1 - gm^2))/gm
Eval: Om = tan(wm / (2 * fs))
Eval: Os = Om * sqrt((gm^2 - g1^2) * (1 - gm^2)) / (1-gm^2)