Home

Awesome

KFR - Fast, modern C++ DSP framework

<p align="center"> <img width="300" height="auto" src="img/KFR1.png"> </p>

Build Test

License Release

https://www.kfrlib.com

KFR 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.

KFR6

New features, performance improvements, easier setup.

:arrow_right: What's new in KFR6

:arrow_right: Upgrade from a previous version

Our other projects

<div align="center">

🟣 Brisk is a cross-platform C++20 GUI framework featuring MVVM architecture, reactive capabilities, and scalable, accelerated GPU rendering. (GPL/Commercial)

🟢 CxxDox — C++ documentation generator. (MIT)

</div>

KFR Installation

Compiler support:

Clang 11+ GCC 7+ MSVC 2019 Xcode 12+

KFR has no external dependencies except for a C++17-compatible standard C++ library. CMake is used as the build system.

Clang 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.

Note: Building the DFT module currently requires Clang due to internal compiler errors and a lack of optimization in GCC and MSVC.

:arrow_right: See Installation docs for more details

Features

:star2: — new in KFR6

FFT/DFT

:arrow_right: See also How to apply FFT with KFR

DSP

Base

Math

SIMD

IO

Multiarchitecture

The 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

C API

C API is available and includes a subset of KFR features including FFT and filter processing.

Benchmark results

DFT

Powers of 2, from 16 to 16777216 (Higher is better)

FFT Performance

Prime numbers from 17 to 127 (Higher is better)

DFT Performance

Small numbers from 18 to 119 (Higher is better)

DFT Performance

Random sizes from 120 to 30720000 (Higher is better)

DFT Performance

See fft benchmark for details about benchmarking process.

Biquad

(Higher is better)

Biquad Performance

Documentation

KFR 6 (latest) https://www.kfrlib.com/docs/latest/

KFR 5 https://www.kfrlib.com/docs/v5/

Built with

Branches

dev - current development version. Pull requests should go to dev.

main - current stable version passing all compiler/architecture tests.

v5 - previous version of KFR (no new features, fixes only)

License

KFR is dual-licensed, available under both commercial and open-source GPL 2+ license.

If you want to use KFR in a commercial product or a closed-source project, you need to purchase a Commercial License.