LPF doubt why a cut-off frequency of an LPF is higher than that of SinOsc

hi,
obvious question, why use an LPF with a Ugen SinOsc (e.g.) like this:
{LPF1.ar(SinOsc.ar(880,0,0.1), 200)}.play
I have seen in codes people passing this filter to Ugens with frequencies well below the cutoff frequency of the Ugen. Is this done to avoid aliasing? I don’t quite understand the reason. Is there a good tutorial where they explain everything about filters and supercollider?

The cutoff frequency is the frequency at which signals with that frequency will be reduced by 3dB. So you’re still hear them, they’ll just be quieter.

The code you have there doesn’t make a lot of sense, as a sine wave only has a single frequency (in this case 880 hz), and so this is really just an expensive way of reduce the volume of your sine wave. But if it was a saw/Square wave, this is a way to reduce the ‘brightness’ of the sound, or to attenuate the higher frequencies.

1 Like

Ok Thank you very much. But the doubt is why if the frequency is less than 1000 a LPF is going to affect the amp of the frequency Ugen. The filter if it passes the cutoff frequency above the frequency of the carrier Gen will not affect it, that is, it would filter what is above the cutoff frequency of the LPF, if the frequency of a SinOsc is lower it would not affect it, is that so?

If you set a LPF to have a cutoff frequency of 1000 hz, what you’re telling it is to reduce frequencies at 1000hz by 3dB. For frequencies above 1000hz it will reduce them by more until it cuts the entirety of the signal. For frequencies below 1000hz it will reduce them by less than 3dB until at some frequency (for the sake or argument let’s say 700hz) the signals are not reduced at all.(*)

Where the cutoff begins and ends depends upon the filter. For 4th order filters it might be more like 800hz and 1200 hz, whereas for 2nd order filters it might be 600 and 1600 as the curve is shallower(**)

There are some graphs on this page which hopefully illustrate this for you:

So if you want to eliminate the entirety of the signal, you’d have to lower the cutoff below the actual frequency.

  • This is an idealized description, but it’s close enough for our purposes.
    ** These numbers are totally fictional, but hopefully you get the idea.

Incidentally - using a filter with a single sine wave is pretty pointless. Anyone doing this is obviously a bit confused as to how this stuff works.

You might be imagining that a filter is a true brick wall: for lowpass, below the cutoff = full volume; at and above the cutoff = silence.

This filter doesn’t exist. It’s an impossible frequency response.

All filters’ frequency responses have some kind of slope. This affects the volume of your single sine wave.

Now… imagine a volume control. This affects all frequencies equally. So what is the difference between this and a filter? The difference is that a filter has a different gain at different frequencies. So, in order to hear the difference between a volume control and a filter, the only way is to feed it an input that contains multiple frequencies. If you use a single-frequency input, then there are no “different frequencies” by which to hear the effect of different gain values – hence what you hear is no different from a volume control… which is not a useful thing to do.

hjh

Perfect, that’s what I suspected, thank you very much for the explanation!!!