PageRenderTime 428ms CodeModel.GetById 20ms app.highlight 13ms RepoModel.GetById 17ms app.codeStats 0ms

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

http://echo-nest-remix.googlecode.com/
HTML | 143 lines | 112 code | 10 blank | 21 comment | 0 complexity | 422d030bef381329fadda0868f02d439 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.example_print_file</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;example_print_file
 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.example_print_file-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.example_print_file-module.html">Module echonest.support.midi.example_print_file</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-docstring">"""
</tt> </tt>
 64<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-docstring">This is an example that uses the MidiToText eventhandler. When an 
</tt> </tt>
 65<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-docstring">event is triggered on it, it prints the event to the console.
</tt> </tt>
 66<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-docstring">
</tt> </tt>
 67<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-docstring">It gets the events from the MidiInFile.
</tt> </tt>
 68<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-docstring">
</tt> </tt>
 69<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-docstring">So it prints all the events from the infile to the console. great for 
</tt> </tt>
 70<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-docstring">debugging :-s
</tt> </tt>
 71<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
 72<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line">
 </tt>
 73<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line">
 </tt>
 74<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"><tt class="py-comment"># get data</tt>
 </tt>
 75<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable echonest.support.midi.example_print_file.test_file=echonest.support.midi.example_print_file-module.html#test_file"><a title="echonest.support.midi.example_print_file.test_file" class="py-name" href="#" onclick="return doclink('link-0', 'test_file', 'link-0');">test_file</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'test/midifiles/minimal-cubase-type0.mid'</tt> </tt>
 76<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line">
 </tt>
 77<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line"><tt class="py-comment"># do parsing</tt>
 </tt>
 78<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-1" class="py-name" targets="Module echonest.support.midi.MidiInFile=echonest.support.midi.MidiInFile-module.html,Class echonest.support.midi.MidiInFile.MidiInFile=echonest.support.midi.MidiInFile.MidiInFile-class.html"><a title="echonest.support.midi.MidiInFile
 79echonest.support.midi.MidiInFile.MidiInFile" class="py-name" href="#" onclick="return doclink('link-1', 'MidiInFile', 'link-1');">MidiInFile</a></tt> <tt class="py-keyword">import</tt> <tt id="link-2" class="py-name"><a title="echonest.support.midi.MidiInFile
 80echonest.support.midi.MidiInFile.MidiInFile" class="py-name" href="#" onclick="return doclink('link-2', 'MidiInFile', 'link-1');">MidiInFile</a></tt> </tt>
 81<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name" targets="Module echonest.support.midi.MidiToText=echonest.support.midi.MidiToText-module.html,Class echonest.support.midi.MidiToText.MidiToText=echonest.support.midi.MidiToText.MidiToText-class.html"><a title="echonest.support.midi.MidiToText
 82echonest.support.midi.MidiToText.MidiToText" class="py-name" href="#" onclick="return doclink('link-3', 'MidiToText', 'link-3');">MidiToText</a></tt> <tt class="py-keyword">import</tt> <tt id="link-4" class="py-name"><a title="echonest.support.midi.MidiToText
 83echonest.support.midi.MidiToText.MidiToText" class="py-name" href="#" onclick="return doclink('link-4', 'MidiToText', 'link-3');">MidiToText</a></tt> <tt class="py-comment"># the event handler</tt> </tt>
 84<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line"><tt id="link-5" class="py-name" targets="Variable echonest.support.midi.example_print_file.midiIn=echonest.support.midi.example_print_file-module.html#midiIn"><a title="echonest.support.midi.example_print_file.midiIn" class="py-name" href="#" onclick="return doclink('link-5', 'midiIn', 'link-5');">midiIn</a></tt> <tt class="py-op">=</tt> <tt id="link-6" class="py-name"><a title="echonest.support.midi.MidiInFile
 85echonest.support.midi.MidiInFile.MidiInFile" class="py-name" href="#" onclick="return doclink('link-6', 'MidiInFile', 'link-1');">MidiInFile</a></tt><tt class="py-op">(</tt><tt id="link-7" class="py-name"><a title="echonest.support.midi.MidiToText
 86echonest.support.midi.MidiToText.MidiToText" class="py-name" href="#" onclick="return doclink('link-7', 'MidiToText', 'link-3');">MidiToText</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-8" class="py-name"><a title="echonest.support.midi.example_print_file.test_file" class="py-name" href="#" onclick="return doclink('link-8', 'test_file', 'link-0');">test_file</a></tt><tt class="py-op">)</tt> </tt>
 87<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line"><tt id="link-9" class="py-name"><a title="echonest.support.midi.example_print_file.midiIn" class="py-name" href="#" onclick="return doclink('link-9', 'midiIn', 'link-5');">midiIn</a></tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Method echonest.support.midi.MidiInFile.MidiInFile.read()=echonest.support.midi.MidiInFile.MidiInFile-class.html#read,Method echonest.support.midi.MidiInStream.MidiInStream.read()=echonest.support.midi.MidiInStream.MidiInStream-class.html#read"><a title="echonest.support.midi.MidiInFile.MidiInFile.read
 88echonest.support.midi.MidiInStream.MidiInStream.read" class="py-name" href="#" onclick="return doclink('link-10', 'read', 'link-10');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
 89<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line"> </tt><script type="text/javascript">
 90<!--
 91expandto(location.href);
 92// -->
 93</script>
 94</pre>
 95<br />
 96<!-- ==================== NAVIGATION BAR ==================== -->
 97<table class="navbar" border="0" width="100%" cellpadding="0"
 98       bgcolor="#a0c0ff" cellspacing="0">
 99  <tr valign="middle">
100
101  <!-- Tree link -->
102      <th>&nbsp;&nbsp;&nbsp;<a
103        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
104
105  <!-- Index link -->
106      <th>&nbsp;&nbsp;&nbsp;<a
107        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
108
109  <!-- Help link -->
110      <th>&nbsp;&nbsp;&nbsp;<a
111        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
112
113  <!-- Project homepage -->
114      <th class="navbar" align="right" width="100%">
115        <table border="0" cellpadding="0" cellspacing="0">
116          <tr><th class="navbar" align="center"
117            ><a class="navbar" target="_top" href="http://code.google.com/p/echo-nest-remix/">Project Homepage</a></th>
118          </tr></table></th>
119  </tr>
120</table>
121<table border="0" cellpadding="0" cellspacing="0" width="100%%">
122  <tr>
123    <td align="left" class="footer">
124    Generated by Epydoc 3.0.1 on Wed Sep  1 16:09:00 2010
125    </td>
126    <td align="right" class="footer">
127      <a target="mainFrame" href="http://epydoc.sourceforge.net"
128        >http://epydoc.sourceforge.net</a>
129    </td>
130  </tr>
131</table>
132
133<script type="text/javascript">
134  <!--
135  // Private objects are initially displayed (because if
136  // javascript is turned off then we want them to be
137  // visible); but by default, we want to hide them.  So hide
138  // them unless we have a cookie that says to show them.
139  checkCookie();
140  // -->
141</script>
142</body>
143</html>