Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poor documentation #168

Open
MatthieuMv opened this issue Dec 7, 2022 · 3 comments
Open

Poor documentation #168

MatthieuMv opened this issue Dec 7, 2022 · 3 comments

Comments

@MatthieuMv
Copy link

MatthieuMv commented Dec 7, 2022

Hello,

I want to use KFR for business purposes (and thus, pay the license).
However, I am disappointed by the poor documentation.
Do you plan to enhance developer experience in the future ?

Thank you

@MatthieuMv MatthieuMv changed the title Custom filter Poor documentation Dec 7, 2022
@dancazarin
Copy link
Member

Hello,

Documentation is constantly being improved, new guides and how to’s are on the way.

Could you elaborate what topics in the documentation you are most interested in?

There are also priority tech support for all purchasers of commercial license.

@MatthieuMv
Copy link
Author

Thank you for this fast answer @dancazarin.
It would be great if at least user functions/classes have a small description about its usage and parameters.

For example, let's consider the following function:

zpk<T> iir_lowpass(const zpk<T>& filter, identity<T> frequency, identity<T> fs = 2.0)

The argument 'fs' is not clear, I had to check this example to see that you pass 48'000 and deduce that this is the sample rate and that the frequency is not normalized.

However, if we take the low pass design function of FIR, it is very well commented:

/**
 * @brief Calculates coefficients for the low-pass FIR filter
 * @param taps array where computed coefficients are stored
 * @param cutoff Normalized frequency (frequency_Hz / samplerate_Hz)
 * @param window pointer to a window function
 * @param normalize true for normalized coefficients
 */
template <typename T, univector_tag Tag>
void fir_lowpass(univector<T, Tag>& taps, identity<T> cutoff, expression_handle<T>& window, bool normalize = true) 

Another example is DSP naming: functions like "to_sos" or structs like "zpk" are not self explanatory, a comment would be great when you don't know maths abbreviations. I often end-up in MatLab documentation to understand what's happening.

KFR seems to be one of the best C++ DSP library but it is hard for DSP newcomers (like me) to understand and use: more in-code documentation could help a lot.

PS: I think there is a typo in the section title here "Biquad Peak filter (0.3, 3, -2dB)" should be "Biquad Bandpass filter (0.25, 0.2)"

Thank you for your time and have a nice day.

@dancazarin
Copy link
Member

@MatthieuMv Thank you for providing these details. The documentation should definitely be expanded to include the description of newer features such as IIR filter design. Naming mainly follows python numpy library and is compatible with it in terms of parameters and ranges.

Thank you for catching the typo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants