PageRenderTime 292ms CodeModel.GetById 131ms app.highlight 89ms RepoModel.GetById 61ms app.codeStats 1ms

/apidocs/echonest.support.midi.RawOutstreamFile-pysrc.html

http://echo-nest-remix.googlecode.com/
HTML | 201 lines | 170 code | 10 blank | 21 comment | 0 complexity | 849d500112f67e526fb924d58e9c4c37 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.support.midi.RawOutstreamFile</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.support-module.html">Package&nbsp;support</a> ::
 44        <a href="echonest.support.midi-module.html">Package&nbsp;midi</a> ::
 45        Module&nbsp;RawOutstreamFile
 46      </span>
 47    </td>
 48    <td>
 49      <table cellpadding="0" cellspacing="0">
 50        <!-- hide/show private -->
 51        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
 52    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
 53        <tr><td align="right"><span class="options"
 54            >[<a href="frames.html" target="_top">frames</a
 55            >]&nbsp;|&nbsp;<a href="echonest.support.midi.RawOutstreamFile-pysrc.html"
 56            target="_top">no&nbsp;frames</a>]</span></td></tr>
 57      </table>
 58    </td>
 59  </tr>
 60</table>
 61<h1 class="epydoc">Source Code for <a href="echonest.support.midi.RawOutstreamFile-module.html">Module echonest.support.midi.RawOutstreamFile</a></h1>
 62<pre class="py-src">
 63<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-comment"># -*- coding: ISO-8859-1 -*-</tt>
 </tt>
 64<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line">
 </tt>
 65<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-comment"># standard library imports</tt>
 </tt>
 66<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
 67<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">types</tt> <tt class="py-keyword">import</tt> <tt class="py-name">StringType</tt> </tt>
 68<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">struct</tt> <tt class="py-keyword">import</tt> <tt class="py-name">unpack</tt> </tt>
 69<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">cStringIO</tt> <tt class="py-keyword">import</tt> <tt class="py-name">StringIO</tt> </tt>
 70<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line">
 </tt>
 71<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-comment"># custom import</tt>
 </tt>
 72<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module echonest.support.midi.DataTypeConverters=echonest.support.midi.DataTypeConverters-module.html"><a title="echonest.support.midi.DataTypeConverters" class="py-name" href="#" onclick="return doclink('link-0', 'DataTypeConverters', 'link-0');">DataTypeConverters</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Function echonest.support.midi.DataTypeConverters.writeBew()=echonest.support.midi.DataTypeConverters-module.html#writeBew,Method echonest.support.midi.RawOutstreamFile.RawOutstreamFile.writeBew()=echonest.support.midi.RawOutstreamFile.RawOutstreamFile-class.html#writeBew"><a title="echonest.support.midi.DataTypeConverters.writeBew
 73echonest.support.midi.RawOutstreamFile.RawOutstreamFile.writeBew" class="py-name" href="#" onclick="return doclink('link-1', 'writeBew', 'link-1');">writeBew</a></tt><tt class="py-op">,</tt> <tt id="link-2" class="py-name" targets="Function echonest.support.midi.DataTypeConverters.writeVar()=echonest.support.midi.DataTypeConverters-module.html#writeVar"><a title="echonest.support.midi.DataTypeConverters.writeVar" class="py-name" href="#" onclick="return doclink('link-2', 'writeVar', 'link-2');">writeVar</a></tt><tt class="py-op">,</tt> <tt id="link-3" class="py-name" targets="Function echonest.support.midi.DataTypeConverters.fromBytes()=echonest.support.midi.DataTypeConverters-module.html#fromBytes"><a title="echonest.support.midi.DataTypeConverters.fromBytes" class="py-name" href="#" onclick="return doclink('link-3', 'fromBytes', 'link-3');">fromBytes</a></tt> </tt>
 74<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line">
 </tt>
 75<a name="RawOutstreamFile"></a><div id="RawOutstreamFile-def"><a name="L12"></a><tt class="py-lineno">12</tt> <a class="py-toggle" href="#" id="RawOutstreamFile-toggle" onclick="return toggle('RawOutstreamFile');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="echonest.support.midi.RawOutstreamFile.RawOutstreamFile-class.html">RawOutstreamFile</a><tt class="py-op">:</tt> </tt>
 76</div><div id="RawOutstreamFile-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="RawOutstreamFile-expanded"><a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line">    
 </tt>
 77<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line">    <tt class="py-docstring">"""
</tt> </tt>
 78<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line"><tt class="py-docstring">    
</tt> </tt>
 79<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"><tt class="py-docstring">    Writes a midi file to disk.
</tt> </tt>
 80<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"><tt class="py-docstring">    
</tt> </tt>
 81<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
 82<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line">
 </tt>
 83<a name="RawOutstreamFile.__init__"></a><div id="RawOutstreamFile.__init__-def"><a name="L20"></a><tt class="py-lineno">20</tt> <a class="py-toggle" href="#" id="RawOutstreamFile.__init__-toggle" onclick="return toggle('RawOutstreamFile.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.RawOutstreamFile.RawOutstreamFile-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">outfile</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
 84</div><div id="RawOutstreamFile.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="RawOutstreamFile.__init__-expanded"><a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt> <tt class="py-op">=</tt> <tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
 85<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outfile</tt> <tt class="py-op">=</tt> <tt class="py-name">outfile</tt> </tt>
 86</div><a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line">
 </tt>
 87<a name="L24"></a><tt class="py-lineno">24</tt>  <tt class="py-line">
 </tt>
 88<a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line">    <tt class="py-comment"># native data reading functions</tt>
 </tt>
 89<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line">
 </tt>
 90<a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line">
 </tt>
 91<a name="RawOutstreamFile.writeSlice"></a><div id="RawOutstreamFile.writeSlice-def"><a name="L28"></a><tt class="py-lineno">28</tt> <a class="py-toggle" href="#" id="RawOutstreamFile.writeSlice-toggle" onclick="return toggle('RawOutstreamFile.writeSlice');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.RawOutstreamFile.RawOutstreamFile-class.html#writeSlice">writeSlice</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">str_slice</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
 92</div><div id="RawOutstreamFile.writeSlice-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="RawOutstreamFile.writeSlice-expanded"><a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line">        <tt class="py-docstring">"Writes the next text slice to the raw data"</tt> </tt>
 93<a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Method echonest.support.midi.MidiOutFile.MidiOutFile.write()=echonest.support.midi.MidiOutFile.MidiOutFile-class.html#write,Method echonest.support.midi.RawOutstreamFile.RawOutstreamFile.write()=echonest.support.midi.RawOutstreamFile.RawOutstreamFile-class.html#write"><a title="echonest.support.midi.MidiOutFile.MidiOutFile.write
 94echonest.support.midi.RawOutstreamFile.RawOutstreamFile.write" class="py-name" href="#" onclick="return doclink('link-4', 'write', 'link-4');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">str_slice</tt><tt class="py-op">)</tt> </tt>
 95</div><a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line">        
 </tt>
 96<a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line">        
 </tt>
 97<a name="RawOutstreamFile.writeBew"></a><div id="RawOutstreamFile.writeBew-def"><a name="L33"></a><tt class="py-lineno">33</tt> <a class="py-toggle" href="#" id="RawOutstreamFile.writeBew-toggle" onclick="return toggle('RawOutstreamFile.writeBew');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.RawOutstreamFile.RawOutstreamFile-class.html#writeBew">writeBew</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-param">length</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
 98</div><div id="RawOutstreamFile.writeBew-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="RawOutstreamFile.writeBew-expanded"><a name="L34"></a><tt class="py-lineno">34</tt>  <tt class="py-line">        <tt class="py-docstring">"Writes a value to the file as big endian word"</tt> </tt>
 99<a name="L35"></a><tt class="py-lineno">35</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-5" class="py-name" targets="Method echonest.support.midi.RawOutstreamFile.RawOutstreamFile.writeSlice()=echonest.support.midi.RawOutstreamFile.RawOutstreamFile-class.html#writeSlice"><a title="echonest.support.midi.RawOutstreamFile.RawOutstreamFile.writeSlice" class="py-name" href="#" onclick="return doclink('link-5', 'writeSlice', 'link-5');">writeSlice</a></tt><tt class="py-op">(</tt><tt id="link-6" class="py-name"><a title="echonest.support.midi.DataTypeConverters.writeBew
100echonest.support.midi.RawOutstreamFile.RawOutstreamFile.writeBew" class="py-name" href="#" onclick="return doclink('link-6', 'writeBew', 'link-1');">writeBew</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
101</div><a name="L36"></a><tt class="py-lineno">36</tt>  <tt class="py-line">
 </tt>
102<a name="L37"></a><tt class="py-lineno">37</tt>  <tt class="py-line">
 </tt>
103<a name="RawOutstreamFile.writeVarLen"></a><div id="RawOutstreamFile.writeVarLen-def"><a name="L38"></a><tt class="py-lineno">38</tt> <a class="py-toggle" href="#" id="RawOutstreamFile.writeVarLen-toggle" onclick="return toggle('RawOutstreamFile.writeVarLen');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.RawOutstreamFile.RawOutstreamFile-class.html#writeVarLen">writeVarLen</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
104</div><div id="RawOutstreamFile.writeVarLen-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="RawOutstreamFile.writeVarLen-expanded"><a name="L39"></a><tt class="py-lineno">39</tt>  <tt class="py-line">        <tt class="py-docstring">"Writes a variable length word to the file"</tt> </tt>
105<a name="L40"></a><tt class="py-lineno">40</tt>  <tt class="py-line">        <tt class="py-name">var</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name"><a title="echonest.support.midi.RawOutstreamFile.RawOutstreamFile.writeSlice" class="py-name" href="#" onclick="return doclink('link-7', 'writeSlice', 'link-5');">writeSlice</a></tt><tt class="py-op">(</tt><tt id="link-8" class="py-name"><a title="echonest.support.midi.DataTypeConverters.writeVar" class="py-name" href="#" onclick="return doclink('link-8', 'writeVar', 'link-2');">writeVar</a></tt><tt class="py-op">(</tt><tt class="py-name">value</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
106</div><a name="L41"></a><tt class="py-lineno">41</tt>  <tt class="py-line">
 </tt>
107<a name="L42"></a><tt class="py-lineno">42</tt>  <tt class="py-line">
 </tt>
108<a name="RawOutstreamFile.write"></a><div id="RawOutstreamFile.write-def"><a name="L43"></a><tt class="py-lineno">43</tt> <a class="py-toggle" href="#" id="RawOutstreamFile.write-toggle" onclick="return toggle('RawOutstreamFile.write');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.RawOutstreamFile.RawOutstreamFile-class.html#write">write</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
109</div><div id="RawOutstreamFile.write-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="RawOutstreamFile.write-expanded"><a name="L44"></a><tt class="py-lineno">44</tt>  <tt class="py-line">        <tt class="py-docstring">"Writes to disc"</tt> </tt>
110<a name="L45"></a><tt class="py-lineno">45</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outfile</tt><tt class="py-op">:</tt> </tt>
111<a name="L46"></a><tt class="py-lineno">46</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outfile</tt><tt class="py-op">,</tt> <tt class="py-name">StringType</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
112<a name="L47"></a><tt class="py-lineno">47</tt>  <tt class="py-line">                <tt class="py-name">outfile</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">outfile</tt><tt class="py-op">,</tt> <tt class="py-string">'wb'</tt><tt class="py-op">)</tt> </tt>
113<a name="L48"></a><tt class="py-lineno">48</tt>  <tt class="py-line">                <tt class="py-name">outfile</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name"><a title="echonest.support.midi.MidiOutFile.MidiOutFile.write
114echonest.support.midi.RawOutstreamFile.RawOutstreamFile.write" class="py-name" href="#" onclick="return doclink('link-9', 'write', 'link-4');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Method echonest.support.midi.RawOutstreamFile.RawOutstreamFile.getvalue()=echonest.support.midi.RawOutstreamFile.RawOutstreamFile-class.html#getvalue"><a title="echonest.support.midi.RawOutstreamFile.RawOutstreamFile.getvalue" class="py-name" href="#" onclick="return doclink('link-10', 'getvalue', 'link-10');">getvalue</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
115<a name="L49"></a><tt class="py-lineno">49</tt>  <tt class="py-line">                <tt class="py-name">outfile</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method echonest.support.midi.MidiInStream.MidiInStream.close()=echonest.support.midi.MidiInStream.MidiInStream-class.html#close"><a title="echonest.support.midi.MidiInStream.MidiInStream.close" class="py-name" href="#" onclick="return doclink('link-11', 'close', 'link-11');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
116<a name="L50"></a><tt class="py-lineno">50</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
117<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 class="py-name">outfile</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name"><a title="echonest.support.midi.MidiOutFile.MidiOutFile.write
118echonest.support.midi.RawOutstreamFile.RawOutstreamFile.write" class="py-name" href="#" onclick="return doclink('link-12', 'write', 'link-4');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name"><a title="echonest.support.midi.RawOutstreamFile.RawOutstreamFile.getvalue" class="py-name" href="#" onclick="return doclink('link-13', 'getvalue', 'link-10');">getvalue</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
119<a name="L52"></a><tt class="py-lineno">52</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
120<a name="L53"></a><tt class="py-lineno">53</tt>  <tt class="py-line">            <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stdout</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name"><a title="echonest.support.midi.MidiOutFile.MidiOutFile.write
121echonest.support.midi.RawOutstreamFile.RawOutstreamFile.write" class="py-name" href="#" onclick="return doclink('link-14', 'write', 'link-4');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name"><a title="echonest.support.midi.RawOutstreamFile.RawOutstreamFile.getvalue" class="py-name" href="#" onclick="return doclink('link-15', 'getvalue', 'link-10');">getvalue</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
122</div><a name="L54"></a><tt class="py-lineno">54</tt>  <tt class="py-line">                
 </tt>
123<a name="RawOutstreamFile.getvalue"></a><div id="RawOutstreamFile.getvalue-def"><a name="L55"></a><tt class="py-lineno">55</tt> <a class="py-toggle" href="#" id="RawOutstreamFile.getvalue-toggle" onclick="return toggle('RawOutstreamFile.getvalue');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.RawOutstreamFile.RawOutstreamFile-class.html#getvalue">getvalue</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
124</div><div id="RawOutstreamFile.getvalue-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="RawOutstreamFile.getvalue-expanded"><a name="L56"></a><tt class="py-lineno">56</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">buffer</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name"><a title="echonest.support.midi.RawOutstreamFile.RawOutstreamFile.getvalue" class="py-name" href="#" onclick="return doclink('link-16', 'getvalue', 'link-10');">getvalue</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
125</div></div><a name="L57"></a><tt class="py-lineno">57</tt>  <tt class="py-line">
 </tt>
126<a name="L58"></a><tt class="py-lineno">58</tt>  <tt class="py-line">
 </tt>
127<a name="L59"></a><tt class="py-lineno">59</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
128<a name="L60"></a><tt class="py-lineno">60</tt>  <tt class="py-line">
 </tt>
129<a name="L61"></a><tt class="py-lineno">61</tt>  <tt class="py-line">    <tt id="link-17" class="py-name" targets="Variable echonest.support.midi.example_mimimal_type0.out_file=echonest.support.midi.example_mimimal_type0-module.html#out_file,Variable echonest.support.midi.example_transpose_octave.out_file=echonest.support.midi.example_transpose_octave-module.html#out_file"><a title="echonest.support.midi.example_mimimal_type0.out_file
130echonest.support.midi.example_transpose_octave.out_file" class="py-name" href="#" onclick="return doclink('link-17', 'out_file', 'link-17');">out_file</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'test/midifiles/midiout.mid'</tt> </tt>
131<a name="L62"></a><tt class="py-lineno">62</tt>  <tt class="py-line">    <tt id="link-18" class="py-name"><a title="echonest.support.midi.example_mimimal_type0.out_file
132echonest.support.midi.example_transpose_octave.out_file" class="py-name" href="#" onclick="return doclink('link-18', 'out_file', 'link-17');">out_file</a></tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
133<a name="L63"></a><tt class="py-lineno">63</tt>  <tt class="py-line">    <tt class="py-name">rawOut</tt> <tt class="py-op">=</tt> <tt id="link-19" class="py-name" targets="Module echonest.support.midi.RawOutstreamFile=echonest.support.midi.RawOutstreamFile-module.html,Class echonest.support.midi.RawOutstreamFile.RawOutstreamFile=echonest.support.midi.RawOutstreamFile.RawOutstreamFile-class.html"><a title="echonest.support.midi.RawOutstreamFile
134echonest.support.midi.RawOutstreamFile.RawOutstreamFile" class="py-name" href="#" onclick="return doclink('link-19', 'RawOutstreamFile', 'link-19');">RawOutstreamFile</a></tt><tt class="py-op">(</tt><tt id="link-20" class="py-name"><a title="echonest.support.midi.example_mimimal_type0.out_file
135echonest.support.midi.example_transpose_octave.out_file" class="py-name" href="#" onclick="return doclink('link-20', 'out_file', 'link-17');">out_file</a></tt><tt class="py-op">)</tt> </tt>
136<a name="L64"></a><tt class="py-lineno">64</tt>  <tt class="py-line">    <tt class="py-name">rawOut</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="echonest.support.midi.RawOutstreamFile.RawOutstreamFile.writeSlice" class="py-name" href="#" onclick="return doclink('link-21', 'writeSlice', 'link-5');">writeSlice</a></tt><tt class="py-op">(</tt><tt class="py-string">'MThd'</tt><tt class="py-op">)</tt> </tt>
137<a name="L65"></a><tt class="py-lineno">65</tt>  <tt class="py-line">    <tt class="py-name">rawOut</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name"><a title="echonest.support.midi.DataTypeConverters.writeBew
138echonest.support.midi.RawOutstreamFile.RawOutstreamFile.writeBew" class="py-name" href="#" onclick="return doclink('link-22', 'writeBew', 'link-1');">writeBew</a></tt><tt class="py-op">(</tt><tt class="py-number">6</tt><tt class="py-op">,</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt> </tt>
139<a name="L66"></a><tt class="py-lineno">66</tt>  <tt class="py-line">    <tt class="py-name">rawOut</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name"><a title="echonest.support.midi.DataTypeConverters.writeBew
140echonest.support.midi.RawOutstreamFile.RawOutstreamFile.writeBew" class="py-name" href="#" onclick="return doclink('link-23', 'writeBew', 'link-1');">writeBew</a></tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
141<a name="L67"></a><tt class="py-lineno">67</tt>  <tt class="py-line">    <tt class="py-name">rawOut</tt><tt class="py-op">.</tt><tt id="link-24" class="py-name"><a title="echonest.support.midi.DataTypeConverters.writeBew
142echonest.support.midi.RawOutstreamFile.RawOutstreamFile.writeBew" class="py-name" href="#" onclick="return doclink('link-24', 'writeBew', 'link-1');">writeBew</a></tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
143<a name="L68"></a><tt class="py-lineno">68</tt>  <tt class="py-line">    <tt class="py-name">rawOut</tt><tt class="py-op">.</tt><tt id="link-25" class="py-name"><a title="echonest.support.midi.DataTypeConverters.writeBew
144echonest.support.midi.RawOutstreamFile.RawOutstreamFile.writeBew" class="py-name" href="#" onclick="return doclink('link-25', 'writeBew', 'link-1');">writeBew</a></tt><tt class="py-op">(</tt><tt class="py-number">15360</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
145<a name="L69"></a><tt class="py-lineno">69</tt>  <tt class="py-line">    <tt class="py-name">rawOut</tt><tt class="py-op">.</tt><tt id="link-26" class="py-name"><a title="echonest.support.midi.MidiOutFile.MidiOutFile.write
146echonest.support.midi.RawOutstreamFile.RawOutstreamFile.write" class="py-name" href="#" onclick="return doclink('link-26', 'write', 'link-4');">write</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
147<a name="L70"></a><tt class="py-lineno">70</tt>  <tt class="py-line"> </tt><script type="text/javascript">
148<!--
149expandto(location.href);
150// -->
151</script>
152</pre>
153<br />
154<!-- ==================== NAVIGATION BAR ==================== -->
155<table class="navbar" border="0" width="100%" cellpadding="0"
156       bgcolor="#a0c0ff" cellspacing="0">
157  <tr valign="middle">
158
159  <!-- Tree link -->
160      <th>&nbsp;&nbsp;&nbsp;<a
161        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
162
163  <!-- Index link -->
164      <th>&nbsp;&nbsp;&nbsp;<a
165        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
166
167  <!-- Help link -->
168      <th>&nbsp;&nbsp;&nbsp;<a
169        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
170
171  <!-- Project homepage -->
172      <th class="navbar" align="right" width="100%">
173        <table border="0" cellpadding="0" cellspacing="0">
174          <tr><th class="navbar" align="center"
175            ><a class="navbar" target="_top" href="http://code.google.com/p/echo-nest-remix/">Project Homepage</a></th>
176          </tr></table></th>
177  </tr>
178</table>
179<table border="0" cellpadding="0" cellspacing="0" width="100%%">
180  <tr>
181    <td align="left" class="footer">
182    Generated by Epydoc 3.0.1 on Wed Sep  1 16:09:00 2010
183    </td>
184    <td align="right" class="footer">
185      <a target="mainFrame" href="http://epydoc.sourceforge.net"
186        >http://epydoc.sourceforge.net</a>
187    </td>
188  </tr>
189</table>
190
191<script type="text/javascript">
192  <!--
193  // Private objects are initially displayed (because if
194  // javascript is turned off then we want them to be
195  // visible); but by default, we want to hide them.  So hide
196  // them unless we have a cookie that says to show them.
197  checkCookie();
198  // -->
199</script>
200</body>
201</html>