PageRenderTime 54ms CodeModel.GetById 2ms app.highlight 16ms RepoModel.GetById 15ms app.codeStats 1ms

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

http://echo-nest-remix.googlecode.com/
HTML | 150 lines | 119 code | 10 blank | 21 comment | 0 complexity | 83f383a61e5009301e077654c90535d5 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_channel_0</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_channel_0
 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_channel_0-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_channel_0-module.html">Module echonest.support.midi.example_print_channel_0</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-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module echonest.support.midi.MidiOutStream=echonest.support.midi.MidiOutStream-module.html,Class echonest.support.midi.MidiOutStream.MidiOutStream=echonest.support.midi.MidiOutStream.MidiOutStream-class.html"><a title="echonest.support.midi.MidiOutStream
 64echonest.support.midi.MidiOutStream.MidiOutStream" class="py-name" href="#" onclick="return doclink('link-0', 'MidiOutStream', 'link-0');">MidiOutStream</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name"><a title="echonest.support.midi.MidiOutStream
 65echonest.support.midi.MidiOutStream.MidiOutStream" class="py-name" href="#" onclick="return doclink('link-1', 'MidiOutStream', 'link-0');">MidiOutStream</a></tt> </tt>
 66<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-2" 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
 67echonest.support.midi.MidiInFile.MidiInFile" class="py-name" href="#" onclick="return doclink('link-2', 'MidiInFile', 'link-2');">MidiInFile</a></tt> <tt class="py-keyword">import</tt> <tt id="link-3" class="py-name"><a title="echonest.support.midi.MidiInFile
 68echonest.support.midi.MidiInFile.MidiInFile" class="py-name" href="#" onclick="return doclink('link-3', 'MidiInFile', 'link-2');">MidiInFile</a></tt> </tt>
 69<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line">
 </tt>
 70<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-string">"""
</tt> </tt>
 71<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-string">This prints all note on events on midi channel 0
</tt> </tt>
 72<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-string">"""</tt> </tt>
 73<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line">
 </tt>
 74<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line">
 </tt>
 75<a name="Transposer"></a><div id="Transposer-def"><a name="L9"></a><tt class="py-lineno"> 9</tt> <a class="py-toggle" href="#" id="Transposer-toggle" onclick="return toggle('Transposer');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="echonest.support.midi.example_print_channel_0.Transposer-class.html">Transposer</a><tt class="py-op">(</tt><tt class="py-base-class">MidiOutStream</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
 76</div><div id="Transposer-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="Transposer-expanded"><a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line">    
 </tt>
 77<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line">    <tt class="py-docstring">"Transposes all notes by 1 octave"</tt> </tt>
 78<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line">    
 </tt>
 79<a name="Transposer.note_on"></a><div id="Transposer.note_on-def"><a name="L13"></a><tt class="py-lineno">13</tt> <a class="py-toggle" href="#" id="Transposer.note_on-toggle" onclick="return toggle('Transposer.note_on');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.example_print_channel_0.Transposer-class.html#note_on">note_on</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">channel</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-param">note</tt><tt class="py-op">=</tt><tt class="py-number">0x40</tt><tt class="py-op">,</tt> <tt class="py-param">velocity</tt><tt class="py-op">=</tt><tt class="py-number">0x40</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
 80</div><div id="Transposer.note_on-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="Transposer.note_on-expanded"><a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">channel</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
 81<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line">            <tt class="py-keyword">print</tt> <tt class="py-name">channel</tt><tt class="py-op">,</tt> <tt class="py-name">note</tt><tt class="py-op">,</tt> <tt class="py-name">velocity</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Method echonest.support.midi.MidiOutStream.MidiOutStream.rel_time()=echonest.support.midi.MidiOutStream.MidiOutStream-class.html#rel_time"><a title="echonest.support.midi.MidiOutStream.MidiOutStream.rel_time" class="py-name" href="#" onclick="return doclink('link-4', 'rel_time', 'link-4');">rel_time</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
 82</div></div><a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line">
 </tt>
 83<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line">
 </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_channel_0.event_handler=echonest.support.midi.example_print_channel_0-module.html#event_handler"><a title="echonest.support.midi.example_print_channel_0.event_handler" class="py-name" href="#" onclick="return doclink('link-5', 'event_handler', 'link-5');">event_handler</a></tt> <tt class="py-op">=</tt> <tt id="link-6" class="py-name" targets="Class echonest.support.midi.example_print_channel_0.Transposer=echonest.support.midi.example_print_channel_0.Transposer-class.html,Class echonest.support.midi.example_transpose_octave.Transposer=echonest.support.midi.example_transpose_octave.Transposer-class.html"><a title="echonest.support.midi.example_print_channel_0.Transposer
 85echonest.support.midi.example_transpose_octave.Transposer" class="py-name" href="#" onclick="return doclink('link-6', 'Transposer', 'link-6');">Transposer</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
 86<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line">
 </tt>
 87<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line"><tt id="link-7" class="py-name" targets="Variable echonest.support.midi.example_print_channel_0.in_file=echonest.support.midi.example_print_channel_0-module.html#in_file,Variable echonest.support.midi.example_transpose_octave.in_file=echonest.support.midi.example_transpose_octave-module.html#in_file"><a title="echonest.support.midi.example_print_channel_0.in_file
 88echonest.support.midi.example_transpose_octave.in_file" class="py-name" href="#" onclick="return doclink('link-7', 'in_file', 'link-7');">in_file</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'midiout/minimal_type0.mid'</tt> </tt>
 89<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line"><tt id="link-8" class="py-name" targets="Variable echonest.support.midi.example_print_channel_0.midi_in=echonest.support.midi.example_print_channel_0-module.html#midi_in,Variable echonest.support.midi.example_transpose_octave.midi_in=echonest.support.midi.example_transpose_octave-module.html#midi_in"><a title="echonest.support.midi.example_print_channel_0.midi_in
 90echonest.support.midi.example_transpose_octave.midi_in" class="py-name" href="#" onclick="return doclink('link-8', 'midi_in', 'link-8');">midi_in</a></tt> <tt class="py-op">=</tt> <tt id="link-9" class="py-name"><a title="echonest.support.midi.MidiInFile
 91echonest.support.midi.MidiInFile.MidiInFile" class="py-name" href="#" onclick="return doclink('link-9', 'MidiInFile', 'link-2');">MidiInFile</a></tt><tt class="py-op">(</tt><tt id="link-10" class="py-name"><a title="echonest.support.midi.example_print_channel_0.event_handler" class="py-name" href="#" onclick="return doclink('link-10', 'event_handler', 'link-5');">event_handler</a></tt><tt class="py-op">,</tt> <tt id="link-11" class="py-name"><a title="echonest.support.midi.example_print_channel_0.in_file
 92echonest.support.midi.example_transpose_octave.in_file" class="py-name" href="#" onclick="return doclink('link-11', 'in_file', 'link-7');">in_file</a></tt><tt class="py-op">)</tt> </tt>
 93<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line"><tt id="link-12" class="py-name"><a title="echonest.support.midi.example_print_channel_0.midi_in
 94echonest.support.midi.example_transpose_octave.midi_in" class="py-name" href="#" onclick="return doclink('link-12', 'midi_in', 'link-8');">midi_in</a></tt><tt class="py-op">.</tt><tt id="link-13" 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
 95echonest.support.midi.MidiInStream.MidiInStream.read" class="py-name" href="#" onclick="return doclink('link-13', 'read', 'link-13');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
 96<a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line"> </tt><script type="text/javascript">
 97<!--
 98expandto(location.href);
 99// -->
100</script>
101</pre>
102<br />
103<!-- ==================== NAVIGATION BAR ==================== -->
104<table class="navbar" border="0" width="100%" cellpadding="0"
105       bgcolor="#a0c0ff" cellspacing="0">
106  <tr valign="middle">
107
108  <!-- Tree link -->
109      <th>&nbsp;&nbsp;&nbsp;<a
110        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
111
112  <!-- Index link -->
113      <th>&nbsp;&nbsp;&nbsp;<a
114        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
115
116  <!-- Help link -->
117      <th>&nbsp;&nbsp;&nbsp;<a
118        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
119
120  <!-- Project homepage -->
121      <th class="navbar" align="right" width="100%">
122        <table border="0" cellpadding="0" cellspacing="0">
123          <tr><th class="navbar" align="center"
124            ><a class="navbar" target="_top" href="http://code.google.com/p/echo-nest-remix/">Project Homepage</a></th>
125          </tr></table></th>
126  </tr>
127</table>
128<table border="0" cellpadding="0" cellspacing="0" width="100%%">
129  <tr>
130    <td align="left" class="footer">
131    Generated by Epydoc 3.0.1 on Wed Sep  1 16:09:00 2010
132    </td>
133    <td align="right" class="footer">
134      <a target="mainFrame" href="http://epydoc.sourceforge.net"
135        >http://epydoc.sourceforge.net</a>
136    </td>
137  </tr>
138</table>
139
140<script type="text/javascript">
141  <!--
142  // Private objects are initially displayed (because if
143  // javascript is turned off then we want them to be
144  // visible); but by default, we want to hide them.  So hide
145  // them unless we have a cookie that says to show them.
146  checkCookie();
147  // -->
148</script>
149</body>
150</html>