Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)

Overview

KFR - Fast, modern C++ DSP framework

Build Status Gitter License

Compiler support:

Clang 6+ Xcode 9+ GCC 7+ MSVC 2017

https://www.kfr.dev

KFR is an open source C++ DSP framework that focuses on high performance (see benchmark results section).

KFR has no external dependencies except C++17-compatible standard C++ library.

Some C++17 library features will be emulated if not present in the standard library.

Features

What's new in KFR 4.0

  • IIR filter design
    • Butterworth
    • Chebyshev type I and II
    • Bessel
    • Lowpass, highpass, bandpass and bandstop filters
    • Conversion of arbitrary filter from Z,P,K to SOS format (suitable for biquad function and filter)
  • Discrete Cosine Transform type II (and its inverse, also called DCT type III)
  • cmake uninstall target (thank to @acxz)
  • C API: DFT, real DFT, DCT, FIR and IIR filters and convolution, memory allocation
    • Built for SSE2, SSE4.1, AVX, AVX2, AVX512, x86 and x86_64, architecture is selected at runtime
    • Can be used with any compiler and any language with ability to call C functions
    • Windows binaries will be available soon
  • C++17
    • Inline variables
    • Fold expressions
    • Structured binding
  • New vector based types: color, rectangle, point, size, border, geometric vector, 2D matrix
  • Color space conversion (sRGB, XYZ, Lab, LCH)
  • MP3 file reading (using third party dr_lib library, see source code for details)
  • Various optimizations and fixes (thank to @bmanga, @ncorgan, @rotkreis, @mujjingun for fixes and bug reports)

Release notes

  • DFT is limited to Clang due to ICE in MSVC and broken AVX optimization in GCC 8 and 9. Once fixed, support will be added

What's new in KFR 3.0

  • Optimized non-power of two DFT implementation
  • GCC 7+ support
  • MSVC 2017 support
  • AVX-512 support (MSVC and Clang, GCC has incomplete support of AVX-512 instrinsics)
  • EBU R128
  • Ability to include KFR as a subdirectory in cmake project
  • Ability to link objects built for multiple architectures into one binary
  • Number of automatic tests has been increased
  • C API for DFT
  • GPL version changed from 3 to 2+

All features

  • All code in the library is optimized for Intel, AMD (SSE2, SSE3, SSE4.x, AVX and AVX2 and AVX512) and ARM (NEON) processors
  • Mathematical and statistical functions
  • Template expressions (See examples)
  • All data types are supported including complex numbers
  • All vector lengths are also supported. vec<float,1>, vec<unsigned,3>, vec<complex<float>, 11> all are valid vector types in KFR
  • Most of the standard library functions are re-implemented to support vector of any length and data type
  • Runtime cpu detection

Included DSP/audio algorithms:

  • FFT
  • Convolution
  • FIR filtering
  • FIR filter design using the window method
  • Resampling with configurable quality (See resampling.cpp from Examples directory)
  • Goertzel algorithm
  • Fractional delay
  • Biquad filtering
  • Biquad design functions
  • Oscillators: Sine, Square, Sawtooth, Triangle
  • Window functions: Triangular, Bartlett, Cosine, Hann, Bartlett-Hann, Hamming, Bohman, Blackman, Blackman-Harris, Kaiser, Flattop, Gaussian, Lanczos, Rectangular
  • Audio file reading/writing
  • Pseudorandom number generator
  • Sorting
  • Ring (Circular) buffer
  • Simple waveshaper
  • Fast incremental sine/cosine generation
  • EBU R128

Benchmark results

DFT

KFR 3.0.1

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

Usage

Common prerequisites

  • CMake 3.0 or newer for building tests and examples
  • Python 2.7 or 3.x for running examples
  • (Optional) Ninja (https://ninja-build.org/)

For running examples and plotting frequency responses of filters the following python packages are required:

pip install matplotlib
pip install numpy
pip install scipy

Or download prebuilt python packages for windows

To obtain the full code, including examples and tests, you can clone the git repository:

git clone https://github.com/kfrlib/kfr.git

Building KFR C API

Windows

These commands must be executed in MSVC2017 command prompt

cd <path_to_kfr_repository>
mkdir build && cd build
cmake -GNinja -DENABLE_CAPI_BUILD=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER="<PATH_TO_LLVM_DIR>/bin/clang-cl.exe" ..
ninja kfr_capi

Linux, macOS, other

cd <path_to_kfr_repository>
mkdir build && cd build
cmake -GNinja -DENABLE_CAPI_BUILD=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ ..
ninja kfr_capi

ArchLinux Package

KFR is available on the ArchLinux User Repository (AUR). You can install it with an AUR helper, like yay, as follows:

yay -S kfr

To discuss any issues related to this AUR package refer to the comments section of kfr.

Prebuilt binaries will be available soon.

Including in CMake project

CMakeLists.txt contains these libraries:

  • kfr - header only interface library
  • kfr_dft - static library for DFT and related algorithms
  • kfr_io - static library for file IO and audio IO
# Include KFR subdirectory
add_subdirectory(kfr)

# Add header-only KFR to your executable or library, this sets include directories etc
target_link_libraries(your_executable_or_library kfr)

# Add KFR DFT to your executable or library, (cpp file will be built for this)
target_link_libraries(your_executable_or_library kfr_dft)

# Add KFR IO to your executable or library, (cpp file will be built for this)
target_link_libraries(your_executable_or_library kfr_io)

Makefile, command line etc (Unix-like systems)

# Add this to command line
-Ipath_to_kfr/include

# And this if needed
-lkfr_dft -lkfr_io

# C++17 mode must be enabled
-std=c++17
# or
-std=gnu++17

Linux

Prerequisites

  • GCC 7 or newer
  • Clang 6.0 or newer

Command line

cd <path_to_kfr>
mkdir build && cd build
cmake -DENABLE_TESTS=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release ..
make -- -j

Or using Ninja

cd <path_to_kfr>
mkdir build && cd build
cmake -GNinja -DENABLE_TESTS=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release ..
ninja

macOS

Prerequisites

  • XCode 9.x, 10.x or 11.x

Command line

Using Xcode project:

cd <path_to_kfr>
mkdir build && cd build
cmake -GXcode -DENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release ..
cmake --build .

Using Unix Makefiles:

cd <path_to_kfr>
mkdir build && cd build
cmake -G"Unix Makefiles" -DENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release ..
make -- -j

Or using Ninja:

cd <path_to_kfr>
mkdir build && cd build
cmake -GNinja -DENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release ..
ninja

Visual Studio

Prerequisites

  • Visual Studio 2017
  • Latest Clang (http://llvm.org/)
  • Ninja is highly recommended because Visual Studio does not support parallel build with Clang at this moment.

Visual Studio IDE

To work with KFR in Visual Studio you must add the path to the include directory inside KFR directory to the list of the project's include directories.
More details: https://docs.microsoft.com/en-us/cpp/ide/vcpp-directories-property-page?view=vs-2017

Make sure that LLVM toolset is set for the project

Download and install official LLVM extension:

More details: https://docs.microsoft.com/en-us/cpp/ide/general-property-page-project?view=vs-2017

LLVM/Clang has very good compatibility with MSVC ABI and it's widely used for building large projects on Windows (including Chrome), so switching to LLVM/Clang should not cause compatibility problems.

Command line

Using Ninja:

cd <path_to_kfr>
mkdir build && cd build
call "C:\<path to your Visual Studio installation>\VC\Auxiliary\Build\vcvars64.bat"
cmake -GNinja -DENABLE_TESTS=ON -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_CXX_FLAGS=-m64 -DCMAKE_BUILD_TYPE=Release ..
ninja

Or generate Visual Studio solution (building will be slower):

cd <path_to_kfr>
mkdir build && cd build
cmake -G"Visual Studio 15 2017 Win64" -DENABLE_TESTS=ON -Tllvm -DCMAKE_BUILD_TYPE=Release ..

MinGW/MSYS

Prerequisites

  • Latest MinGW or MSYS2
  • Clang 6.0 or newer

Using Makefiles:

cd <path_to_kfr>
mkdir build && cd build
cmake -DENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release ..
make -- -j

Using Ninja:

cd <path_to_kfr>
mkdir build && cd build
cmake -GNinja -DENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release ..
ninja

Documentation

Documentation home:

https://www.kfrlib.com/newdocs/

Built with

Branches

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

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

Tests

Every commit is tested in various OS, compilers, compiler settings etc.

You can run the tests using these commands:

cd <path_to_cmake_build_directory>
cd tests
ctest -V

Tested on the following systems:

macOS

  • (Intel AVX2) macOS 10.13.6 / Xcode 10 / AppleClang 10.0.0.10001145
  • (Intel AVX Azure Pipelines) macOS 10.13.6 / Xcode 10.1 / AppleClang 10.0.0.10001145
  • (Intel AVX Azure Pipelines) macOS 10.13.6 / Xcode 10 / AppleClang 10.0.0.10001145
  • (Intel AVX Azure Pipelines) macOS 10.13.6 / Xcode 9.4.1 / AppleClang 9.1.0.9020039
  • (Intel AVX Azure Pipelines) macOS 10.13.6 / Xcode 9.0.1 / AppleClang 9.0.0.9000038
  • (Intel AVX Azure Pipelines) macOS 10.13.6 / Xcode 8.3.3 / AppleClang 8.1.0.8020042
  • (Intel AVX2) macOS 10.11.6 / Xcode 7.3 / AppleClang 7.3.0.7030031
  • (Intel AVX2) macOS 10.11.4 / Xcode 7.3 / AppleClang 7.3.0.7030031
  • (ARMv7, ARMv7s, ARM64) macOS 10.11.6 / Xcode 7.3 / AppleClang 7.3.0.7030031
  • (Intel AVX) macOS 10.10.5 / Xcode 7.1 / AppleClang 7.0.0.7000176
  • (SSE4.2 Travis-CI) macOS 10.11.6 / Xcode 8 (beta4) / AppleClang 8.0.0.8000035
  • (SSE4.2 Travis-CI) macOS 10.11.5 / Xcode 7.3 / AppleClang 7.3.0.7030031
  • (SSE4.2 Travis-CI) macOS 10.11.5 / Xcode 7.2 / AppleClang 7.0.2.7000181
  • (SSE4.2 Travis-CI) macOS 10.10.5 / Xcode 7.1 / AppleClang 7.0.0.7000176
  • (SSE4.2 Travis-CI) macOS 10.10.5 / Xcode 7 / AppleClang 7.0.0.7000072
  • (SSE4.2 Travis-CI) macOS 10.10.5 / Xcode 6.4 / AppleClang 6.1.0.6020053
  • (SSE4.2 Travis-CI) macOS 10.10.3 / Xcode 6.3 / AppleClang 6.1.0.6020049

Ubuntu

  • (Intel AVX2) Ubuntu 18.04 / gcc-7.x / clang version 7.0.0 (tags/RELEASE_700/final)
  • (Intel AVX2) Ubuntu 16.04 / gcc-5.4.0 / clang version 3.8.0 (tags/RELEASE_380/final)
  • (ARMv7 NEON) Ubuntu 16.04 / gcc-5.4.0 / clang version 3.8.0 (tags/RELEASE_380/final)
  • (ARMv7 NEON) Ubuntu 14.04 / gcc-4.8.4 / clang version 3.8.0 (tags/RELEASE_380/final)
  • (ARMv7 NEON Travis-CI) Ubuntu 14.04 / gcc-4.8.4 / clang version 3.8.0 (tags/RELEASE_380/final)
  • (Intel AVX2 Travis-CI) Ubuntu 12.04 / gcc-5.4.0 / clang version 3.8.0 (tags/RELEASE_380/final)
  • (Intel AVX2 Travis-CI) Ubuntu 14.04 / gcc-5.3.0 (Ubuntu 5.3.0-3ubuntu1~14.04) 5.3.0 20151204 / clang version 3.8.0 (tags/RELEASE_380/final)

Windows

  • (Intel AVX512) Windows 10 / Visual Studio 2017 / Clang 7.0
  • (Intel AVX512) Windows 10 / Visual Studio 2017 / Clang 6.0
  • (Intel AVX2) Windows 10 / MinGW-W64 5.2 / clang version 3.8.0 (branches/release_38)
  • (Intel AVX2) Windows 10 / MinGW-W64 4.8 / clang version 3.8.0 (branches/release_38)
  • (Intel AVX) Windows 8.1 / MinGW-W64 5.4 / clang version 3.8.0 (branches/release_38)
  • (Intel AVX) Windows 8.1 / Visual Studio 2015 Update 2 / clang version 3.9.0 (SVN r273898 (27 June 2016))

Linux on Windows 10

  • (Intel AVX2) Windows 10.0.17134.407 compatible with Ubuntu 18.04 / gcc-7.x / clang version 7.0.0 (tags/RELEASE_700/final)
  • (Intel AVX2) Windows 10.0.14393 compatible with Ubuntu 14.04 / gcc-5.4.0 / clang version 3.8.0 (tags/RELEASE_380/final)

Planned for future versions

  • Parallel execution of algorithms
  • Serialization/Deserialization of any expression
  • More formats for audio file reading/writing

License

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

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

Issues
  • Make DFT compile with GCC

    Make DFT compile with GCC

    Fixes some issues preventing dft from compiling on GCC. Tested on gcc 6 & 7. gcc 6 gives warnings on required alignments, but it still passes the tests (KFR 3.0.9 avx2 64-bit (gcc-6.5.0/linux) +in running on avx2)

    opened by bmanga 18
  • [Implementation] Implementing a simple low pass filter

    [Implementation] Implementing a simple low pass filter

    I would like to use this library to implementing a low pass filter, instead of writing my own low pass filter, however, after spending some time looking at the examples and the documentation I am a bit lost in whether I can achieve what I want with kfr. If anyone could help me/point me in the right direction it would be much appreciated. Forgive me for my naivety I am not too exposed to DSP.

    Problem: I am receiving a data stream of samples (digital, just doubles) along with their associated timestamps. When I sample this data stream the data is noisy, as such I would like convert the sampled output of the data stream to a filtered less noisy sample, say filtering out data greater than some cutoff frequency. Note: I would not like to keep track of all the previous samples, (I know I need to keep track of the previous sample based on (1st order) low pass filter equations I am familiar with).

    From what I understand so far I can design parameters (taps) for a filter at specific cutoff frequencies and with a window method. However, after reading and running the example code on fir.cpp and looking at the output images (amplitude and gain plots) I am not sure what the cutoff value actually means. It does not seem to represent cutoff frequencies for a filter.

    From the output taps of designing the filter I can create a filter. Now my question is how I can use my filter on individual samples rather than the entire datastream. When I use filter.apply(output, input) can my input be a single sample? Another question I have is how to incorporate the associated timestamps along with the incoming samples? This information is vital for outputting a filtered sample.

    After some more research it seems that an IIR filter is a solution to my problem instead of a FIR filter. However, kfr does not seem to have any implementations of IIR filters, however there are biquad implementations, but I am still not sure how to specify my dt when I apply the filter on a single sample.

    As for the cutoff value, I know understand that to be the ratio: freq_cutoff/freq_sampling.

    opened by acxz 12
  • error: ‘audio_reader_flac’ was not declared in this scope

    error: ‘audio_reader_flac’ was not declared in this scope

    How to read a flac file?

    #include <kfr/base.hpp>
    #include <kfr/dsp.hpp>
    #include <kfr/io.hpp>
    
    int main() {
    
        audio_reader_flac<float> reader(open_file_for_reading("6319-64726-0013.flac"));
        return 0;
    }
    
    
    (kfr) [email protected]:~/kfr$ g++ -std=c++17 flacfileRead.cpp -o flacfileRead
    flacfileRead.cpp: In function ‘int main()’:
    flacfileRead.cpp:7:5: error: ‘audio_reader_flac’ was not declared in this scope
         audio_reader_flac<float> reader(open_file_for_reading("6319-64726-0013.flac"));
         ^~~~~~~~~~~~~~~~~
    flacfileRead.cpp:7:5: note: suggested alternative: ‘__io_read_fn’
         audio_reader_flac<float> reader(open_file_for_reading("6319-64726-0013.flac"));
         ^~~~~~~~~~~~~~~~~
         __io_read_fn
    flacfileRead.cpp:7:23: error: expected primary-expression before ‘float’
          audio_reader_flac<float> reader(open_file_for_reading("6319-64726-0013.flac"));
                            ^~~~~
    (kfr) [email protected]:~/kfr$ 
    

    Looking forward to your kind help. Marco

    opened by marcoippolito 9
  • g++ 7.1.1 and vec: requested alignment is not an integer constant

    g++ 7.1.1 and vec: requested alignment is not an integer constant

    Hi. I have a compilation error in the master branch of kfr.

    On an attempt to use the DFT with Linux and gcc 7.1.1, the following error is produced:

    thirdparty/kfr/include/kfr/base/simd_intrin.hpp: In instantiation of ‘struct kfr::vec<float, 4>’:
    thirdparty/kfr/include/kfr/base/simd_x86.hpp:11:44:   required from here
    thirdparty/kfr/include/kfr/base/simd_intrin.hpp:136:97: error: requested alignment is not an integer constant
     struct alignas(const_min(platform<>::maximum_vector_alignment, sizeof(T) * next_poweroftwo(N))) vec
    

    origin of the error

    From what I observe, recent gcc refuses to accept the parameter of alignas as a compile time constant. On the same machine I have also tested with clang and gcc5 and it builds with these other compilers.

    opened by jpcima 9
  • Build Failure [GCC]

    Build Failure [GCC]

    OS: ArchLinux GCC: 9.1 kfr: master ( 11d9a15) at the time of posting EDIT: same errors reported with the dev branch as well ( 1b4afb3) at the time of posting

    I am getting the following errors: error: requested alignment is not an integer constant. This issue is very similar to #16, however, that issue was fixed for GCC 8.x, but now I am getting the same issue on GCC 9.1.

    Here is a more complete sample of the output:

    /home/acxz/vcs/github/acxz/kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/simd.hpp: In instantiation of ‘struct kfr::sse2::intrinsics::simd_array<short int, 8>’:
    /home/acxz/vcs/github/acxz/kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1118:31:   required from ‘T kfr::sse2::intrinsics::simd_get_element(kfr::sse2::intrinsics::simd<T, N1>&, std::size_t) [with T = short int; long unsigned int N = 8; kfr::sse2::intrinsics::simd<T, N1> = __vector(2) long long int; std::size_t = long unsigned int]’
    /home/acxz/vcs/github/acxz/kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/vec.hpp:321:50:   required from ‘constexpr kfr::sse2::vec<T, N>::value_type kfr::sse2::vec<T, N>::get(std::size_t) const [with int dummy = 0; typename std::enable_if<((dummy == 0) && cometa::compound_type_traits<T>::is_scalar), cometa::details::unique_enum_impl<318>::type>::type <anonymous> = cometa::details::unique_enum_impl<318>::value; T = short int; long unsigned int N = 8; kfr::sse2::vec<T, N>::value_type = short int; std::size_t = long unsigned int]’
    /home/acxz/vcs/github/acxz/kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/vec.hpp:308:107:   required from ‘constexpr kfr::sse2::vec<T, N>::value_type kfr::sse2::vec<T, N>::operator[](std::size_t) const & [with T = short int; long unsigned int N = 8; kfr::sse2::vec<T, N>::value_type = short int; std::size_t = long unsigned int]’
    /home/acxz/vcs/github/acxz/kfr/include/kfr/io/impl/../../base/../simd/impl/basicoperators_generic.hpp:115:5:   required from here
    /home/acxz/vcs/github/acxz/kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/simd.hpp:70:35: error: requested alignment is not an integer constant
    

    Note: Clang 8.0 works fine.

    opened by acxz 7
  • make_univector doesn't work with std::vector

    make_univector doesn't work with std::vector

    Hi there,

    I tried to use make_univector function to convert input. However, when testing this example taken from the documentation page

    std::vector<float> data; // existing data, or std::array<N, float>
    float val = rms(make_univector(data)); // No data copy
    

    I got these errors:

    .../kfr-master/include/kfr/io/../base/univector.hpp:478:32: note: candidate function
          template not viable: requires 2 arguments, but 1 was provided
    KFR_INTRINSIC univector_ref<T> make_univector(T* data, size_t size)
                                   ^
    .../kfr-master/include/kfr/io/../base/univector.hpp:485:38: note: candidate function
          template not viable: requires 2 arguments, but 1 was provided
    KFR_INTRINSIC univector_ref<const T> make_univector(const T* data, size_t size)
    

    It seems that make_univector doesn't take std::vector, or did I get something wrong? Thanks.

    opened by rotkreis 6
  • kfr::complex / std::complex troubles

    kfr::complex / std::complex troubles

    Hi, I have trouble with float complex type. I try to use std::complex to make easier the integration with other code and I have compiler errors. for example with the resampler:

    .../include/kfr/dsp/sample_rate_conversion.hpp:115:25: error: invalid operands to binary expression ('kfr::sse2::samplerate_converter<std::complex >::ftype' (aka 'std::complex') and 'const long') cutoff = cutoff / std::max(decimation_factor, interpolation_factor); ~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .../include/kfr/dsp/sample_rate_conversion.hpp:404:12: note: in instantiation of member function 'kfr::sse2::samplerate_converter<std::complex >::samplerate_converter' requested here return samplerate_converter(quality, itype(interpolation_factor), itype(decimation_factor), scale, ^

    there is other errors with other kfr object, the resampler is just an example.

    Is kfr::c32 totally compatible with std::complex Or, what is the purpose of that type? Is it necessary to have 2 complex types?

    to bypass the problem I implement my dsp classes with kfr::complex and "cast" from my calling code with: auto ucpx = make_univector<kfr::c32>( reinterpret_cast<kfr::c32*>(m_cpx_buffer.data()), m_cpx_buffer.size());

    Is it correct? Is there a better way?

    with my best regards

    Resolved 
    opened by mipac 5
  • fft_accuracy test failure with Clang 11

    fft_accuracy test failure with Clang 11

    The testcase fft_accuracy fails quite badly after building with clang 11.

    ...
        type = float, size = 254; complex-inverse:
        [fail]    rms_diff_outofplace < min_prec | 6.27181 < 0.00140648
    [----RUN----] dct...
    [--SUCCESS--] 2 subtests of 2
    ===============================================================================
    [--SUCCESS--] 145/146 tests 2677857/2678067 checks
    [---ERROR---] 1/146 tests 210/2678067 checks
                  fft_accuracy
    
    • My development machine is running Fedora 33, and I build with clang-11, cmake 3.18.4 and Ninja, the cpu is an i7-10510U, and the build uses avx2.
    • It worked with clang-10, and interestingly enough I have seen no issues when building in debug either.
    • Also get a lot of psABI warnings, but don't think the ABI would pertain to this issue seeing how the tests are all in the same application built with the same toolchain.
    Compiler bug 
    opened by m-hagelin 5
  • Release 3.0.5 breaks Android Support

    Release 3.0.5 breaks Android Support

    Due to a custom implementation of pthreads in Android the latest release of KFR can not easily be included in an Android. The 3.0.5 release currently results in a build error of 'cannot find -lpthread' when adding KFR to CMakeList using add_subdirectory().

    https://developer.android.com/ndk/guides/stable_apis#clib

    Edit : I've added a branch in my project to illustrate the issue : https://github.com/Jman420/menrva/tree/feature/upgrade-kfr

    opened by Jman420 5
  • Overflow for small input lengths in zero latency biquad

    Overflow for small input lengths in zero latency biquad

    In the zero latency biquad expression the begin_block may overflow if the input source is less than the number of filters - 1:

    This line: https://github.com/kfrlib/kfr/blob/master/include/kfr/dsp/biquad.hpp#L178

    This code block assumes the input source will be greater than or equal to filters - 1 in length:

        CMT_INLINE void begin_block(cinput_t cinput, size_t size) const
        {
            block_end = size;
            for (size_t i = 0; i < filters - 1; i++)
            {
                const vec<T, 1> in = this->argument_first(cinput, i, vec_t<T, 1>());
                state.out = process(bq, state, insertleft(in[0], state.out));
            }
        }
    

    For real time audio applications this isn't going to be a good assumption for large numbers of filters.

    opened by codingkeith 5
  • kfrlib doesn't work at Qt 5.7.0

    kfrlib doesn't work at Qt 5.7.0

    Hi dlevin256, When I build my Qt project, it gives me the compile output, like this:

    /home/bearsuny/Libs/kfr-1.2.0/include/kfr/base/min_max.hpp:43: error: cannot convert ‘const simd_t {aka const __vector(16) unsigned char}’ to ‘__m128i {aka __vector(2) long long int}’ for argument ‘1’ to ‘__m128i _mm_min_epu8(__m128i, __m128i)’ And my project is simple, like this #include <QCoreApplication> #include <iostream> #include <kfr/dft.hpp> using namespace kfr; using namespace std; int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); return a.exec(); } The .pro file: QT += core QT -= gui CONFIG += c++14 TARGET = PipeMonitor CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cpp INCLUDEPATH += /home/bearsuny/Libs/kfr-1.2.0/include the version of kfrlib is 1.2.0 and I don't know that should I use kfrlib 1.0.0 or else? Thank you

    opened by Bearsuny 5
  • Need a method to change filter coefficients

    Need a method to change filter coefficients

    You can't assign a new filter it pops, I can't get to the biquad_block to modify the coefficients. Needs some method to get them or modify it while it is running without popping.

    opened by TomCoalfish 1
  • Availability of functionality

    Availability of functionality

    Hi.

    Are there any implementations of the following functionality in the KFR library, with intrinsics:

    • correlation of two vectors, with a single double-number output (Pearson correlation coefficient), and a correlation of two complex vectors;
    • shift of signal carrier frequency;
    • interpolation of signal samples with preservation of signal frequency characteristics (the one "resampling" on FFT is too slow) - like Farrow filter, using Lagrange polynomial?

    I tried but didn't find it.

    opened by trig-ger 0
  • Fix cometa ambiguities

    Fix cometa ambiguities

    Hello,

    I have been facing some issues installing KFR on a basic Ubuntu distribution. My setup is using a scientific framework (ROOT CERN) which is compiled with Clang10, and some other parts with GCC9.

    I had to update many namespace to avoid ambiguities between cometa:: and std:: methods. Here is a working update, that I compile using : mkdir build && cd build cmake -DENABLE_TESTS=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_COMPILER=clang++ -DENABLE_CAPI_BUILD=ON ../

    Can somebody have a look at that ?

    opened by xKZL 5
  • Build a test program with GCC9

    Build a test program with GCC9

    Hello,

    I have successfully built KFR (incl. C api) with shared library option enabled. Right now, I am trying to compile a class using GCC9 (std=c++17) including some basic call to dft.

    univector<complex<double>, 256> data = cexp(linspace(0, c_pi<double, 2>, 256) * make_complex(0, 1));
    univector<complex<double>, 256> freq;
        
    freq = dft(data);
    

    I am getting some issue like :

          ^
    In file included from input_line_9:5:
    In file included from /home/marcomeyer/Software/escalade/src/lib/UMO/include/UMO/TSignal.h:28:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/dft.hpp:25:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/base.hpp:25:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/math.hpp:25:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd.hpp:25:
    
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/comparison.hpp:28:
    
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/constants.hpp:28:
    /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/types.hpp:404:75: error: reference to 'is_same' is ambiguous
        is_same<T, float> || is_same<T, double> || is_same<T, signed char> || is_same<T, unsigned char> ||
                                                                              ^
    /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/../cometa.hpp:181:23: note: candidate found by name lookup is 'cometa::is_same'
    constexpr inline bool is_same = std::is_same<T1, T2>::value;
                          ^
    /usr/include/c++/9/type_traits:1285:12: note: candidate found by name lookup is 'std::is_same'
        struct is_same
    

    I thought about some conflict with "using namespace std;" so II removed these lines. but the problem still persist. Additionally I have noticed these error message as well:

    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/dft.hpp:25:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/base.hpp:25:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/math.hpp:25:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd.hpp:25:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/comparison.hpp:29:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/impl/function.hpp:25:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/impl/../../base/expression.hpp:29:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/impl/../../base/../simd/shuffle.hpp:28:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/mask.hpp:28:
    /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/vec.hpp:231:41: error: reference to 'is_convertible' is ambiguous
        template <typename U, KFR_ENABLE_IF(is_convertible<U, value_type>&& compound_type_traits<T>::is_scalar)>
                                            ^
    /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/impl/intrinsics.h:50:23: note: expanded from macro 'KFR_ENABLE_IF'
    #define KFR_ENABLE_IF CMT_ENABLE_IF
                          ^
    /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/../cometa.hpp:187:23: note: candidate found by name lookup is 'cometa::is_convertible'
    constexpr inline bool is_convertible = std::is_convertible<Tfrom, Tto>::value;
                          ^
    /usr/include/c++/9/type_traits:1328:12: note: candidate found by name lookup is 'std::is_convertible'
        struct is_convertible
               ^
    In file included from input_line_9:5:
    In file included from /home/marcomeyer/Software/escalade/src/lib/UMO/include/UMO/TSignal.h:28:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/dft.hpp:25:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/base.hpp:25:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/math.hpp:25:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd.hpp:25:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/comparison.hpp:29:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/impl/function.hpp:25:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/impl/../../base/expression.hpp:29:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/impl/../../base/../simd/shuffle.hpp:28:
    In file included from /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/mask.hpp:28:
    /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/vec.hpp:231:27: error: parameter declarator cannot be qualified
        template <typename U, KFR_ENABLE_IF(is_convertible<U, value_type>&& compound_type_traits<T>::is_scalar)>
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/impl/intrinsics.h:50:23: note: expanded from macro 'KFR_ENABLE_IF'
    #define KFR_ENABLE_IF CMT_ENABLE_IF
                          ^
    /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/../cometa.hpp:874:28: note: expanded from macro 'CMT_ENABLE_IF'
    #define CMT_ENABLE_IF(...) CMT_ENABLE_IF_IMPL(__LINE__, __VA_ARGS__)
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/marcomeyer/Software/kfr/4.2.1/include/kfr/simd/../cometa.hpp:870:95: note: expanded from macro 'CMT_ENABLE_IF_IMPL'
        typename ::std::enable_if<(__VA_ARGS__), typename ::cometa::details::unique_enum_impl<N>::type>::type =  \
                                                                                                ~~^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    

    Anybody might help me to understand or fix that issue ?

    opened by xKZL 0
  •  transfer function coefficients and v.s. Matlab

    transfer function coefficients and v.s. Matlab

    Hi, KFR Community, Thanks for the help in advance for two issues.

    1. how to get the transfer function coefficients of IIR, such as "the 8th-order Chebyshev type I filter, lowpass" below
      plot_save("chebyshev1_lowpass8", output,
                 options + ", title='8th-order Chebyshev type I filter, lowpass'");
      
       {
           zpk<fbase> filt                       = iir_lowpass(chebyshev2<fbase>(8, 80), 0.09);
           std::vector<biquad_params<fbase>> bqs = to_sos(filt);
           output                                = biquad<maxorder>(bqs, unitimpulse());
       }
      

    Code is from : https://github.com/kfrlib/kfr/blob/master/examples/iir.cpp

    I understand that "filt" contains zeor-pole-gain forms, any help function inside to get transfer function coefficients?

    1. I print out some information of "filt" for the " the 12th-order Butterworth filter, bandpass' below. They are different from Matlab code. Any hint to get the same results?
       zpk<fbase> filt = iir_bandstop(butterworth<fbase>(2), 0.0200, 0.6400);
        std::cout << "filt.k = " << filt.k << "\n";
        univector<complex<fbase>> z = filt.z;
        univector<complex<fbase>> p = filt.p;
    
        std::cout << "filt.z =  \n";
    
        for (int i = 0; i < z.size(); i++)
        {
            std::cout << z[i].real() << " + i " << z[i].imag() << "\n";
        }
    
        std::cout << "filt.p =  \n";
    
        for (int i = 0; i < z.size(); i++)
        {
            std::cout << p[i].real() << " + i " << p[i].imag() << "\n";
        }
    
        std::vector<biquad_params<fbase>> bqs = to_sos(filt);
    
        for (int i = 0; i < bqs.size(); i++)
        {
            biquad_params<fbase> norm = bqs[i].normalized_all();
            std::cout << "a =" << norm.a0 << ", " << norm.a1 << ", " << norm.a2 << " b=" << norm.b0 << ", "
                      << norm.b1 << ", " << norm.b2 << "\n";
        }
    `
       
     Output from KFR: 
    ```cpp
    filt.k = 0.190617
    filt.z =
    0.905633 + i 0.424062
    0.905633 + i 0.424062
    0.905633 + i -0.424062
    0.905633 + i -0.424062
    filt.p =
    0.955593 + i -0.0442401
    0.955593 + i 0.0442401
    -0.251103 + i 0.403472
    -0.251103 + i -0.403472
    

    Output from Matlab:

    >> fbands=[0.0200    0.6400]
    >> [bfz1,bfp1,bfk1]=butter(2,fbands,'bandpass')
    
    bfz1 =
    
         1
         1
        -1
        -1
    
    
    bfp1 =
    
      -0.2511 + 0.4035i
      -0.2511 - 0.4035i
       0.9556 + 0.0442i
       0.9556 - 0.0442i
    
    
    bfk1 =
    
        0.4127
    

    Bests, Bin

    opened by dbinlbl 0
  • Build fails on GCC-8

    Build fails on GCC-8

    Repro:

    $ sudo docker run -v $PWD/kfr:/kfr  -it ubuntu:18.04
    # apt update ; apt install cmake g++-8
    # mkdir build; cd build
    # cmake /kfr/ -DCMAKE_CXX_COMPILER=g++-8
    -- The CXX compiler identification is GNU 8.4.0
    -- Check for working CXX compiler: /usr/bin/g++-8
    -- Check for working CXX compiler: /usr/bin/g++-8 -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Detecting native cpu...
    -- DETECTED_CPU=avx2
    -- CPU_ARCH=avx2
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /build
    
    # make
    Scanning dependencies of target kfr_io
    Scanning dependencies of target detect_cpu
    [ 25%] Building CXX object CMakeFiles/detect_cpu.dir/cmake/detect_cpu.cpp.o
    [ 50%] Building CXX object CMakeFiles/kfr_io.dir/include/kfr/io/impl/audiofile-impl.cpp.o
    In file included from /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend.hpp:29,
                     from /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/vec.hpp:30,
                     from /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/mask.hpp:28,
                     from /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/shuffle.hpp:28,
                     from /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/expression.hpp:29,
                     from /kfr/include/kfr/io/impl/../../base/../simd/impl/function.hpp:25,
                     from /kfr/include/kfr/io/impl/../../base/../simd/impl/operators.hpp:28,
                     from /kfr/include/kfr/io/impl/../../base/../simd/operators.hpp:28,
                     from /kfr/include/kfr/io/impl/../../base/basic_expressions.hpp:28,
                     from /kfr/include/kfr/io/impl/../audiofile.hpp:28,
                     from /kfr/include/kfr/io/impl/audiofile-impl.cpp:27:
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:653:72: error: macro "_mm256_shuffle_ps" passed 7 arguments, but takes just 3
         return _mm256_shuffle_ps(t1, t2, shuffle_mask<8, 2, 3, 2, 3>::value);
                                                                            ^
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:661:72: error: macro "_mm256_shuffle_ps" passed 7 arguments, but takes just 3
         return _mm256_shuffle_ps(t1, t2, shuffle_mask<8, 0, 1, 0, 1>::value);
                                                                            ^
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1655:82: error: macro "_mm256_shuffle_ps" passed 7 arguments, but takes just 3
                 return _mm256_shuffle_ps(x, x, shuffle_mask<8, I0, I1, I2, I3>::value);
                                                                                      ^
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1676:75: error: macro "_mm256_blend_ps" passed 11 arguments, but takes just 3
                                                 1 - I6 / 4, 1 - I7 / 4>::value);
                                                                               ^
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1695:74: error: macro "_mm256_shuffle_ps" passed 5 arguments, but takes just 3
                 return _mm256_shuffle_ps(x, x, shuffle_mask<2, I0, I1>::value);
                                                                              ^
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1714:102: error: macro "_mm256_blend_pd" passed 7 arguments, but takes just 3
             return _mm256_blend_pd(t1, t2, shuffle_mask<4, I0 / 2, I1 / 2, 1 - I2 / 2, 1 - I3 / 2>::value);
                                                                                                          ^
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1727:91: error: macro "_mm_blend_ps" passed 7 arguments, but takes just 3
             return _mm_blend_ps(t1, t2, shuffle_mask<4, I0 / 4, I1 / 4, I2 / 4, I3 / 4>::value);
                                                                                               ^
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1733:94: error: macro "_mm_permute_ps" passed 6 arguments, but takes just 2
             t1        = _mm_permute_ps(t1, shuffle_mask<8, I0 % 4, I1 % 4, I2 % 4, I3 % 4>::value);
                                                                                                  ^
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1734:94: error: macro "_mm_permute_ps" passed 6 arguments, but takes just 2
             t2        = _mm_permute_ps(t2, shuffle_mask<8, I0 % 4, I1 % 4, I2 % 4, I3 % 4>::value);
                                                                                                  ^
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1735:91: error: macro "_mm_blend_ps" passed 7 arguments, but takes just 3
             return _mm_blend_ps(t1, t2, shuffle_mask<4, I0 / 4, I1 / 4, I2 / 4, I3 / 4>::value);
                                                                                               ^
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1747:75: error: macro "_mm_blend_pd" passed 5 arguments, but takes just 3
             return _mm_blend_pd(t1, t2, shuffle_mask<2, I0 / 2, I1 / 2>::value);
                                                                               ^
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1753:79: error: macro "_mm_permute_pd" passed 4 arguments, but takes just 2
             t1         = _mm_permute_pd(t1, shuffle_mask<2, I0 % 2, I1 % 2>::value);
                                                                                   ^
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1754:79: error: macro "_mm_permute_pd" passed 4 arguments, but takes just 2
             t2         = _mm_permute_pd(t2, shuffle_mask<2, I0 % 2, I1 % 2>::value);
                                                                                   ^
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1755:75: error: macro "_mm_blend_pd" passed 5 arguments, but takes just 3
             return _mm_blend_pd(t1, t2, shuffle_mask<2, I0 / 2, I1 / 2>::value);
                                                                               ^
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1764:91: error: macro "_mm_shuffle_ps" passed 7 arguments, but takes just 3
         return KFR_mm256_setr_m128(_mm_shuffle_ps(x, x, shuffle_mask<8, I0, I1, I2, I3>::value),
                                                                                               ^
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1765:91: error: macro "_mm_shuffle_ps" passed 7 arguments, but takes just 3
                                    _mm_shuffle_ps(x, x, shuffle_mask<8, I4, I5, I6, I7>::value));
                                                                                               ^
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1773:84: error: macro "_mm_shuffle_pd" passed 5 arguments, but takes just 3
         return KFR_mm256_setr_m128d(_mm_shuffle_pd(x, x, shuffle_mask<2, I0, I1>::value),
                                                                                        ^
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1774:84: error: macro "_mm_shuffle_pd" passed 5 arguments, but takes just 3
                                     _mm_shuffle_pd(x, x, shuffle_mask<2, I2, I3>::value));
                                                                                        ^
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp: In function 'kfr::avx2::intrinsics::simd<float, 8> kfr::avx2::intrinsics::simd_shuffle(kfr::avx2::intrinsics::simd_t<float, 16>, kfr::avx2::intrinsics::simd<float, 16>&, cometa::csizes_t<2, 3, 6, 7, 10, 11, 14, 15>, cometa::overload_priority<9>)':
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:653:12: error: '_mm256_shuffle_ps' was not declared in this scope
         return _mm256_shuffle_ps(t1, t2, shuffle_mask<8, 2, 3, 2, 3>::value);
                ^~~~~~~~~~~~~~~~~
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp: In function 'kfr::avx2::intrinsics::simd<float, 8> kfr::avx2::intrinsics::simd_shuffle(kfr::avx2::intrinsics::simd_t<float, 16>, kfr::avx2::intrinsics::simd<float, 16>&, cometa::csizes_t<0, 1, 4, 5, 8, 9, 12, 13>, cometa::overload_priority<9>)':
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:661:12: error: '_mm256_shuffle_ps' was not declared in this scope
         return _mm256_shuffle_ps(t1, t2, shuffle_mask<8, 0, 1, 0, 1>::value);
                ^~~~~~~~~~~~~~~~~
    [ 75%] Linking CXX executable detect_cpu
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp: In function 'kfr::avx2::intrinsics::simd<float, 8> kfr::avx2::intrinsics::simd_vec_shuffle(kfr::avx2::intrinsics::simd_t<float, 8>, kfr::avx2::intrinsics::simd<float, 8>&, cometa::csizes_t<I0, I1, I2, I3, I4, I5, I6, I7>)':
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1655:20: error: '_mm256_shuffle_ps' was not declared in this scope
                 return _mm256_shuffle_ps(x, x, shuffle_mask<8, I0, I1, I2, I3>::value);
                        ^~~~~~~~~~~~~~~~~
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1674:16: error: '_mm256_blend_ps' was not declared in this scope
             return _mm256_blend_ps(t1, t2,
                    ^~~~~~~~~~~~~~~
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp: In function 'kfr::avx2::intrinsics::simd<double, 4> kfr::avx2::intrinsics::simd_vec_shuffle(kfr::avx2::intrinsics::simd_t<double, 4>, kfr::avx2::intrinsics::simd<double, 4>&, cometa::csizes_t<I0, I1, I2, I3>)':
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1695:20: error: '_mm256_shuffle_ps' was not declared in this scope
                 return _mm256_shuffle_ps(x, x, shuffle_mask<2, I0, I1>::value);
                        ^~~~~~~~~~~~~~~~~
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1714:16: error: '_mm256_blend_pd' was not declared in this scope
             return _mm256_blend_pd(t1, t2, shuffle_mask<4, I0 / 2, I1 / 2, 1 - I2 / 2, 1 - I3 / 2>::value);
                    ^~~~~~~~~~~~~~~
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp: In function 'kfr::avx2::intrinsics::simd<float, 4> kfr::avx2::intrinsics::simd_vec_shuffle(kfr::avx2::intrinsics::simd_t<float, 8>, kfr::avx2::intrinsics::simd<float, 8>&, cometa::csizes_t<I0, I1, I2, I3>)':
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1727:16: error: '_mm_blend_ps' was not declared in this scope
             return _mm_blend_ps(t1, t2, shuffle_mask<4, I0 / 4, I1 / 4, I2 / 4, I3 / 4>::value);
                    ^~~~~~~~~~~~
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1733:21: error: '_mm_permute_p ' was not declared in this scope
             t1        = _mm_permute_ps(t1, shuffle_mask<8, I0 % 4, I1 % 4, I2 % 4, I3 % 4>::value);
                         ^~~~~~~~~~~~~~
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1735:16: error: '_mm_blend_ps' was not declared in this scope
             return _mm_blend_ps(t1, t2, shuffle_mask<4, I0 / 4, I1 / 4, I2 / 4, I3 / 4>::value);
                    ^~~~~~~~~~~~
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp: In function 'kfr::avx2::intrinsics::simd<double, 2> kfr::avx2::intrinsics::simd_vec_shuffle(kfr::avx2::intrinsics::simd_t<double, 4>, kfr::avx2::intrinsics::simd<double, 4>&, cometa::csizes_t<I0, I1>)':
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1747:16: error: '_mm_blend_pd' was not declared in this scope
             return _mm_blend_pd(t1, t2, shuffle_mask<2, I0 / 2, I1 / 2>::value);
                    ^~~~~~~~~~~~
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1753:22: error: '_mm_permute_p ' was not declared in this scope
             t1         = _mm_permute_pd(t1, shuffle_mask<2, I0 % 2, I1 % 2>::value);
                          ^~~~~~~~~~~~~~
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1755:16: error: '_mm_blend_pd' was not declared in this scope
             return _mm_blend_pd(t1, t2, shuffle_mask<2, I0 / 2, I1 / 2>::value);
                    ^~~~~~~~~~~~
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp: In function 'kfr::avx2::intrinsics::simd<float, 8> kfr::avx2::intrinsics::simd_vec_shuffle(kfr::avx2::intrinsics::simd_t<float, 4>, kfr::avx2::intrinsics::simd<float, 4>&, cometa::csizes_t<I0, I1, I2, I3, I4, I5, I6, I7>)':
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1764:32: error: '_mm_shuffle_p ' was not declared in this scope
         return KFR_mm256_setr_m128(_mm_shuffle_ps(x, x, shuffle_mask<8, I0, I1, I2, I3>::value),
                                    ^~~~~~~~~~~~~~
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp: In function 'kfr::avx2::intrinsics::simd<double, 4> kfr::avx2::intrinsics::simd_vec_shuffle(kfr::avx2::intrinsics::simd_t<double, 2>, kfr::avx2::intrinsics::simd<double, 2>&, cometa::csizes_t<I0, I1, I2, I3>)':
    /kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1773:33: error: '_mm_shuffle_p ' was not declared in this scope
         return KFR_mm256_setr_m128d(_mm_shuffle_pd(x, x, shuffle_mask<2, I0, I1>::value),
                                     ^~~~~~~~~~~~~~
    [ 75%] Built target detect_cpu
    CMakeFiles/kfr_io.dir/build.make:62: recipe for target 'CMakeFiles/kfr_io.dir/include/kfr/io/impl/audiofile-impl.cpp.o' failed
    make[2]: *** [CMakeFiles/kfr_io.dir/include/kfr/io/impl/audiofile-impl.cpp.o] Error 1
    CMakeFiles/Makefile2:136: recipe for target 'CMakeFiles/kfr_io.dir/all' failed
    make[1]: *** [CMakeFiles/kfr_io.dir/all] Error 2
    Makefile:129: recipe for target 'all' failed
    make: *** [all] Error 2
    
    opened by jcelerier 1
Releases(4.2.1)
  • 4.2.1(Apr 29, 2021)

  • 4.2.0(Mar 31, 2020)

    Added

    • ENABLE_DFT_MULTIARCH cmake option can be used to build kfr_dft with multiple architectures support (x86/x86_64 only)
    • config.h is generated during install step with all #defines needed for correct usage of installed libraries

    Changed

    • CMAKE_INSTALL_PREFIX is reset to empty on Win32 (can be overriden in cmake command line)
    • C API binary is now installed using install command (make install, ninja install or cmake --build . --target install)
    Source code(tar.gz)
    Source code(zip)
  • 4.1.0(Mar 4, 2020)

    Added

    • MSVC2019 support (16.4.4 is required)
    • Stateless short_fir expression (thanks to https://github.com/slarew)
    • biquad_filter constructor taking std::vector<biquad_params<T>> (thanks to https://github.com/BenjaminNavarro)
    • cabssqr function (thanks to https://github.com/slarew)
    • moving_sum expression (thanks to https://github.com/slarew)
    • gen_expj generator (thanks to https://github.com/slarew)

    Changed

    • cdirect_t{} is now allowed in real dft plan methods for compatibility
    • complex support for convolve_filter (thanks to https://github.com/slarew)

    Fixed

    • GCC debug build (thanks to https://github.com/BenjaminNavarro)
    • is_invocable_r_impl fallback for missing C++17 feature
    • std::complex compatibility (thanks to https://github.com/slarew)
    • Various CI fixes
    Source code(tar.gz)
    Source code(zip)
  • 4.0.0(Dec 5, 2019)

    • IIR filter design
      • Butterworth
      • Chebyshev type I and II
      • Bessel
      • Lowpass, highpass, bandpass and bandstop filters
      • Conversion of arbitrary filter from Z,P,K to SOS format (suitable for biquad function and filter)
    • Discrete Cosine Transform type II (and its inverse, also called DCT type III)
    • cmake uninstall target (thank to @acxz)
    • C API: DFT, real DFT, DCT, FIR and IIR filters and convolution, memory allocation
      • Built for SSE2, SSE4.1, AVX, AVX2, AVX512, x86 and x86_64, architecture is selected at runtime
      • Can be used with any compiler and any language with ability to call C functions
      • Prebuilt windows binaries
    • C++17
      • Inline variables
      • Fold expressions
      • Structured binding
    • New vector based types: color, rectangle, point, size, border, geometric vector, 2D matrix
    • Color space conversion (sRGB, XYZ, Lab, LCH)
    • MP3 file reading (using third party dr_lib library, see source code for details)
    • Various optimizations and fixes (thank to @bmanga, @ncorgan, @rotkreis, @mujjingun for fixes and bug reports)

    Release notes

    • MSVC support is limited to MSVC2017 due to ICE in MSVC2019. Once fixed, support will be added
    • DFT is limited to Clang due to ICE in MSVC and broken AVX optimization in GCC 8 and 9. Once fixed, support will be added

    See full change log in CHANGELOG.md

    Source code(tar.gz)
    Source code(zip)
    KFR.4.0.0.Windows.x86.zip(2.62 MB)
    KFR.4.0.0.Windows.x86_64.zip(2.75 MB)
  • 4.0.0-rc(Dec 4, 2019)

    • IIR filter design
      • Butterworth
      • Chebyshev type I and II
      • Bessel
      • Lowpass, highpass, bandpass and bandstop filters
      • Conversion of arbitrary filter from Z,P,K to SOS format (suitable for biquad function and filter)
    • Discrete Cosine Transform type II (and its inverse, also called DCT type III)
    • cmake uninstall target (thank to @acxz)
    • C API: DFT, real DFT, DCT, FIR and IIR filters and convolution, memory allocation
      • Built for SSE2, SSE4.1, AVX, AVX2, AVX512, x86 and x86_64, architecture is selected at runtime
      • Can be used with any compiler and any language with ability to call C functions
      • Prebuilt windows binaries
    • C++17
      • Inline variables
      • Fold expressions
      • Structured binding
    • New vector based types: color, rectangle, point, size, border, geometric vector, 2D matrix
    • Color space conversion (sRGB, XYZ, Lab, LCH)
    • MP3 file reading (using third party dr_lib library, see source code for details)
    • Various optimizations and fixes (thank to @bmanga, @ncorgan, @rotkreis, @mujjingun for fixes and bug reports)

    Release notes

    • MSVC support is limited to MSVC2017 due to ICE in MSVC2019. Once fixed, support will be added
    • DFT is limited to Clang due to ICE in MSVC and broken AVX optimization in GCC 8 and 9. Once fixed, support will be added
    Source code(tar.gz)
    Source code(zip)
    kfr_capi.h(10.32 KB)
    kfr_capi_x32.dll(8.15 MB)
    kfr_capi_x64.dll(8.08 MB)
  • 3.0.9(Apr 2, 2019)

    Changes since KFR 3.0.8

    Added

    • reduce supports different types and containers other than univector
    • Assignment operators for univector: +=, *= etc
    • concatenate function to concatenate two expressions sequentially
    • Audio file IO: read_channels/write_channels to read channels data directly without interleaving/deinterleaving
    • as_string: support for std::vector

    Changed

    • expression_scalar: support for vec<T>

    Fixed

    • CPU detection in cmake subdirectory
    • MSVC 2017 32-bit intrinsics
    Source code(tar.gz)
    Source code(zip)
  • v3.0.8(Mar 15, 2019)

    Changes since KFR 2.x

    • Optimized non-power of two DFT implementation
    • DFT speeds have been improved by up to 15% on most modern cpus
    • MSVC 2017 support
    • GCC 7+ support
    • Full AVX-512 support
    • EBU R128
    • Ability to include KFR as a subdirectory in cmake project
    • Ability to link objects built for multiple architectures into one binary
    • Number of automatic tests has been increased
    • C API for DFT
    • WAV file reading/writing and FLAC file reading (based on included https://github.com/mackron/dr_libs)
    • GPL version changed from 3 to 2+
    • Support for resampling complex vectors
    • Various performance improvements
    • Portability and stability fixes

    Tested OS/compiler

    • macOS High Sierra/Xcode 10.1
    • macOS High Sierra/Xcode 10
    • macOS High Sierra/Xcode 9.4.1
    • macOS High Sierra/Xcode 9.0.1
    • macOS High Sierra/Xcode 8.3.3
    • Windows/Visual Studio 2017
    • Windows/Clang 6.0.0
    • Windows/Clang 7.0.0
    • Windows/Clang 7.0.1
    • MinGW Windows/Clang 6.0.0
    • MinGW Windows/Clang 7.0.0
    • MinGW Windows/Clang 7.0.1
    • MinGW Windows/GCC 7.3.0
    • MinGW Windows/GCC 8.2.0
    • Ubuntu Linux 18.04/GCC 7.3.0
    • Ubuntu Linux 18.04/GCC 8.2.0
    • Ubuntu Linux 16.04/GCC 8.1.0
    • Ubuntu Linux 16.04/GCC 7.3.0
    • Ubuntu Linux 16.04/GCC 7.4.0
    • Ubuntu Linux 16.04/Clang 6.0.1
    • Ubuntu Linux 18.04/Clang 4.0
    • Android R19

    Tested architectures

    • Generic (without SIMD)
    • x86
    • x86_64 (AMD64)
    • SSE
    • SSE2
    • SSE3
    • SSSE3
    • SSE4.1
    • SSE4.2
    • AVX
    • AVX2
    • FMA
    • AVX512
    • ARM NEON
    • ARM64 NEON
    Source code(tar.gz)
    Source code(zip)
  • v3.0.7(Mar 13, 2019)

    Changes since KFR 2.x

    • Optimized non-power of two DFT implementation
    • DFT speeds have been improved by up to 15% on most modern cpus
    • MSVC 2017 support
    • GCC 7+ support
    • Full AVX-512 support
    • EBU R128
    • Ability to include KFR as a subdirectory in cmake project
    • Ability to link objects built for multiple architectures into one binary
    • Number of automatic tests has been increased
    • C API for DFT
    • WAV file reading/writing and FLAC file reading (based on included https://github.com/mackron/dr_libs)
    • GPL version changed from 3 to 2+
    • Support for resampling complex vectors
    • Various performance improvements
    • Portability and stability fixes

    Tested OS/compiler

    • macOS High Sierra/Xcode 10.1
    • macOS High Sierra/Xcode 10
    • macOS High Sierra/Xcode 9.4.1
    • macOS High Sierra/Xcode 9.0.1
    • macOS High Sierra/Xcode 8.3.3
    • Windows/Visual Studio 2017
    • Windows/Clang 6.0.0
    • Windows/Clang 7.0.0
    • Windows/Clang 7.0.1
    • MinGW Windows/Clang 6.0.0
    • MinGW Windows/Clang 7.0.0
    • MinGW Windows/Clang 7.0.1
    • MinGW Windows/GCC 7.3.0
    • MinGW Windows/GCC 8.2.0
    • Ubuntu Linux 18.04/GCC 7.3.0
    • Ubuntu Linux 18.04/GCC 8.2.0
    • Ubuntu Linux 16.04/GCC 8.1.0
    • Ubuntu Linux 16.04/GCC 7.3.0
    • Ubuntu Linux 16.04/GCC 7.4.0
    • Ubuntu Linux 16.04/Clang 6.0.1
    • Ubuntu Linux 18.04/Clang 4.0
    • Android R19

    Tested architectures

    • Generic (without SIMD)
    • x86
    • x86_64 (AMD64)
    • SSE
    • SSE2
    • SSE3
    • SSSE3
    • SSE4.1
    • SSE4.2
    • AVX
    • AVX2
    • FMA
    • AVX512
    • ARM NEON
    • ARM64 NEON
    Source code(tar.gz)
    Source code(zip)
  • v3.0.5-rc(Mar 1, 2019)

    • Optimized non-power of two DFT implementation
    • GCC 7+ support
    • MSVC 2017 support
    • Full AVX-512 support
    • EBU R128
    • Ability to include KFR as a subdirectory in cmake project
    • Ability to link objects built for multiple architectures into one binary
    • Number of automatic tests has been increased
    • C API for DFT
    • GPL version changed from 3 to 2+
    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Sep 9, 2016)

    New features and notable changes:

    • Real-to-complex and complex-to-real FFT
    • FFT plan caching
    • Cross-correlation and auto-correlation
    • Initial support for GCC and other compilers
    • Compile times have been reduced by 10 times in Debug mode
    • New function to partition expression for parallel execution
    • Faster implementations for many functions
    • Various small improvements and fixes
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Aug 26, 2016)

    New features:

    • Zero latency biquad filter
    • Documentation has been written for many functions
    • Access to the internal state of expressions and their operands
    • Ability to replace arguments in existing expressions
    • phasor function to easily setup oscillators
    • expression_adjacent: call a binary function on the adjacent elements of the input expression
    • Virtual base classes for the user-defined expressions
    • dspplot python library: New parameter div_by_N
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Aug 12, 2016)

    Added in version 1.0:

    • Full ARM NEON support
    • Stereo conversion (LR -> MS, MS -> LR)
    • DC remover
    • Fast Upsample/Downsample by powers of two
    • Lots of improvements and fixes
    Source code(tar.gz)
    Source code(zip)
  • v0.9.3-prerelease(Aug 4, 2016)

A wrapper for intel SSE/AVX vector instructions

VMath A wrapper for intel SSE/AVX vector instructions This is just a toy thing to figure out what working with intrinsics is like. I tried to keep it

Dennis 7 Apr 24, 2022
SIMD (SSE) implementation of the infamous Fast Inverse Square Root algorithm from Quake III Arena.

simd_fastinvsqrt SIMD (SSE) implementation of the infamous Fast Inverse Square Root algorithm from Quake III Arena. Why Why not. How This video explai

Liam 7 Jan 28, 2022
Header only FFT library

dj_fft: Header-only FFT library Details This repository provides a header-only library to compute fourier transforms in 1D, 2D, and 3D. Its goal is to

Jonathan Dupuy 119 Jun 27, 2022
Kraken is an open-source modern math library that comes with a fast-fixed matrix class and math-related functions.

Kraken ?? Table of Contents Introduction Requirement Contents Installation Introduction Kraken is a modern math library written in a way that gives ac

yahya mohammed 24 Mar 28, 2022
✨sigmatch - Modern C++ 20 Signature Match / Search Library

sigmatch Modern C++ 20 Signature Match / Search Library ✨ Features ?? Header-only, no dependencies, no exceptions. ☕ Compile-time literal signature st

Sprite 35 Jun 22, 2022
A modern, C++20-native, single-file header-only dense 2D matrix library.

A modern, C++20-native, single-file header-only dense 2D matrix library. Contents Example usage creating matrices basic operations row, col, size, sha

feng wang 45 May 11, 2022
Random for modern C++ with convenient API

Random for modern C++ with convenient API Design goals Supported compilers Integration Five-minute tutorial Number range Common type number range Char

Ilya Polishchuk 685 Jun 24, 2022
SymEngine is a fast symbolic manipulation library, written in C++

SymEngine SymEngine is a standalone fast C++ symbolic manipulation library. Optional thin wrappers allow usage of the library from other languages, e.

null 859 Jun 25, 2022
Fast math tool written on asm/c

math_tool fast math tool written on asm/c This project was created for easy use of mathematical / geometric rules and operations. This project contain

portable executable 3 Mar 8, 2022
Blazing-fast Expression Templates Library (ETL) with GPU support, in C++

Expression Templates Library (ETL) 1.3.0 ETL is a header only library for C++ that provides vector and matrix classes with support for Expression Temp

Baptiste Wicht 201 Jun 4, 2022
(Python, R, C++) Library-agnostic evaluation framework for implicit-feedback recommender systems

RecoMetrics Library-agnostic evaluation framework for implicit-feedback recommender systems that are based on low-rank matrix factorization models or

null 16 Apr 19, 2022
C++ image processing and machine learning library with using of SIMD: SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX-512, VMX(Altivec) and VSX(Power7), NEON for ARM.

Introduction The Simd Library is a free open source image processing and machine learning library, designed for C and C++ programmers. It provides man

Ihar Yermalayeu 1.6k Jun 24, 2022
C++ wrappers for SIMD intrinsics and parallelized, optimized mathematical functions (SSE, AVX, NEON, AVX512)

C++ wrappers for SIMD intrinsics and parallelized, optimized mathematical functions (SSE, AVX, NEON, AVX512)

Xtensor Stack 1.4k Jun 24, 2022
Faster Non-Integer Sample Rate Conversion

Non-Integer Sample Rate Conversion This repository contains a comparison of sample-rate conversion (SRC) algorithms, with an emphasis on performance f

null 23 Mar 6, 2022
Math library using hlsl syntax with SSE/NEON support

HLSL++ Small header-only math library for C++ with the same syntax as the hlsl shading language. It supports any SSE (x86/x64 devices like PC, Mac, PS

null 253 Jun 13, 2022
A wrapper for intel SSE/AVX vector instructions

VMath A wrapper for intel SSE/AVX vector instructions This is just a toy thing to figure out what working with intrinsics is like. I tried to keep it

Dennis 7 Apr 24, 2022
Neon - neon - an HTTP/1.1 and WebDAV client library with a C API

neon neon is an HTTP and WebDAV client library, with a C language API. Mailing list: [email protected] || Web site: https://notroj.github.io/n

Joe Orton 67 Jun 22, 2022
Fft-benchmark - A benchmark for comparison of FFT algorithms performance

FFT benchmark A benchmark for comparison of FFT algorithms performance. Currently supports Intel IPP, KFR, FFTW and KissFFT. Requires: Clang 6.0+ (GCC

KFR 16 Apr 7, 2022
This repo is for the open source DSP filters made for alt:V.

voice-filters This repo is for the open source DSP filters made for alt:V. Editing & building Run generate.bat and find the Visual Studio project file

altMP team 4 Jun 16, 2022
DSP C++ audio filters

DSP filters in C++ This repo contains some DSP biquad filters used in audio. I've extracted those filters from the Designing Audio Effect Plug-Ins in

Dimitris Tassopoulos 77 Jun 8, 2022
SIMD (SSE) implementation of the infamous Fast Inverse Square Root algorithm from Quake III Arena.

simd_fastinvsqrt SIMD (SSE) implementation of the infamous Fast Inverse Square Root algorithm from Quake III Arena. Why Why not. How This video explai

Liam 7 Jan 28, 2022
A fast character conversion and transliteration library based on the scheme defined for Japan National Tax Agency (国税庁) 's corporate number (法人番号) system.

jntajis-python Documentation: https://jntajis-python.readthedocs.io/ What's JNTAJIS-python? JNTAJIS-python is a transliteration library, specifically

Open Collector, Inc. 12 May 16, 2022
A fast Perforce to Git conversion tool written in C++ using Perforce Helix Core C++ API and Libgit2

P4 Fusion A fast Perforce depot to Git repository converter using the Helix Core C/C++ API as an attempt to mitigate the performance bottlenecks in gi

Salesforce 49 May 23, 2022
Blazing fast, composable, Pythonic quantile filters.

Rolling Quantiles for NumPy Hyper-efficient and composable filters. Simple, clean, intuitive interface. Supports streaming data or bulk processing. Py

Myrl Marmarelis 120 Jun 2, 2022
OpenGL Demo: Simulating Ocean Waves with FFT

OceanFFT Realistic ocean wave simulation, primarily based on J. Tessendorf's paper, using OpenGL compute shaders. Checkout the demo video here. In the

Achal Pandey 59 Jun 9, 2022
A colorful FFT programm demonstrating acoustic data decomposition. For profit and fun.

FFT power spectrum visualizer A high-quality demonstration of the application can be found at https://www.youtube.com/watch?v=AaJ25F8pjOw https://www.

Long Nguyen 29 Nov 10, 2021
Header only FFT library

dj_fft: Header-only FFT library Details This repository provides a header-only library to compute fourier transforms in 1D, 2D, and 3D. Its goal is to

Jonathan Dupuy 119 Jun 27, 2022
Experiments using the RPI Zero GPU for FFT (1D and 2D)

RPI0_GPU_FFT Experiments using the RPI Zero GPU for FFT/IFFT 1D/2D For an input 4194304 (1D), the GPU was around 7X faster than np.fft.fft and np.fft.

Ricardo de Azambuja 27 Jun 20, 2022
Command line C++ and Python VSTi Host library with MFCC, FFT, RMS and audio extraction and .wav writing.

______ _ ___ ___ | ___ \ | | | \/ | | |_/ /___ _ __ __| | ___ _ __| . . | __ _ _ __

Leon Fedden 280 Jun 28, 2022