PageRenderTime 620ms CodeModel.GetById 271ms app.highlight 174ms RepoModel.GetById 168ms app.codeStats 1ms

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

http://echo-nest-remix.googlecode.com/
HTML | 443 lines | 392 code | 28 blank | 23 comment | 0 complexity | ecd5d716935f5ecb9d7341bcb9070b00 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.AudioData32</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;AudioData32
 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.AudioData32-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 AudioData32</h1><p class="nomargin-top"><span class="codelink"><a href="echonest.audio-pysrc.html#AudioData32">source&nbsp;code</a></span></p>
 62<center>
 63
 64</center>
 65<hr />
 66A 32-bit variant of AudioData, intended for data collection on
 67audio rendering with headroom.
 68
 69<!-- ==================== INSTANCE METHODS ==================== -->
 70<a name="section-InstanceMethods"></a>
 71<table class="summary" border="1" cellpadding="3"
 72       cellspacing="0" width="100%" bgcolor="white">
 73<tr bgcolor="#70b0f0" class="table-header">
 74  <td colspan="2" class="table-header">
 75    <table border="0" cellpadding="0" cellspacing="0" width="100%">
 76      <tr valign="top">
 77        <td align="left"><span class="table-header">Instance Methods</span></td>
 78        <td align="right" valign="top"
 79         ><span class="options">[<a href="#section-InstanceMethods"
 80         class="privatelink" onclick="toggle_private();"
 81         >hide private</a>]</span></td>
 82      </tr>
 83    </table>
 84  </td>
 85</tr>
 86<tr>
 87    <td width="15%" align="right" valign="top" class="summary">
 88      <span class="summary-type">&nbsp;</span>
 89    </td><td class="summary">
 90      <table width="100%" cellpadding="0" cellspacing="0" border="0">
 91        <tr>
 92          <td><span class="summary-sig"><a href="echonest.audio.AudioData32-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
 93        <span class="summary-sig-arg">filename</span>=<span class="summary-sig-default">None</span>,
 94        <span class="summary-sig-arg">ndarray</span>=<span class="summary-sig-default">None</span>,
 95        <span class="summary-sig-arg">shape</span>=<span class="summary-sig-default">None</span>,
 96        <span class="summary-sig-arg">sampleRate</span>=<span class="summary-sig-default">None</span>,
 97        <span class="summary-sig-arg">numChannels</span>=<span class="summary-sig-default">None</span>,
 98        <span class="summary-sig-arg">defer</span>=<span class="summary-sig-default">False</span>,
 99        <span class="summary-sig-arg">verbose</span>=<span class="summary-sig-default">True</span>)</span><br />
100      Special form of AudioData to allow for headroom when collecting samples.</td>
101          <td align="right" valign="top">
102            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData32.__init__">source&nbsp;code</a></span>
103            
104          </td>
105        </tr>
106      </table>
107      
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      <table width="100%" cellpadding="0" cellspacing="0" border="0">
115        <tr>
116          <td><span class="summary-sig"><a href="echonest.audio.AudioData32-class.html#load" class="summary-sig-name">load</a>(<span class="summary-sig-arg">self</span>)</span></td>
117          <td align="right" valign="top">
118            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData32.load">source&nbsp;code</a></span>
119            
120          </td>
121        </tr>
122      </table>
123      
124    </td>
125  </tr>
126<tr>
127    <td width="15%" align="right" valign="top" class="summary">
128      <span class="summary-type">&nbsp;</span>
129    </td><td class="summary">
130      <table width="100%" cellpadding="0" cellspacing="0" border="0">
131        <tr>
132          <td><span class="summary-sig"><a href="echonest.audio.AudioData32-class.html#encode" class="summary-sig-name">encode</a>(<span class="summary-sig-arg">self</span>,
133        <span class="summary-sig-arg">filename</span>=<span class="summary-sig-default">None</span>,
134        <span class="summary-sig-arg">mp3</span>=<span class="summary-sig-default">None</span>)</span><br />
135      Outputs an MP3 or WAVE file to <code class="link">filename</code>.</td>
136          <td align="right" valign="top">
137            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData32.encode">source&nbsp;code</a></span>
138            
139          </td>
140        </tr>
141      </table>
142      
143    </td>
144  </tr>
145<tr>
146    <td width="15%" align="right" valign="top" class="summary">
147      <span class="summary-type">&nbsp;</span>
148    </td><td class="summary">
149      <table width="100%" cellpadding="0" cellspacing="0" border="0">
150        <tr>
151          <td><span class="summary-sig"><a name="normalize"></a><span class="summary-sig-name">normalize</span>(<span class="summary-sig-arg">self</span>)</span><br />
152      Return to 16-bit for encoding.</td>
153          <td align="right" valign="top">
154            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData32.normalize">source&nbsp;code</a></span>
155            
156          </td>
157        </tr>
158      </table>
159      
160    </td>
161  </tr>
162<tr>
163    <td width="15%" align="right" valign="top" class="summary">
164      <span class="summary-type">&nbsp;</span>
165    </td><td class="summary">
166      <table width="100%" cellpadding="0" cellspacing="0" border="0">
167        <tr>
168          <td><span class="summary-sig"><a href="echonest.audio.AudioData32-class.html#pad_with_zeros" class="summary-sig-name">pad_with_zeros</a>(<span class="summary-sig-arg">self</span>,
169        <span class="summary-sig-arg">num_samples</span>)</span></td>
170          <td align="right" valign="top">
171            <span class="codelink"><a href="echonest.audio-pysrc.html#AudioData32.pad_with_zeros">source&nbsp;code</a></span>
172            
173          </td>
174        </tr>
175      </table>
176      
177    </td>
178  </tr>
179  <tr>
180    <td colspan="2" class="summary">
181    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="echonest.audio.AudioData-class.html">AudioData</a></code></b>:
182      <code><a href="echonest.audio.AudioData-class.html#__add__">__add__</a></code>,
183      <code><a href="echonest.audio.AudioData-class.html#__getitem__">__getitem__</a></code>,
184      <code><a href="echonest.audio.AudioData-class.html#__len__">__len__</a></code>,
185      <code><a href="echonest.audio.AudioData-class.html#add_at">add_at</a></code>,
186      <code><a href="echonest.audio.AudioData-class.html#append">append</a></code>,
187      <code><a href="echonest.audio.AudioData-class.html#getsample">getsample</a></code>,
188      <code><a href="echonest.audio.AudioData-class.html#getslice">getslice</a></code>,
189      <code><a href="echonest.audio.AudioData-class.html#render">render</a></code>,
190      <code><a href="echonest.audio.AudioData-class.html#sum">sum</a></code>,
191      <code><a href="echonest.audio.AudioData-class.html#unload">unload</a></code>
192      </p>
193    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="echonest.audio.AudioRenderable-class.html">AudioRenderable</a></code></b>:
194      <code><a href="echonest.audio.AudioRenderable-class.html#resolve_source">resolve_source</a></code>,
195      <code><a href="echonest.audio.AudioRenderable-class.html#sources">sources</a></code>
196      </p>
197    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
198      <code>__delattr__</code>,
199      <code>__format__</code>,
200      <code>__getattribute__</code>,
201      <code>__hash__</code>,
202      <code>__new__</code>,
203      <code>__reduce__</code>,
204      <code>__reduce_ex__</code>,
205      <code>__repr__</code>,
206      <code>__setattr__</code>,
207      <code>__sizeof__</code>,
208      <code>__str__</code>,
209      <code>__subclasshook__</code>
210      </p>
211    </td>
212  </tr>
213</table>
214<!-- ==================== STATIC METHODS ==================== -->
215<a name="section-StaticMethods"></a>
216<table class="summary" border="1" cellpadding="3"
217       cellspacing="0" width="100%" bgcolor="white">
218<tr bgcolor="#70b0f0" class="table-header">
219  <td colspan="2" class="table-header">
220    <table border="0" cellpadding="0" cellspacing="0" width="100%">
221      <tr valign="top">
222        <td align="left"><span class="table-header">Static Methods</span></td>
223        <td align="right" valign="top"
224         ><span class="options">[<a href="#section-StaticMethods"
225         class="privatelink" onclick="toggle_private();"
226         >hide private</a>]</span></td>
227      </tr>
228    </table>
229  </td>
230</tr>
231  <tr>
232    <td colspan="2" class="summary">
233    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="echonest.audio.AudioRenderable-class.html">AudioRenderable</a></code></b>:
234      <code><a href="echonest.audio.AudioRenderable-class.html#init_audio_data">init_audio_data</a></code>
235      </p>
236    </td>
237  </tr>
238</table>
239<!-- ==================== PROPERTIES ==================== -->
240<a name="section-Properties"></a>
241<table class="summary" border="1" cellpadding="3"
242       cellspacing="0" width="100%" bgcolor="white">
243<tr bgcolor="#70b0f0" class="table-header">
244  <td colspan="2" class="table-header">
245    <table border="0" cellpadding="0" cellspacing="0" width="100%">
246      <tr valign="top">
247        <td align="left"><span class="table-header">Properties</span></td>
248        <td align="right" valign="top"
249         ><span class="options">[<a href="#section-Properties"
250         class="privatelink" onclick="toggle_private();"
251         >hide private</a>]</span></td>
252      </tr>
253    </table>
254  </td>
255</tr>
256  <tr>
257    <td colspan="2" class="summary">
258    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="echonest.audio.AudioData-class.html">AudioData</a></code></b>:
259      <code><a href="echonest.audio.AudioData-class.html#duration">duration</a></code>,
260      <code><a href="echonest.audio.AudioData-class.html#source">source</a></code>
261      </p>
262    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
263      <code>__class__</code>
264      </p>
265    </td>
266  </tr>
267</table>
268<!-- ==================== METHOD DETAILS ==================== -->
269<a name="section-MethodDetails"></a>
270<table class="details" border="1" cellpadding="3"
271       cellspacing="0" width="100%" bgcolor="white">
272<tr bgcolor="#70b0f0" class="table-header">
273  <td colspan="2" class="table-header">
274    <table border="0" cellpadding="0" cellspacing="0" width="100%">
275      <tr valign="top">
276        <td align="left"><span class="table-header">Method Details</span></td>
277        <td align="right" valign="top"
278         ><span class="options">[<a href="#section-MethodDetails"
279         class="privatelink" onclick="toggle_private();"
280         >hide private</a>]</span></td>
281      </tr>
282    </table>
283  </td>
284</tr>
285</table>
286<a name="__init__"></a>
287<div>
288<table class="details" border="1" cellpadding="3"
289       cellspacing="0" width="100%" bgcolor="white">
290<tr><td>
291  <table width="100%" cellpadding="0" cellspacing="0" border="0">
292  <tr valign="top"><td>
293  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
294        <span class="sig-arg">filename</span>=<span class="sig-default">None</span>,
295        <span class="sig-arg">ndarray</span>=<span class="sig-default">None</span>,
296        <span class="sig-arg">shape</span>=<span class="sig-default">None</span>,
297        <span class="sig-arg">sampleRate</span>=<span class="sig-default">None</span>,
298        <span class="sig-arg">numChannels</span>=<span class="sig-default">None</span>,
299        <span class="sig-arg">defer</span>=<span class="sig-default">False</span>,
300        <span class="sig-arg">verbose</span>=<span class="sig-default">True</span>)</span>
301    <br /><em class="fname">(Constructor)</em>
302  </h3>
303  </td><td align="right" valign="top"
304    ><span class="codelink"><a href="echonest.audio-pysrc.html#AudioData32.__init__">source&nbsp;code</a></span>&nbsp;
305    </td>
306  </tr></table>
307  
308  Special form of AudioData to allow for headroom when collecting samples.
309  <dl class="fields">
310    <dt>Parameters:</dt>
311    <dd><ul class="nomargin-top">
312        <li><strong class="pname"><code>filename</code></strong> - a path to an audio file for loading its sample
313data into the AudioData.data</li>
314        <li><strong class="pname"><code>ndarray</code></strong> - a <a class="rst-rst-reference external 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>
315        <li><strong class="pname"><code>shape</code></strong> - a tuple of array dimensions</li>
316        <li><strong class="pname"><code>sampleRate</code></strong> - sample rate, in Hz</li>
317        <li><strong class="pname"><code>numChannels</code></strong> - number of channels</li>
318    </ul></dd>
319    <dt>Overrides:
320        object.__init__
321    </dt>
322  </dl>
323</td></tr></table>
324</div>
325<a name="load"></a>
326<div>
327<table class="details" border="1" cellpadding="3"
328       cellspacing="0" width="100%" bgcolor="white">
329<tr><td>
330  <table width="100%" cellpadding="0" cellspacing="0" border="0">
331  <tr valign="top"><td>
332  <h3 class="epydoc"><span class="sig"><span class="sig-name">load</span>(<span class="sig-arg">self</span>)</span>
333  </h3>
334  </td><td align="right" valign="top"
335    ><span class="codelink"><a href="echonest.audio-pysrc.html#AudioData32.load">source&nbsp;code</a></span>&nbsp;
336    </td>
337  </tr></table>
338  
339  
340  <dl class="fields">
341    <dt>Overrides:
342        <a href="echonest.audio.AudioData-class.html#load">AudioData.load</a>
343    </dt>
344  </dl>
345</td></tr></table>
346</div>
347<a name="encode"></a>
348<div>
349<table class="details" border="1" cellpadding="3"
350       cellspacing="0" width="100%" bgcolor="white">
351<tr><td>
352  <table width="100%" cellpadding="0" cellspacing="0" border="0">
353  <tr valign="top"><td>
354  <h3 class="epydoc"><span class="sig"><span class="sig-name">encode</span>(<span class="sig-arg">self</span>,
355        <span class="sig-arg">filename</span>=<span class="sig-default">None</span>,
356        <span class="sig-arg">mp3</span>=<span class="sig-default">None</span>)</span>
357  </h3>
358  </td><td align="right" valign="top"
359    ><span class="codelink"><a href="echonest.audio-pysrc.html#AudioData32.encode">source&nbsp;code</a></span>&nbsp;
360    </td>
361  </tr></table>
362  
363  Outputs an MP3 or WAVE file to <code class="link">filename</code>.
364Format is determined by <code class="link">mp3</code> parameter.
365  <dl class="fields">
366    <dt>Overrides:
367        <a href="echonest.audio.AudioRenderable-class.html#encode">AudioRenderable.encode</a>
368    </dt>
369  </dl>
370</td></tr></table>
371</div>
372<a name="pad_with_zeros"></a>
373<div>
374<table class="details" border="1" cellpadding="3"
375       cellspacing="0" width="100%" bgcolor="white">
376<tr><td>
377  <table width="100%" cellpadding="0" cellspacing="0" border="0">
378  <tr valign="top"><td>
379  <h3 class="epydoc"><span class="sig"><span class="sig-name">pad_with_zeros</span>(<span class="sig-arg">self</span>,
380        <span class="sig-arg">num_samples</span>)</span>
381  </h3>
382  </td><td align="right" valign="top"
383    ><span class="codelink"><a href="echonest.audio-pysrc.html#AudioData32.pad_with_zeros">source&nbsp;code</a></span>&nbsp;
384    </td>
385  </tr></table>
386  
387  
388  <dl class="fields">
389    <dt>Overrides:
390        <a href="echonest.audio.AudioData-class.html#pad_with_zeros">AudioData.pad_with_zeros</a>
391    </dt>
392  </dl>
393</td></tr></table>
394</div>
395<br />
396<!-- ==================== NAVIGATION BAR ==================== -->
397<table class="navbar" border="0" width="100%" cellpadding="0"
398       bgcolor="#a0c0ff" cellspacing="0">
399  <tr valign="middle">
400
401  <!-- Tree link -->
402      <th>&nbsp;&nbsp;&nbsp;<a
403        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
404
405  <!-- Index link -->
406      <th>&nbsp;&nbsp;&nbsp;<a
407        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
408
409  <!-- Help link -->
410      <th>&nbsp;&nbsp;&nbsp;<a
411        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
412
413  <!-- Project homepage -->
414      <th class="navbar" align="right" width="100%">
415        <table border="0" cellpadding="0" cellspacing="0">
416          <tr><th class="navbar" align="center"
417            ><a class="navbar" target="_top" href="http://code.google.com/p/echo-nest-remix/">Project Homepage</a></th>
418          </tr></table></th>
419  </tr>
420</table>
421<table border="0" cellpadding="0" cellspacing="0" width="100%%">
422  <tr>
423    <td align="left" class="footer">
424    Generated by Epydoc 3.0.1 on Wed Sep  1 16:08:58 2010
425    </td>
426    <td align="right" class="footer">
427      <a target="mainFrame" href="http://epydoc.sourceforge.net"
428        >http://epydoc.sourceforge.net</a>
429    </td>
430  </tr>
431</table>
432
433<script type="text/javascript">
434  <!--
435  // Private objects are initially displayed (because if
436  // javascript is turned off then we want them to be
437  // visible); but by default, we want to hide them.  So hide
438  // them unless we have a cookie that says to show them.
439  checkCookie();
440  // -->
441</script>
442</body>
443</html>