{"id":13418490,"url":"https://github.com/kfrlib/kfr","last_synced_at":"2025-05-14T09:07:11.825Z","repository":{"id":37692628,"uuid":"62246024","full_name":"kfrlib/kfr","owner":"kfrlib","description":"Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)","archived":false,"fork":false,"pushed_at":"2025-04-08T16:19:01.000Z","size":12706,"stargazers_count":1722,"open_issues_count":26,"forks_count":255,"subscribers_count":64,"default_branch":"main","last_synced_at":"2025-04-11T21:46:53.438Z","etag":null,"topics":["audio","audio-processing","avx","avx512","clang","cplusplus","cplusplus-14","cplusplus-17","cpp14","cpp17","cxx","dft","digital-signal-processing","discrete-fourier-transform","dsp","fast-fourier-transform","fft","header-only","simd"],"latest_commit_sha":null,"homepage":"https://www.kfrlib.com","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kfrlib.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-06-29T17:48:43.000Z","updated_at":"2025-04-11T16:13:26.000Z","dependencies_parsed_at":"2023-10-11T10:45:36.705Z","dependency_job_id":"4d857d4d-5c3d-45f0-bc16-6e7bfaaea4a8","html_url":"https://github.com/kfrlib/kfr","commit_stats":{"total_commits":1096,"total_committers":18,"mean_commits":"60.888888888888886","dds":0.05565693430656937,"last_synced_commit":"6aea976a464de59d522d0c629e64bf0c044e6777"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kfrlib%2Fkfr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kfrlib%2Fkfr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kfrlib%2Fkfr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kfrlib%2Fkfr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kfrlib","download_url":"https://codeload.github.com/kfrlib/kfr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254110374,"owners_count":22016391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","audio-processing","avx","avx512","clang","cplusplus","cplusplus-14","cplusplus-17","cpp14","cpp17","cxx","dft","digital-signal-processing","discrete-fourier-transform","dsp","fast-fourier-transform","fft","header-only","simd"],"created_at":"2024-07-30T22:01:02.888Z","updated_at":"2025-05-14T09:07:11.784Z","avatar_url":"https://github.com/kfrlib.png","language":"C++","readme":"# KFR - Fast, modern C++ DSP framework\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"300\" height=\"auto\" src=\"img/KFR1.png\"\u003e\n\u003c/p\u003e\n\n![Build](https://img.shields.io/github/actions/workflow/status/kfrlib/kfr/build.yml?style=flat-square\u0026label=Build)\n![Test](https://img.shields.io/github/actions/workflow/status/kfrlib/kfr/test.yml?style=flat-square\u0026label=Test)\n\n![License](https://img.shields.io/github/license/kfrlib/kfr.svg?style=flat-square\u0026label=License)\n![Release](https://img.shields.io/github/release-date/kfrlib/kfr?style=flat-square\u0026label=Latest+release)\n\nhttps://www.kfrlib.com\n\nKFR is an open source C++ DSP framework that contains high performance building blocks for DSP, audio, scientific and other applications. It is distributed under dual GPLv2/v3 and [commercial license](https://kfrlib.com/purchase).\n\n## KFR6\n\nNew features, performance improvements, easier setup.\n\n:arrow_right: [What's new in KFR6](docs/docs/whatsnew6.md)\n\n:arrow_right: [Upgrade from a previous version](docs/docs/upgrade6.md)\n\n## Our other projects\n\n\u003cdiv align=\"center\"\u003e\n\n[**🟣 Brisk**](https://github.com/brisklib/brisk) is a cross-platform C++20 GUI framework featuring MVVM architecture, reactive capabilities, and scalable, accelerated GPU rendering. *(GPL/Commercial)*\n\n[**🟢 CxxDox**](https://github.com/kfrlib/cxxdox) — C++ documentation generator. *(MIT)*\n\n\u003c/div\u003e\n\n## KFR Installation\n\nCompiler support:\n\n![Clang 11+](https://img.shields.io/badge/Clang-11%2B-brightgreen.svg?style=flat-square)\n![GCC 7+](https://img.shields.io/badge/GCC-7%2B-brightgreen.svg?style=flat-square)\n![MSVC 2019](https://img.shields.io/badge/MSVC-2019%2B-brightgreen.svg?style=flat-square)\n![Xcode 12+](https://img.shields.io/badge/Xcode-12%2B-brightgreen.svg?style=flat-square)\n\nKFR has no external dependencies except for a C++17-compatible standard C++ library. CMake is used as the build system.\n\nClang is highly recommended and proven to provide the best performance for KFR. You can use Clang as a drop-in replacement for both GCC on Linux and MSVC on Windows. On macOS, Clang is the default compiler and included in the official Xcode toolchain.\n\n_Note_: ARM/AArch64 support and building the DFT module currently requires Clang due to internal compiler errors and a lack of some optimizations in GCC and MSVC.\n\n:arrow_right: See [Installation](docs/docs/installation.md) docs for more details\n\n## Features\n\n:star2: — new in KFR6\n\n### FFT/DFT\n* Optimized DFT implementation for any size (non-power of two sizes are supported)\n* DFT performance is on par with the most performant implementation currently available [See Benchmarks](#benchmark-results)\n* Real forward and inverse DFT\n* :star2: Multidimensional complex and real DFT\n* Discrete Cosine Transform type II (and its inverse, also called DCT type III)\n* Convolution using FFT\n* Convolution filter\n\n:arrow_right: See also [How to apply FFT](docs/docs/dft.md) with KFR\n\n### DSP\n\n* IIR filter design\n  * Butterworth\n  * Chebyshev type I and II\n  * Bessel\n  * Lowpass, highpass, bandpass and bandstop filters\n  * Conversion of arbitrary filter from {Z, P, K} to SOS format (suitable for biquad function and filter)\n* Biquad filter [See Benchmarks](#benchmark-results)\n* Simple biquad filter design\n* FIR filter design using window method\n* Loudness measurement according to EBU R128\n* Window functions: Triangular, Bartlett, Cosine, Hann, Bartlett-Hann, Hamming, Bohman, Blackman, Blackman-Harris, Kaiser, Flattop, Gaussian, Lanczos, Rectangular\n* Sample rate conversion with configurable quality and linear phase\n* Oscillators, fast incremental sine/cosine generation,  Goertzel algorithm, fractional delay\n\n### Base\n\n* Tensors (multidimensional arrays)\n* :star2: .npy support (reading/writing)\n* :star2: Matrix transpose\n* Statistical functions\n* Random number generation\n* Template expressions (See examples)\n* Ring (Circular) buffer\n* :star2: Windows arm64 support\n* :star2: Emscripten (wasm/wasm64) support\n\n### Math\n\n* Mathematical functions such as `sin`, `log` and `cosh` built on top of SIMD primitives\n* Most of the standard library functions are re-implemented to support vector of any length and data type\n\n### SIMD\n\n* `vec\u003cT, N\u003e` class and related functions that abstracts cpu-specific intrinsics\n* All code in the library is optimized for Intel, AMD (SSE2, SSE3, SSE4.x, AVX and AVX2 and AVX512) and ARM, AArch64 (NEON) processors\n* All data types are supported including complex numbers\n* All vector lengths are also supported. `vec\u003cfloat,1\u003e`, `vec\u003cunsigned,3\u003e`, `vec\u003ccomplex\u003cfloat\u003e, 11\u003e` all are valid vector types in KFR\n* Sorting\n\n### IO\n\n* Audio file reading/writing\n* WAV\n* FLAC\n* MP3\n\n### Multiarchitecture\n\nThe multiarchitecture mode enables building algorithms for multiple architectures with runtime dispatch to detect the CPU of the target machine and select the best code path\n\n* :star2: Multiarchitecture for DFT, resampling, FIR and IIR filters.\n\n### C API\n\nC API is available and includes a subset of KFR features including FFT and filter processing.\n\n* :star2: Support for non x86 systems.\n\n## Benchmark results\n\n### DFT\n\nPowers of 2, from 16 to 16777216 (*Higher is better*)\n\n![FFT Performance](img/powers2_double_16_16777216.png)\n\nPrime numbers from 17 to 127 (*Higher is better*)\n\n![DFT Performance](img/primes_double_17_127.png)\n\nSmall numbers from 18 to 119 (*Higher is better*)\n\n![DFT Performance](img/composite_double_18_119.png)\n\nRandom sizes from 120 to 30720000 (*Higher is better*)\n\n![DFT Performance](img/extra_double_120_30720000.png)\n\nSee [fft benchmark](https://github.com/kfrlib/fft-benchmark) for details about benchmarking process.\n\n\n### Biquad\n\n(*Higher is better*)\n\n![Biquad Performance](img/biquad.svg)\n\n## Documentation\n\nKFR 6 (latest)\nhttps://www.kfrlib.com/docs/latest/\n\nKFR 5\nhttps://www.kfrlib.com/docs/v5/\n\nBuilt with\n* [cxxdox - generates markdown docs from C++](https://github.com/kfrlib/cxxdox)\n* [mkdocs - static documentation generator](https://www.mkdocs.org/)\n* [mkdocs-material - material theme for mkdocs](https://squidfunk.github.io/mkdocs-material/)\n\n## Branches\n\n`dev` - current development version. Pull requests should go to `dev`.\n\n`main` - current stable version passing all compiler/architecture tests.\n\n`v5` - previous version of KFR (no new features, fixes only)\n\n## License\n\nKFR is dual-licensed, available under both commercial and open-source GPL 2+ license.\n\nIf you want to use KFR in a commercial product or a closed-source project, you need to [purchase a Commercial License](https://kfrlib.com/purchase-license).\n","funding_links":[],"categories":["TODO scan for Android support in followings","C++","Mathematics","Framework"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkfrlib%2Fkfr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkfrlib%2Fkfr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkfrlib%2Fkfr/lists"}