Class: SpectrumAnalyzer::Config
- Inherits:
-
Object
- Object
- SpectrumAnalyzer::Config
- Defined in:
- lib/spectrum-analyzer/config.rb
Instance Attribute Summary collapse
-
#analysis_range ⇒ Object
Returns the value of attribute analysis_range.
-
#file_name ⇒ Object
Returns the value of attribute file_name.
-
#window_function ⇒ Object
Returns the value of attribute window_function.
-
#window_size ⇒ Object
Returns the value of attribute window_size.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
5 6 7 8 9 10 11 12 13 |
# File 'lib/spectrum-analyzer/config.rb', line 5 def initialize @window_size = 512 @window_function = :hanning @analysis_array = [{ :b_index => 27, :t_index => 47, :min => 1, :max => 2}, #Low area { :b_index => 58, :t_index => 64, :min => 2.5, :max => 6.5}, #High peak { :b_index => 70, :t_index => 74, :min => 2.0, :max => 4.2 }, #Mid peak { :b_index => 82, :t_index => 109, :min => 0.8, :max => 2}] #Low area @file_name = "spec/analyze.wav" end |
Instance Attribute Details
#analysis_range ⇒ Object
Returns the value of attribute analysis_range.
3 4 5 |
# File 'lib/spectrum-analyzer/config.rb', line 3 def analysis_range @analysis_range end |
#file_name ⇒ Object
Returns the value of attribute file_name.
3 4 5 |
# File 'lib/spectrum-analyzer/config.rb', line 3 def file_name @file_name end |
#window_function ⇒ Object
Returns the value of attribute window_function.
3 4 5 |
# File 'lib/spectrum-analyzer/config.rb', line 3 def window_function @window_function end |
#window_size ⇒ Object
Returns the value of attribute window_size.
3 4 5 |
# File 'lib/spectrum-analyzer/config.rb', line 3 def window_size @window_size end |