RTF_CREATE_DOWNSAMPLER(3)
π RTF_CREATE_DOWNSAMPLER π
okay bestie, welcome to the rtfilter library corner of the manual pages π this one's all about making your signals chill out and take up less space. it's rtf_create_downsampler, and she's iconic, no cap.
β¨ NAME β¨
rtf_create_downsampler β creates downsampling filter π¦
πΈ SYNOPSIS πΈ
#include <rtfilter.h>
hfilter rtf_create_downsampler(unsigned int nch, int type,
unsigned int r);
π DESCRIPTION π
so like, rtf_create_downsampler() makes you a filter that downsamples signals coming from nch channels of type type (peep rtf_create_filter(3) for the tea on that) by a decimation factor of r. translation? the sampling frequency of the input is gonna be r times the sampling frequency of the output. she's literally shrinking the vibe β¨
the way she does it internally? okay so, she applies a lowpass 4-order Chebychev filter to the input data, using a normalized cutoff frequency of 0.8/(2*r), and then decimates the result every r samples. that's it, that's the whole glow-up π«Ά
π RETURN VALUE π
she hands you the handle to the created filter when it all works out π ...and NULL otherwise π (we don't talk about the otherwise).
π NOTES π
heads up bestie, this one's different from most other filters!
on the contrary of most other filters, the number of samples returned by rtf_filter(3) is different than the input (as expected, she's built different π
) but it also may vary at each call if the number of sample supplied in input is not a multiple of r. so like, keep an eye on that, fr fr.
π SEE ALSO π
EPFL Β· 2010
and that's the whole page, bestie π§ mwah π this manual page was brought to you by EPFL, circa 2010 β iykyk, periodt β
π¦ where this page comes from
- debian bookworm: librtfilter-dev 1.1-4+b2
- debian trixie: librtfilter-dev 1.1-4+b3
- ubuntu jammy: librtfilter-dev 1.1-4build1
- ubuntu noble: librtfilter-dev 1.1-4build2
- ubuntu questing: librtfilter-dev 1.1-4build2
- Copyright 2010 (c) EPFL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms