Class: SpectrumAnalyzer::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/spectrum-analyzer/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

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_rangeObject

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_nameObject

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_functionObject

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_sizeObject

Returns the value of attribute window_size.



3
4
5
# File 'lib/spectrum-analyzer/config.rb', line 3

def window_size
  @window_size
end