Package echonest :: Package remix :: 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=None, timbre=None, loudness_begin=0.0, loudness_max=0.0, time_loudness_max=0.0, loudness_end=None, kind='segment', source=None)
Initializes an AudioSegment.
source code

Inherited from AudioQuantum: __getstate__, __repr__, __str__, absolute_context, children, context_string, get_end, get_source, group, local_context, mean_loudness, mean_pitches, mean_timbre, next, parent, prev, render, set_source, toxml

Inherited from AudioRenderable: encode, resolve_source, sources

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

Static Methods [hide private]

Inherited from AudioRenderable: init_audio_data

Properties [hide private]
  tatum
Returns the tatum that overlaps most with the segment Note that some segments have NO overlapping tatums. If this is the case, None will be returned.
  beat

Inherited from AudioQuantum: end, segments, source

Inherited from object: __class__

Method Details [hide private]

__init__(self, start=0.0, duration=0.0, pitches=None, timbre=None, loudness_begin=0.0, loudness_max=0.0, time_loudness_max=0.0, loudness_end=None, kind='segment', source=None)
(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__

Property Details [hide private]

tatum

Returns the tatum that overlaps most with the segment Note that some segments have NO overlapping tatums. If this is the case, None will be returned.
Get Method:
unreachable.tatum(self) - Returns the tatum that overlaps most with the segment Note that some segments have NO overlapping tatums. If this is the case, None will be returned.

beat

Get Method:
unreachable.beat(self)