Class: Segment

Inherits:
Section show all
Defined in:
lib/echonest/element/segment.rb

Instance Attribute Summary collapse

Attributes inherited from Section

#confidence, #duration, #start

Instance Method Summary collapse

Constructor Details

#initialize(start, duration, confidence, loudness, max_loudness, pitches, timbre) ⇒ Segment

Returns a new instance of Segment.



4
5
6
7
8
9
10
11
# File 'lib/echonest/element/segment.rb', line 4

def initialize(start, duration, confidence, loudness, max_loudness, pitches, timbre)
  super(start, duration, confidence)

  @loudness = loudness
  @max_loudness = max_loudness
  @pitches = pitches
  @timbre = timbre
end

Instance Attribute Details

#loudnessObject (readonly)

Returns the value of attribute loudness.



2
3
4
# File 'lib/echonest/element/segment.rb', line 2

def loudness
  @loudness
end

#max_loudnessObject (readonly)

Returns the value of attribute max_loudness.



2
3
4
# File 'lib/echonest/element/segment.rb', line 2

def max_loudness
  @max_loudness
end

#pitchesObject (readonly)

Returns the value of attribute pitches.



2
3
4
# File 'lib/echonest/element/segment.rb', line 2

def pitches
  @pitches
end

#timbreObject (readonly)

Returns the value of attribute timbre.



2
3
4
# File 'lib/echonest/element/segment.rb', line 2

def timbre
  @timbre
end