PageRenderTime 745ms CodeModel.GetById 262ms app.highlight 352ms RepoModel.GetById 111ms app.codeStats 1ms

/apidocs/echonest.action-pysrc.html

http://echo-nest-remix.googlecode.com/
HTML | 681 lines | 650 code | 10 blank | 21 comment | 0 complexity | e8349a1ef0a0c6334538e8d31c747e12 MD5 | raw file

Large files files are truncated, but you can click here to view the full 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.action</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;action
 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.action-pysrc.html"
 54            target="_top">no&nbsp;frames</a>]</span></td></tr>
 55      </table>
 56    </td>
 57  </tr>
 58</table>
 59<h1 class="epydoc">Source Code for <a href="echonest.action-module.html">Module echonest.action</a></h1>
 60<pre class="py-src">
 61<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
 62<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"># encoding: utf-8</tt> </tt>
 63<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
 64<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">action.py</tt> </tt>
 65<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 66<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">Created by Tristan Jehan and Jason Sundram.</tt> </tt>
 67<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
 68<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
 69<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">numpy</tt> <tt class="py-keyword">import</tt> <tt class="py-name">zeros</tt><tt class="py-op">,</tt> <tt id="link-0" class="py-name" targets="Variable echonest.video.multiply=echonest.video-module.html#multiply"><a title="echonest.video.multiply" class="py-name" href="#" onclick="return doclink('link-0', 'multiply', 'link-0');">multiply</a></tt><tt class="py-op">,</tt> <tt class="py-name">float32</tt> </tt>
 70<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">math</tt> <tt class="py-keyword">import</tt> <tt class="py-name">atan</tt><tt class="py-op">,</tt> <tt id="link-1" class="py-name" targets="Variable echonest.video.pi=echonest.video-module.html#pi"><a title="echonest.video.pi" class="py-name" href="#" onclick="return doclink('link-1', 'pi', 'link-1');">pi</a></tt> </tt>
 71<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
 72<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"> </tt>
 73<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-2" class="py-name" targets="Package echonest=echonest-module.html"><a title="echonest" class="py-name" href="#" onclick="return doclink('link-2', 'echonest', 'link-2');">echonest</a></tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Module echonest.audio=echonest.audio-module.html,Variable pyechonest.artist.Artist.audio=pyechonest.artist.Artist-class.html#audio"><a title="echonest.audio
 74pyechonest.artist.Artist.audio" class="py-name" href="#" onclick="return doclink('link-3', 'audio', 'link-3');">audio</a></tt> <tt class="py-keyword">import</tt> <tt id="link-4" class="py-name" targets="Function echonest.audio.assemble()=echonest.audio-module.html#assemble"><a title="echonest.audio.assemble" class="py-name" href="#" onclick="return doclink('link-4', 'assemble', 'link-4');">assemble</a></tt><tt class="py-op">,</tt> <tt id="link-5" class="py-name" targets="Class echonest.audio.AudioData=echonest.audio.AudioData-class.html"><a title="echonest.audio.AudioData" class="py-name" href="#" onclick="return doclink('link-5', 'AudioData', 'link-5');">AudioData</a></tt> </tt>
 75<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">cAction</tt> <tt class="py-keyword">import</tt> <tt class="py-name">limit</tt><tt class="py-op">,</tt> <tt class="py-name">crossfade</tt><tt class="py-op">,</tt> <tt id="link-6" class="py-name" targets="Method echonest.video.EditableFrames.fadein()=echonest.video.EditableFrames-class.html#fadein"><a title="echonest.video.EditableFrames.fadein" class="py-name" href="#" onclick="return doclink('link-6', 'fadein', 'link-6');">fadein</a></tt><tt class="py-op">,</tt> <tt id="link-7" class="py-name" targets="Method echonest.video.EditableFrames.fadeout()=echonest.video.EditableFrames-class.html#fadeout"><a title="echonest.video.EditableFrames.fadeout" class="py-name" href="#" onclick="return doclink('link-7', 'fadeout', 'link-7');">fadeout</a></tt> </tt>
 76<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"> </tt>
 77<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">dirac</tt> </tt>
 78<a name="rows"></a><div id="rows-def"><a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"> </tt>
 79<a name="L18"></a><tt class="py-lineno"> 18</tt> <a class="py-toggle" href="#" id="rows-toggle" onclick="return toggle('rows');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.action-module.html#rows">rows</a><tt class="py-op">(</tt><tt class="py-param">m</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
 80</div><div id="rows-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="rows-expanded"><a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line">    <tt class="py-docstring">"""returns the # of rows in a numpy matrix"""</tt> </tt>
 81<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">m</tt><tt class="py-op">.</tt><tt class="py-name">shape</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
 82</div><a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"> </tt>
 83<a name="make_mono"></a><div id="make_mono-def"><a name="L22"></a><tt class="py-lineno"> 22</tt> <a class="py-toggle" href="#" id="make_mono-toggle" onclick="return toggle('make_mono');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.action-module.html#make_mono">make_mono</a><tt class="py-op">(</tt><tt class="py-param">track</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
 84</div><div id="make_mono-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="make_mono-expanded"><a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">    <tt class="py-docstring">"Converts stereo tracks to mono; leaves mono tracks alone."</tt> </tt>
 85<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-8" class="py-name" targets="Module pyechonest.track=pyechonest.track-module.html"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-8', 'track', 'link-8');">track</a></tt><tt class="py-op">.</tt><tt class="py-name">data</tt><tt class="py-op">.</tt><tt class="py-name">ndim</tt> <tt class="py-op">==</tt> <tt class="py-number">2</tt><tt class="py-op">:</tt> </tt>
 86<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line">        <tt class="py-name">mono</tt> <tt class="py-op">=</tt> <tt class="py-name">zeros</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-9" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-9', 'track', 'link-8');">track</a></tt><tt class="py-op">.</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
 87<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">i</tt><tt class="py-op">,</tt> <tt class="py-name">d</tt> <tt class="py-keyword">in</tt> <tt class="py-name">enumerate</tt><tt class="py-op">(</tt><tt id="link-10" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-10', 'track', 'link-8');">track</a></tt><tt class="py-op">.</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
 88<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">            <tt class="py-name">mono</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">d</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
 89<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">        <tt id="link-11" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-11', 'track', 'link-8');">track</a></tt><tt class="py-op">.</tt><tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">mono</tt> </tt>
 90<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-12" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-12', 'track', 'link-8');">track</a></tt> </tt>
 91</div><a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line"> </tt>
 92<a name="make_stereo"></a><div id="make_stereo-def"><a name="L31"></a><tt class="py-lineno"> 31</tt> <a class="py-toggle" href="#" id="make_stereo-toggle" onclick="return toggle('make_stereo');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.action-module.html#make_stereo">make_stereo</a><tt class="py-op">(</tt><tt class="py-param">track</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
 93</div><div id="make_stereo-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="make_stereo-expanded"><a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">    <tt class="py-docstring">"""If the track is mono, doubles it. otherwise, does nothing."""</tt> </tt>
 94<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-13" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-13', 'track', 'link-8');">track</a></tt><tt class="py-op">.</tt><tt class="py-name">data</tt><tt class="py-op">.</tt><tt class="py-name">ndim</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
 95<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">        <tt class="py-name">stereo</tt> <tt class="py-op">=</tt> <tt class="py-name">zeros</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt id="link-14" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-14', 'track', 'link-8');">track</a></tt><tt class="py-op">.</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
 96<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">i</tt><tt class="py-op">,</tt> <tt class="py-name">d</tt> <tt class="py-keyword">in</tt> <tt class="py-name">enumerate</tt><tt class="py-op">(</tt><tt id="link-15" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-15', 'track', 'link-8');">track</a></tt><tt class="py-op">.</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
 97<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">            <tt class="py-name">stereo</tt><tt class="py-op">[</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">d</tt><tt class="py-op">,</tt> <tt class="py-name">d</tt><tt class="py-op">)</tt> </tt>
 98<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">        <tt id="link-16" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-16', 'track', 'link-8');">track</a></tt><tt class="py-op">.</tt><tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">stereo</tt> </tt>
 99<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-17" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-17', 'track', 'link-8');">track</a></tt> </tt>
100</div><a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">     </tt>
101<a name="render"></a><div id="render-def"><a name="L40"></a><tt class="py-lineno"> 40</tt> <a class="py-toggle" href="#" id="render-toggle" onclick="return toggle('render');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.action-module.html#render">render</a><tt class="py-op">(</tt><tt class="py-param">actions</tt><tt class="py-op">,</tt> <tt class="py-param">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
102</div><div id="render-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="render-expanded"><a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">    <tt class="py-docstring">"""Calls render on each action in actions, concatenates the results, renders an audio file, and returns a path to the file"""</tt> </tt>
103<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">    <tt class="py-name">pieces</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">a</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name" targets="Method echonest.action.Blend.render()=echonest.action.Blend-class.html#render,Method echonest.action.Crossfade.render()=echonest.action.Crossfade-class.html#render,Method echonest.action.Crossmatch.render()=echonest.action.Crossmatch-class.html#render,Method echonest.action.Fadein.render()=echonest.action.Fadein-class.html#render,Method echonest.action.Fadeout.render()=echonest.action.Fadeout-class.html#render,Method echonest.action.Playback.render()=echonest.action.Playback-class.html#render,Function echonest.action.render()=echonest.action-module.html#render,Method echonest.audio.AudioData.render()=echonest.audio.AudioData-class.html#render,Method echonest.audio.AudioQuantum.render()=echonest.audio.AudioQuantum-class.html#render,Method echonest.audio.AudioQuantumList.render()=echonest.audio.AudioQuantumList-class.html#render,Method echonest.audio.ModifiedRenderable.render()=echonest.audio.ModifiedRenderable-class.html#render,Method echonest.audio.Simultaneous.render()=echonest.audio.Simultaneous-class.html#render,Method echonest.video.ImageSequence.render()=echonest.video.ImageSequence-class.html#render"><a title="echonest.action.Blend.render
104echonest.action.Crossfade.render
105echonest.action.Crossmatch.render
106echonest.action.Fadein.render
107echonest.action.Fadeout.render
108echonest.action.Playback.render
109echonest.action.render
110echonest.audio.AudioData.render
111echonest.audio.AudioQuantum.render
112echonest.audio.AudioQuantumList.render
113echonest.audio.ModifiedRenderable.render
114echonest.audio.Simultaneous.render
115echonest.video.ImageSequence.render" class="py-name" href="#" onclick="return doclink('link-18', 'render', 'link-18');">render</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">a</tt> <tt class="py-keyword">in</tt> <tt class="py-name">actions</tt><tt class="py-op">]</tt> </tt>
116<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">    <tt class="py-name">out</tt> <tt class="py-op">=</tt> <tt id="link-19" class="py-name"><a title="echonest.audio.assemble" class="py-name" href="#" onclick="return doclink('link-19', 'assemble', 'link-4');">assemble</a></tt><tt class="py-op">(</tt><tt class="py-name">pieces</tt><tt class="py-op">,</tt> <tt class="py-name">numChannels</tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-name">sampleRate</tt><tt class="py-op">=</tt><tt class="py-number">44100</tt><tt class="py-op">)</tt> <tt class="py-comment"># TODO: make these vary.</tt> </tt>
117<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">out</tt><tt class="py-op">,</tt> <tt class="py-name">out</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Method echonest.audio.AudioData.encode()=echonest.audio.AudioData-class.html#encode,Method echonest.audio.AudioData32.encode()=echonest.audio.AudioData32-class.html#encode,Method echonest.audio.AudioRenderable.encode()=echonest.audio.AudioRenderable-class.html#encode"><a title="echonest.audio.AudioData.encode
118echonest.audio.AudioData32.encode
119echonest.audio.AudioRenderable.encode" class="py-name" href="#" onclick="return doclink('link-20', 'encode', 'link-20');">encode</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
120</div><a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line"> </tt>
121<a name="Playback"></a><div id="Playback-def"><a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"> </tt>
122<a name="L47"></a><tt class="py-lineno"> 47</tt> <a class="py-toggle" href="#" id="Playback-toggle" onclick="return toggle('Playback');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="echonest.action.Playback-class.html">Playback</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
123</div><div id="Playback-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Playback-expanded"><a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">    <tt class="py-docstring">"""A snippet of the given track with start and duration. Volume leveling may be applied."""</tt> </tt>
124<a name="Playback.__init__"></a><div id="Playback.__init__-def"><a name="L49"></a><tt class="py-lineno"> 49</tt> <a class="py-toggle" href="#" id="Playback.__init__-toggle" onclick="return toggle('Playback.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.action.Playback-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">track</tt><tt class="py-op">,</tt> <tt class="py-param">start</tt><tt class="py-op">,</tt> <tt class="py-param">duration</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
125</div><div id="Playback.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Playback.__init__-expanded"><a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-21', 'track', 'link-8');">track</a></tt> <tt class="py-op">=</tt> <tt id="link-22" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-22', 'track', 'link-8');">track</a></tt> </tt>
126<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name" targets="Variable echonest.audio.AudioQuantumList.start=echonest.audio.AudioQuantumList-class.html#start"><a title="echonest.audio.AudioQuantumList.start" class="py-name" href="#" onclick="return doclink('link-23', 'start', 'link-23');">start</a></tt> <tt class="py-op">=</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt id="link-24" class="py-name"><a title="echonest.audio.AudioQuantumList.start" class="py-name" href="#" onclick="return doclink('link-24', 'start', 'link-23');">start</a></tt><tt class="py-op">)</tt> </tt>
127<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-25" class="py-name" targets="Variable echonest.audio.AudioData.duration=echonest.audio.AudioData-class.html#duration,Variable echonest.audio.AudioQuantumList.duration=echonest.audio.AudioQuantumList-class.html#duration,Variable echonest.audio.LocalAudioFile.duration=echonest.audio.LocalAudioFile-class.html#duration,Variable echonest.audio.ModifiedRenderable.duration=echonest.audio.ModifiedRenderable-class.html#duration,Variable echonest.audio.Simultaneous.duration=echonest.audio.Simultaneous-class.html#duration,Method echonest.audio.TimeTruncateFactor.duration()=echonest.audio.TimeTruncateFactor-class.html#duration,Method echonest.audio.TimeTruncateLength.duration()=echonest.audio.TimeTruncateLength-class.html#duration,Function echonest.sorting.duration()=echonest.sorting-module.html#duration,Method echonest.video.ImageSequence.duration()=echonest.video.ImageSequence-class.html#duration"><a title="echonest.audio.AudioData.duration
128echonest.audio.AudioQuantumList.duration
129echonest.audio.LocalAudioFile.duration
130echonest.audio.ModifiedRenderable.duration
131echonest.audio.Simultaneous.duration
132echonest.audio.TimeTruncateFactor.duration
133echonest.audio.TimeTruncateLength.duration
134echonest.sorting.duration
135echonest.video.ImageSequence.duration" class="py-name" href="#" onclick="return doclink('link-25', 'duration', 'link-25');">duration</a></tt> <tt class="py-op">=</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt id="link-26" class="py-name"><a title="echonest.audio.AudioData.duration
136echonest.audio.AudioQuantumList.duration
137echonest.audio.LocalAudioFile.duration
138echonest.audio.ModifiedRenderable.duration
139echonest.audio.Simultaneous.duration
140echonest.audio.TimeTruncateFactor.duration
141echonest.audio.TimeTruncateLength.duration
142echonest.sorting.duration
143echonest.video.ImageSequence.duration" class="py-name" href="#" onclick="return doclink('link-26', 'duration', 'link-25');">duration</a></tt><tt class="py-op">)</tt> </tt>
144</div><a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">     </tt>
145<a name="Playback.render"></a><div id="Playback.render-def"><a name="L54"></a><tt class="py-lineno"> 54</tt> <a class="py-toggle" href="#" id="Playback.render-toggle" onclick="return toggle('Playback.render');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.action.Playback-class.html#render">render</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
146</div><div id="Playback.render-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Playback.render-expanded"><a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">        <tt class="py-comment"># self has start and duration, so it is a valid index into track.</tt> </tt>
147<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">        <tt class="py-name">output</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-27', 'track', 'link-8');">track</a></tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">]</tt> </tt>
148<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">        <tt class="py-comment"># Normalize volume if necessary</tt> </tt>
149<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">        <tt class="py-name">gain</tt> <tt class="py-op">=</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-28" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-28', 'track', 'link-8');">track</a></tt><tt class="py-op">,</tt> <tt class="py-string">'gain'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
150<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">gain</tt> <tt class="py-op">!=</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
151<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">            <tt class="py-comment"># limit expects a float32 vector</tt> </tt>
152<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">            <tt class="py-name">output</tt><tt class="py-op">.</tt><tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">limit</tt><tt class="py-op">(</tt><tt id="link-29" class="py-name"><a title="echonest.video.multiply" class="py-name" href="#" onclick="return doclink('link-29', 'multiply', 'link-0');">multiply</a></tt><tt class="py-op">(</tt><tt class="py-name">output</tt><tt class="py-op">.</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">float32</tt><tt class="py-op">(</tt><tt class="py-name">gain</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
153<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">             </tt>
154<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">output</tt> </tt>
155</div><a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">     </tt>
156<a name="Playback.__repr__"></a><div id="Playback.__repr__-def"><a name="L65"></a><tt class="py-lineno"> 65</tt> <a class="py-toggle" href="#" id="Playback.__repr__-toggle" onclick="return toggle('Playback.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.action.Playback-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
157</div><div id="Playback.__repr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Playback.__repr__-expanded"><a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">"&lt;Playback '%s'&gt;"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-30', 'track', 'link-8');">track</a></tt><tt class="py-op">.</tt><tt class="py-name">analysis</tt><tt class="py-op">.</tt><tt class="py-name">name</tt> </tt>
158</div><a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">     </tt>
159<a name="Playback.__str__"></a><div id="Playback.__str__-def"><a name="L68"></a><tt class="py-lineno"> 68</tt> <a class="py-toggle" href="#" id="Playback.__str__-toggle" onclick="return toggle('Playback.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.action.Playback-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
160</div><div id="Playback.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Playback.__str__-expanded"><a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">"Playback\t%.3f\t-&gt; %.3f\t (%.3f)\t%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name"><a title="echonest.audio.AudioQuantumList.start" class="py-name" href="#" onclick="return doclink('link-31', 'start', 'link-23');">start</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-32" class="py-name"><a title="echonest.audio.AudioQuantumList.start" class="py-name" href="#" onclick="return doclink('link-32', 'start', 'link-23');">start</a></tt><tt class="py-op">+</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name"><a title="echonest.audio.AudioData.duration
161echonest.audio.AudioQuantumList.duration
162echonest.audio.LocalAudioFile.duration
163echonest.audio.ModifiedRenderable.duration
164echonest.audio.Simultaneous.duration
165echonest.audio.TimeTruncateFactor.duration
166echonest.audio.TimeTruncateLength.duration
167echonest.sorting.duration
168echonest.video.ImageSequence.duration" class="py-name" href="#" onclick="return doclink('link-33', 'duration', 'link-25');">duration</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="echonest.audio.AudioData.duration
169echonest.audio.AudioQuantumList.duration
170echonest.audio.LocalAudioFile.duration
171echonest.audio.ModifiedRenderable.duration
172echonest.audio.Simultaneous.duration
173echonest.audio.TimeTruncateFactor.duration
174echonest.audio.TimeTruncateLength.duration
175echonest.sorting.duration
176echonest.video.ImageSequence.duration" class="py-name" href="#" onclick="return doclink('link-34', 'duration', 'link-25');">duration</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-35', 'track', 'link-8');">track</a></tt><tt class="py-op">.</tt><tt class="py-name">analysis</tt><tt class="py-op">.</tt><tt class="py-name">name</tt><tt class="py-op">)</tt> </tt>
177</div></div><a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"> </tt>
178<a name="Fadeout"></a><div id="Fadeout-def"><a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line"> </tt>
179<a name="L72"></a><tt class="py-lineno"> 72</tt> <a class="py-toggle" href="#" id="Fadeout-toggle" onclick="return toggle('Fadeout');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="echonest.action.Fadeout-class.html">Fadeout</a><tt class="py-op">(</tt><tt class="py-base-class">Playback</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
180</div><div id="Fadeout-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Fadeout-expanded"><a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">    <tt class="py-docstring">"""Fadeout"""</tt> </tt>
181<a name="Fadeout.render"></a><div id="Fadeout.render-def"><a name="L74"></a><tt class="py-lineno"> 74</tt> <a class="py-toggle" href="#" id="Fadeout.render-toggle" onclick="return toggle('Fadeout.render');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.action.Fadeout-class.html#render">render</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
182</div><div id="Fadeout.render-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Fadeout.render-expanded"><a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">        <tt class="py-name">gain</tt> <tt class="py-op">=</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-36', 'track', 'link-8');">track</a></tt><tt class="py-op">,</tt> <tt class="py-string">'gain'</tt><tt class="py-op">,</tt> <tt class="py-number">1.0</tt><tt class="py-op">)</tt> </tt>
183<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">        <tt class="py-name">output</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-37', 'track', 'link-8');">track</a></tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">]</tt> </tt>
184<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">        <tt class="py-comment"># second parameter is optional -- in place function for now</tt> </tt>
185<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">        <tt class="py-name">output</tt><tt class="py-op">.</tt><tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt id="link-38" class="py-name"><a title="echonest.video.EditableFrames.fadeout" class="py-name" href="#" onclick="return doclink('link-38', 'fadeout', 'link-7');">fadeout</a></tt><tt class="py-op">(</tt><tt class="py-name">output</tt><tt class="py-op">.</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">gain</tt><tt class="py-op">)</tt> </tt>
186<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">output</tt> </tt>
187</div><a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">     </tt>
188<a name="Fadeout.__repr__"></a><div id="Fadeout.__repr__-def"><a name="L81"></a><tt class="py-lineno"> 81</tt> <a class="py-toggle" href="#" id="Fadeout.__repr__-toggle" onclick="return toggle('Fadeout.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.action.Fadeout-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
189</div><div id="Fadeout.__repr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Fadeout.__repr__-expanded"><a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">"&lt;Fadeout '%s'&gt;"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-39" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-39', 'track', 'link-8');">track</a></tt><tt class="py-op">.</tt><tt class="py-name">analysis</tt><tt class="py-op">.</tt><tt class="py-name">name</tt> </tt>
190</div><a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">     </tt>
191<a name="Fadeout.__str__"></a><div id="Fadeout.__str__-def"><a name="L84"></a><tt class="py-lineno"> 84</tt> <a class="py-toggle" href="#" id="Fadeout.__str__-toggle" onclick="return toggle('Fadeout.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.action.Fadeout-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
192</div><div id="Fadeout.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Fadeout.__str__-expanded"><a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">"Fade out\t%.3f\t-&gt; %.3f\t (%.3f)\t%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-40" class="py-name"><a title="echonest.audio.AudioQuantumList.start" class="py-name" href="#" onclick="return doclink('link-40', 'start', 'link-23');">start</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-41" class="py-name"><a title="echonest.audio.AudioQuantumList.start" class="py-name" href="#" onclick="return doclink('link-41', 'start', 'link-23');">start</a></tt><tt class="py-op">+</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-42" class="py-name"><a title="echonest.audio.AudioData.duration
193echonest.audio.AudioQuantumList.duration
194echonest.audio.LocalAudioFile.duration
195echonest.audio.ModifiedRenderable.duration
196echonest.audio.Simultaneous.duration
197echonest.audio.TimeTruncateFactor.duration
198echonest.audio.TimeTruncateLength.duration
199echonest.sorting.duration
200echonest.video.ImageSequence.duration" class="py-name" href="#" onclick="return doclink('link-42', 'duration', 'link-25');">duration</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-43" class="py-name"><a title="echonest.audio.AudioData.duration
201echonest.audio.AudioQuantumList.duration
202echonest.audio.LocalAudioFile.duration
203echonest.audio.ModifiedRenderable.duration
204echonest.audio.Simultaneous.duration
205echonest.audio.TimeTruncateFactor.duration
206echonest.audio.TimeTruncateLength.duration
207echonest.sorting.duration
208echonest.video.ImageSequence.duration" class="py-name" href="#" onclick="return doclink('link-43', 'duration', 'link-25');">duration</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-44" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-44', 'track', 'link-8');">track</a></tt><tt class="py-op">.</tt><tt class="py-name">analysis</tt><tt class="py-op">.</tt><tt class="py-name">name</tt><tt class="py-op">)</tt> </tt>
209</div></div><a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line"> </tt>
210<a name="Fadein"></a><div id="Fadein-def"><a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line"> </tt>
211<a name="L88"></a><tt class="py-lineno"> 88</tt> <a class="py-toggle" href="#" id="Fadein-toggle" onclick="return toggle('Fadein');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="echonest.action.Fadein-class.html">Fadein</a><tt class="py-op">(</tt><tt class="py-base-class">Playback</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
212</div><div id="Fadein-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Fadein-expanded"><a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">    <tt class="py-docstring">"""Fadein"""</tt> </tt>
213<a name="Fadein.render"></a><div id="Fadein.render-def"><a name="L90"></a><tt class="py-lineno"> 90</tt> <a class="py-toggle" href="#" id="Fadein.render-toggle" onclick="return toggle('Fadein.render');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.action.Fadein-class.html#render">render</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
214</div><div id="Fadein.render-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Fadein.render-expanded"><a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">        <tt class="py-name">gain</tt> <tt class="py-op">=</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-45" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-45', 'track', 'link-8');">track</a></tt><tt class="py-op">,</tt> <tt class="py-string">'gain'</tt><tt class="py-op">,</tt> <tt class="py-number">1.0</tt><tt class="py-op">)</tt> </tt>
215<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">        <tt class="py-name">output</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-46', 'track', 'link-8');">track</a></tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">]</tt> </tt>
216<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">        <tt class="py-comment"># second parameter is optional -- in place function for now</tt> </tt>
217<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">        <tt class="py-name">output</tt><tt class="py-op">.</tt><tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt id="link-47" class="py-name"><a title="echonest.video.EditableFrames.fadein" class="py-name" href="#" onclick="return doclink('link-47', 'fadein', 'link-6');">fadein</a></tt><tt class="py-op">(</tt><tt class="py-name">output</tt><tt class="py-op">.</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">gain</tt><tt class="py-op">)</tt> </tt>
218<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">output</tt> </tt>
219</div><a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">     </tt>
220<a name="Fadein.__repr__"></a><div id="Fadein.__repr__-def"><a name="L97"></a><tt class="py-lineno"> 97</tt> <a class="py-toggle" href="#" id="Fadein.__repr__-toggle" onclick="return toggle('Fadein.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.action.Fadein-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
221</div><div id="Fadein.__repr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Fadein.__repr__-expanded"><a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">"&lt;Fadein '%s'&gt;"</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-48" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-48', 'track', 'link-8');">track</a></tt><tt class="py-op">.</tt><tt class="py-name">analysis</tt><tt class="py-op">.</tt><tt class="py-name">name</tt> </tt>
222</div><a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">     </tt>
223<a name="Fadein.__str__"></a><div id="Fadein.__str__-def"><a name="L100"></a><tt class="py-lineno">100</tt> <a class="py-toggle" href="#" id="Fadein.__str__-toggle" onclick="return toggle('Fadein.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.action.Fadein-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
224</div><div id="Fadein.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Fadein.__str__-expanded"><a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-string">"Fade in\t%.3f\t-&gt; %.3f\t (%.3f)\t%s"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-49" class="py-name"><a title="echonest.audio.AudioQuantumList.start" class="py-name" href="#" onclick="return doclink('link-49', 'start', 'link-23');">start</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="echonest.audio.AudioQuantumList.start" class="py-name" href="#" onclick="return doclink('link-50', 'start', 'link-23');">start</a></tt><tt class="py-op">+</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-51" class="py-name"><a title="echonest.audio.AudioData.duration
225echonest.audio.AudioQuantumList.duration
226echonest.audio.LocalAudioFile.duration
227echonest.audio.ModifiedRenderable.duration
228echonest.audio.Simultaneous.duration
229echonest.audio.TimeTruncateFactor.duration
230echonest.audio.TimeTruncateLength.duration
231echonest.sorting.duration
232echonest.video.ImageSequence.duration" class="py-name" href="#" onclick="return doclink('link-51', 'duration', 'link-25');">duration</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-52" class="py-name"><a title="echonest.audio.AudioData.duration
233echonest.audio.AudioQuantumList.duration
234echonest.audio.LocalAudioFile.duration
235echonest.audio.ModifiedRenderable.duration
236echonest.audio.Simultaneous.duration
237echonest.audio.TimeTruncateFactor.duration
238echonest.audio.TimeTruncateLength.duration
239echonest.sorting.duration
240echonest.video.ImageSequence.duration" class="py-name" href="#" onclick="return doclink('link-52', 'duration', 'link-25');">duration</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-53" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-53', 'track', 'link-8');">track</a></tt><tt class="py-op">.</tt><tt class="py-name">analysis</tt><tt class="py-op">.</tt><tt class="py-name">name</tt><tt class="py-op">)</tt> </tt>
241</div></div><a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line"> </tt>
242<a name="Edit"></a><div id="Edit-def"><a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line"> </tt>
243<a name="L104"></a><tt class="py-lineno">104</tt> <a class="py-toggle" href="#" id="Edit-toggle" onclick="return toggle('Edit');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="echonest.action.Edit-class.html">Edit</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
244</div><div id="Edit-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Edit-expanded"><a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">    <tt class="py-docstring">"""Refer to a snippet of audio"""</tt> </tt>
245<a name="Edit.__init__"></a><div id="Edit.__init__-def"><a name="L106"></a><tt class="py-lineno">106</tt> <a class="py-toggle" href="#" id="Edit.__init__-toggle" onclick="return toggle('Edit.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.action.Edit-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">track</tt><tt class="py-op">,</tt> <tt class="py-param">start</tt><tt class="py-op">,</tt> <tt class="py-param">duration</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
246</div><div id="Edit.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Edit.__init__-expanded"><a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-54" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-54', 'track', 'link-8');">track</a></tt> <tt class="py-op">=</tt> <tt id="link-55" class="py-name"><a title="pyechonest.track" class="py-name" href="#" onclick="return doclink('link-55', 'track', 'link-8');">track</a></tt> </tt>
247<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-56" class="py-name"><a title="echonest.audio.AudioQuantumList.start" class="py-name" href="#" onclick="return doclink('link-56', 'start', 'link-23');">start</a></tt> <tt class="py-op">=</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt id="link-57" class="py-name"><a title="echonest.audio.AudioQuantumList.start" class="py-name" href="#" onclick="return doclink('link-57', 'start', 'link-23');">start</a></tt><tt class="py-op">)</tt> </tt>
248<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="echonest.audio.AudioData.duration
249echonest.audio.AudioQuantumList.duration
250echonest.audio.LocalAudioFile.duration
251echonest.audio.ModifiedRenderable.duration
252echonest.audio.Simultaneous.duration
253echonest.audio.TimeTruncateFactor.duration
254echonest.audio.TimeTruncateLength.duration
255echonest.sorting.duration
256echonest.video.ImageSequence.duration" class="py-name" href="#" onclick="return doclink('link-58', 'duration', 'link-25');">duration</a></tt> <tt class="py-op">=</tt> <tt class="py-name">float</tt><tt class="py-op">(</tt><tt id="link-59" class="py-name"><a title="echonest.audio.AudioData.duration
257echonest.audio.AudioQuantumList.duration
258echonest.audio.LocalAudioFile.duration
259echonest.audio.ModifiedRenderable.duration
260echonest.audio.Simultaneous.duration
261echonest.audio.TimeTruncateFactor.duration
262echonest.audio.TimeTruncateLength.duration
263echonest.sorting.duration
264echonest.video.ImageSequence.dura

Large files files are truncated, but you can click here to view the full file