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

Class AudioQuantumList

source code


A container that enables content-based selection and filtering. A List that contains AudioQuantum objects, with additional methods for manipulating them.

When an AudioQuantumList is created for a track via a call to the Analyze API, attach() is called so that its container is set to the containing AudioAnalysis, and the container of each of the AudioQuantum list members is set to itself.

Additional accessors now include AudioQuantum elements such as start, duration, and confidence, which each return a List of the corresponding properties in the contained AudioQuanta. A special name is kinds, which returns a List of the kind of each AudioQuantum. If AudioQuantumList.kind is "segment", then pitches, timbre, loudness_begin, loudness_max, time_loudness_max, and loudness_end are available.

Instance Methods [hide private]
new empty list
__init__(self, initial=None, kind=None, container=None, source=None)
Initializes an AudioQuantumList. All parameters are optional.
source code
 
get_many(attribute) source code
 
get_many_if_segment(attribute) source code
 
get_duration(self) source code
 
get_source(self)
Returns its own or its parent's source.
source code
 
set_source(self, value)
Checks input to see if it is an AudioData.
source code
 
sources(self) source code
 
attach(self, container)
Create circular references to the containing AudioAnalysis and for the contained AudioQuantum objects.
source code
 
__getstate__(self)
Eliminates the circular reference for pickling.
source code
 
toxml(self, context=None) source code
 
render(self, start=0.0, to_audio=None, with_source=None) source code

Inherited from list: __add__, __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __iadd__, __imul__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __repr__, __reversed__, __rmul__, __setitem__, __setslice__, __sizeof__, append, count, extend, index, insert, pop, remove, reverse, sort

Inherited from AudioRenderable: encode, resolve_source

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from AudioRenderable: init_audio_data

Class Variables [hide private]

Inherited from list: __hash__

Properties [hide private]
  durations
  kinds
  start
  confidence
  pitches
  timbre
  loudness_begin
  loudness_max
  time_loudness_max
  loudness_end
  source
The AudioData source for the AudioQuantumList.
  duration
Total duration of the AudioQuantumList.

Inherited from object: __class__

Method Details [hide private]

__init__(self, initial=None, kind=None, container=None, source=None)
(Constructor)

source code 
Initializes an AudioQuantumList. All parameters are optional.
Parameters:
  • initial - a List type with the initial contents
  • kind - a label for the kind of AudioQuantum contained within
  • container - a reference to the containing AudioAnalysis
  • source - a reference to the AudioData with the corresponding samples and time base for the contained AudioQuanta
Returns: new empty list
Overrides: object.__init__

sources(self)

source code 
Overrides: AudioRenderable.sources

Property Details [hide private]

durations

Get Method:
unreachable.fun(self)

kinds

Get Method:
unreachable.fun(self)

start

Get Method:
unreachable.fun(self)

confidence

Get Method:
unreachable.fun(self)

pitches

Get Method:
unreachable.fun(self)

timbre

Get Method:
unreachable.fun(self)

loudness_begin

Get Method:
unreachable.fun(self)

loudness_max

Get Method:
unreachable.fun(self)

time_loudness_max

Get Method:
unreachable.fun(self)

loudness_end

Get Method:
unreachable.fun(self)

source

The AudioData source for the AudioQuantumList.
Get Method:
get_source(self) - Returns its own or its parent's source.
Set Method:
set_source(self, value) - Checks input to see if it is an AudioData.

duration

Total duration of the AudioQuantumList.
Get Method:
get_duration(self)