get_segments
Retrieve a set of segments of a track after previously calling for analysis via upload. A segment is short sound entity (under a second) that is relatively uniform in timbre and harmony. Each segment in the set contains information on its start in seconds, its duration in seconds, variations in loudness, and two sets of corresponding pitches and timbres.
Input Parameters
| Name | Required | Multiple | Data Type | Description |
|---|---|---|---|---|
| version | yes | no | String | The API version you are calling: '3' |
| context | optional | no | Context | A free-form identifier for the request |
| api_key | yes | no | API Key | Your Echo Nest API Key |
| id | one of id or md5 | no | Identifier | An Echo Nest Identifier |
| md5 | one of id or md5 | no | MD5 File Hash | The MD5 hash of a previously uploaded file |
| analysis_version | optional | no | Integer | Analyzer version to use. |
| format | optional | no | String 'xml' or 'json' | Defaults to 'xml'. Response format |
Note: This method requires an HTTP GET request.
Example Response
<?xml version="1.0" encoding="UTF-8"?>
<response version="3">
<status>
<code>0</code>
<message>Success</message>
</status>
<query>
<parameter name="api_key">5ZAOMB3BUR8QUN4PE</parameter>
<parameter name="id">music://id.echonest.com/~/TR/TRLFPPE11C3F10749F</parameter>
</query>
<analysis>
<segment start="2.54562" duration="0.29587">
<loudness>
<dB time="0">-29.707</dB>
<dB type="max" time="0.03483">-25.351</dB>
</loudness>
<pitches>
<pitch>0.009</pitch>
<pitch>0.090</pitch>
<pitch>0.010</pitch>
<pitch>0.018</pitch>
<pitch>1.000</pitch>
<pitch>0.017</pitch>
<pitch>0.005</pitch>
<pitch>0.005</pitch>
<pitch>0.028</pitch>
<pitch>0.383</pitch>
<pitch>0.010</pitch>
<pitch>0.016</pitch>
</pitches>
<timbre>
<coeff>31.132</coeff>
<coeff>-51.574</coeff>
<coeff>92.135</coeff>
<coeff>60.049</coeff>
<coeff>77.614</coeff>
<coeff>-17.629</coeff>
<coeff>-47.819</coeff>
<coeff>6.888</coeff>
<coeff>17.400</coeff>
<coeff>-0.635</coeff>
<coeff>-8.109</coeff>
<coeff>-45.552</coeff>
</timbre>
</segment>
</analysis>
</response>
Response Codes
| -1 | Unknown error |
| 0 | Success |
| 1 | Missing/Invalid API key |
| 2 | This API key is not allowed to call this method |
| 3 | Rate limit exceeded |
| 4 | Missing parameter |
| 5 | Invalid parmameter |

