Class: FMOD::Effects::FFT

Inherits:
Dsp
  • Object
show all
Defined in:
lib/fmod/effects/fft.rb

Overview

This unit simply analyzes the signal and provides spectrum information.

Set the attributes for the spectrum analysis with #window_size and #window_type, and retrieve the results with #spectrum and #dominant_frequency.

See Also:

Instance Attribute Summary collapse

Attributes inherited from Dsp

#active, #bypass, #channel_format, #input_count, #output_count, #parameter_count, #parent, #type, #wet_dry_mix

Attributes inherited from Handle

#user_data

Method Summary

Methods inherited from Dsp

#[], #[]=, #add_input, bool_param, data_param, #disconnect, #disconnect_from, #enable_metering, float_param, from_handle, #get_bool, #get_data, #get_float, #get_integer, #idle?, #info, #input, #input_connection, #input_metering?, integer_param, #name, #output, #output_connection, #output_format, #output_metering?, #param_info, #play, #reset, #set_bool, #set_data, #set_float, #set_integer, #set_wet_dry_mix, #show_dialog, #to_s, type_map, #version

Methods inherited from Handle

#initialize, #int_ptr, #release, #to_s

Constructor Details

This class inherits a constructor from FMOD::Handle

Instance Attribute Details

#dominant_frequencyFloat (readonly)

The dominant frequencies for each channel.

Returns:

  • (Float)

    the current value of dominant_frequency



28
29
30
# File 'lib/fmod/effects/fft.rb', line 28

def dominant_frequency
  @dominant_frequency
end

#spectrumPointer (readonly)

Retrieves a pointer to the current spectrum values between 0 and 1 for each “FFT bin”.

Returns:

  • (Pointer)

    the current value of spectrum



28
29
30
# File 'lib/fmod/effects/fft.rb', line 28

def spectrum
  @spectrum
end

#window_sizeInteger

The size of the FFT window. Must be a power of 2.

  • Minimum: 128

  • Maximum: 16384

  • Default: 2048

  • Valid: 128, 256, 512, 1024, 2048, 4096, 8192, 16384

Returns:

  • (Integer)

    the current value of window_size



28
29
30
# File 'lib/fmod/effects/fft.rb', line 28

def window_size
  @window_size
end

#window_typeInteger

The shape of the FFT window.

Returns:

  • (Integer)

    the current value of window_type

See Also:



28
29
30
# File 'lib/fmod/effects/fft.rb', line 28

def window_type
  @window_type
end