RTF_CREATE_FIR_LOWPASS(3)

✨ RTF_CREATE_FIR_LOWPASS ✨

okay bestie, sit down, hydrate, and let me tell you about the absolute icon that is rtf_create_fir_lowpass(3) from the rtfilter library. yes this is a real manual page and yes it's giving very much signal-processing-coded πŸŽ€


🌸 NAME 🌸

rtf_create_fir_lowpass, rtf_create_fir_highpass, rtf_create_fir_bandpass β€” bestie these three literally create FIR lowpass, highpass and bandpass windowed sinc filters. that's the whole job. that's the vibe. slay πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <rtf_common.h>

hfilter rtf_create_fir_lowpass(unsigned int nch, int proctype,
                               double fc, unsigned int hlen,
                               KernelWindow wndtype);
hfilter rtf_create_fir_highpass(unsigned int nch, int proctype,
                                double fc, unsigned int hlen,
                                KernelWindow wndtype);
hfilter rtf_create_fir_bandpass(unsigned int nchann, int proctype,
                                double fc_low, double fc_high,
                                unsigned int hlen,
                                KernelWindow wndtype);

πŸ’– DESCRIPTION πŸ’–

so, rtf_create_fir_lowpass() creates a lowpass windowed sinc filter. it processes nchann channels of whatever data type proctype says, with fc as the normalized cutoff frequency and hlen as the half length of the window. periodt.

rtf_create_fir_highpass() is literally the same thing as rtf_create_fir_lowpass() except β€” plot twist β€” it makes a highpass filter instead. same energy, different frequency direction πŸŒ€

rtf_create_fir_bandpass() is also the same, but it makes a bandpass filter, with fc_low and fc_high as the lowpass and highpass normalized cutoff frequencies respectively. two cutoffs, one icon πŸ‘‘

now, a normalized frequency is the ratio between the absolute frequency and the sampling frequency. iykyk but if you don't: a value of 1.0 refers to the sampling frequency. so like, that's the whole scale, bestie πŸ“

the parameter proctype means exactly the same thing as it does in rtf_create_filter(3). go read that manpage for the details, i'm not gonna repeat her whole lore here πŸ’…

the parameter wndtype specifies the type of window applied to the impulse response, and it can take these values:

  • BLACKMAN_WINDOW πŸ–€
  • HAMMING_WINDOW 🎡
  • RECT_WINDOW ⬜

(if you want the ~meaning~ behind those, go pick up a book on signal processing, bestie. that's above my pay grade and also above this manpage's job description πŸ“š)


⭐ RETURN VALUE ⭐

returns the handle to the created filter when everything goes right 🫢 and NULL otherwise 😭 (no handle for you, bestie).


🌈 SEE ALSO 🌈


and that's the whole page, bestie!! this lil masterpiece is brought to you by EPFL, dated 2010, living inside the rtfilter library man pages. go forth and filter something iconic πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from