Skip to main content

Module analysis

Module analysis 

Source
Expand description

FFT-based frequency analysis for recorded signals

This module provides functions to analyze recorded audio signals and extract:

  • Frequency spectrum (magnitude in dBFS)
  • Phase spectrum (compensated for latency)
  • Latency estimation via cross-correlation
  • Microphone compensation for calibrated measurements
  • Standalone WAV buffer analysis (wav2csv functionality)

Structs§

AnalysisResult
Result of FFT analysis
MicrophoneCompensation
Microphone compensation data (frequency response correction)
WavAnalysisConfig
Configuration for standalone WAV buffer analysis
WavAnalysisOutput
Result of standalone WAV buffer analysis

Functions§

analyze_recording
Analyze a recorded WAV file against a reference signal
analyze_wav_buffer
Analyze a buffer of audio samples and return frequency response
analyze_wav_file
Analyze a WAV file and return frequency response
compute_clarity_broadband
Compute Clarity (C50, C80) from Impulse Response (Broadband) Returns (C50_dB, C80_dB)
compute_clarity_spectrum
Compute Clarity spectrum (C50, C80) using octave band filtering Returns (C50_vec, C80_vec)
compute_group_delay
Compute group delay from phase data Group delay = -d(phase)/d(frequency) / (2*pi)
compute_impulse_response_from_fr
Compute impulse response from frequency response using approximated inverse FFT
compute_rt60_broadband
Compute RT60 from Impulse Response (Broadband) Uses T20 (-5dB to -25dB) extrapolation
compute_rt60_spectrum
Compute RT60 spectrum using octave band filtering
compute_spectrogram
Compute Spectrogram from Impulse Response Returns (spectrogram_matrix_db, frequency_bins, time_bins) window_size samples (e.g. 512), hop_size samples (e.g. 128).
read_analysis_csv
Read analysis results from CSV file
smooth_response_f32
Apply octave smoothing to frequency response data (f32 version)
smooth_response_f64
Apply octave smoothing to frequency response data (f64 version)
write_analysis_csv
Write analysis results to CSV file with optional microphone compensation
write_wav_analysis_csv
Write WAV analysis result to CSV file