NAME

WWW::EchoNest::Track

SYNOPSIS

Represents an audio analysis from The Echo Nest.
All the functions exportable from this module return
Track objects.

METHODS

This module's interface is purely functional. No methods.

FUNCTIONS

track_from_file

Creates a new Track object from a filehandle or filename.

ARGUMENTS:
  file           => filename or filehandle-reference
  filetype       => type of the file (e.g. mp3, wav, flac)

RETURNS:
  A new Track object.

EXAMPLE:
  use WWW::EchoNest::Track qw( track_from_file );
  my @tracks
  my @tracks[0] = track_from_file('path/to/audio.mp3');

  open ( my $AUDIO_FH, '<', 'path/to/other.mp3' );
  my @tracks[1] = track_from_file($AUDIO_FH);

track_from_filename

Creates a new Track object from a filename.

ARGUMENTS:
  filename       => filename
  filetype       => type of the file (e.g. mp3, wav, flac)

RETURNS:
  A new Track object.

EXAMPLE:
  # Insert helpful example here!

track_from_url

Creates a new Track object from a url.

ARGUMENTS:
  url     => A string giving the URL to read from.
             This must be on a public machine accessible via HTTP.

RETURNS:
  A new Track object.

EXAMPLE:
  # Insert helpful example here!

track_from_id

Creates a new Track object from an Echo Nest track ID.

ARGUMENTS:
  id       => A string containing the ID of a previously analyzed track.

RETURNS:
  A new Track object.

EXAMPLE:
  # Insert helpful example here!

track_from_md5

Creates a new Track object from an md5 hash.

ARGUMENTS:
  md5       => A string 32 characters long giving the md5 checksum of a track already analyzed.

RETURNS:
  A new Track object.

EXAMPLE:
  # Insert helpful example here!

track_from_reanalyzing_id

Create a track object from an Echo Nest track ID, reanalyzing the track first.

ARGUMENTS:
  identifier   => A string containing the ID of a previously analyzed track

RETURNS:
  A new Track object.

EXAMPLE:
  # Insert helpful example here!

track_from_reanalyzing_md5

Create a track object from an md5 hash, reanalyzing the track first.

ARGUMENTS:
  md5     => A string containing the md5 of a previously analyzed track

RETURNS:
  A new Track object.

EXAMPLE:
  # Insert helpful example here!

AUTHOR

Brian Sorahan, <bsorahan@gmail.com>

SUPPORT

Join the Google group: <http://groups.google.com/group/www-echonest>

ACKNOWLEDGEMENTS

Thanks to all the folks at The Echo Nest for providing access to their powerful API.

LICENSE

Copyright 2011 Brian Sorahan.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.