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