• ### lop~ object argument??

Hi PD

I wonder if lop~ object's argument should be the filter's cut-off frequency.
I tested "lop~ 400" with an 1kHz OSC~ input, but then the signal sounds like there is no attenuation at all.
However, in Csound, such a test with lpf18 or biquad opcode (tuned to a one-pole) will attenuate the 1kHz sine accordingly.
So have I misunderstood the argument? I noticed that with lop~ and hip~, the argument in the help is referred to as "roll-off frequency" while their right inlets were termed "cut-off frequency". Are they different?

• | Posts 4 | Views 4914
• how did you measure it exactly?
anyhoo
http://lists.puredata.info/pipermail/pd-list/2014-05/106928.html
seems like a normalized filter that has a single pole that goes from 1 to 0 on the real axis as the cutoff frequency goes from 0 to 1 radians(so it is definitely an approximation). Every frequency higher than that cutoff is clipped, and the frequencies in that range will have a warped cutoff (half-power) frequency (& frequency response).
from miller's book: http://msp.ucsd.edu/techniques/v0.11/book-html/node140.html

just for fun let's see what the frequency response should be where you measured it:
at 44100 sample rate, a cutoff frequency of 400 would be translated into:
4002pi/44100 = .05699
1 - .05699 = .94301 is the pole

so the transfer function will be:
.05699/(1 - .94301(z^-1))
the radian value of 1000 @ samplerate of 44100 is (1000/44100) * 2pi = .142476 radians

the cartesian co-ordinates in the complex plane of .94301(z^-1):
real part: cos(.142476).94301 = .933455
imaginary part: -sin(.142476)
.94301 = -.133902

then the distance formula:
sqrt((1 - .933455)^2 + (0 + .133902)^2) = .14952585
so the gain will be: .05699/.14952585 = .38113811

which is the peak amplitude after the lop~ when i measured .. actually quite a bit of attenuation

• here is an abstraction that solves the cutoff frequency warping, though you can see that it's much more expensive than miller's approximation and doesn't matter much below a few thousand hz. another thing to remember is that as a 1 pole filter the slope is very gradual anyhow
lop-fix.zip

• @seb-harmonik.ar said:

lop-fix.zip

Thank you very much for the detailed explanation.
I should've measured the signal output before posting.

| Posts 4 | Views 4914
Internal error.

Oops! Looks like something went wrong!