class

DSP::FrequencyDomain

Inherits Reference < Object

Frequency domain analysis class. On instantiation a forward FFT is performed on the given time series data, and the results are stored in full and half form. The half-FFT form cuts out the latter half of the FFT results. Also, for the half-FFT the complex values will be converted to magnitude (linear or decibel) if specified in :fft_format (see FFT_FORMATS for valid values).

Constructors

new(data : Array(Float64), sample_rate : Float64)
Source

Instance methods

freq_magnitudes
Source
freq_magnitudes_db
Source
freq_to_idx(freq)

Convert an FFT frequency bin to the corresponding FFT output index

Source
idx_to_freq(idx)

Convert an FFT output index to the corresponding frequency bin

Source
peaks

Find frequency peak values.

Source
peaks_db

Find frequency peak values.

Source