Class: FMOD::Effects::FFT
- 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.
Instance Attribute Summary collapse
-
#dominant_frequency ⇒ Float
readonly
The dominant frequencies for each channel.
-
#spectrum ⇒ Pointer
readonly
Retrieves a pointer to the current spectrum values between 0 and 1 for each “FFT bin”.
-
#window_size ⇒ Integer
The size of the FFT window.
-
#window_type ⇒ Integer
The shape of the FFT window.
Attributes inherited from Dsp
#active, #bypass, #channel_format, #input_count, #output_count, #parameter_count, #parent, #type, #wet_dry_mix
Attributes inherited from Handle
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_frequency ⇒ Float (readonly)
The dominant frequencies for each channel.
28 29 30 |
# File 'lib/fmod/effects/fft.rb', line 28 def dominant_frequency @dominant_frequency end |
#spectrum ⇒ Pointer (readonly)
Retrieves a pointer to the current spectrum values between 0 and 1 for each “FFT bin”.
28 29 30 |
# File 'lib/fmod/effects/fft.rb', line 28 def spectrum @spectrum end |
#window_size ⇒ Integer
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
28 29 30 |
# File 'lib/fmod/effects/fft.rb', line 28 def window_size @window_size end |
#window_type ⇒ Integer
The shape of the FFT window.
-
Minimum: 0
-
Maximum: 5
-
Default: Core::WindowType::HAMMING
28 29 30 |
# File 'lib/fmod/effects/fft.rb', line 28 def window_type @window_type end |