I want to synthesize this simple analog audio filter which is a notch:
The inductor with resistor creates a simple one-pole low pass filter with the cutoff frequency at:
fc = 1/(2pi L R)
The capacitor with the resistor creates a one-pole high pass filter with the cutoff freq at:
fc = 1/(2pi C R)
So is synthesizing this circuit as simple as just running the input through both filters and summing it together?
ie.
onePoleHPF.setFreq(1/(2pi*C*R));
onePoleLPF.setFreq(1/(2pi*L*R));
output = onePoleHPF.process(input) + onePoleLPF.process(input);
Or is it not really that simple? Do I need to "weight" their contributions or gain scale them somehow to ensure I'm not adding gain at any overlapping frequency? If so, in what proportion? Like
output = onePoleHPF.process(input * 0.5) + onePoleLPF.process(input * 0.5);
I think one of these two approaches is correct because parallel elements share the same voltage across them so I think the input voltage is just split 50/50 between the two pathways.
Or will this not work and I need to create a completely new filter to get the right output? If so, how would I get a transfer function to make this work?
EDIT this is inserted after I got an answer from user287001:
The answer was what I needed.
The principles I used come from: https://www.dsprelated.com/freebooks/pasp/String_Excitation.html. If I have two resistors in series of identical impedance at that point instead of one resistor (more accurate for my simulation) like this:
(Sim from https://www.falstad.com/afilter/)
Then the equation becomes:
\$V_o(s) = V_i(s) * \frac{2R}{2R+\frac{1}{\frac{1}{sL} + sC}}\$
Substituting \$s = \frac{1-z^{-1}}{T}\$ where T is the sampling period and having Wolfram Alpha simplify:
\$V_o(z) = \frac{2 R V_i(z) (C L z^{-2} - 2 C L z^{-1} + C L + T^{2})}{2 C L R z^{-2} - 4 C L R z^{-1} + 2 C L R - L T z^{-1} + L T + 2 R T^{2}}\$
Multiplying both sides out I get:
\$2CLRV_o[n-2] - 4CLRV_o[n-1]-TLV_o[n-1] + 2CLRV_o[n] + TLV_o[n] + 2RT^{2}V_o[n] = 2R (V_i[n-2]CL-2CLV_i[n-1] + V_i[n]CL + V_i[n]T^{2})\$
Then to isolate for \$V_o[n]\$:
\$V_o[n] = \frac{2R (V_i[n-2]CL - 2CLV_i[n-1] + V_i[n]CL + V_i[n]T^{2}) - 2CLRV_o[n-2] + 4CLRV_o[n-1] + TLV_o[n-1]}{2CLR + TL + 2RT^{2}}\$
Does that look correct? Thanks a bunch.