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

Class AudioAnalysis

source code


This class uses (but does not wrap) pyechonest.track to allow transparent caching of the audio analysis of an audio file.

For example, the following script will display the bars of a track twice:

from echonest import *
a = audio.AudioAnalysis('YOUR_TRACK_ID_HERE')
a.bars
a.bars

The first time a.bars is called, a network request is made of the Echo Nest Analyze API. The second time time a.bars is called, the cached value is returned immediately.

An AudioAnalysis object can be created using an existing ID, as in the example above, or by specifying the audio file to upload in order to create the ID, as in:

a = audio.AudioAnalysis('FULL_PATH_TO_AUDIO_FILE')
Instance Methods [hide private]
 
__init__(self, path_or_identifier)
Constructor. If the argument is a valid local path or a URL, the track ID is generated by uploading the file to the Echo Nest Analyze API. Otherwise, the argument is assumed to be the track ID.
source code
 
__getstate__(self)
Eliminates the circular reference for pickling.
source code
 
__setstate__(self, state)
Recreates circular references after unpickling.
source code

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

Properties [hide private]
  bars
  beats
  tatums
  sections
  segments

Inherited from object: __class__

Method Details [hide private]

__init__(self, path_or_identifier)
(Constructor)

source code 

Constructor. If the argument is a valid local path or a URL, the track ID is generated by uploading the file to the Echo Nest Analyze API. Otherwise, the argument is assumed to be the track ID.

Parameters:
  • path_or_identifier - A string representing either a path to a local file, or the ID of a file that has already been uploaded for analysis.
Overrides: object.__init__

Property Details [hide private]

bars

Get Method:
unreachable.bars(self)

beats

Get Method:
unreachable.beats(self)

tatums

Get Method:
unreachable.tatums(self)

sections

Get Method:
unreachable.sections(self)

segments

Get Method:
unreachable.segments(self)