RustFFT | A mixed-radix FFT library written in pure Rust | Video Utils library

 by   awelkie Rust Version: Current License: Non-SPDX

kandi X-RAY | RustFFT Summary

kandi X-RAY | RustFFT Summary

RustFFT is a Rust library typically used in Video, Video Utils applications. RustFFT has no bugs, it has no vulnerabilities and it has low support. However RustFFT has a Non-SPDX License. You can download it from GitHub.

RustFFT is a mixed-radix FFT implementation written in Rust. See the documentation for more details.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              RustFFT has a low active ecosystem.
              It has 188 star(s) with 17 fork(s). There are 10 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 3 open issues and 21 have been closed. On average issues are closed in 287 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of RustFFT is current.

            kandi-Quality Quality

              RustFFT has 0 bugs and 0 code smells.

            kandi-Security Security

              RustFFT has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              RustFFT code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              RustFFT has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              RustFFT releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of RustFFT
            Get all kandi verified functions for this library.

            RustFFT Key Features

            No Key Features are available at this moment for RustFFT.

            RustFFT Examples and Code Snippets

            No Code Snippets are available at this moment for RustFFT.

            Community Discussions

            QUESTION

            How to modify and then inverse complex data that went through FFT algorithm?
            Asked 2022-Feb-28 at 15:27

            I wrote a low-pass filter based around the FFT algorithm.

            First I process the input data using forward FFT, then I decrease the "volume" of parts of the resulting spectrum, then I put the data into the inverse FFT and finally I normalize the data like this:

            ...

            ANSWER

            Answered 2022-Feb-28 at 13:30

            There are two issues with your code:

            1. Since you want to process real data (i.e. data whose imaginary part is 0), the output of the forward FFT is symmetrical and you need to apply the same coefficient to matching frequencies (i.e. spectrum[i] and spectrum[spectrum.len() - i], remembering that spectrum[0] stands alone, and so does spectrum[spectrum.len()/2] if the length is even).

            2. If the frequencies are symmetrical, the result of the inverse FFT should be real (i.e. the imaginary part should be 0 ± small rounding errors). Therefore your normalize function should use x.re instead of x.norm(), which will allow it to retain its sign.

            Source https://stackoverflow.com/questions/71293024

            QUESTION

            What do I have to do to change the visuals of my audio visualizer?
            Asked 2021-Aug-08 at 20:07

            I created my own audio visualizer in rust where I have the amplitude of each frequency stored as [f32; 3750].

            I use cpal as audio backend with f32 audio samples, 2 channels and a 44.1khz sample rate.

            I converted those samples using rustfft like this:

            ...

            ANSWER

            Answered 2021-Aug-08 at 20:07

            Your code is, in a sense, fine; what you are seeing are basic problems with interpreting the FFT, not with computing it.

            First, the FFT is naturally a function from complex samples to complex samples. When you start with a real-valued input signal and convert it to complex by adding a zero imaginary component (or any other simple value, even copying the real input_buffer[i]), the output will always be a mirrored spectrum.

            (Complex-valued signals can have arbitrarily asymmetric spectra, distinguishing positive frequencies from negative ones. This is not widely useful in audio, but it is fundamental to software-defined radio (SDR) applications of FFT and other DSP operations.)

            In order to not get the mirroring, you must discard one half of the output. (It's slightly more efficient — though not 50%, if I recall correctly — to skip computing that half, but it doesn't look like rustfft offers that option.)

            If you discard the upper half of the output (in terms of array indices), then you will find that the remaining “frequency bins” are arranged from 0 Hz up to 22.05 kHz. The library documentation notes this:

            Output Order

            Elements in the output are ordered by ascending frequency, with the first element corresponding to frequency 0.

            Applications that do use the second half of the spectrum often swap the two halves, so that instead of a range of 0 Hz to [sampling frequency]/2, they go from −[sampling frequency]/2 to +[sampling frequency]/2. But since you're starting with a real, not complex, signal, this doesn't apply to you; I just mention it since you might have seen it in other plots that have 0 Hz at the center.

            The drop-off which is visible in the center of your image corresponds to the high-pass anti-aliasing filter required in any digital signal processing. It should appear at the right edge once you've discarded the right half.

            Finally, your code does not appear to have any windowing applied to the input signal. Windowing is a complex topic, but it is necessary to account for the fact that the FFT presumes a periodic signal which exactly repeats over the length of the input buffer, but we're actually feeding it a signal whose period is not an even division of the input buffer; windowing dampens the effects of this by attenuating the beginning and ending portions of the signal.

            You should look up a standard window function and apply it to your input data before the FFT; this should reduce the secondary peak you're observing.

            Source https://stackoverflow.com/questions/68702132

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install RustFFT

            You can download it from GitHub.
            Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.

            Support

            Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/awelkie/RustFFT.git

          • CLI

            gh repo clone awelkie/RustFFT

          • sshUrl

            git@github.com:awelkie/RustFFT.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link