#real-time-audio #fft #spectrogram #audio

aloe-fft-demo

Provides an advanced demonstration of real-time FFT and spectrogram visualization using Rust. Ideal for audio signal processing and dynamic frequency analysis. This crate is a translation of the c++ juce module serving the same function.

1 unstable release

Uses new Rust 2024

new 0.1.1 Apr 3, 2025

#8 in #spectrogram


Used in aloe-exports

GPL-3.0 license

1MB
11K SLoC

Aloe FFT Demo

The aloe-fft-demo crate is designed to provide a sophisticated demonstration of real-time Fast Fourier Transform (FFT) processing within Rust. It employs FFT to visualize audio signals through a dynamic spectrogram. This crate is particularly beneficial for users interested in audio signal processing, visualization, and transformations.

Features

  • Real-Time Audio Processing: The SimpleFFTDemo struct enables real-time audio capture and FFT processing on the incoming audio stream.
  • Spectrogram Visualization: Captures and visualizes the frequency domain representation via spectrogram images.
  • Efficient Data Handling: Utilizes a circular FIFO buffer for efficient sample data handling, ensuring low-latency processing.

Usage

To leverage the functionalities provided by this crate, instantiate SimpleFFTDemo within your application and invoke methods such as prepare_to_play, get_next_audio_block, and paint for rendering. Here is a succinct example:

use aloe_fft_demo::SimpleFFTDemo;

fn main() {
    let mut fft_demo = SimpleFFTDemo::default();
    // Configure your audio system, and begin processing
}

Technical Insights

This crate employs the Fast Fourier Transform to convert time-domain signal samples into frequency-domain data. The draw_next_line_of_spectrogram method efficiently shifts existing image data and renders new FFT results, providing a scrolling spectrogram effect.

The implementation leverages:

  • Optimized FFT Transform: Through frequency-only forward transformations for rapid calculations.
  • FIFO and FFT Data Buffers: Specifically sized for seamless handling of sample data and transform operations.

Installation

Add the following to your Cargo.toml:

[dependencies]
aloe-fft-demo = "0.1.0"

License

GPL-3.0


This README.md file was generated by an AI model and may not be 100% accurate, however, it should be pretty good.

This crate is a translation of the JUCE module.

JUCE is a c++ software framework for developing high performance audio applications.

Usage falls under the GPLv3 as well as the JUCE commercial license.

See github.com/juce-framework/JUCE and the JUCE license page for details.

This crate is in the process of being translated from c++ to rust. For progress updates, please see the workspacer rust project.

Dependencies

~40MB
~639K SLoC