PageRenderTime 341ms CodeModel.GetById 161ms app.highlight 78ms RepoModel.GetById 93ms app.codeStats 0ms

/apidocs/echonest.audio.AudioData-class.html

http://echo-nest-remix.googlecode.com/
HTML | 639 lines | 570 code | 45 blank | 24 comment | 0 complexity | a5e40a202f899766df9bd1cc094999a6 MD5 | raw file
  1<?xml version="1.0" encoding="ascii"?>
  2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3          "DTD/xhtml1-transitional.dtd">
  4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  5<head>
  6  <title>echonest.audio.AudioData</title>
  7  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  8  <script type="text/javascript" src="epydoc.js"></script>
  9</head>
 10
 11<body bgcolor="white" text="black" link="blue" vlink="#204080"
 12      alink="#204080">
 13<!-- ==================== NAVIGATION BAR ==================== -->
 14<table class="navbar" border="0" width="100%" cellpadding="0"
 15       bgcolor="#a0c0ff" cellspacing="0">
 16  <tr valign="middle">
 17
 18  <!-- Tree link -->
 19      <th>&nbsp;&nbsp;&nbsp;<a
 20        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
 21
 22  <!-- Index link -->
 23      <th>&nbsp;&nbsp;&nbsp;<a
 24        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
 25
 26  <!-- Help link -->
 27      <th>&nbsp;&nbsp;&nbsp;<a
 28        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
 29
 30  <!-- Project homepage -->
 31      <th class="navbar" align="right" width="100%">
 32        <table border="0" cellpadding="0" cellspacing="0">
 33          <tr><th class="navbar" align="center"
 34            ><a class="navbar" target="_top" href="http://code.google.com/p/echo-nest-remix/">Project Homepage</a></th>
 35          </tr></table></th>
 36  </tr>
 37</table>
 38<table width="100%" cellpadding="0" cellspacing="0">
 39  <tr valign="top">
 40    <td width="100%">
 41      <span class="breadcrumbs">
 42        <a href="echonest-module.html">Package&nbsp;echonest</a> ::
 43        <a href="echonest.audio-module.html">Module&nbsp;audio</a> ::
 44        Class&nbsp;AudioData
 45      </span>
 46    </td>
 47    <td>
 48      <table cellpadding="0" cellspacing="0">
 49        <!-- hide/show private -->
 50        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
 51    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
 52        <tr><td align="right"><span class="options"
 53            >[<a href="frames.html" target="_top">frames</a
 54            >]&nbsp;|&nbsp;<a href="echonest.audio.AudioData-class.html"
 55            target="_top">no&nbsp;frames</a>]</span></td></tr>
 56      </table>
 57    </td>
 58  </tr>
 59</table>
 60<!-- ==================== CLASS DESCRIPTION ==================== -->
 61<h1 class="epydoc">Class AudioData</h1><p class="nomargin-top"><span class="codelink"><a href="echonest.audio-pysrc.html#AudioData">source&nbsp;code</a></span></p>
 62<center>
 63
 64</center>
 65<hr />
 66<p>Handles audio data transparently. A smart audio container
 67with accessors that include:</p>
 68<dl class="rst-docutils">
 69<dt>sampleRate</dt>
 70<dd>samples per second</dd>
 71<dt>numChannels</dt>
 72<dd>number of channels</dd>
 73<dt>data</dt>
 74<dd>a <a class="rst-reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html" target="_top">numpy.array</a></dd>
 75</dl>
 76
 77<!-- ==================== INSTANCE METHODS ==================== -->
 78<a name="section-InstanceMethods"></a>
 79<table class="summary" border="1" cellpadding="3"
 80       cellspacing="0" width="100%" bgcolor="white">
 81<tr bgcolor="#70b0f0" class="table-header">
 82  <td colspan="2" class="table-header">
 83    <table border="0" cellpadding="0" cellspacing="0" width="100%">
 84      <tr valign="top">
 85        <td align="left"><span class="table-header">Instance Methods</span></td>
 86        <td align="right" valign="top"
 87         ><span class="options">[<a href="#section-InstanceMethods"
 88         class="privatelink" onclick="toggle_private();"
 89         >hide private</a>]</span></td>
 90      </tr>
 91    </table>
 92  </td>
 93</tr>
 94<tr>
 95    <td width="15%" align="right" valign="top" class="summary">
 96      <span class="summary-type">&nbsp;</span>
 97    </td><td class="summary">
 98      <table width="100%" cellpadding="0" cellspacing="0" border="0">
 99        <tr>
100          <td><span class="summary-sig"><a href="echonest.audio.AudioData-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
101        <span class="summary-sig-arg">filename</span>=<span class="summary-sig-default">None</span>,
102        <span class="summary-sig-arg">ndarray</span>=<span class="summary-sig-default">None</span>,
103        <span class="summary-sig-arg">shape</span>=<span class="summary-sig-default">None</span>,
104        <span class="summary-sig-arg">sampleRate</span>=<span class="summary-sig-default">None</span>,
105        <span class="summary-sig-arg">numChannels</span>=<span class="summary-sig-default">None</span>,
106        <span class="summary-sig-arg">defer</span>=<span class="summary-sig-default">False</span>,
107        <span class="summary-sig-arg">verbose</span>=<span class="summary-sig-default">True</span>)</span><br />
108      Given an input <code class="link">ndarray</code>, import the sample values and shape
109(if none is specified) of the input <code class="link">numpy.array</code>.</td>
110          <td align="right" valign="top">
111            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData.__init__">source&nbsp;code</a></span>
112            
113          </td>
114        </tr>
115      </table>
116      
117    </td>
118  </tr>
119<tr>
120    <td width="15%" align="right" valign="top" class="summary">
121      <span class="summary-type">&nbsp;</span>
122    </td><td class="summary">
123      <table width="100%" cellpadding="0" cellspacing="0" border="0">
124        <tr>
125          <td><span class="summary-sig"><a name="load"></a><span class="summary-sig-name">load</span>(<span class="summary-sig-arg">self</span>)</span></td>
126          <td align="right" valign="top">
127            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData.load">source&nbsp;code</a></span>
128            
129          </td>
130        </tr>
131      </table>
132      
133    </td>
134  </tr>
135<tr>
136    <td width="15%" align="right" valign="top" class="summary">
137      <span class="summary-type">&nbsp;</span>
138    </td><td class="summary">
139      <table width="100%" cellpadding="0" cellspacing="0" border="0">
140        <tr>
141          <td><span class="summary-sig"><a href="echonest.audio.AudioData-class.html#__getitem__" class="summary-sig-name">__getitem__</a>(<span class="summary-sig-arg">self</span>,
142        <span class="summary-sig-arg">index</span>)</span><br />
143      Fetches a frame or slice.</td>
144          <td align="right" valign="top">
145            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData.__getitem__">source&nbsp;code</a></span>
146            
147          </td>
148        </tr>
149      </table>
150      
151    </td>
152  </tr>
153<tr>
154    <td width="15%" align="right" valign="top" class="summary">
155      <span class="summary-type">&nbsp;</span>
156    </td><td class="summary">
157      <table width="100%" cellpadding="0" cellspacing="0" border="0">
158        <tr>
159          <td><span class="summary-sig"><a name="getslice"></a><span class="summary-sig-name">getslice</span>(<span class="summary-sig-arg">self</span>,
160        <span class="summary-sig-arg">index</span>)</span><br />
161      Help <a href="echonest.audio.AudioData-class.html#__getitem__" class="link">__getitem__</a> return a new AudioData for a given slice</td>
162          <td align="right" valign="top">
163            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData.getslice">source&nbsp;code</a></span>
164            
165          </td>
166        </tr>
167      </table>
168      
169    </td>
170  </tr>
171<tr>
172    <td width="15%" align="right" valign="top" class="summary">
173      <span class="summary-type">&nbsp;</span>
174    </td><td class="summary">
175      <table width="100%" cellpadding="0" cellspacing="0" border="0">
176        <tr>
177          <td><span class="summary-sig"><a name="getsample"></a><span class="summary-sig-name">getsample</span>(<span class="summary-sig-arg">self</span>,
178        <span class="summary-sig-arg">index</span>)</span><br />
179      Help <a href="echonest.audio.AudioData-class.html#__getitem__" class="link">__getitem__</a> return a frame (all channels for a given
180sample index)</td>
181          <td align="right" valign="top">
182            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData.getsample">source&nbsp;code</a></span>
183            
184          </td>
185        </tr>
186      </table>
187      
188    </td>
189  </tr>
190<tr>
191    <td width="15%" align="right" valign="top" class="summary">
192      <span class="summary-type">&nbsp;</span>
193    </td><td class="summary">
194      <table width="100%" cellpadding="0" cellspacing="0" border="0">
195        <tr>
196          <td><span class="summary-sig"><a name="pad_with_zeros"></a><span class="summary-sig-name">pad_with_zeros</span>(<span class="summary-sig-arg">self</span>,
197        <span class="summary-sig-arg">num_samples</span>)</span></td>
198          <td align="right" valign="top">
199            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData.pad_with_zeros">source&nbsp;code</a></span>
200            
201          </td>
202        </tr>
203      </table>
204      
205    </td>
206  </tr>
207<tr>
208    <td width="15%" align="right" valign="top" class="summary">
209      <span class="summary-type">&nbsp;</span>
210    </td><td class="summary">
211      <table width="100%" cellpadding="0" cellspacing="0" border="0">
212        <tr>
213          <td><span class="summary-sig"><a name="append"></a><span class="summary-sig-name">append</span>(<span class="summary-sig-arg">self</span>,
214        <span class="summary-sig-arg">as2</span>)</span><br />
215      Appends the input to the end of this <a href="echonest.audio.AudioData-class.html" class="link">AudioData</a>.</td>
216          <td align="right" valign="top">
217            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData.append">source&nbsp;code</a></span>
218            
219          </td>
220        </tr>
221      </table>
222      
223    </td>
224  </tr>
225<tr>
226    <td width="15%" align="right" valign="top" class="summary">
227      <span class="summary-type">&nbsp;</span>
228    </td><td class="summary">
229      <table width="100%" cellpadding="0" cellspacing="0" border="0">
230        <tr>
231          <td><span class="summary-sig"><a name="sum"></a><span class="summary-sig-name">sum</span>(<span class="summary-sig-arg">self</span>,
232        <span class="summary-sig-arg">as2</span>)</span></td>
233          <td align="right" valign="top">
234            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData.sum">source&nbsp;code</a></span>
235            
236          </td>
237        </tr>
238      </table>
239      
240    </td>
241  </tr>
242<tr>
243    <td width="15%" align="right" valign="top" class="summary">
244      <span class="summary-type">&nbsp;</span>
245    </td><td class="summary">
246      <table width="100%" cellpadding="0" cellspacing="0" border="0">
247        <tr>
248          <td><span class="summary-sig"><a name="add_at"></a><span class="summary-sig-name">add_at</span>(<span class="summary-sig-arg">self</span>,
249        <span class="summary-sig-arg">time</span>,
250        <span class="summary-sig-arg">as2</span>)</span></td>
251          <td align="right" valign="top">
252            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData.add_at">source&nbsp;code</a></span>
253            
254          </td>
255        </tr>
256      </table>
257      
258    </td>
259  </tr>
260<tr>
261    <td width="15%" align="right" valign="top" class="summary">
262      <span class="summary-type">&nbsp;</span>
263    </td><td class="summary">
264      <table width="100%" cellpadding="0" cellspacing="0" border="0">
265        <tr>
266          <td><span class="summary-sig"><a name="__len__"></a><span class="summary-sig-name">__len__</span>(<span class="summary-sig-arg">self</span>)</span></td>
267          <td align="right" valign="top">
268            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData.__len__">source&nbsp;code</a></span>
269            
270          </td>
271        </tr>
272      </table>
273      
274    </td>
275  </tr>
276<tr>
277    <td width="15%" align="right" valign="top" class="summary">
278      <span class="summary-type">&nbsp;</span>
279    </td><td class="summary">
280      <table width="100%" cellpadding="0" cellspacing="0" border="0">
281        <tr>
282          <td><span class="summary-sig"><a name="__add__"></a><span class="summary-sig-name">__add__</span>(<span class="summary-sig-arg">self</span>,
283        <span class="summary-sig-arg">other</span>)</span><br />
284      Supports stuff like this: sound3 = sound1 + sound2</td>
285          <td align="right" valign="top">
286            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData.__add__">source&nbsp;code</a></span>
287            
288          </td>
289        </tr>
290      </table>
291      
292    </td>
293  </tr>
294<tr>
295    <td width="15%" align="right" valign="top" class="summary">
296      <span class="summary-type">&nbsp;</span>
297    </td><td class="summary">
298      <table width="100%" cellpadding="0" cellspacing="0" border="0">
299        <tr>
300          <td><span class="summary-sig"><a href="echonest.audio.AudioData-class.html#encode" class="summary-sig-name">encode</a>(<span class="summary-sig-arg">self</span>,
301        <span class="summary-sig-arg">filename</span>=<span class="summary-sig-default">None</span>,
302        <span class="summary-sig-arg">mp3</span>=<span class="summary-sig-default">None</span>)</span><br />
303      Outputs an MP3 or WAVE file to <code class="link">filename</code>.</td>
304          <td align="right" valign="top">
305            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData.encode">source&nbsp;code</a></span>
306            
307          </td>
308        </tr>
309      </table>
310      
311    </td>
312  </tr>
313<tr>
314    <td width="15%" align="right" valign="top" class="summary">
315      <span class="summary-type">&nbsp;</span>
316    </td><td class="summary">
317      <table width="100%" cellpadding="0" cellspacing="0" border="0">
318        <tr>
319          <td><span class="summary-sig"><a name="unload"></a><span class="summary-sig-name">unload</span>(<span class="summary-sig-arg">self</span>)</span></td>
320          <td align="right" valign="top">
321            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData.unload">source&nbsp;code</a></span>
322            
323          </td>
324        </tr>
325      </table>
326      
327    </td>
328  </tr>
329<tr>
330    <td width="15%" align="right" valign="top" class="summary">
331      <span class="summary-type">&nbsp;</span>
332    </td><td class="summary">
333      <table width="100%" cellpadding="0" cellspacing="0" border="0">
334        <tr>
335          <td><span class="summary-sig"><a name="render"></a><span class="summary-sig-name">render</span>(<span class="summary-sig-arg">self</span>,
336        <span class="summary-sig-arg">start</span>=<span class="summary-sig-default">0.0</span>,
337        <span class="summary-sig-arg">to_audio</span>=<span class="summary-sig-default">None</span>,
338        <span class="summary-sig-arg">with_source</span>=<span class="summary-sig-default">None</span>)</span></td>
339          <td align="right" valign="top">
340            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData.render">source&nbsp;code</a></span>
341            
342          </td>
343        </tr>
344      </table>
345      
346    </td>
347  </tr>
348  <tr>
349    <td colspan="2" class="summary">
350    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="echonest.audio.AudioRenderable-class.html">AudioRenderable</a></code></b>:
351      <code><a href="echonest.audio.AudioRenderable-class.html#resolve_source">resolve_source</a></code>,
352      <code><a href="echonest.audio.AudioRenderable-class.html#sources">sources</a></code>
353      </p>
354    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
355      <code>__delattr__</code>,
356      <code>__format__</code>,
357      <code>__getattribute__</code>,
358      <code>__hash__</code>,
359      <code>__new__</code>,
360      <code>__reduce__</code>,
361      <code>__reduce_ex__</code>,
362      <code>__repr__</code>,
363      <code>__setattr__</code>,
364      <code>__sizeof__</code>,
365      <code>__str__</code>,
366      <code>__subclasshook__</code>
367      </p>
368    </td>
369  </tr>
370</table>
371<!-- ==================== STATIC METHODS ==================== -->
372<a name="section-StaticMethods"></a>
373<table class="summary" border="1" cellpadding="3"
374       cellspacing="0" width="100%" bgcolor="white">
375<tr bgcolor="#70b0f0" class="table-header">
376  <td colspan="2" class="table-header">
377    <table border="0" cellpadding="0" cellspacing="0" width="100%">
378      <tr valign="top">
379        <td align="left"><span class="table-header">Static Methods</span></td>
380        <td align="right" valign="top"
381         ><span class="options">[<a href="#section-StaticMethods"
382         class="privatelink" onclick="toggle_private();"
383         >hide private</a>]</span></td>
384      </tr>
385    </table>
386  </td>
387</tr>
388  <tr>
389    <td colspan="2" class="summary">
390    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="echonest.audio.AudioRenderable-class.html">AudioRenderable</a></code></b>:
391      <code><a href="echonest.audio.AudioRenderable-class.html#init_audio_data">init_audio_data</a></code>
392      </p>
393    </td>
394  </tr>
395</table>
396<!-- ==================== PROPERTIES ==================== -->
397<a name="section-Properties"></a>
398<table class="summary" border="1" cellpadding="3"
399       cellspacing="0" width="100%" bgcolor="white">
400<tr bgcolor="#70b0f0" class="table-header">
401  <td colspan="2" class="table-header">
402    <table border="0" cellpadding="0" cellspacing="0" width="100%">
403      <tr valign="top">
404        <td align="left"><span class="table-header">Properties</span></td>
405        <td align="right" valign="top"
406         ><span class="options">[<a href="#section-Properties"
407         class="privatelink" onclick="toggle_private();"
408         >hide private</a>]</span></td>
409      </tr>
410    </table>
411  </td>
412</tr>
413<tr>
414    <td width="15%" align="right" valign="top" class="summary">
415      <span class="summary-type">&nbsp;</span>
416    </td><td class="summary">
417        <a href="echonest.audio.AudioData-class.html#duration" class="summary-name">duration</a>
418    </td>
419  </tr>
420<tr>
421    <td width="15%" align="right" valign="top" class="summary">
422      <span class="summary-type">&nbsp;</span>
423    </td><td class="summary">
424        <a href="echonest.audio.AudioData-class.html#source" class="summary-name">source</a>
425    </td>
426  </tr>
427  <tr>
428    <td colspan="2" class="summary">
429    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
430      <code>__class__</code>
431      </p>
432    </td>
433  </tr>
434</table>
435<!-- ==================== METHOD DETAILS ==================== -->
436<a name="section-MethodDetails"></a>
437<table class="details" border="1" cellpadding="3"
438       cellspacing="0" width="100%" bgcolor="white">
439<tr bgcolor="#70b0f0" class="table-header">
440  <td colspan="2" class="table-header">
441    <table border="0" cellpadding="0" cellspacing="0" width="100%">
442      <tr valign="top">
443        <td align="left"><span class="table-header">Method Details</span></td>
444        <td align="right" valign="top"
445         ><span class="options">[<a href="#section-MethodDetails"
446         class="privatelink" onclick="toggle_private();"
447         >hide private</a>]</span></td>
448      </tr>
449    </table>
450  </td>
451</tr>
452</table>
453<a name="__init__"></a>
454<div>
455<table class="details" border="1" cellpadding="3"
456       cellspacing="0" width="100%" bgcolor="white">
457<tr><td>
458  <table width="100%" cellpadding="0" cellspacing="0" border="0">
459  <tr valign="top"><td>
460  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
461        <span class="sig-arg">filename</span>=<span class="sig-default">None</span>,
462        <span class="sig-arg">ndarray</span>=<span class="sig-default">None</span>,
463        <span class="sig-arg">shape</span>=<span class="sig-default">None</span>,
464        <span class="sig-arg">sampleRate</span>=<span class="sig-default">None</span>,
465        <span class="sig-arg">numChannels</span>=<span class="sig-default">None</span>,
466        <span class="sig-arg">defer</span>=<span class="sig-default">False</span>,
467        <span class="sig-arg">verbose</span>=<span class="sig-default">True</span>)</span>
468    <br /><em class="fname">(Constructor)</em>
469  </h3>
470  </td><td align="right" valign="top"
471    ><span class="codelink"><a href="echonest.audio-pysrc.html#AudioData.__init__">source&nbsp;code</a></span>&nbsp;
472    </td>
473  </tr></table>
474  
475  <p>Given an input <code class="link">ndarray</code>, import the sample values and shape
476(if none is specified) of the input <code class="link">numpy.array</code>.</p>
477<p>Given a <code class="link">filename</code> (and an input ndarray), use ffmpeg to convert
478the file to wave, then load the file into the data,
479auto-detecting the sample rate, and number of channels.</p>
480  <dl class="fields">
481    <dt>Parameters:</dt>
482    <dd><ul class="nomargin-top">
483        <li><strong class="pname"><code>filename</code></strong> - a path to an audio file for loading its sample
484data into the AudioData.data</li>
485        <li><strong class="pname"><code>ndarray</code></strong> - a <a class="rst-reference external" href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html" target="_top">numpy.array</a> instance with sample data</li>
486        <li><strong class="pname"><code>shape</code></strong> - a tuple of array dimensions</li>
487        <li><strong class="pname"><code>sampleRate</code></strong> - sample rate, in Hz</li>
488        <li><strong class="pname"><code>numChannels</code></strong> - number of channels</li>
489    </ul></dd>
490    <dt>Overrides:
491        object.__init__
492    </dt>
493  </dl>
494</td></tr></table>
495</div>
496<a name="__getitem__"></a>
497<div>
498<table class="details" border="1" cellpadding="3"
499       cellspacing="0" width="100%" bgcolor="white">
500<tr><td>
501  <table width="100%" cellpadding="0" cellspacing="0" border="0">
502  <tr valign="top"><td>
503  <h3 class="epydoc"><span class="sig"><span class="sig-name">__getitem__</span>(<span class="sig-arg">self</span>,
504        <span class="sig-arg">index</span>)</span>
505    <br /><em class="fname">(Indexing operator)</em>
506  </h3>
507  </td><td align="right" valign="top"
508    ><span class="codelink"><a href="echonest.audio-pysrc.html#AudioData.__getitem__">source&nbsp;code</a></span>&nbsp;
509    </td>
510  </tr></table>
511  
512  Fetches a frame or slice. Returns an individual frame (if the index
513is a time offset float or an integer sample number) or a slice if
514the index is an <a href="echonest.audio.AudioQuantum-class.html" class="link">AudioQuantum</a> (or quacks like one).
515  <dl class="fields">
516  </dl>
517</td></tr></table>
518</div>
519<a name="encode"></a>
520<div>
521<table class="details" border="1" cellpadding="3"
522       cellspacing="0" width="100%" bgcolor="white">
523<tr><td>
524  <table width="100%" cellpadding="0" cellspacing="0" border="0">
525  <tr valign="top"><td>
526  <h3 class="epydoc"><span class="sig"><span class="sig-name">encode</span>(<span class="sig-arg">self</span>,
527        <span class="sig-arg">filename</span>=<span class="sig-default">None</span>,
528        <span class="sig-arg">mp3</span>=<span class="sig-default">None</span>)</span>
529  </h3>
530  </td><td align="right" valign="top"
531    ><span class="codelink"><a href="echonest.audio-pysrc.html#AudioData.encode">source&nbsp;code</a></span>&nbsp;
532    </td>
533  </tr></table>
534  
535  Outputs an MP3 or WAVE file to <code class="link">filename</code>.
536Format is determined by <code class="link">mp3</code> parameter.
537  <dl class="fields">
538    <dt>Overrides:
539        <a href="echonest.audio.AudioRenderable-class.html#encode">AudioRenderable.encode</a>
540    </dt>
541  </dl>
542</td></tr></table>
543</div>
544<br />
545<!-- ==================== PROPERTY DETAILS ==================== -->
546<a name="section-PropertyDetails"></a>
547<table class="details" border="1" cellpadding="3"
548       cellspacing="0" width="100%" bgcolor="white">
549<tr bgcolor="#70b0f0" class="table-header">
550  <td colspan="2" class="table-header">
551    <table border="0" cellpadding="0" cellspacing="0" width="100%">
552      <tr valign="top">
553        <td align="left"><span class="table-header">Property Details</span></td>
554        <td align="right" valign="top"
555         ><span class="options">[<a href="#section-PropertyDetails"
556         class="privatelink" onclick="toggle_private();"
557         >hide private</a>]</span></td>
558      </tr>
559    </table>
560  </td>
561</tr>
562</table>
563<a name="duration"></a>
564<div>
565<table class="details" border="1" cellpadding="3"
566       cellspacing="0" width="100%" bgcolor="white">
567<tr><td>
568  <h3 class="epydoc">duration</h3>
569  
570  <dl class="fields">
571    <dt>Get Method:</dt>
572    <dd class="value"><span class="summary-sig"><i>unreachable</i>.duration(<span class="summary-sig-arg">self</span>)</span>
573    </dd>
574  </dl>
575</td></tr></table>
576</div>
577<a name="source"></a>
578<div>
579<table class="details" border="1" cellpadding="3"
580       cellspacing="0" width="100%" bgcolor="white">
581<tr><td>
582  <h3 class="epydoc">source</h3>
583  
584  <dl class="fields">
585    <dt>Get Method:</dt>
586    <dd class="value"><span class="summary-sig"><i>unreachable</i>.source(<span class="summary-sig-arg">self</span>)</span>
587    </dd>
588  </dl>
589</td></tr></table>
590</div>
591<br />
592<!-- ==================== NAVIGATION BAR ==================== -->
593<table class="navbar" border="0" width="100%" cellpadding="0"
594       bgcolor="#a0c0ff" cellspacing="0">
595  <tr valign="middle">
596
597  <!-- Tree link -->
598      <th>&nbsp;&nbsp;&nbsp;<a
599        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
600
601  <!-- Index link -->
602      <th>&nbsp;&nbsp;&nbsp;<a
603        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
604
605  <!-- Help link -->
606      <th>&nbsp;&nbsp;&nbsp;<a
607        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
608
609  <!-- Project homepage -->
610      <th class="navbar" align="right" width="100%">
611        <table border="0" cellpadding="0" cellspacing="0">
612          <tr><th class="navbar" align="center"
613            ><a class="navbar" target="_top" href="http://code.google.com/p/echo-nest-remix/">Project Homepage</a></th>
614          </tr></table></th>
615  </tr>
616</table>
617<table border="0" cellpadding="0" cellspacing="0" width="100%%">
618  <tr>
619    <td align="left" class="footer">
620    Generated by Epydoc 3.0.1 on Wed Sep  1 16:08:58 2010
621    </td>
622    <td align="right" class="footer">
623      <a target="mainFrame" href="http://epydoc.sourceforge.net"
624        >http://epydoc.sourceforge.net</a>
625    </td>
626  </tr>
627</table>
628
629<script type="text/javascript">
630  <!--
631  // Private objects are initially displayed (because if
632  // javascript is turned off then we want them to be
633  // visible); but by default, we want to hide them.  So hide
634  // them unless we have a cookie that says to show them.
635  checkCookie();
636  // -->
637</script>
638</body>
639</html>