PageRenderTime 82ms CodeModel.GetById 52ms app.highlight 22ms RepoModel.GetById 1ms app.codeStats 0ms

/apidocs/echonest.audio-module.html

http://echo-nest-remix.googlecode.com/
HTML | 722 lines | 678 code | 33 blank | 11 comment | 0 complexity | 1c6398fead98a6cde005ea20209aeb61 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</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        Module&nbsp;audio
 44      </span>
 45    </td>
 46    <td>
 47      <table cellpadding="0" cellspacing="0">
 48        <!-- hide/show private -->
 49        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
 50    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
 51        <tr><td align="right"><span class="options"
 52            >[<a href="frames.html" target="_top">frames</a
 53            >]&nbsp;|&nbsp;<a href="echonest.audio-module.html"
 54            target="_top">no&nbsp;frames</a>]</span></td></tr>
 55      </table>
 56    </td>
 57  </tr>
 58</table>
 59<!-- ==================== MODULE DESCRIPTION ==================== -->
 60<h1 class="epydoc">Module audio</h1><p class="nomargin-top"><span class="codelink"><a href="echonest.audio-pysrc.html">source&nbsp;code</a></span></p>
 61<p>The main <a class="rst-rst-rst-reference external rst-rst-reference external rst-reference external" href="http://the.echonest.com/" target="_top">Echo Nest</a> <a class="rst-rst-rst-reference external rst-rst-reference external rst-reference external" href="http://code.google.com/p/echo-nest-remix/" target="_top">Remix API</a> module for manipulating audio files and
 62their associated <a class="rst-rst-rst-reference external rst-rst-reference external rst-reference external" href="http://the.echonest.com/" target="_top">Echo Nest</a> <a class="rst-rst-rst-reference external rst-rst-reference external rst-reference external" href="http://developer.echonest.com/pages/overview?version=2" target="_top">Analyze API</a> analyses.</p>
 63<p>AudioData, and getpieces by Robert Ochshorn
 64on 2008-06-06.  Some refactoring and everything else by Joshua Lifton
 652008-09-07.  Refactoring by Ben Lacker 2009-02-11. Other contributions
 66by Adam Lindsay.</p>
 67
 68<hr />
 69<div class="fields">      <p><strong>Version:</strong>
 70        $Revision: 0 $
 71      </p>
 72</div><!-- ==================== CLASSES ==================== -->
 73<a name="section-Classes"></a>
 74<table class="summary" border="1" cellpadding="3"
 75       cellspacing="0" width="100%" bgcolor="white">
 76<tr bgcolor="#70b0f0" class="table-header">
 77  <td colspan="2" class="table-header">
 78    <table border="0" cellpadding="0" cellspacing="0" width="100%">
 79      <tr valign="top">
 80        <td align="left"><span class="table-header">Classes</span></td>
 81        <td align="right" valign="top"
 82         ><span class="options">[<a href="#section-Classes"
 83         class="privatelink" onclick="toggle_private();"
 84         >hide private</a>]</span></td>
 85      </tr>
 86    </table>
 87  </td>
 88</tr>
 89<tr bgcolor="#e8f0f8" >
 90  <th colspan="2" class="group-header"
 91    >&nbsp;&nbsp;&nbsp;&nbsp;Base Classes</th></tr>
 92<tr>
 93    <td width="15%" align="right" valign="top" class="summary">
 94      <span class="summary-type">&nbsp;</span>
 95    </td><td class="summary">
 96        <a href="echonest.audio.AudioAnalysis-class.html" class="summary-name">AudioAnalysis</a><br />
 97      This class wraps <code class="link">echonest.web</code> to allow transparent caching of the
 98audio analysis of an audio file.
 99    </td>
100  </tr>
101<tr>
102    <td width="15%" align="right" valign="top" class="summary">
103      <span class="summary-type">&nbsp;</span>
104    </td><td class="summary">
105        <a href="echonest.audio.AudioRenderable-class.html" class="summary-name">AudioRenderable</a><br />
106      An object that gives an <a href="echonest.audio.AudioData-class.html" class="link">AudioData</a> in response to a call to its <code class="link">render</code>()
107method.
108    </td>
109  </tr>
110<tr>
111    <td width="15%" align="right" valign="top" class="summary">
112      <span class="summary-type">&nbsp;</span>
113    </td><td class="summary">
114        <a href="echonest.audio.AudioData-class.html" class="summary-name">AudioData</a><br />
115      Handles audio data transparently.
116    </td>
117  </tr>
118<tr>
119    <td width="15%" align="right" valign="top" class="summary">
120      <span class="summary-type">&nbsp;</span>
121    </td><td class="summary">
122        <a href="echonest.audio.AudioData32-class.html" class="summary-name">AudioData32</a><br />
123      A 32-bit variant of AudioData, intended for data collection on
124audio rendering with headroom.
125    </td>
126  </tr>
127<tr bgcolor="#e8f0f8" >
128  <th colspan="2" class="group-header"
129    >&nbsp;&nbsp;&nbsp;&nbsp;Audio-plus-Analysis Classes</th></tr>
130<tr>
131    <td width="15%" align="right" valign="top" class="summary">
132      <span class="summary-type">&nbsp;</span>
133    </td><td class="summary">
134        <a href="echonest.audio.LocalAudioFile-class.html" class="summary-name">LocalAudioFile</a><br />
135      The basic do-everything class for remixing.
136    </td>
137  </tr>
138<tr>
139    <td width="15%" align="right" valign="top" class="summary">
140      <span class="summary-type">&nbsp;</span>
141    </td><td class="summary">
142        <a href="echonest.audio.LocalAnalysis-class.html" class="summary-name">LocalAnalysis</a><br />
143      Like <a href="echonest.audio.LocalAudioFile-class.html" class="link">LocalAudioFile</a>, it conditionally uploads the file with which
144it was initialized.
145    </td>
146  </tr>
147<tr bgcolor="#e8f0f8" >
148  <th colspan="2" class="group-header"
149    >&nbsp;&nbsp;&nbsp;&nbsp;Building Blocks</th></tr>
150<tr>
151    <td width="15%" align="right" valign="top" class="summary">
152      <span class="summary-type">&nbsp;</span>
153    </td><td class="summary">
154        <a href="echonest.audio.AudioQuantum-class.html" class="summary-name">AudioQuantum</a><br />
155      A unit of musical time, identified at minimum with a start time and
156a duration, both in seconds.
157    </td>
158  </tr>
159<tr>
160    <td width="15%" align="right" valign="top" class="summary">
161      <span class="summary-type">&nbsp;</span>
162    </td><td class="summary">
163        <a href="echonest.audio.AudioSegment-class.html" class="summary-name">AudioSegment</a><br />
164      Subclass of <a href="echonest.audio.AudioQuantum-class.html" class="link">AudioQuantum</a> for the data-rich segments returned by
165the Analyze API.
166    </td>
167  </tr>
168<tr>
169    <td width="15%" align="right" valign="top" class="summary">
170      <span class="summary-type">&nbsp;</span>
171    </td><td class="summary">
172        <a href="echonest.audio.ModifiedRenderable-class.html" class="summary-name">ModifiedRenderable</a><br />
173      Class that contains any AudioRenderable, but overrides the
174render() method with nested effects, called sequentially on the
175result of the preceeding effect.
176    </td>
177  </tr>
178<tr>
179    <td width="15%" align="right" valign="top" class="summary">
180      <span class="summary-type">&nbsp;</span>
181    </td><td class="summary">
182        <a href="echonest.audio.AudioQuantumList-class.html" class="summary-name">AudioQuantumList</a><br />
183      A container that enables content-based selection and filtering.
184    </td>
185  </tr>
186<tr bgcolor="#e8f0f8" >
187  <th colspan="2" class="group-header"
188    >&nbsp;&nbsp;&nbsp;&nbsp;Effects</th></tr>
189<tr>
190    <td width="15%" align="right" valign="top" class="summary">
191      <span class="summary-type">&nbsp;</span>
192    </td><td class="summary">
193        <a href="echonest.audio.AudioEffect-class.html" class="summary-name">AudioEffect</a>
194    </td>
195  </tr>
196<tr>
197    <td width="15%" align="right" valign="top" class="summary">
198      <span class="summary-type">&nbsp;</span>
199    </td><td class="summary">
200        <a href="echonest.audio.LevelDB-class.html" class="summary-name">LevelDB</a>
201    </td>
202  </tr>
203<tr>
204    <td width="15%" align="right" valign="top" class="summary">
205      <span class="summary-type">&nbsp;</span>
206    </td><td class="summary">
207        <a href="echonest.audio.AmplitudeFactor-class.html" class="summary-name">AmplitudeFactor</a>
208    </td>
209  </tr>
210<tr>
211    <td width="15%" align="right" valign="top" class="summary">
212      <span class="summary-type">&nbsp;</span>
213    </td><td class="summary">
214        <a href="echonest.audio.TimeTruncateFactor-class.html" class="summary-name">TimeTruncateFactor</a>
215    </td>
216  </tr>
217<tr>
218    <td width="15%" align="right" valign="top" class="summary">
219      <span class="summary-type">&nbsp;</span>
220    </td><td class="summary">
221        <a href="echonest.audio.TimeTruncateLength-class.html" class="summary-name">TimeTruncateLength</a>
222    </td>
223  </tr>
224<tr>
225    <td width="15%" align="right" valign="top" class="summary">
226      <span class="summary-type">&nbsp;</span>
227    </td><td class="summary">
228        <a href="echonest.audio.Simultaneous-class.html" class="summary-name">Simultaneous</a><br />
229      Stacks all contained AudioQuanta atop one another, adding their respective
230samples.
231    </td>
232  </tr>
233<tr bgcolor="#e8f0f8" >
234  <th colspan="2" class="group-header"
235    >&nbsp;&nbsp;&nbsp;&nbsp;Exception Classes</th></tr>
236<tr>
237    <td width="15%" align="right" valign="top" class="summary">
238      <span class="summary-type">&nbsp;</span>
239    </td><td class="summary">
240        <a href="echonest.audio.FileTypeError-class.html" class="summary-name">FileTypeError</a>
241    </td>
242  </tr>
243<tr>
244    <td width="15%" align="right" valign="top" class="summary">
245      <span class="summary-type">&nbsp;</span>
246    </td><td class="summary">
247        <a href="echonest.audio.EchoNestRemixError-class.html" class="summary-name">EchoNestRemixError</a><br />
248      Error raised by the Remix API.
249    </td>
250  </tr>
251</table>
252<!-- ==================== FUNCTIONS ==================== -->
253<a name="section-Functions"></a>
254<table class="summary" border="1" cellpadding="3"
255       cellspacing="0" width="100%" bgcolor="white">
256<tr bgcolor="#70b0f0" class="table-header">
257  <td colspan="2" class="table-header">
258    <table border="0" cellpadding="0" cellspacing="0" width="100%">
259      <tr valign="top">
260        <td align="left"><span class="table-header">Functions</span></td>
261        <td align="right" valign="top"
262         ><span class="options">[<a href="#section-Functions"
263         class="privatelink" onclick="toggle_private();"
264         >hide private</a>]</span></td>
265      </tr>
266    </table>
267  </td>
268</tr>
269<tr bgcolor="#e8f0f8" >
270  <th colspan="2" class="group-header"
271    >&nbsp;&nbsp;&nbsp;&nbsp;Audio helper functions</th></tr>
272<tr>
273    <td width="15%" align="right" valign="top" class="summary">
274      <span class="summary-type">&nbsp;</span>
275    </td><td class="summary">
276      <table width="100%" cellpadding="0" cellspacing="0" border="0">
277        <tr>
278          <td><span class="summary-sig"><a href="echonest.audio-module.html#getpieces" class="summary-sig-name">getpieces</a>(<span class="summary-sig-arg">audioData</span>,
279        <span class="summary-sig-arg">segs</span>)</span><br />
280      Collects audio samples for output.</td>
281          <td align="right" valign="top">
282            <span class="codelink"><a href="echonest.audio-pysrc.html#getpieces">source&nbsp;code</a></span>
283            
284          </td>
285        </tr>
286      </table>
287      
288    </td>
289  </tr>
290<tr>
291    <td width="15%" align="right" valign="top" class="summary">
292      <span class="summary-type">&nbsp;</span>
293    </td><td class="summary">
294      <table width="100%" cellpadding="0" cellspacing="0" border="0">
295        <tr>
296          <td><span class="summary-sig"><a href="echonest.audio-module.html#assemble" class="summary-sig-name">assemble</a>(<span class="summary-sig-arg">audioDataList</span>,
297        <span class="summary-sig-arg">numChannels</span>=<span class="summary-sig-default">1</span>,
298        <span class="summary-sig-arg">sampleRate</span>=<span class="summary-sig-default">44100</span>)</span><br />
299      Collects audio samples for output.</td>
300          <td align="right" valign="top">
301            <span class="codelink"><a href="echonest.audio-pysrc.html#assemble">source&nbsp;code</a></span>
302            
303          </td>
304        </tr>
305      </table>
306      
307    </td>
308  </tr>
309<tr>
310    <td width="15%" align="right" valign="top" class="summary">
311      <span class="summary-type">&nbsp;</span>
312    </td><td class="summary">
313      <table width="100%" cellpadding="0" cellspacing="0" border="0">
314        <tr>
315          <td><span class="summary-sig"><a href="echonest.audio-module.html#mix" class="summary-sig-name">mix</a>(<span class="summary-sig-arg">dataA</span>,
316        <span class="summary-sig-arg">dataB</span>,
317        <span class="summary-sig-arg">mix</span>=<span class="summary-sig-default">0.5</span>)</span><br />
318      Mixes two <a href="echonest.audio.AudioData-class.html" class="link">AudioData</a> objects.</td>
319          <td align="right" valign="top">
320            <span class="codelink"><a href="echonest.audio-pysrc.html#mix">source&nbsp;code</a></span>
321            
322          </td>
323        </tr>
324      </table>
325      
326    </td>
327  </tr>
328<tr>
329    <td width="15%" align="right" valign="top" class="summary">
330      <span class="summary-type">&nbsp;</span>
331    </td><td class="summary">
332      <table width="100%" cellpadding="0" cellspacing="0" border="0">
333        <tr>
334          <td><span class="summary-sig"><a href="echonest.audio-module.html#megamix" class="summary-sig-name">megamix</a>(<span class="summary-sig-arg">dataList</span>)</span><br />
335      Mix together any number of <a href="echonest.audio.AudioData-class.html" class="link">AudioData</a> objects.</td>
336          <td align="right" valign="top">
337            <span class="codelink"><a href="echonest.audio-pysrc.html#megamix">source&nbsp;code</a></span>
338            
339          </td>
340        </tr>
341      </table>
342      
343    </td>
344  </tr>
345<tr bgcolor="#e8f0f8" >
346  <th colspan="2" class="group-header"
347    >&nbsp;&nbsp;&nbsp;&nbsp;ffmpeg helper functions</th></tr>
348<tr>
349    <td width="15%" align="right" valign="top" class="summary">
350      <span class="summary-type">&nbsp;</span>
351    </td><td class="summary">
352      <table width="100%" cellpadding="0" cellspacing="0" border="0">
353        <tr>
354          <td><span class="summary-sig"><a name="ffmpeg"></a><span class="summary-sig-name">ffmpeg</span>(<span class="summary-sig-arg">infile</span>,
355        <span class="summary-sig-arg">outfile</span>=<span class="summary-sig-default">None</span>,
356        <span class="summary-sig-arg">overwrite</span>=<span class="summary-sig-default">True</span>,
357        <span class="summary-sig-arg">bitRate</span>=<span class="summary-sig-default">None</span>,
358        <span class="summary-sig-arg">numChannels</span>=<span class="summary-sig-default">None</span>,
359        <span class="summary-sig-arg">sampleRate</span>=<span class="summary-sig-default">None</span>,
360        <span class="summary-sig-arg">verbose</span>=<span class="summary-sig-default">True</span>)</span><br />
361      Executes ffmpeg through the shell to convert or read media files.</td>
362          <td align="right" valign="top">
363            <span class="codelink"><a href="echonest.audio-pysrc.html#ffmpeg">source&nbsp;code</a></span>
364            
365          </td>
366        </tr>
367      </table>
368      
369    </td>
370  </tr>
371<tr>
372    <td width="15%" align="right" valign="top" class="summary">
373      <span class="summary-type">&nbsp;</span>
374    </td><td class="summary">
375      <table width="100%" cellpadding="0" cellspacing="0" border="0">
376        <tr>
377          <td><span class="summary-sig"><a name="settings_from_ffmpeg"></a><span class="summary-sig-name">settings_from_ffmpeg</span>(<span class="summary-sig-arg">parsestring</span>)</span><br />
378      Parses the output of ffmpeg to determine sample rate and frequency of
379an audio file.</td>
380          <td align="right" valign="top">
381            <span class="codelink"><a href="echonest.audio-pysrc.html#settings_from_ffmpeg">source&nbsp;code</a></span>
382            
383          </td>
384        </tr>
385      </table>
386      
387    </td>
388  </tr>
389<tr>
390    <td width="15%" align="right" valign="top" class="summary">
391      <span class="summary-type">&nbsp;</span>
392    </td><td class="summary">
393      <table width="100%" cellpadding="0" cellspacing="0" border="0">
394        <tr>
395          <td><span class="summary-sig"><a name="ffmpeg_error_check"></a><span class="summary-sig-name">ffmpeg_error_check</span>(<span class="summary-sig-arg">parsestring</span>)</span><br />
396      Looks for known errors in the ffmpeg output</td>
397          <td align="right" valign="top">
398            <span class="codelink"><a href="echonest.audio-pysrc.html#ffmpeg_error_check">source&nbsp;code</a></span>
399            
400          </td>
401        </tr>
402      </table>
403      
404    </td>
405  </tr>
406<tr bgcolor="#e8f0f8" >
407  <th colspan="2" class="group-header"
408    >&nbsp;&nbsp;&nbsp;&nbsp;Utility functions</th></tr>
409<tr class="private">
410    <td width="15%" align="right" valign="top" class="summary">
411      <span class="summary-type">&nbsp;</span>
412    </td><td class="summary">
413      <table width="100%" cellpadding="0" cellspacing="0" border="0">
414        <tr>
415          <td><span class="summary-sig"><a name="_dataParser"></a><span class="summary-sig-name">_dataParser</span>(<span class="summary-sig-arg">tag</span>,
416        <span class="summary-sig-arg">nodes</span>)</span></td>
417          <td align="right" valign="top">
418            <span class="codelink"><a href="echonest.audio-pysrc.html#_dataParser">source&nbsp;code</a></span>
419            
420          </td>
421        </tr>
422      </table>
423      
424    </td>
425  </tr>
426<tr class="private">
427    <td width="15%" align="right" valign="top" class="summary">
428      <span class="summary-type">&nbsp;</span>
429    </td><td class="summary">
430      <table width="100%" cellpadding="0" cellspacing="0" border="0">
431        <tr>
432          <td><span class="summary-sig"><a name="_attributeParser"></a><span class="summary-sig-name">_attributeParser</span>(<span class="summary-sig-arg">tag</span>,
433        <span class="summary-sig-arg">nodes</span>)</span></td>
434          <td align="right" valign="top">
435            <span class="codelink"><a href="echonest.audio-pysrc.html#_attributeParser">source&nbsp;code</a></span>
436            
437          </td>
438        </tr>
439      </table>
440      
441    </td>
442  </tr>
443<tr class="private">
444    <td width="15%" align="right" valign="top" class="summary">
445      <span class="summary-type">&nbsp;</span>
446    </td><td class="summary">
447      <table width="100%" cellpadding="0" cellspacing="0" border="0">
448        <tr>
449          <td><span class="summary-sig"><a name="_segmentsParser"></a><span class="summary-sig-name">_segmentsParser</span>(<span class="summary-sig-arg">nodes</span>)</span></td>
450          <td align="right" valign="top">
451            <span class="codelink"><a href="echonest.audio-pysrc.html#_segmentsParser">source&nbsp;code</a></span>
452            
453          </td>
454        </tr>
455      </table>
456      
457    </td>
458  </tr>
459<tr>
460    <td width="15%" align="right" valign="top" class="summary">
461      <span class="summary-type">&nbsp;</span>
462    </td><td class="summary">
463      <table width="100%" cellpadding="0" cellspacing="0" border="0">
464        <tr>
465          <td><span class="summary-sig"><a name="chain_from_mixed"></a><span class="summary-sig-name">chain_from_mixed</span>(<span class="summary-sig-arg">iterables</span>)</span><br />
466      Helper function to flatten a list of elements and lists
467into a list of elements.</td>
468          <td align="right" valign="top">
469            <span class="codelink"><a href="echonest.audio-pysrc.html#chain_from_mixed">source&nbsp;code</a></span>
470            
471          </td>
472        </tr>
473      </table>
474      
475    </td>
476  </tr>
477</table>
478<!-- ==================== VARIABLES ==================== -->
479<a name="section-Variables"></a>
480<table class="summary" border="1" cellpadding="3"
481       cellspacing="0" width="100%" bgcolor="white">
482<tr bgcolor="#70b0f0" class="table-header">
483  <td colspan="2" class="table-header">
484    <table border="0" cellpadding="0" cellspacing="0" width="100%">
485      <tr valign="top">
486        <td align="left"><span class="table-header">Variables</span></td>
487        <td align="right" valign="top"
488         ><span class="options">[<a href="#section-Variables"
489         class="privatelink" onclick="toggle_private();"
490         >hide private</a>]</span></td>
491      </tr>
492    </table>
493  </td>
494</tr>
495<tr>
496    <td width="15%" align="right" valign="top" class="summary">
497      <span class="summary-type">&nbsp;</span>
498    </td><td class="summary">
499        <a href="echonest.audio-module.html#ffmpeg_install_instructions" class="summary-name">ffmpeg_install_instructions</a> = <code title="'''
500en-ffmpeg not found! Please make sure ffmpeg is installed and create a\
501 link as follows:
502    sudo ln -s `which ffmpeg` /usr/local/bin/en-ffmpeg
503'''"><code class="variable-quote">'</code><code class="variable-string">\nen-ffmpeg not found! Please m</code><code class="variable-ellipsis">...</code></code>
504    </td>
505  </tr>
506<tr>
507    <td width="15%" align="right" valign="top" class="summary">
508      <span class="summary-type">&nbsp;</span>
509    </td><td class="summary">
510        <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'echonest'"><code class="variable-quote">'</code><code class="variable-string">echonest</code><code class="variable-quote">'</code></code>
511    </td>
512  </tr>
513</table>
514<!-- ==================== FUNCTION DETAILS ==================== -->
515<a name="section-FunctionDetails"></a>
516<table class="details" border="1" cellpadding="3"
517       cellspacing="0" width="100%" bgcolor="white">
518<tr bgcolor="#70b0f0" class="table-header">
519  <td colspan="2" class="table-header">
520    <table border="0" cellpadding="0" cellspacing="0" width="100%">
521      <tr valign="top">
522        <td align="left"><span class="table-header">Function Details</span></td>
523        <td align="right" valign="top"
524         ><span class="options">[<a href="#section-FunctionDetails"
525         class="privatelink" onclick="toggle_private();"
526         >hide private</a>]</span></td>
527      </tr>
528    </table>
529  </td>
530</tr>
531</table>
532<a name="getpieces"></a>
533<div>
534<table class="details" border="1" cellpadding="3"
535       cellspacing="0" width="100%" bgcolor="white">
536<tr><td>
537  <table width="100%" cellpadding="0" cellspacing="0" border="0">
538  <tr valign="top"><td>
539  <h3 class="epydoc"><span class="sig"><span class="sig-name">getpieces</span>(<span class="sig-arg">audioData</span>,
540        <span class="sig-arg">segs</span>)</span>
541  </h3>
542  </td><td align="right" valign="top"
543    ><span class="codelink"><a href="echonest.audio-pysrc.html#getpieces">source&nbsp;code</a></span>&nbsp;
544    </td>
545  </tr></table>
546  
547  Collects audio samples for output.
548Returns a new <a href="echonest.audio.AudioData-class.html" class="link">AudioData</a> where the new sample data is assembled
549from the input audioData according to the time offsets in each
550of the elements of the input segs (commonly an <a href="echonest.audio.AudioQuantumList-class.html" class="link">AudioQuantumList</a>).
551  <dl class="fields">
552    <dt>Parameters:</dt>
553    <dd><ul class="nomargin-top">
554        <li><strong class="pname"><code>audioData</code></strong> - an <a href="echonest.audio.AudioData-class.html" class="link">AudioData</a> object</li>
555        <li><strong class="pname"><code>segs</code></strong> - an iterable containing objects that may be accessed
556as slices or indices for an <a href="echonest.audio.AudioData-class.html" class="link">AudioData</a></li>
557    </ul></dd>
558  </dl>
559</td></tr></table>
560</div>
561<a name="assemble"></a>
562<div>
563<table class="details" border="1" cellpadding="3"
564       cellspacing="0" width="100%" bgcolor="white">
565<tr><td>
566  <table width="100%" cellpadding="0" cellspacing="0" border="0">
567  <tr valign="top"><td>
568  <h3 class="epydoc"><span class="sig"><span class="sig-name">assemble</span>(<span class="sig-arg">audioDataList</span>,
569        <span class="sig-arg">numChannels</span>=<span class="sig-default">1</span>,
570        <span class="sig-arg">sampleRate</span>=<span class="sig-default">44100</span>)</span>
571  </h3>
572  </td><td align="right" valign="top"
573    ><span class="codelink"><a href="echonest.audio-pysrc.html#assemble">source&nbsp;code</a></span>&nbsp;
574    </td>
575  </tr></table>
576  
577  Collects audio samples for output.
578Returns a new <a href="echonest.audio.AudioData-class.html" class="link">AudioData</a> object assembled
579by concatenating all the elements of audioDataList.
580  <dl class="fields">
581    <dt>Parameters:</dt>
582    <dd><ul class="nomargin-top">
583        <li><strong class="pname"><code>audioDatas</code></strong> - a list of <a href="echonest.audio.AudioData-class.html" class="link">AudioData</a> objects</li>
584    </ul></dd>
585  </dl>
586</td></tr></table>
587</div>
588<a name="mix"></a>
589<div>
590<table class="details" border="1" cellpadding="3"
591       cellspacing="0" width="100%" bgcolor="white">
592<tr><td>
593  <table width="100%" cellpadding="0" cellspacing="0" border="0">
594  <tr valign="top"><td>
595  <h3 class="epydoc"><span class="sig"><span class="sig-name">mix</span>(<span class="sig-arg">dataA</span>,
596        <span class="sig-arg">dataB</span>,
597        <span class="sig-arg">mix</span>=<span class="sig-default">0.5</span>)</span>
598  </h3>
599  </td><td align="right" valign="top"
600    ><span class="codelink"><a href="echonest.audio-pysrc.html#mix">source&nbsp;code</a></span>&nbsp;
601    </td>
602  </tr></table>
603  
604  <p>Mixes two <a href="echonest.audio.AudioData-class.html" class="link">AudioData</a> objects. Assumes they have the same sample rate
605and number of channels.</p>
606<p>Mix takes a float 0-1 and determines the relative mix of two audios.
607i.e., mix=0.9 yields greater presence of dataA in the final mix.</p>
608  <dl class="fields">
609  </dl>
610</td></tr></table>
611</div>
612<a name="megamix"></a>
613<div>
614<table class="details" border="1" cellpadding="3"
615       cellspacing="0" width="100%" bgcolor="white">
616<tr><td>
617  <table width="100%" cellpadding="0" cellspacing="0" border="0">
618  <tr valign="top"><td>
619  <h3 class="epydoc"><span class="sig"><span class="sig-name">megamix</span>(<span class="sig-arg">dataList</span>)</span>
620  </h3>
621  </td><td align="right" valign="top"
622    ><span class="codelink"><a href="echonest.audio-pysrc.html#megamix">source&nbsp;code</a></span>&nbsp;
623    </td>
624  </tr></table>
625  
626  Mix together any number of <a href="echonest.audio.AudioData-class.html" class="link">AudioData</a> objects. Keep the shape of
627the first one in the list. Assume they all have the same sample rate
628and number of channels.
629  <dl class="fields">
630  </dl>
631</td></tr></table>
632</div>
633<br />
634<!-- ==================== VARIABLES DETAILS ==================== -->
635<a name="section-VariablesDetails"></a>
636<table class="details" border="1" cellpadding="3"
637       cellspacing="0" width="100%" bgcolor="white">
638<tr bgcolor="#70b0f0" class="table-header">
639  <td colspan="2" class="table-header">
640    <table border="0" cellpadding="0" cellspacing="0" width="100%">
641      <tr valign="top">
642        <td align="left"><span class="table-header">Variables Details</span></td>
643        <td align="right" valign="top"
644         ><span class="options">[<a href="#section-VariablesDetails"
645         class="privatelink" onclick="toggle_private();"
646         >hide private</a>]</span></td>
647      </tr>
648    </table>
649  </td>
650</tr>
651</table>
652<a name="ffmpeg_install_instructions"></a>
653<div>
654<table class="details" border="1" cellpadding="3"
655       cellspacing="0" width="100%" bgcolor="white">
656<tr><td>
657  <h3 class="epydoc">ffmpeg_install_instructions</h3>
658  
659  <dl class="fields">
660  </dl>
661  <dl class="fields">
662    <dt>Value:</dt>
663      <dd><table><tr><td><pre class="variable">
664<code class="variable-quote">'''</code><code class="variable-string"></code>
665<code class="variable-string">en-ffmpeg not found! Please make sure ffmpeg is installed and create a</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
666<code class="variable-string"> link as follows:</code>
667<code class="variable-string">    sudo ln -s `which ffmpeg` /usr/local/bin/en-ffmpeg</code>
668<code class="variable-string"></code><code class="variable-quote">'''</code>
669</pre></td></tr></table>
670</dd>
671  </dl>
672</td></tr></table>
673</div>
674<br />
675<!-- ==================== NAVIGATION BAR ==================== -->
676<table class="navbar" border="0" width="100%" cellpadding="0"
677       bgcolor="#a0c0ff" cellspacing="0">
678  <tr valign="middle">
679
680  <!-- Tree link -->
681      <th>&nbsp;&nbsp;&nbsp;<a
682        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
683
684  <!-- Index link -->
685      <th>&nbsp;&nbsp;&nbsp;<a
686        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
687
688  <!-- Help link -->
689      <th>&nbsp;&nbsp;&nbsp;<a
690        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
691
692  <!-- Project homepage -->
693      <th class="navbar" align="right" width="100%">
694        <table border="0" cellpadding="0" cellspacing="0">
695          <tr><th class="navbar" align="center"
696            ><a class="navbar" target="_top" href="http://code.google.com/p/echo-nest-remix/">Project Homepage</a></th>
697          </tr></table></th>
698  </tr>
699</table>
700<table border="0" cellpadding="0" cellspacing="0" width="100%%">
701  <tr>
702    <td align="left" class="footer">
703    Generated by Epydoc 3.0.1 on Wed Sep  1 16:08:57 2010
704    </td>
705    <td align="right" class="footer">
706      <a target="mainFrame" href="http://epydoc.sourceforge.net"
707        >http://epydoc.sourceforge.net</a>
708    </td>
709  </tr>
710</table>
711
712<script type="text/javascript">
713  <!--
714  // Private objects are initially displayed (because if
715  // javascript is turned off then we want them to be
716  // visible); but by default, we want to hide them.  So hide
717  // them unless we have a cookie that says to show them.
718  checkCookie();
719  // -->
720</script>
721</body>
722</html>