Package echonest :: Module audio :: Class AudioSegment
[hide private]
[frames] | no frames]

Class AudioSegment

source code


Subclass of AudioQuantum for the data-rich segments returned by the Analyze API.
Instance Methods [hide private]
 
__init__(self, start=0.0, duration=0.0, pitches=[], timbre=[], loudness_begin=0.0, loudness_max=0.0, time_loudness_max=0.0, loudness_end=None, kind='segment')
Initializes an AudioSegment.
source code

Inherited from AudioQuantum: __getstate__, __repr__, __str__, absolute_context, children, context_string, get_end, group, local_context, next, parent, prev

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Properties [hide private]

Inherited from AudioQuantum: end

Inherited from object: __class__

Method Details [hide private]

__init__(self, start=0.0, duration=0.0, pitches=[], timbre=[], loudness_begin=0.0, loudness_max=0.0, time_loudness_max=0.0, loudness_end=None, kind='segment')
(Constructor)

source code 
Initializes an AudioSegment.
Parameters:
  • start - offset from start of the track, in seconds
  • duration - duration of the AudioSegment, in seconds
  • pitches - a twelve-element list with relative loudnesses of each pitch class, from C (pitches[0]) to B (pitches[11])
  • timbre - a twelve-element list with the loudness of each of a principal component of time and/or frequency profile
  • kind - string identifying the kind of AudioQuantum: "segment"
  • loudness_begin - loudness in dB at the start of the segment
  • loudness_max - loudness in dB at the loudest moment of the segment
  • time_loudness_max - time (in sec from start of segment) of loudest moment
  • loudness_end - loudness at end of segment (if it is given)
Overrides: object.__init__